a repository of mathematical know-how

How to solve cubic and quartic equations

Quick description

This article explains methods for solving cubic and quartic equations, and shows why they are natural.


How to solve quadratic equations

Note iconIncomplete This article is incomplete. No discussion of quartics yet.

Example 1

If you are lucky, then you can solve your cubic equation by a mixture of trial and error and methods for solving quadratics. For example, consider the cubic equation x^3-x^2-3x+2=0. If we substitute x=1, we get 1-1-3+2=-1, so there must be a root greater than 1. If we try x=2, we get 8-4-6+2=0. Bingo! So now we know, by the factor theorem, that it must be possible to write our cubic in the form (x-2)(ax^2+bx+c). Multiplying out these brackets gives us ax^3+(b-2a)x^2+(c-2b)x-2c. Equating coefficients with those of x^3-x^2-3x+2, we can solve for a, b and c in turn, getting a=1, b=1, c=-1. Therefore, our original equation can be rewritten as (x-2)(x^2+x-1)=0. We can then solve the quadratic equation x^2+x-1 and obtain the three solutions x=2, x=(-1\pm\sqrt{5})/2.

General discussion

Now let us turn to the question of how to solve a cubic when we are unable to do so by trial and error as above. The first step in a natural discovery of such a solution is the observation, which one can hardly help making, that solutions to quadratics take the form u\pm\sqrt{v}. If we now turn things round and just assume that solutions will take this form then we can get a very quick derivation of the quadratic formula, which, for simplicity, I will do just for quadratics of the form x^2+bx+c. (Of course, it is very easy to reduce the general case to this case, so this is not a serious loss of generality.)

The derivation comes from the well-known fact that the roots of such a quadratic must add up to -b and must multiply to give c. The first fact tells us that  u=-b/2 and the second tells us that  (u+\sqrt{v})(u-\sqrt{v})=c, which in turn tells us that  u^2-v=c, so that  v=u^2-c. By our earlier computation, this is  b^2/4-c. This gives the usual quadratic formula in the case  a=1.

Was that a fully justified argument? Yes, because once you are looking for roots of the form  u\pm\sqrt{v} there is no mystery behind the idea of looking at what you know about the two roots, converting that into some equations for  u and  v and trying to solve those equations. You can't tell in advance that the equations will have a nice solution, but it's very natural to give the approach a try.

Now let us ask ourselves the following question: what would be the most blindingly obvious way of generalizing the above approach to cubics? There are two ideas we might have in connection with this. The first is to try to get the cubic into as simple a form as possible, and the second is to make a guess about the general form of the roots. Let us take each of these in turn, beginning with the second.

