I had read some years ago that when Ramanujan was shown the formula for finding the roots of a cubic equation via radicals, it motivated him to find the corresponding formula for the quartic, by himself. He apparently even tried to solve the quintic via radicals, because he did not know this was impossible. At the time that I read the above story, I actually didn’t even know the formula for the cubic. So I decided to derive it myself just for fun. Here I derive, step by step, the formula for the roots of a general cubic equation.

First, to gain intuition, let us derive the formula for quadratic equations. Consider a quadratic polynomial with complex coefficients, whose roots we wish to find:

or,

Let us “complete the square” via a change of variables: let so that

Eq. (2) becomes

The two roots in are the positive and negative square roots:

But so that

which is the famous quadratic formula.

Having seen the derivation of the quadratic case, let us have some fun repeating this exercise for cubics! The third degree polynomial equation

becomes

Let us “complete the cube”, in analogy to completing the square as we did above for the quadratic equation.

Let , so that

so that becomes and becomes

Let us rewrite the last equation as

This is as far as we are going to get by just “completing the cube.” Cubic equations with no quadratic monomial are known as depressed cubics. So we have taken a general cubic and turned it into a depressed cubic.

Next, we can use a different trick to transform this equation into a solvable quadratic equation, as follows. Let

so that

Hence, becomes

Now, let , so that the above becomes

We can solve this! We get

We now back substitute to find , then , then :

We are done! If we want, we can simplify this expression somewhat by multiplying by and by . Let us write

Let

Then

We thus arrive at our final general expression, which of course must be handled with care when there are multiple roots and so forth. Recalling the definitions

the 3 roots are given by

by inserting the 3 values of .

**Appendix **

As a double check, let us consider the cubic

We have

For the principal branch of the cube root we obtain :

We leave it as an exercise for the reader to show that the expression with radicals above adds up to give 4 as the total answer. (See answer below for how to obtain 4, but try very hard to do it all by yourself before you look at the answer. )

The other 2 roots are obtained by taking the 2 other cube roots. If we multiply by the value of on the principal branch of the cube root, we get the roots and .

See answer below the line for how to arrive at 4 in (16).

Here we will prove that

The evaluation of sums of cube roots that sum up to rationals can seem very difficult at first sight. If you are unfamiliar with such sums, try taking a look at some better known problems, such as this one here.

First, let

Next, notice that

Now observe that

so that

Now, this means that

Let

Using common denominators,

Putting everything back together, we finally get