solve() is not giving the right solutions
Hey there,
i need your help on this one. The following sage code is giving me a headache:
- f(x) = x^3 + x^2 - 0.1
- solve(f==0, x)
- -->
- [x == -1/2(1/180Isqrt(13)sqrt(3) + 7/540)^(1/3)(Isqrt(3) + 1) - 1/18(-Isqrt(3) + 1)/(1/180Isqrt(13)sqrt(3) + 7/540)^(1/3) - 1/3, x == -1/2(1/180Isqrt(13)sqrt(3) + 7/540)^(1/3)(-Isqrt(3) + 1) - 1/18(Isqrt(3) + 1)/(1/180Isqrt(13)sqrt(3) + 7/540)^(1/3) - 1/3, x == (1/180Isqrt(13)sqrt(3) + 7/540)^(1/3) + 1/9/(1/180Isqrt(13)sqrt(3) + 7/540)^(1/3) - 1/3]
So i'm getting these 3 solutions, but they are not in R (real numbers), which they should be. Im figuring there is some problem with really long terms or something? Is there an easy solution for this? Is the solve()-method here working as intended?
Regards, Ben
See casus irreducibilis...
You can get "ostensibly real" solutions by expressing the quantities in trigonometric form. For example :