1 | initial version |
The problem is that for Sage (-1)^(1/3) is complex (and you have negative numbers in parentheses)
CC((-1)^(1/3))
0.500000000000000 + 0.866025403784439*I
If you need the real solution you can use (-abs(a))^(1/3)=-(abs(a))^(1/3), a-real
y=-abs(2/9*sqrt(3)*sqrt(1355) - 611/27)^(1/3) -61/9/abs(2/9*sqrt(3)*sqrt(1355) - 611/27)^(1/3) - 8/3
RR(y)
-8.03053921870339
If your equation is polynomial and you need the real roots you can also use roots()
reset()
(x^3+1).roots(multiplicities=false,ring=RR)
[-1.00000000000000]
2 | No.2 Revision |
The problem is that for Sage (-1)^(1/3) is complex (and you have negative numbers in parentheses)
CC((-1)^(1/3))
0.500000000000000 + 0.866025403784439*I
If you need the real solution you can use (-abs(a))^(1/3)=-(abs(a))^(1/3), a-real
y=-abs(2/9*sqrt(3)*sqrt(1355) - 611/27)^(1/3) -61/9/abs(2/9*sqrt(3)*sqrt(1355) - 611/27)^(1/3) - 8/3
RR(y)
-8.03053921870339
If your equation is polynomial and you need the real roots you can also use roots()
reset()
(x^3+1).roots(multiplicities=false,ring=RR)
[-1.00000000000000]
(x^3+8*x^2+x+10).roots(multiplicities=false,ring=RR)
[-8.03053921870339]