Cubic polynomials always have explicit solutions and Mathematica certainly knows about them. But Mathematica will by default show the explicit solution only sometimes. I'm guessing there is something about the 'complexity' of the expression that Mathematica uses to choose to hide it as a root object — but does anybody know exactly when it might choose to, or not?
For example, here's a cubic with three real distinct roots that are returned as a root object:
Solve[x^3 - x^2 - 3 x + 1 == 0, x]
You can force Mathematica to show the explicit expressions with the following command though the result contains complex numbers. (Even though they should simplify to real numbers, Simplify
wouldn't do it)
Solve[x^3 - x^2 - 3 x + 1 == 0, x] // ToRadicals
Root
, it's usually the better solution. It's just a rigorous representation of an algebraic number. One advantage is that numerical evaluation of a realRoot
yields a real number, while radical expressions are prone to little parasitic imaginary parts. $\endgroup$Cubics->True
, (2) The remark "...hough the result contains complex numbers. (Even though they should simplify to real numbers, Simplify wouldn't do it)" is simply incorrect, at least if the expectation is that the result will remain in terms of radicals. Look up "casus irreducibilis". $\endgroup$