What is the most natural way of generalizing our choice above for the form of the roots? To ask this question another way: we are trying to find XXX, where XXX is to the number 3 as  u+\sqrt{v} and  u-\sqrt{v} are to the number 2. There is a very obvious guess: we should take  u+r,  u+s and  u+t, where  r,  s and  t are the three cube roots of some number  v. If we write  \omega for the cube root of 1 (or, to be more specific, the number  e^{2\pi i/3}) then we can write this guess as  u+v^{1/3},  u+\omega v^{1/3} and  u+\omega^2v^{1/3} (where  v^{1/3} is some cube root of vit doesn't matter which).

By analogy with the quadratic case, we are hoping that this will be the general form of a solution to the equation  x^3+bx^2+cx+d=0. But a moment's thought shows that it cannot be. Let us see this in two different ways.

The first is that if that is the general form of the roots, then we have two degrees of freedom—the choice of  u and the choice of  v. But we are looking at a three-dimensional set of equations (since we are free to choose  b,  c and  d). It is a good exercise to prove rigorously that our guess is guaranteed to be wrong for this reason, but for now let us be satisfied with the observation that it looks very worrying. Indeed, if life were that simple then it is hardly likely that solving the cubic would have been as hard a problem as it was.

A second way to see that the guess is wrong is to consider what happens if  b=0. Now we are looking at a cubic of the form  x^3+cx+d, and if the roots take the form stated then, since their sum is now zero, we find that  u=0. But then the three roots are just the cube roots of  v, so they are the roots of the equation  x^3-v=0. In other words, the guess is wrong unless  c=0. (This is of course an instance of the fact that we do not have enough degrees of freedom.)

So, with this small extra insight into the problem, let us try to come up with a better guess. How do we generalize a pair such as  u+\sqrt{v} and  u-\sqrt v? We want a triple of roots, but we also want each component of the triple to have three degrees of freedom. In other words, we want each root to be made out of a  u, a  v and a  w.

Since we don't quite know how we will build the roots, a helpful idea at this point is to lose some information in the quadratic case. This is a slightly subtle point that I will discuss more in a moment. First let us merely observe that we could have represented the two roots of a quadratic as  u+v and  u-v, and it would still have been very easy to solve for  u and  v. Then the fact that a square root was involved would not have been a guess (however natural) but something that one actually derived, in a very easy and natural way.

Since this slight modification of the quadratic guess will turn out to be very helpful, it is important to establish that it could be justified. That is, I am not drawing a rabbit out of a hat here. The justification is as follows. In the cubic case we do not know exactly what the form of our guess would take. We could just make some wild guesses and hope to hit the right answer. But much better is to make more general guesses and then work out what their more precise forms must be. This is an example of the trick If you don't know how to make a decision, then don't make it. We can apply that trick in the quadratic case, so it is a very sensible strategy to try to do the same for cubics.

Having established this point, let us see what happens. We are now trying to find the natural analogue for the number 3, built out of three variables  u,  v and  w, of the pair  (u+v,u-v) in the degree-2 case. The pair  (u+v,u-v) consists of a couple of linear combinations of  u and  v, so it is natural (though not essential to the discovery of the argument) to think of it as a linear transformation of the pair  (u,v). That draws our attention to the matrix  \begin{pmatrix} 1&1\\ 1&-1\\ \end{pmatrix}, and it is then very natural to wonder if this matrix has an obvious generalization to a  3\times 3 matrix.

It does! This is the  2\times 2 case of the well-known circulant matrix, but even if you don't know that, you do know that the numbers 1 and -1 are the two square roots of 1. Moreover, this is not just a coincidence but the reason that they occur in our discussion of quadratics. So it is natural to try to build a  3\times 3 matrix out of the three cube roots of 1, which are  1,  \omega and  \omega^2. In the end there is only one sensible choice to make (give or take the odd symmetry). It is the matrix  \begin{pmatrix} 1&1&1\\ 1&\omega&\omega^2\\ 1&\omega^2&\omega\\ \end{pmatrix}. Thus, our guess for the forms of the three roots is  u+v+w,  u+\omega v+\omega^2 w and  u+\omega^2 v+\omega w.

This seems a very satisfactory guess (even if we don't have a compelling reason to suppose that it will work). So now we are left with the task of solving for  u,  v and  w on the assumption that they are the roots of the cubic  x^3+bx^2+cx+d. At this point one could just plunge in, but it helps a lot to simplify the cubic first by "completing the cube". This is the familiar idea that by substituting  y=x+b/3 for  x you get a cubic in  y where the coefficient of  y^2 is zero. So let's just assume, as we may, that  b=0, so that we are looking for roots of  x^3+cx+d. Since the roots add up to 0 and  1+\omega+\omega^2=0, this tells us that  u=0, so the three roots are now of the form  v+w,  \omega v+\omega^2w and  \omega^2v+\omega w. (We are therefore down to two degrees of freedom, but so is the cubic we are trying to solve.)

The information we know about these three roots is that their product is  -d and that the sum of all the products of two of them is  c. So the next task is clear: expand out these expressions and see if we can solve the resulting equations in  u and  v. The details of this are not particularly important: you could stop reading now and just take on trust that we end up needing to solve quadratics and take cube roots, both of which we are allowed to assume that we can do. However, it's nice to see that it really does work.

The product of the three numbers  v+w,  \omega v+\omega^2 w and  \omega^2v+\omega w works out to be  v^3+w^3. (It's instructive to do this calculation for yourself and see how the fact that  1+\omega+\omega^2=0 makes the other two possible terms cancel. Then one can see that the fact that rather simple expressions come out of these calculations is not a coincidence.) As for the sum of the three products of two of them, it comes out to be  (\omega+\omega^2)vw, which equals  -vw. So we need  -vw and  v^3+w^3 to take the values  c and  d, respectively. This tells us that  v^3 and  w^3 are the two roots of the equation  x^2-dx-c^3=0, so, as claimed, we can solve for  v and  w by solving a quadratic and taking cube roots.

A small extra point is that one must think a bit about which cube roots to take, but that I will gloss over here.

An obvious question: what happens if one tries to generalize this approach to quartics and quintics? The answer is that in both cases it is obvious how to generalize the guess about the form that the roots should take. In the case of the quartic, when one guesses that they are of the form  u+v+w+t,  u+iv-w-it,  u-v+w-t and  u-iv-w+it, everything works out nicely, if you get rid of the  x^3 term and hence of  u. You get some equations in  v,  w and  t and they aren't too hard to solve. If you try it for the quintic then, not too surprisingly, you end up with some equations that are more complicated than the quintic you started with.


Hi, there is a tiny mistake.

Hi, there is a tiny mistake.

"Therefore, our original equation can be rewritten as (x-2)(***). We can then solve the quadratic equation and obtain the three solutions , ."

Instead of (x-1)(***). Hence, one of the solution should be x=2 instead of x=1.

Thanks – corrected now.

Thanks – corrected now.

This article is a bit too

This article is a bit too insistent about how obvious its observations are. This can be a helpful device for keeping the reader's attention moving, but here it's distracting.

Well, it's a Wiki.

It's a Wiki. Usual advice is to rewrite the style yourself. :-)

My personal favorite way of

My personal favorite way of understanding cubics is the following. In analogy to quadratic equations, try a solution of the form u + v, figuring once we get a single root we can get the other two in short order. Then get rid of the bx^2 term like you did, obtaining x^3 + cx + d = 0. The idea now is to cancel the cx term too. Namely, x^3 = u^3 + 3uv(u + v) + v^3, and cx = c(u + v), so to cancel the cx
term and the 3uv(u + v) term at the same time one stipulates that 3uv = -c.

As a result, one has two equations now: u^3 + v^3 + d = 0, and 3uv = -c. Plugging
v = -c/3u into the first equation gives a quadratic equation in u^3, which has
six solutions u. To each of these three is a single v = -c/3u that works and then one obtains six solutions u + v. But of course u and v are symmetric here so we really just have 3 solutions.

what is uv?

what is uv?

Post new comment

(Note: commenting is not possible on this snapshot.)

Before posting from this form, please consider whether it would be more appropriate to make an inline comment using the Turn commenting on link near the bottom of the window. (Simply click the link, move the cursor over the article, and click on the piece of text on which you want to comment.)