## 305 -2. Solving cubic and quartic polynomials.

1. We all know how to solve a linear equation such as $ax+b=0$, namely $x=-b/a$ (assuming $a\ne0$; if $a=0$ then either $b=0$ and any $x$ is a solution, or else there are no solutions). This was known to Babylonian and Persian mathematicians (with the usual caveats about the signs of $a,b$, since the notion of negative numbers had not been introduced yet.)

This is trivial, but there is a subtle point here:

• Some equations have no solutions.

If we are interested in solving polynomial equations in general, at some point we will need an argument justifying that we can. For now, let us proceed formally, assuming that we will always find solutions.

Just as with linear equations, we all know as well how to solve quadratics, such as $ax^2+bx+c=0$. Namely, we can factor $a$ out (if  $a=0$ we are in the linear case, so let’s assume that this is not the case) and then complete the square. We get $ax^2+bx+c=$

$\displaystyle a\left(x^2+\frac ba x+\frac ca\right)= a\left[\left(x+\frac b{2a}\right)^2+\left(\frac ca -\frac {b^2}{4a^2}\right)\right],$

so $ax^2+bx+c=0$ iff $(x+b/2a)^2=(b^2/4a^2)-(c/a)$, or

$\displaystyle x=\frac{-b\pm\sqrt{b^2-4ac}}{2a},$

Another small subtlety appears here, namely, there is some inherent ambiguity in the meaning of the expression $\sqrt r$. We usually resolve this by “choosing a sign” of the square root. As long as we are looking at quadratic polynomials with integer (or rational, or real, or even complex) coefficients, there is a standard way of making this choice. In more general situations (in arbitrary fields) there is no such standard procedure.

Besides this subtlety, a more serious one needs to be faced. Nowadays, we are used to working with complex numbers, so the view of a square root of a negative number does not cause confusion, but this was a serious issue for many centuries, and when complex numbers were first used, many were skeptical of whether they actually made sense. It wasn’t until Gauss’ presentation of complex numbers as pairs of reals that their use became mainstream. This is related to the question of whether one can always solve an equation. The answer was “no” until complex numbers were introduced and accepted, and then it became “yes.”

2. Cubic equations. The history of the solutions to cubic and quartic equations is full of melodrama, the historical note at the end of Chapter 2 of the book is well worth reading, see also this.

Here is a brief description of the method. I recommend that you look at the book for additional remarks and examples.

We begin with a general observation; the ideas discussed here (algebra of polynomial equations) tended to constitute a large part of a typical Abstract Algebra course at the beginning of the 20-th century. The “symmetries” that are at the center of the concept of group are apparent in the equations that one obtains.

Suppose $\displaystyle P(x)=\sum_{i=0}^n a_i x^i$ is a polynomial of degree $n$, and let $r$ be a root, so $\displaystyle 0=P(r)=\sum_{i=0}^n a_i r^i$, and $\displaystyle P(x)=P(x)-P(r)=\sum_{i=0}^n (x^i-r^i)=(x-r)Q(x)$ where $Q$ is a polynomial of degree $n-1$; here we are using the identities $\displaystyle a^m-b^m=(a-b)\sum_{i=0}^{m-1}a^ib^{m-i}$.

Assuming that we can find roots $r_1,\dots,r_n$ of $P$, the above shows that we can factor $P(x)=a_n(x-r_1)\times\dots\times(x-r_n)$. But then, expanding, we also must have $P(x)=$

$a_n(x^n-(r_1+\dots+r_n)x^{n-1}+(r_1r_2+r_1r_3+\dots$ $+r_{n-1}r_n)x^{n-2} -\dots+(-1)^nr_1\dots r_n),$

which relates the coefficients of $P$ to the so called elementary symmetric functions of the roots of $P$, namely,

• $a_{n-1}/a_n=-(r_1+\dots+r_n)$ is minus the sum of the roots,
• $a_{n-2}/a_n=r_1r_2+r_1r_3+\dots+r_{n-1}r_n$ is the sum of all the products $r_ir_j$ with $i,
• $a_{n-3}/a_n=-(r_1r_2r_3+\dots+r_{n-2}r_{n-1}r_n)$ is minus the sum of all the triple products, etc.

Now consider a cubic equation $x^3+ax^2+bx+c=0$ (just as in the previous cases, we can begin by dividing by the leading coefficient, so we may as well assume that the leading coefficient is 1).

