1
$\begingroup$

According to https://en.wikipedia.org/wiki/Cubic_equation#General_cubic_formula When a cubic equation with real coefficients has three real roots, the formulas expressing these roots in terms of radicals involve complex numbers. Galois theory allows proving that when the three roots are real, and none is rational (casus irreducibilis), one cannot express the roots in terms of real radicals. Nevertheless, purely real expressions of the solutions may be obtained using trigonometric functions, specifically in terms of cosines and arccosines, by Vieta's formulas.

Is it possible to ask Mathematica to use this real representation, instead of radicals?

$\endgroup$
1

1 Answer 1

2
$\begingroup$
$Version

(* "13.0.0 for Mac OS X x86 (64-bit) (December 3, 2021)" *)

Clear["Global`*"]

eqn = t^3 + p*t + q == 0;

solRad = Assuming[4 p^3 + 27 q^2 < 0,
  Solve[eqn, t] // ToRadicals // Simplify]

(* {{t -> (-2 3^(1/3) p + 2^(1/3) (-9 q + Sqrt[12 p^3 + 81 q^2])^(2/3))/(
   6^(2/3) (-9 q + Sqrt[12 p^3 + 81 q^2])^(1/3))}, 
   {t -> (2 2^(1/3) 3^(1/6) (3 I + Sqrt[3]) p + 
    I 2^(2/3) 3^(1/3) (I + Sqrt[3]) (-9 q + Sqrt[12 p^3 + 81 q^2])^(2/3))/(
   12 (-9 q + Sqrt[12 p^3 + 81 q^2])^(1/3))}, 
   {t -> (2 2^(1/3) 3^(1/6) (-3 I + Sqrt[3]) p + 
    2^(2/3) 3^(1/3) (-1 - I Sqrt[3]) (-9 q + Sqrt[12 p^3 + 81 q^2])^(2/3))/(
   12 (-9 q + Sqrt[12 p^3 + 81 q^2])^(1/3))}}

Verifying the solution,

Assuming[4 p^3 + 27 q^2 < 0, eqn /. solRad // Simplify]

(* {True, True, True} *)

To convert to trig expressions use ComplexExpand with the option TargetFunctions set to {Re, Im}

solTrig = Assuming[4 p^3 + 27 q^2 < 0,
  solRad // ComplexExpand[#, TargetFunctions -> {Re, Im}] & // Simplify]

(* {{t -> (2 Sqrt[-p] Cos[1/3 ArcTan[-9 q, Sqrt[-12 p^3 - 81 q^2]]])/Sqrt[
   3]}, 
   {t -> -(1/3)
      Sqrt[-p] (Sqrt[3] Cos[1/3 ArcTan[-9 q, Sqrt[-12 p^3 - 81 q^2]]] + 
      3 Sin[1/3 ArcTan[-9 q, Sqrt[-12 p^3 - 81 q^2]]])}, 
   {t -> -(1/3)
      Sqrt[-p] (Sqrt[3] Cos[1/3 ArcTan[-9 q, Sqrt[-12 p^3 - 81 q^2]]] - 
      3 Sin[1/3 ArcTan[-9 q, Sqrt[-12 p^3 - 81 q^2]]])}} *)

Plotting,

Plot3D[Evaluate[t /. solTrig],
 {p, q} ∈ ImplicitRegion[4 p^3 + 27 q^2 < 0, {p, q}],
 PlotLegends -> Automatic,
 PlotPoints -> 100,
 MaxRecursion -> 5]

enter image description here

$\endgroup$

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.