# Cardano’s formula

A quadratic equation is relatively easy to solve, and the Babylonians were aware of methods to solve them in 1600 BC. The cubic formula is significantly harder to solve and it took much longer to find the solution to the general form of the cubic equation: In the 16th century, Italian mathematicians Scipione del Ferro and Niccolo Tartaglia found methods to solve the general cubic equation. Gerolamo Cardano was the first one to publish this method, and the formula is still best known by his name.

Somewhat surprisingly, it is possible to derive Cardano’s formula by using a method that is a three-dimensional analogue of completing the square. I present the derivation here, which is based on Mieke Jansen’s master thesis. To fully understand this article, some understanding of roots of unity is necessary. However, the lion’s share will be understandable even for those without understanding of roots of unity.

Before considering the cubic formula, we’ll have a look at the method that is called ‘completing the square’.

## Completing the square

Suppose we have a quadratic equation of the form $x_{2}+ax=c$

Any quadratic equation can be written in this form. If we now add some expression, to both sides so that the left side is a perfect square, we can take the square root of both sides. Indeed, this is possible, since we have $(x+2a )_{2}=x_{2}+ax+(2a )_{2}$

So if we add $4a_{2} $ from both sides, the left side is now the square of a linear factor, and we obtain $(x+2a )_{2}=c+4a_{2} $

which is quite easy to work out. Assuming that $a$ and $c$ are positive for the moment, we can gain some geometric intuition for the procedure by using this figure:

The blue square has width and height $x$. The red rectangles are chosen so that their area adds up to $ax$, which means that they have one side with length $x$ and one side with length $2a $. The green square has area $(2a )_{2}$ and represents the quantity we added.

## Solving the cubic equation

It is not easy to attack the general cubic equation with the same strategy. To make the equation simpler, we use substitution to reduce it to the form $x_{3}+px=q$

This form is called the *depressed cubic*. I now show that the general cubic equation can be reduced to this form. This means that solving cubics of this form means that we are also able to solve cubics of the general form.

Start with an equation in the general form $x_{3}+ax_{2}+bx=c$

If we substitute $x=y−3a $, we obtain $y_{3}+(b−3a_{2} )y=c+a279b−2a_{2} $

For simplicity, put $p=b−3a_{2} $ and $q=c+a279b−2a_{2} $ to end up with $y_{3}+py=q$

So, if we have cubic equation in the form $x_{3}+ax_{2}+bx=c$, we can compute $p$ and $q$, and try to find the solution of $y_{3}+py=q$. If we have found $y$ we can use $x=y−3a $ to find $x$.

### Completing the cube

Consider a depressed cubic of the form $y_{3}+py=q$

Now, consider the following three-dimensional analogue of the figure in the last section:

Let $u$ be the length of the side of the large cube that is formed by the blue cube, the red boxes, and the green cube. Let $v=u−y$. Now, the green cube has side $v$ and the blue cube has side $y$. The three red rectangular boxes have sides with lengths $u$, $v$, and $y$, and the big cube that is formed by all the other shapes has side length $u$.

Analogously to the completion of the square, we demand that the volume of the blue cube and the red boxes to add up to $y_{3}+py$. Then, since all these boxes have the same volume as the volume of the big cube (with sides $u$) minus the volume of the small cube (with sides $v$), we have $u_{3}−v_{3}=y_{3}+py=q$. Since the blue cube has a volume of $y_{3}$, each of the three red boxes has volume $3py $. Since each red rectangular box has a volume of $uvy$, we find $uvy=3p y$. It follows that $u_{3}v_{3}=(3p )_{3}$.

Setting $r=−(3p )_{3},s:=u_{3},t:=−v_{3}$, we obtain the equations $s+t=q$ and $st=r$. In other words, we are looking for two numbers $s,t$ which have sum $q$ and product $r$. Note that this is equivalent to solving the quadratic equation $z_{2}−qz+r=0$, since $(z−s)(z−t)=z_{2}−qz+r$ exactly when the sum of $s$ and $t$ is $q$ and their product is $r$. The solutions are $2q +(2q )_{2}−r $ and $2q −(2q )_{2}−r $. Note that the expressions are symmetric in $s$ and $t$, so we can choose freely which expression we pick for $s$ and which one for $t$ (as long as we pick $s$ as one of them and $t$ as the other).

