# Box 5.3a: The Cubic Formula

## Solving a Cubic

 Four centuries before European mathematicians solved the problems of the cubic and quartic equations, Indian mathematician and astronomer, Bhaskara, had solved these problems. You can see a biography of Bhaskara by clicking here.

There are also pdf converters available online if you need to have any pdf document in another format.)

Note that this material is not at all likely to be on the exam. The formula is not even all that useful. It's given here merely to satisfy your curiosity. So you may skip this box if you like.

If you are given a cubic equation in the form of

```   x3 + px2 + qx + r  =  0                                       eq. 5.3a-1
```
and need to solve for x, then the first thing you do is substitute variables. Everywhere you see an x in the cubic, replace it with
```             p
x  =  u -                                                     eq. 5.3a-2
3
```
When you get done squaring and cubing this expression, then substituting stuff back in and gathering like terms, you will get
```   u3 + au + b  =  0                                             eq. 5.3a-3a
```
where
```              p2
a  =  q -                                                     eq. 5.3a-3b
3
```
and
```              pq    2p3
b  =  r -     +                                               eq. 5.3a-3c
3     27
```
Now compute A and B by

 ``` A = ``` ``` ``` ``` eq. 5.3a-4a ```

and

 ``` B = ``` ``` ``` ``` eq. 5.3a-4b ```

Then you have the following solutions for u

```   u  =  A + B                                                   eq. 5.3a-5a
____
u  =  -(1/2)(A + B)  +  √-3/4 (A - B)                         eq. 5.3a-5b
____
u  =  -(1/2)(A + B)  -  √-3/4 (A - B)                         eq. 5.3a-5c
```
Of course, you know how convert from the u solutions to the x solutions (hint: look at 5.3a-2).

You may be troubled by the expression, -3/4, which is not a real number, but is a complex number. Note that A and B will also nonreal complex numbers whenever

```   b2    a3
+     <  0                                                 eq. 5.3a-6
4    27
```
So the cubic formula does require that you understand the arithmetic of complex numbers.

And if you are not up on complex numbers, don't worry. We will be reviewing them in a later section.

### How to Derive the Cubic Formula

If you have been trying to come up with a solution to the cubic on your own, my heart goes out to you. Generations of mathematicians searched for a cubic solution before Niccolo Fontana Tartaglia and Girolamo Cardano hit on it in the 16th century (Cardano published the solution in Ars Magna in 1545). So there is no shame in your not finding it (of course if you did find it on your own, my hat is off to you).

Since you solve the quadratic by completing the square, a lot of people who attack the cubic do so by trying to "complete the cube." Well that attack doesn't work. The trick is to convert the cubic, by a circuitous route, to a quadratic and then apply the quadratic formula.

We already saw in the previous paragraphs that it is sufficient to find a solution only to cubics in the form of

```   u3 + au + b  =  0                                             eq. 5.3a-3a
```
This is because by suitable substitution of variables, any cubic can be brought into this form.

In order to find the solution to the cubic you would have had to have the insight of making the simplification of equation 5.3a-3a, and you would also have to have the insight to suppose that a solution to that equation, u, ought to be expressed as the difference of two new variables:

```   u  =  s - t                                                   eq. 5.3a-7
```
Now substitute that into equation 5.3a-3a:
```   (s - t)3 + a(s - t) + b  =  0                                 eq. 5.3a-8a
```
Now multiply out the cubed term using the binomial formula.
```   s3 - 3s2t + 3st2 - t3 + as - at + b  =  0                      eq. 5.3a-8b
```
In order for this equation to hold we must be able to cancel all the terms on the left of the equal. If you substitute  t3 - s3 = b,  you can see that you cancel all the cubed terms:
```   s3 - 3s2t + 3st2 - t3 + as - at + t3 - s3  =  0                eq. 5.3a-8c

-3s2t + 3st2 + as - at  =  0                                  eq. 5.3a-8d
```
Now just substitute  3st = a,  and you cancel the remaining terms:
```   -3s2t + 3st2 + (3st)s - (3st)t  =  0                          eq. 5.3a-8e
```
The only problem that remains is to find a suitable s and t from a and b. We already made the substitutions:
```   3st  =  a                                                      eq. 5.3a-9a

t3 - s3  =  b                                                  eq. 5.3a-9b
```
So we solve these two equations simultaneously for s and t.
```          a
s  =                                                           eq. 5.3a-10
3t
```
Substitute eq. 5.3a-10 into 5.3a-9b and you get
```          a3
t3 -        =  b                                               eq. 5.3a-11
(3t)3
```
Multiply through by  (3t)3 = 27t3,  and it becomes:
```   27t6 - a3  =  27t3b                                            eq. 5.3a-12
```
Don't let the 6th power here scare you. This isn't as bad as it looks. All the powers of t are multiples of 3. So if substitute  t3 = z,  you find yourself in familiar territory.
```   27z2 - a3  =  27bz                                             eq. 5.3a-13
```
From here you use the quadratic formula to solve for z. For each solution you come up with for z, you will know that  t = z1/3.  From t you can find  s = a/(3t),  and from s you can find  u = s - t,  which is a solution to
```   u3 + au + b  =  0
```
and from u you can find x (the solution to your original equation) using equation 5.3a-2.

If you thought that was interesting, click here to see how Cardano's assistant, Lodovico Ferrari, was able to solve the problem of the quartic (4th degree) polynomial.

Also see