It turns out that solving the equation is simpler if the coefficient of $x^2$, called $a$ above, is zero. In order to achieve this, we `translate’ the equation by replacing $x=y+t$. If $r_1,r_2,r_3$ are the roots of the original equation, the roots of the translated equation would be $r_1-t,r_2-t,r_3-t$, and the coefficient of $y^2$ would be $-(r_1+r_2+r_3)+3t=a+3t$, so it is zero iff $t=-a/3$.

In effect, if $x=y-a/3$, the equation $x^3+ax^2+bx+c=0$ becomes $y^3+(b-\frac{a^2}3)y+(\frac{2a^3}{27}-\frac{ab}3+c)=0$, which we will write in the more palatable form $y^3+py+q=0$, with $p=b-\frac{a^2}3$ and $q=\frac{2a^3}{27}-\frac{ab}3+c$.

[Of course, we could have done this directly without the analysis of the roots above, but (beyond the motivation above) it will eventually become relevant through the course that certain functions of the roots are associated to the coefficients of the polynomial.]

In order to solve this equation, we try a new substitution. There are several ways of motivating it. The new substitution replaces $y$ by $w$, where $\displaystyle y=w+\frac\alpha w$ for a carefully chosen $\alpha$. This is a Möbius transformation, and one can use a bit of complex analysis to indicate why it would be reasonable to try something like that.

The idea behind this substitution is that hopefully it will transform the equation in $y$ into an equation in $w$ of the form $\displaystyle w^3+A+\frac B{w^3}=0$, which is equivalent to $(w^3)^2+A(w^3)+B=0$. This new equation is actually a quadratic in $w^3$, and can therefore be solved.

Let’s try to see if this works: If $\displaystyle y=w+\frac\alpha w$ then $y^3+py+q=0$ becomes

$\displaystyle w^3+(p+3\alpha)w+q+(3\alpha^2+\alpha p)\frac 1w +\frac{a^3}{w^3}=0,$

and (incredibly!) if we choose $\displaystyle \alpha=-\frac p3$, then the coefficients of both $w$ and $1/w$ vanish, and the equation indeed takes the form $\displaystyle w^3 + A +\frac B{w^3}=0$, where $A=q$ and $\displaystyle B=-\frac{p^3}{27}$.

[There are of course deeper reasons (than magic) why this trick works. As far as I know, this argument was for a while just seen as a trick, and the explanation of why it made sense did not appear until the development of Galois theory.]

As pointed out above, this is a quadratic in $w^3$, which we can then proceed to solve, to find two possible values of $w^3$. To each such value $\beta$ we can associate three possible values of $w$, corresponding to the three possible cubic roots of $\beta$ (see below). Each of these six values can then be used to find a value of $y$, and thus a value of $x$ for which the original polynomial vanishes.

As before, there is a new subtlety here. It looks like we have six possibilities for $w$, but we can only have three roots. It takes a little bit of chasing through the equations to see that indeed only three roots are produced. The book shows that at a crucial step a choice of sign in a square root actually does not change the root one obtains. I recommend that you work this out on your own before reading the explanation in the book.

If we were adventurous, we could actually write the solutions explicitly in terms of the coefficients $a,b,c$. I’ll skip this step.

(And just to be self contained, say that $\beta$ is a real and we want to solve the equation $w^3=beta$. Let $s$ be the unique real such that $s^3=\beta$. Then $w^3=s^3$, so $w^3-s^3=0$ or $(w-s)(w^2+ws+s^2)=0$, so either $w=s$ or $w=s\gamma$ or $w=s\bar\gamma$, where $\displaystyle \gamma=\frac{-1+\sqrt3 i}2$ and $\displaystyle \bar\gamma=\frac{-1-\sqrt 3 i}2$.)

There is an important point to notice here. Assume that $P(x)$ is a cubic polynomial, with real coefficients. From calculus, we know that $P$ has at least one real root $r$. This might not be apparent from the formulas we obtain, see Example 2.1 in the book to illustrate this issue. It is a useful exercise (do it!) to check that using the formulas one obtains, indeed at least one of the roots must be a real number. Make sure you verify this fact.

3. Quartic polynomials. The argument in this case begins in a similar way. Say we want to solve the equation $x^4+ax^3+bx^2+cx+d=0.$ As before, it turns out to be useful to try to remove the coefficient of $x^3$. This is achieved by a translation, just as in the previous case: Set $x=y-\frac a4$. Then the equation becomes

$\displaystyle y^4+\left(b-\frac38 a^2\right)y^2+\left(c-\frac12 ab+\frac18 a^3\right)y$ $\displaystyle+\left(d-\frac14 ac+\frac1{16}a^2b -\frac3{256} a^4\right)=0$,

which, in order to keep our sanity, we write as $y^4+py^2+qy+r=0$.

The trick in this case is to see that this equation can be written as a difference of squares, which leads to its factorization as the product of two quadratics, and can therefore be solved. In order to find the squares that lead to this factorization, a parameter is introduced, and one checks that the restrictions it must satisfy lead to a cubic equation. The details will be presented next lecture.

### 8 Responses to 305 -2. Solving cubic and quartic polynomials.

1. […] return to the problem of solving quartic polynomials. In the first lecture on this topic, we reduced the problem of solving an equation […]

2. […] at least formally (for example, they are needed to even make sense of the formulas we found in the previous lectures) what was not clear was that they made sense. Perhaps indiscriminate use of them would […]

3. […] to problem 2, you want to look at the solutions obtained by Cardano’s method as described in lecture, and argue directly from the formulas so obtained that at least one of the solutions must be real. […]

4. […] similar to the previous one. We use Cardano’s method rather than the quadratic formula, see lecture 2.1. I briefly go through the […]

5. […] 305 -2. Solving cubic and quartic polynomials – http://caicedoteaching.wordpress.com/2009/01/28/305-2-solving-cubic-and-quartic-polynomials/ […]

6. […] return to the problem of solving quartic polynomials. In the first lecture on this topic, we reduced the problem of solving an equation […]

7. […] similar to the previous one. We use Cardano’s method rather than the quadratic formula, see lecture 2.1. I briefly go through the […]

8. Saul Schleimer says:

I learned of the Mobius transformation trick from H Tracy Hall, just after I left Berkeley in 2001, as I recall.