Using that $s=u_{3}$ and $t=−v_{3}$ , we find $u=32q ±(2q )_{2}+(3p )_{3} $

$v=−32q ∓(2q )_{2}+(3p )_{3} $

Note that $u+v$ stays the same, regardless of how we pick the signs in the expression for $u$ and $v$. Using $x=y−3a =−3a +u−v$, we find $x=−3a +32q +(2q )_{2}+(3p )_{3} +32q −(2q )_{2}+(3p )_{3} $

Where we have $p=b−3a_{2} $ and $q=c+a279b−2a_{2} $.

## Summary

Algebraically, we can summarize the steps we took as follows:

Take the equation $x_{3}+ax_{2}+bx=c$

Substitute $y=x+3a $

$p=b−3a_{2} $

$q=c+a279b−2a_{2} $

We now have the following polynomial equation in $y$: $y_{3}+py=q$

Introduce $u,v$ that satisfy $y=u−v$ and $uv=3p $. From this, we can derive $u_{3}−v_{3}=q$ $u_{3}v_{3}=(3p )_{3}$

Now substitute $s=u_{3}$

$t=v_{3}$

$r=(3p )_{3}$

So that we have $s−t=q$

$st=r$

These equations have the following solution, where $s$ and $t$ are interchangeable: $s,t=2q ±(2q )_{2}+(3p )_{3} $

If we substitute back and try to express $s$ and $t$ in $a,b$, and $c$, we find $x=y−3a $

where $y=32q +(2q )_{2}+(3p )_{3} +32q −(2q )_{2}+(3p )_{3} $

and $p=b−3a_{2} $

$q=c+a279b−2a_{2} $

You might have noticed that we find only one solution. It is actually possible to find the other two solutions with a slight change in the formula, which I’ll explain in the last section. If you like a good challenge, try to find out why we don’t find all solutions, and try to modify the formula to provide all complex solutions of the cubic formula (if you need a hint, take a look at the second paragraph).

## Simplifying the result

In retrospect, it would be easier to use variables that equal $3p $ and $2q $ instead. Using this, and some other simplifications, we find the solution $x=−A+3C+D +3C−D $

where $A=3a ,B:=3b −A_{2},C=2c+A(b−2A_{2}) $ and $D=C_{2}+B_{3}$

for the equation $x_{3}+ax_{2}+bx=c$

## What about the other solutions?

As we know from the fundamental theorem of algebra, a cubic equations has three (complex) solutions. Yet the formula we found only provides a formula for one of those roots. Indeed we missed some solutions. Specifically, when we took the cube root of $s$ and $t$, we only considered the single real solution. Instead, there are three solutions, which can be deduced from the fundamental theorem of algebra. Specifically, for a real number $w$, the formula $z_{3}=w$

has the solutions $3w ,ω3w $, and $ω_{2}3w $. We missed the last two solutions. However, if we consider all those solutions in $u$ and $v$, we obtain 8 new solutions, which is more than expected. Not all of these are indeed solutions of the cubic equation. While all our solutions satisfy $u_{3}v_{3}=(3p )_{3}$, the stronger condition $uv=3p $ is not always satisfied. This condition can be satisfied by making sure that we pick solutions $ω_{3}3s $ and $ω_{3}3t $ for $u$ and $v$ (so that $uv=3s 3t =3p $).

## Statement of the final result

**Theorem**: Consider the equation $x_{3}+ax_{2}+bx=c$. Let $A=3a ,B:=3b −A_{2},C=2c+A(b−2A_{2}) $, $D=C_{2}+B_{3}$, and $ω_{3} =1$ a cube root of unity. Substituting $k=0,1,2$ in
$x=−A+ω_{3}3C+D +ω_{3}3C−D $

gives all three solutions of the equation. Moreover, if $D≥0$, the solution for $k=0$ is real.

**Proof**: Substitute the expression in $x_{3}+ax_{2}+bx=c$, simplify, and observe that the result is 0. If $D≥0$ and $k=0$, the expression involves only real numbers, so the result will be real as well. $□$