# When does Solve return root objects and when does it not for cubic equations?

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 • If you have a 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 real Root yields a real number, while radical expressions are prone to little parasitic imaginary parts. – John Doty Jun 19 at 19:24
• @JohnDoty Thanks for the reply though that wasn't what I was asking. When is a Root shown, and when is the explicit expression shown instead when it exists? – William Kennerly Jun 19 at 19:26
• (1) You can set 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". – Daniel Lichtblau Jun 19 at 19:27
• @DanielLichtblau Ah! Thank you Both of your tips were helpful in understanding more of this question. Do you think its safe to say that Mathematica will show Root[] whenever the cubic discriminant > 0 ? – William Kennerly Jun 19 at 19:35
• Should have also added, and the rational root test fails? – William Kennerly Jun 19 at 19:52

To obtain the real roots of a cubic with three of them in terms of radicals, you wind up needing complex numbers. See this. But you can keep everything real by using Root.
If you absolutely must have bronze-age radicals rather than space-age Roots, you may give the Cubics -> True option to Solve.