kcrisman wrote : > On Sep 16, 4:04 pm, Francois Maltey <[email protected]> wrote: > >> I play with sage, exp, sin, cos, sinh, and co... >> >> var("a,b,c") >> exp(a)^2 # returns exp(2a) is right >> exp(a)^(1/2) # returns exp (a/2) is wrong, with a=2*i*pi we get -1=1 >> exp(a)^b # returns exp(a*b) is wrong >> > > Well, there is a unique exp, but not a unique square root (or in > general other power, since they may be defined using log). But is XXX^(1/2) are unique and not multivariate : sage remains (a^2)^(1/2) and (a^b)^c. Neither automatic convert (a^2)^(1/2) to a nor (a^b)^c to a^(b*c)
I used both Axiom with only multivariate functions asin sin a = a and (a^2)^(1/2)=a and Maple/mupad with no multivariate functions (but bugs). Mathematics for undergraduate are finest by this way. > Are you suggesting that exp(a)^(1/2) always return exp(a)^(1/2) It's what I prefer > , or that it return something about branches? In my mind log z = ln |z| + i arctan2 (Re(z),Im(z)) where arctan2 (x,y) in ]-pi,pi]. This logarithm is MONO-variate, but we can't write ln (u v) = ln u + ln v in complex domain. > sage: (-1)^(1/3) > (-1)^(1/3) > It's right, arctan(-1,0)=pi, e^(i*pi/3) = 0.5 + 0.866... I > But in general Sage does things over complex numbers fairly > consistently. We constantly get complaints about > sage: (-1.)^(1/3) > 0.500000000000000 + 0.866025403784439*I > All right, so (exp (a))^b is a singular exception... And I prefer a system without such exception. F. --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---
