Why this recent change about (-1)^(1/3) ?



Sage sets the option variable domain to complex. This makes the
results in Sage different from results in Maxima:

(%i1) domain:complex$
(%i2) (-1)^(1/3);
(%o2) (-1)^(1/3)
(%i3) solve(3*x^3-9*x+10, x);
(%o3) [x=(3^(1/3)*((sqrt(3)*%i)/2-1/2))/(-1)^(1/3)+((-1)^(1/3)*(-(sqrt(3)*%i)/2-1/2))/3^(1/3),x=((-1)^(1/3)*((sqrt(3)*%i)/2-1/2))/3^(1/3)+(3^(1/3)*(-(sqrt(3)*%i)/2-1/2))/(-1)^(1/3),x=3^(1/3)/(-1)^(1/3)+(-1)^(1/3)/3^(1/3)]
(%i4) domain:real$
(%i5) (-1)^(1/3);
(%o5) -1
(%i6) solve(3*x^3-9*x+10, x);
(%o6) [x=-3^(1/3)*((sqrt(3)*%i)/2-1/2)-(-(sqrt(3)*%i)/2-1/2)/3^(1/3),x=-((sqrt(3)*%i)/2-1/2)/3^(1/3)-3^(1/3)*(-(sqrt(3)*%i)/2-1/2),x=-3^(1/3)-1/3^(1/3)]


HTH, Andrej



On Wed, Feb 16, 2011 at 3:23 PM, Francois Maltey <fmaltey at nerim.fr> wrote:
> Hello,
>
> I discover Maxima and compare it to Sage or Maple.
>
> I feel that Maxima changes about (-1)^(1/3).
>
> My old maxima is 5.13.0 from an Ubuntu box and is fine,
> but a more recent maxima in Sage is less nice.
> Is there a reason ?
>
> First the (-1)^(1/3)=-1 in the old maxima, and the solve after is right.
>
> (%i2) (-1)^(1/3) ;
> (%o2) ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? - 1
>
> (%i4) solve (3*x^3-9*x+10, x) ;
> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?sqrt(3) %i ? 1
> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?- ---------- - -
> ? ? ? ? ? ? 1/3 ?sqrt(3) %i ? 1 ? ? ? ? ?2 ? ? ? ?2
> (%o4) [x = - 3 ? ?(---------- - -) - ----------------,
> ? ? ? ? ? ? ? ? ? ? ?2 ? ? ? ?2 ? ? ? ? ? 1/3
> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?3
> ? ? ? ? ? ? ? ? ?sqrt(3) %i ? 1
> ? ? ? ? ? ? ? ? ?---------- - -
> ? ? ? ? ? ? ? ? ? ? ?2 ? ? ? ?2 ? ?1/3 ? ?sqrt(3) %i ? 1 ? ? ? ? ?1/3 ? ?1
> ? ? ? ? ? ?x = - -------------- - 3 ? ?(- ---------- - -), x = - 3 ? ?-
> ----]
> ? ? ? ? ? ? ? ? ? ? ? ?1/3 ? ? ? ? ? ? ? ? ? ?2 ? ? ? ?2 ? ? ? ? ? ? ? ? 1/3
> ? ? ? ? ? ? ? ? ? ? ? 3 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 3
>
> Now I call a more recent maxima built in Sage 4.6.1 at 2011-01-11
> This maxima seems to be a 5.22.1 but I'm not sure.
> I don't know how Sage works, I only find this library in Sage.
> The (-1)^(1/3) remains and the solve result is a little too long.
>
> sage: maxima ('(-1)^(1/3)')
> (-1)^(1/3)
> sage: maxima ('solve (3*x^3-9*x+10,x)')
> [ x=3^(1/3)*(sqrt(3)*%i/2-1/2)/(-1)^(1/3) +
> (-1)^(1/3)*(-sqrt(3)*%i/2-1/2)/3^(1/3),
> x=(-1)^(1/3)*(sqrt(3)*%i/2-1/2)/3^(1/3) +
> 3^(1/3)*(-sqrt(3)*%i/2-1/2)/(-1)^(1/3),
> x=3^(1/3)/(-1)^(1/3)+(-1)^(1/3)/3^(1/3)]
>
> Is there a reason ?
> F. from France.
>
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>