Cardano's Formula
Contents |
Theorem
A polynomial equation of the form $a x^3 + b x^2 + c x + d = 0$ with $a \ne 0$ is called a cubic equation, or just cubic.
It has solutions:
- $\displaystyle x_1 = S + T - \frac {b} {3 a}$
- $\displaystyle x_2 = - \frac {S + T} 2 - \frac {b} {3 a} + \frac {i \sqrt 3} 2 \left({S - T}\right)$
- $\displaystyle x_3 = - \frac {S + T} 2 - \frac {b} {3 a} - \frac {i \sqrt 3} 2 \left({S - T}\right)$
where:
- $\displaystyle S = \sqrt [3] {R + \sqrt{Q^3 + R^2}}$
- $\displaystyle T = \sqrt [3] {R - \sqrt{Q^3 + R^2}}$
where:
- $\displaystyle Q = \frac {3 a c - b^2} {9 a^2}$
- $\displaystyle R = \frac {9 a b c - 27 a^2 d - 2 b^3} {54 a^3}$
Discriminant
The expression $D = Q^3 + R^2$ is called the discriminant of the equation.
Let $a, b, c, d \in \R$.
Then:
- if $D > 0$, then one root is real and two are complex conjugates;
- if $D = 0$, then all roots are real, and at least two are equal;
- if $D < 0$, then all roots are real and unequal.
Note that this is a special case of the general discriminant. Also note that this appears in various forms in the literature - this particular form is most convenient for the derivation as given on this page.
Alternative Form of Solutions
If the discriminant $D < 0$, then the solutions can be expressed as:
- $\displaystyle x_1 = 2 \sqrt {-Q} \cos \left({\frac \theta 3}\right) - \frac {b} {3 a}$
- $\displaystyle x_2 = 2 \sqrt {-Q} \cos \left({\frac \theta 3 + \frac {2 \pi} 3}\right) - \frac {b} {3 a}$
- $\displaystyle x_3 = 2 \sqrt {-Q} \cos \left({\frac \theta 3 + \frac {4 \pi} 3}\right) - \frac {b} {3 a}$
where $\displaystyle \cos \theta = \frac R {\sqrt{-Q^3}}$.
Proof
First the cubic is depressed, by using the Tschirnhaus Transformation $\displaystyle x \to x + \frac {b} {3 a}$:
\(\displaystyle \) | \(\displaystyle \) | \(\displaystyle \) | \(\displaystyle a x^3 + b x^2 + c x + d\) | \(=\) | \(\displaystyle 0\) | \(\displaystyle \) | \(\displaystyle \) | \(\displaystyle \) | |||
\(\displaystyle \) | \(\displaystyle \implies\) | \(\displaystyle \) | \(\displaystyle \left({x + \frac {b} {3 a} }\right)^3 - 3 \frac {b} {3 a} x^2 - 3 \frac {b^2} {9 a^2} x - \frac {b^3} {27 a^3} + \frac {b} {a} x^2 + \frac {c} {a} x + \frac {d} {a}\) | \(=\) | \(\displaystyle 0\) | \(\displaystyle \) | \(\displaystyle \) | \(\displaystyle \) | Completing the cube: $\left({a+b}\right)^3 = a^3 + 3 a^2 b + 3 a b^2 + b^3$ | ||
\(\displaystyle \) | \(\displaystyle \implies\) | \(\displaystyle \) | \(\displaystyle \left({x + \frac {b} {3 a} }\right)^3 + \left({\frac {3 a c - b^2} {3 a^2} }\right) x + \left({\frac {27 a^2 d - b^3} {27 a^3} }\right)\) | \(=\) | \(\displaystyle 0\) | \(\displaystyle \) | \(\displaystyle \) | \(\displaystyle \) | |||
\(\displaystyle \) | \(\displaystyle \implies\) | \(\displaystyle \) | \(\displaystyle \left({x + \frac {b} {3 a} }\right)^3 + \left({\frac {3 a c - b^2} {3 a^2} }\right) \left({x + \frac {b} {3 a} }\right) - \frac {b} {3 a} \left({\frac {3 a c - b^2} {3 a^2} }\right) + \left({\frac {27 a^2 d - b^3} {27 a^3} }\right)\) | \(=\) | \(\displaystyle 0\) | \(\displaystyle \) | \(\displaystyle \) | \(\displaystyle \) | |||
\(\displaystyle \) | \(\displaystyle \implies\) | \(\displaystyle \) | \(\displaystyle \left({x + \frac {b} {3 a} }\right)^3 + \left({\frac {3 a c - b^2} {3 a^2} }\right) \left({x + \frac {b} {3 a} }\right) + \left({\frac {27 a^2 d + 2 b^3 - 9 a b c} {27 a^3} }\right)\) | \(=\) | \(\displaystyle 0\) | \(\displaystyle \) | \(\displaystyle \) | \(\displaystyle \) |
Now let:
- $\displaystyle y = x + \frac {b} {3 a}, Q = \frac {3 a c - b^2} {9 a^2}, R = \frac {9 a b c - 27 a^2 d - 2 b^3} {54 a^3}$
Thus we have obtained the depressed cubic $y^3 + 3 Q y - 2 R = 0$.
Now let $y = u + v$ where $u v = -Q$.
Then:
\(\displaystyle \) | \(\displaystyle \) | \(\displaystyle \) | \(\displaystyle \left({u + v}\right) + 3 Q \left({u + v}\right) - 2 R\) | \(=\) | \(\displaystyle 0\) | \(\displaystyle \) | \(\displaystyle \) | \(\displaystyle \) | |||
\(\displaystyle \) | \(\displaystyle \implies\) | \(\displaystyle \) | \(\displaystyle u^3 + 3 u^2 v + 3 u v^2 + v^3 + 3 Q \left({u + v}\right) - 2 R\) | \(=\) | \(\displaystyle 0\) | \(\displaystyle \) | \(\displaystyle \) | \(\displaystyle \) | |||
\(\displaystyle \) | \(\displaystyle \implies\) | \(\displaystyle \) | \(\displaystyle u^3 - 3 Q \left({u + v}\right) + 3 Q \left({u + v}\right) + v^3 - 2 R\) | \(=\) | \(\displaystyle 0\) | \(\displaystyle \) | \(\displaystyle \) | \(\displaystyle \) | as $u v = -Q$ | ||
\(\displaystyle \) | \(\displaystyle \implies\) | \(\displaystyle \) | \(\displaystyle u^3 + v^3 - 2 R\) | \(=\) | \(\displaystyle 0\) | \(\displaystyle \) | \(\displaystyle \) | \(\displaystyle \) | |||
\(\displaystyle \) | \(\displaystyle \implies\) | \(\displaystyle \) | \(\displaystyle u^3 - \frac {Q^3} {u^3} - 2 R\) | \(=\) | \(\displaystyle 0\) | \(\displaystyle \) | \(\displaystyle \) | \(\displaystyle \) | substituting for $T$ from $u v = -Q$ | ||
\(\displaystyle \) | \(\displaystyle \implies\) | \(\displaystyle \) | \(\displaystyle \left({u^3}\right)^2 - 2 R u^3 - Q^3\) | \(=\) | \(\displaystyle 0\) | \(\displaystyle \) | \(\displaystyle \) | \(\displaystyle \) |
This is a quadratic in $u^3$:
- $\displaystyle u^3 = \frac {2 R \pm \sqrt {4 Q^3 + 4 R^2}} {2} = R \pm \sqrt {Q^3 + R^2}$
We have from above $u v = -Q$ and hence $\displaystyle v^3 = -\frac {Q^3} {u^3}$.
Let us try taking the positive root: $u^3 = R + \sqrt {Q^3 + R^2}$.
Then:
\(\displaystyle \) | \(\displaystyle \) | \(\displaystyle \) | \(\displaystyle v^3\) | \(=\) | \(\displaystyle \frac {-Q^3} {R + \sqrt{Q^3 + R^2} }\) | \(\displaystyle \) | \(\displaystyle \) | \(\displaystyle \) | |||
\(\displaystyle \) | \(\displaystyle \) | \(\displaystyle \) | \(\displaystyle \) | \(=\) | \(\displaystyle \frac {-Q^3 \left({R - \sqrt{Q^3 + R^2} }\right)} {R^2 - \left({Q^3 + R^2}\right)}\) | \(\displaystyle \) | \(\displaystyle \) | \(\displaystyle \) | |||
\(\displaystyle \) | \(\displaystyle \) | \(\displaystyle \) | \(\displaystyle \) | \(=\) | \(\displaystyle R - \sqrt{Q^3 + R^2}\) | \(\displaystyle \) | \(\displaystyle \) | \(\displaystyle \) |
The same sort of thing happens if you start with $u^3 = R - \sqrt{Q^3 + R^2}$: we get $v^3 = R + \sqrt{Q^3 + R^2}$.
Thus we see that taking both square roots gives us only one solution; WLOG:
- $u^3 = R + \sqrt{Q^3 + R^2}$
- $v^3 = R - \sqrt{Q^3 + R^2}$
Let $S = \sqrt [3] {R + \sqrt{Q^3 + R^2}}, T = \sqrt [3] {R - \sqrt{Q^3 + R^2}}$.
From Complex Roots of a Number, we have the three cube roots of $u^3$ and $v^3$:
- $\displaystyle u = \begin{cases} S & \\ \left ({-\dfrac 1 2 + \dfrac {i \sqrt 3} 2}\right) S & \\ \left ({-\dfrac 1 2 - \dfrac {i \sqrt 3} 2}\right) S & \\ \end{cases}$
- $\displaystyle v = \begin{cases} T & \\ \left ({-\dfrac 1 2 + \dfrac {i \sqrt 3} 2}\right) T & \\ \left ({-\dfrac 1 2 - \dfrac {i \sqrt 3} 2}\right) T & \\ \end{cases}$
Because of our constraint $u v = -Q$, there are only three combinations of these which are possible such that $y = u + v$:
- $\displaystyle y = \begin{cases} & S + T \\ \left ({-\dfrac 1 2 + \dfrac {i \sqrt 3} 2}\right) S + \left ({-\dfrac 1 2 - \dfrac {i \sqrt 3} 2}\right) T = & -\dfrac {S + T} 2 + \dfrac {i \sqrt 3} 2 \left({S - T}\right)\\ \left ({-\dfrac 1 2 - \dfrac {i \sqrt 3} 2}\right) S + \left ({-\dfrac 1 2 + \dfrac {i \sqrt 3} 2}\right) T = & -\dfrac {S + T} 2 - \dfrac {i \sqrt 3} 2 \left({S - T}\right)\\ \end{cases}$
As $\displaystyle y = x + \frac {b} {3a}$, it follows that the three roots are therefore:
- $\displaystyle x_1 = S + T - \frac {b} {3 a}$
- $\displaystyle x_2 = - \frac {S + T} 2 - \frac {b} {3 a} + \frac {i \sqrt 3} 2 \left({S - T}\right)$
- $\displaystyle x_3 = - \frac {S + T} 2 - \frac {b} {3 a} - \frac {i \sqrt 3} 2 \left({S - T}\right)$
$\blacksquare$
Different Signs of Discriminant
Let $a, b, c, d \in \R$. Then $Q, R \in \R$ .
We have from above that $D = Q^3 + R^2$.
Zero Discriminant
- First the easy case: $D = 0$.
Hence $S = T = \sqrt [3] R$, and so $S + T = 2 \sqrt [3] R, S - T = 0$.
From the above, this gives us:
- $\displaystyle x_1 = 2 \sqrt [3] R - \frac {b} {3 a}$
- $\displaystyle x_2 = - \sqrt [3] R - \frac {b} {3 a}$
- $\displaystyle x_3 = - \sqrt [3] R - \frac {b} {3 a}$
Thus the roots $x_2$ and $x_3$ are equal, and all three roots are real; they are all equal when $R = 0$.
$\blacksquare$
Positive Discriminant
Let $D = Q^3 + R^2 > 0$.
Then $S = R + \sqrt{Q^3 + R^2}$ and $T = R - \sqrt{Q^3 + R^2}$ are wholly real and distinct.
Therefore, so are $S + T$ and $S - T$.
Hence:
- $\displaystyle - \frac {S + T} 2 - \frac {b} {3 a} + \frac {i \sqrt 3} 2 \left({S - T}\right)$
and
- $\displaystyle - \frac {S + T} 2 - \frac {b} {3 a} - \frac {i \sqrt 3} 2 \left({S - T}\right)$
are complex conjugates.
$\blacksquare$
Negative Discriminant
Let $D = Q^3 + R^2 < 0$.
Then $\sqrt D = \pm i \left|{Q^3 + R^2}\right| = \pm i E$, say, where $E > 0$.
Thus $S^3 = R + i E, T^3 = R - i E$.
Let $\sqrt [3] {R + i E} = p + i q$, and so $\sqrt [3] {R - i E} = p - i q$.
Hence $S + T = 2 p, S - T = 2 i q$.
So:
\(\displaystyle \) | \(\displaystyle \) | \(\displaystyle \) | \(\displaystyle y_1\) | \(=\) | \(\displaystyle S + T\) | \(\displaystyle \) | \(\displaystyle \) | \(\displaystyle \) | |||
\(\displaystyle \) | \(\displaystyle \) | \(\displaystyle \) | \(\displaystyle \) | \(=\) | \(\displaystyle 2 p\) | \(\displaystyle \) | \(\displaystyle \) | \(\displaystyle \) | |||
\(\displaystyle \) | \(\displaystyle \) | \(\displaystyle \) | \(\displaystyle y_2\) | \(=\) | \(\displaystyle -\frac {S + T} 2 + \frac {i \sqrt 3} 2 \left({S - T}\right)\) | \(\displaystyle \) | \(\displaystyle \) | \(\displaystyle \) | |||
\(\displaystyle \) | \(\displaystyle \) | \(\displaystyle \) | \(\displaystyle \) | \(=\) | \(\displaystyle - p - \sqrt 3 q\) | \(\displaystyle \) | \(\displaystyle \) | \(\displaystyle \) | (after some algebra) | ||
\(\displaystyle \) | \(\displaystyle \) | \(\displaystyle \) | \(\displaystyle y_3\) | \(=\) | \(\displaystyle -\frac {S + T} 2 - \frac {i \sqrt 3} 2 \left({S - T}\right)\) | \(\displaystyle \) | \(\displaystyle \) | \(\displaystyle \) | |||
\(\displaystyle \) | \(\displaystyle \) | \(\displaystyle \) | \(\displaystyle \) | \(=\) | \(\displaystyle - p + \sqrt 3 q\) | \(\displaystyle \) | \(\displaystyle \) | \(\displaystyle \) | (after some algebra) |
Subtracting $\displaystyle \frac {b} {3 a}$ from the above, we obtain the three distinct real solutions:
- $\displaystyle x_1 = 2 p - \frac {b} {3 a}$
- $\displaystyle x_2 = -p - \sqrt 3 q - \frac {b} {3 a}$
- $\displaystyle x_3 = -p + \sqrt 3 q - \frac {b} {3 a}$
Proof of Alternative Form of Solutions for Negative Discriminant
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:
- $\displaystyle r = \sqrt {R^2 + \left({\sqrt{Q^3 + R^2}}\right)^2} = \sqrt {R^2 - \left({Q^3 + R^2}\right)} = \sqrt {-Q^3}$
- $\displaystyle \tan \theta = \frac {\left|{Q^3 + R^2}\right|} R$
Then $\displaystyle \cos \theta = \frac {R} {\sqrt {-Q^3}}$.
Similarly for $T^3$.
The result:
- $\displaystyle x_1 = 2 \sqrt {-Q} \cos \left({\frac \theta 3}\right) - \frac {b} {3 a}$
- $\displaystyle x_2 = 2 \sqrt {-Q} \cos \left({\frac \theta 3 + \frac {2 \pi} 3}\right) - \frac {b} {3 a}$
- $\displaystyle x_3 = 2 \sqrt {-Q} \cos \left({\frac \theta 3 + \frac {4 \pi} 3}\right) - \frac {b} {3 a}$
follows after some algebra.
$\blacksquare$
Historical Note
This method (in an incomplete form) was first published by Gerolamo Cardano in 1545. He learned the technique from Niccolò Fontana Tartaglia, who had sworn him to secrecy. However, as Cardano learned in 1543, the technique had in fact first been discovered by Scipione del Ferro, so he no longer felt bound by his oath to Tartaglia. The latter did not see the matter in the same light, and entered into a feud with Cardano that lasted a decade.
The method detailed here was not actually analyzed in depth until the work of Rafael Bombelli, who was the first one to solve the problem of what to do about the "imaginary numbers" that inevitably arose when using this formula.
The proof of the alternative form of solutions for negative discriminant was devised by François Viète and published in 1591.
Also known as
Cardan's Formula, from the English form of Cardano's name, Jerome Cardan.
Sources
- Murray R. Spiegel: Mathematical Handbook of Formulas and Tables (1968): $9.3, \ 9.4$
- Allan Clark: Elements of Abstract Algebra (1971)... (previous)... (next): Introduction