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