Cardano's Formula: Solving the General Cubic Equation
The quadratic formula has been known to humans for thousands of years. It is fairly straightforward to derive, and can be done as follows.
A small refresher: the quadratic formula
ax2+bx+c=0
ax2+bx=−c
x2+abx=−ac
x2+abx+(2ab)2=−ac+(2ab)2
(x+2ab)2=−4a24ac+4a2b2=4a2b2−4ac
x+2ab=±2ab2−4ac
x=−2ab±2ab2−4ac=2a−b±b2−4ac.
So we completed the square to find the square of x+2ab, and then took the square root and subtracted the 2ab term. A slightly interesting thing happens if we consider a similar polynomial ay2+by+c, where y=x−2ab. Then we should get x−2ab+2ab=x in that step, right? Let us see:
So as we see, making this substitution simplifies our quadratic equation into an equation of the form a′x2+c′ by eliminating the linear term. However, our reasoning behind this has yet to become clear.
The Cubic Formula
In the middle of the 16th century, Italian mathematician Niccolò Tartaglia discovered a method of solving the cubic equation, and told it to Cardano in exchange for a promise not to publish it. However, in 1543, Cardano found that the formula was discovered independently by Scipione del Ferro, and in 1545 published it anyway, believing that he was no longe obligated to keep the promise. The formula now bears Cardano's name.
Step 1: Eliminating the quadratic term
We consider the cubic ax3+bx2+cx+d=0 and apply a substitution similar to the one in the previous section: y=x+3ab, so x=y−3ab
Now for simplicity's sake, since we aren't dealing with actual given numbers but with general real numbers, we can call ac−3a22b2 and −(ad−3a2bc+27a32b3) by other variables, such as p and q, leaving us with the cubic y3+py=q.
Step 2: Solving the new cubic
Now, we will solve the cubic as follows: we will find s and t such that 3st=p and that s3−t3=q. How does this help? Well, as it turns out, s−t is a solution of the new cubic:
y3+py=q⟹(s−t)3+(3st)(s−t)=s3−t3,
which is always true. So how do we find s and t? Well, we can solve for s in terms of t: 3st=p⟹s=3tp. Now we can substitute that into s3−t3=q to give (3tp)3−t3=q.
Multiplying by t3 and shifting everything to the LHS gives
t6+qt3−27p3=0.
This is a quadratic equation in t3, and can be solved by the above quadratic formula.
t3=2−q±q2−274p3=−2q±4q2−27p3.
A bit of algebra shows that no matter which of the two solutions we take, s−t will still be the same, so WLOG we can take t3 to be the one with the positive root. Thus t3=−2q+4q2−27p3 and s3=t3+q=2q+4q2−27p3 and
The corresponding root to the original cubic can be found by undoing the transformation that eliminated the x2 term, i.e. by subtracting 3ab from this root, and synthetic division finds the last two roots.
Is it possible to solve the cubic using Vieta's formulas?
Say we have a cubic P(x)=ax3+bx2+cx+d (with a=0), and we want to find its roots r,s,t. By Vieta's formulas for cubics, we know
r+s+trs+st+trrst=a−b=ac=a−d.
For ease of notation, let's call B=a−b, C=ac, and D=a−d.