3
$\begingroup$

I know $x^3-3 x+1=0$ has three roots that can be expressed in trigonometric form: $\{2\sin(10^\circ),\,-2\cos(20^\circ),\,2\cos(40^\circ)\}$.

How can I get this result with Mathematica?

$\endgroup$
2
$\begingroup$

You can apply an identity directly:

ComplexExpand@
  Solve[x^3 - 3 x + 1 == 0, x] /. (A_: 1) Cos[t_] + (B_: 1) Sin[t_] :>
   Sqrt[A^2 + B^2] Cos[t - ArcTan[A, B]]

(* {{x -> 2 Cos[(2 π)/9]}, {x -> 2 Sin[π/18]}, {x -> -2 Cos[π/9]}} *)
| improve this answer | |
$\endgroup$
3
$\begingroup$
(ComplexExpand@Solve[x^3 - 3 x + 1 == 0, x] /. Pi/9 -> t // TrigFactor) /. t -> Pi/9

(*{{x -> 2 Cos[(2 π)/9]}, {x -> 2 Sin[π/18]}, {x -> -2 Cos[π/9]}}*)
| improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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