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
But silly examples about power and asin (sin (x)) seems right.
I find that sage (but it's perhaps maxima) is not enough fine with
mathematics.
Theses sage rules are right only for positive real numbers, and in
mathematics we quickly get complex numbers.
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.
> On Sep 17, 5:14 am, Francois Maltey <fmal...@nerim.fr> wrote:
> > kcrisman wrote :> On Sep 16, 4:04 pm, Francois Maltey
> > <fmal...@nerim.fr> 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
<snip>
> It appears that either 1) the Pynac simplification has a bug or 2)
> there is a very good reason for this behavior. I would encourage you
This is a bug in pynac. I wrote the power method for exp during the
rush for the symbolics switch.
Here is a ticket for this issue:
http://trac.sagemath.org/sage_trac/ticket/6948
It will be fixed in the next Sage release.
Thanks a lot for reporting this.
Cheers,
Burcin