There are many treatments of the solution of polynomial equations up to degree four in the literature (i.e. the quartic, cubic, quadratic and trivial linear cases). Many of them are difficult to follow. Some contain steps that are difficult to implement on a computer (such as: “select the real value”, i.e. the value “with zero imaginary part”). However, amongst all the methods there are some real gems. Here is an explanation of those methods that I feel are the simplest to follow, and to implement.
Firstly, some general transformations.
Reduction of General Polynomial to Monic
Given a general degree- polynomial (where )
we can form the monic polynomial (with leading coefficient )
by defining .
The polynomial has the same roots (zeros) as . If is depressed (see below), then so is , so is monic depressed.
Depression of General and Monic Polynomials
Given a general degree- polynomial
we can form the depressed polynomial (with no term)
by defining .
Then, and , but the other are more complicated. For example, if , then .
The polynomial does not generally have the same roots as ; they are related by the above substitution: is a root of iff (if and only if) is a root of .
If is monic (see above), then so is , so is monic depressed.
The order of transforming a general polynomial to monic and depressed forms does not matter.
Now we can move on to root-finding…
Solution of Quadratic (Degree 2)
Given a general quadratic polynomial equation
(noting that I have reversed the usual naming of the coefficients for consistency with what follows), we have the familiar formula
(the denominator would be with the conventional naming).
Less familiar is the formula
(the numerator would be with the conventional naming).
For completeness, and following the methods used below, we can alternatively form the monic depressed form of this equation:
Then is immediately soluble.
A note on terminology here: is a polynomial which has roots, whereas and are polynomial equations, which have solutions.
Solution of Cubic (Degree 3)
Given a general cubic polynomial equation, we form the monic depressed form
We assume that , otherwise 0 is a root, and we can factor an (i.e. just ) out of this equation to obtain a quadratic. Similarly, we assume .
I’m afraid, somewhat “out of the air”, we pull the substitution
, to obtain
which we multiply through by thus
We can further substitute (i.e. ), to see that what we have is essentially just a quadratic:
Therefore, we solve this for
and back-subsitute to get our roots . Incidentally, although we get two values and for , we only get three (rather than six) values for , as each is duplicated. Therefore, there is no problem with false roots.
These are the roots of the monic depressed case; thus, finally, we must back-substitute through the transformation back to the original (possibly non-monic non-depressed) polynomial.
Solution of Quartic (Degree 4)
Given a general quartic polynomial equation, we form the monic depressed form
We assume that , otherwise 0 is a root, and we can factor an (i.e. just ) out of this equation to obtain a cubic. Similarly, we assume , otherwise we have a quadratic in .
If we can factor the left-hand side of this equation as the biquadratic
then we have two quadratic to solve, and we are through. Therefore we expand this:
Matching the coefficients, we have:
(from the missing term in the depressed form);
Thus we immediately have:
Note also that, generally
So rearranging, and multiplying by :
This is cubic in . Thus we can solve for . Then, we have
Thus we can back-substitute into our biquadratic.
Again, these are the roots of the monic depressed case; thus, finally, we must back-substitute through the transformation back to the original polynomial.
For an example, see my later post with an example of solving a quartic.
According to Galois Theory, the general polynomial of degree greater than four is not algebraically soluble (so called by radicals).
Patterns and Other Attacks
However, sometimes the particular coefficients of a particular higher-degree polynomial, make it soluble.
For example, if the polynomial is palindromic, then it can be transformed to a lower-degree polynomial. If its coefficients are all rational or integral, then repeated roots (if any) may be factored out by an exact method, possibly reducing the degree. All rational and complex rational roots may be found in a finite number of steps, using the rational root theorem; these may then be factored out, reducing the degree.
For more information, please see my polynomials.pdf from the Q site (now superceded by Pure). This document is actually a guide to using my polynomial library, implemented in Q, but it does contain some further details of polynomials.