On Aug 22, 2:23 pm, Oscar Gerardo Lazo Arjona
<[email protected]> wrote:

> sage: a=8594.0*x^3 - 30768.0 *x^2 + 36399.0 *x -14224.0
> sage: b=solve(a==0,x)
> sage: for i in b:
> ....:     c=i.rhs()
> ....:     print c.n()
> ....:
> 1.19783952189420 - 4.16333634234434e-17*I
> 0.998467807920659 + 1.38777878078145e-17*I
> 1.38386488335712 + 2.08166817117217e-17*I

IIRC Sage solve punts to Maxima solve, which tries to find
an exact solution. In Maxima I get

[x = (-sqrt(3)*%i/2-1/2)*(sqrt(5159598107)*%i/
(18464209*2^(3/2))-6552490/79340706073)^(1/3)
   +457267*(sqrt(3)*%i/2-1/2)/(36928418*(sqrt(5159598107)*%i/
(18464209*2^(3/2))-6552490/79340706073)^(1/3))+5128/4297,
 x = (sqrt(3)*%i/2-1/2)*(sqrt(5159598107)*%i/
(18464209*2^(3/2))-6552490/79340706073)^(1/3)
   +457267*(-sqrt(3)*%i/2-1/2)/(36928418*(sqrt(5159598107)*%i/
(18464209*2^(3/2))-6552490/79340706073)^(1/3))+5128/4297,
 x = (sqrt(5159598107)*%i/
(18464209*2^(3/2))-6552490/79340706073)^(1/3)
   +457267/(36928418*(sqrt(5159598107)*%i/
(18464209*2^(3/2))-6552490/79340706073)^(1/3))+5128/4297]

Now it's easy to see that these must all be real,
so essentially there must be an identity here (to make the imaginary
units go away) which is not being exploited by Maxima.

If you are specifically looking for numerical values,
probably there is a way to invoke a different algorithm in Sage.

FWIW

Robert Dodier

-- 
To post to this group, send an email to [email protected]
To unsubscribe from this group, send an email to 
[email protected]
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to