# The exact real solutions of a cubic polynomial?

Such an equation: $x^3-5 x+1=0$, according to the cubic discriminant we know it has three real solutions. We can also find the exact expressions of them from Mathematical handbook. However, by MMA

Solve[x^3 - 5 x + 1 == 0, x, Reals]


with the output:

{{x -> Root[1 - 5 #1 + #1^3 &, 1]},
{x -> Root[1 - 5 #1 + #1^3 &, 2]},
{x -> Root[1 - 5 #1 + #1^3 &, 3]}}


How can I obtain the exact real expression of the cubic polynomial by MMA?

• Look up ToRadicals[], or add the setting Cubics -> True to Solve[]. Commented Mar 14, 2016 at 2:55

roots = Solve[x^3 - 5 x + 1 == 0, x, Reals] // ToRadicals //
ComplexExpand // FullSimplify


roots // N

(*  {{x -> -2.33006}, {x -> 0.20164}, {x -> 2.12842}}  *)

x^3 - 5 x + 1 == 0 /. roots // Simplify

(*  {True, True, True}  *)

Plot[x^3 - 5 x + 1, {x, -2.5, 2.5},
Epilog -> {Red, AbsolutePointSize[5],
Point[{x, 0} /. roots]}]


Simplify@Solve[x^3 - 5 x + 1 == 0, x]


Your equation does not have three real solutions:

$\left\{\left\{x\to \frac{\sqrt[3]{\frac{1}{2} i \left(\sqrt{1419}+9 i\right)}}{3^{2/3}}+\frac{5}{\sqrt[3]{\frac{3}{2} i \left(\sqrt{1419}+9 i\right)}}\right\},\left\{x\to \frac{-5+5 i \sqrt{3}}{2^{2/3} \sqrt[3]{3 i \left(\sqrt{1419}+9 i\right)}}-\frac{\left(1+i \sqrt{3}\right) \sqrt[3]{\frac{1}{2} i \left(\sqrt{1419}+9 i\right)}}{2\ 3^{2/3}}\right\},\left\{x\to \frac{i \left(\sqrt{3}+i\right) \sqrt[3]{\frac{1}{2} i \left(\sqrt{1419}+9 i\right)}}{2\ 3^{2/3}}+\frac{-5-5 i \sqrt{3}}{2^{2/3} \sqrt[3]{3 i \left(\sqrt{1419}+9 i\right)}}\right\}\right\}$

• Since this is casus irreducibilis, the radical expressions necessarily involve complex numbers even tho the solutions are real. Commented Mar 14, 2016 at 3:01