4
$\begingroup$

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?

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

2 Answers 2

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

enter image description here

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]}]

enter image description here

$\endgroup$
2
$\begingroup$
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\}$

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.