Cardano's Formula/Trigonometric Form

Theorem
Let $P$ be the cubic equation:
 * $a x^3 + b x^2 + c x + d = 0$ with $a \ne 0$

Let:
 * $Q = \dfrac {3 a c - b^2} {9 a^2}$
 * $R = \dfrac {9 a b c - 27 a^2 d - 2 b^3} {54 a^3}$

Let $a, b, c, d \in \R$.

Let the discriminant $D < 0$, where $D := Q^3 + R^2$.

Then the solutions of $P$ can be expressed as:


 * $x_1 = 2 \sqrt {-Q} \cos \left({\dfrac \theta 3}\right) - \dfrac b {3 a}$
 * $x_2 = 2 \sqrt {-Q} \cos \left({\dfrac \theta 3 + \dfrac {2 \pi} 3}\right) - \dfrac b {3 a}$
 * $x_3 = 2 \sqrt {-Q} \cos \left({\dfrac \theta 3 + \dfrac {4 \pi} 3}\right) - \dfrac b {3 a}$

where:
 * $\cos \theta = \dfrac R {\sqrt{-Q^3}}$

Proof
From Cardano's Formula, the roots of $P$ are:


 * $(1): \quad x_1 = S + T - \dfrac b {3 a}$
 * $(2): \quad x_2 = - \dfrac {S + T} 2 - \dfrac b {3 a} + \dfrac {i \sqrt 3} 2 \left({S - T}\right)$
 * $(3): \quad x_3 = - \dfrac {S + T} 2 - \dfrac b {3 a} - \dfrac {i \sqrt 3} 2 \left({S - T}\right)$

where:
 * $S = \sqrt [3] {R + \sqrt{Q^3 + R^2}}$
 * $T = \sqrt [3] {R - \sqrt{Q^3 + R^2}}$

Let $D = Q^3 + R^2 < 0$.

Then $S^3 = R + i \sqrt{\left|{Q^3 + R^2}\right|}$.

We can express this in polar form:
 * $S^3 = r \left({\cos \theta + i \sin \theta}\right)$

where:
 * $r = \sqrt {R^2 + \left({\sqrt{Q^3 + R^2}}\right)^2} = \sqrt {R^2 - \left({Q^3 + R^2}\right)} = \sqrt {-Q^3}$
 * $\tan \theta = \dfrac {\sqrt{\left|{Q^3 + R^2}\right|}} R$

Then $\cos \theta = \dfrac R {\sqrt {-Q^3}}$.

Similarly for $T^3$.

The result:
 * $(1): \quad x_1 = 2 \sqrt {-Q} \cos \left({\dfrac \theta 3}\right) - \dfrac b {3 a}$
 * $(2): \quad x_2 = 2 \sqrt {-Q} \cos \left({\dfrac \theta 3 + \dfrac {2 \pi} 3}\right) - \dfrac b {3 a}$
 * $(3): \quad x_3 = 2 \sqrt {-Q} \cos \left({\dfrac \theta 3 + \dfrac {4 \pi} 3}\right) - \dfrac b {3 a}$

follows after some algebra.

Historical Note
This technique was devised by and published in 1591.