Consider for example the following polynomial:
x3 + 2x2 - 5x - 6
We can ask: For what value (or values) of x
, if any, does the polynomial evaluate to zero? And can the polynomial be expressed as the product of simpler polynomials?
The example polynomial has a degree of 3. (The degree of a polynomial is the greatest power of its variable, most often x
.) A polynomial whose degree is odd will certainly evaluate to zero for at least one value of x
.
To see this, consider the situations where x
is very large and negative, and where x
is very large and positive. The two values of the polynomial will be of opposite signs. Therefore, at some point in between the polynomial must pass through zero at least once.
On the other hand, when the degree is even, there is no guarantee that the polynomial will be zero for any value of x
.
Factorising has the aim of rewriting a polynomial as a product of some lower order polynomials. Whether or not this is possible in theory, the factorisation problem can often seem insurmountable in practice. For the example above, let's assume that it can be factorised into the form:
(x + a) (x + b) (x + c)
This expression can be multiplied out to obtain:
x^3 + x^2(a+b+c) + x(ab+bc+ca) + abc
In this example, it is clear that the product of a
, b
and c
is -6
. This gives us a clue that the values of a
, b
and c
need to be chosen from the set 1
, 2
, 3
and 6
. But notice that the product is negative. This means that we need to also consider the values -1
, -2
, -3
and -6
.
We can figure out the correct set of values by trial and error. After all, we do not have so many choices to try out, here. Besides, our guess at the form of the factorisation happened to be correct - we do have three linear factors.
But what if we want to factorise something like:
12x^3 + 32x^2 - 19x - 60
We would now have to consider a factorisation into:
(ax + b) (cx + d) (ex + f)
where we know that a
, c
and e
are factors of 12
and that b
, d
and f
are factors of -60
. We now have too many choices open to us.
For example, a
, c
and e
have values taken from the set 1
, 2
, 3
, 4
, 6
, or 12
. The values of b
, d
and f
can come from a set of consisting of 24 different values, as we need to consider negative numbers as well as positive ones.
Still, the solution can be found, if we have enough patience. I challenge you to have a go at finding this solution. The answer is given at the bottom of this page, here.
Perhaps another approach might be simpler. Both of these example polynomials are of odd order, so we know that they have at least one root. If we could find a root of a polynomial, we would then be able to divide it by the corresponding factor and end up with a simpler polynomial to work with.
Looking at the first example, if we try out a few values of x
we quickly discover that the polynomial is 0
when x = 2
. So we know that x - 2
is a factor.
We can divide x3 + 2x2 - 5x - 6
by x-2
to obtain the quadratic polynomial x^2 + 4x + 3
. The trial and error approach quickly shows that this can be factorised as (x+3)(x+1)
. Try using the values -1
and -3
for x
in the original polynomial. It evaluates to zero in both cases.
Simple enough? OK, let's consider factorising this one:
36x6 - 66x5 - 128x4 + 131x3 + 168x2 - 6x - 72
We could look for trial factors based on the possible factors of the coefficients 36
and -72
. But only if we were desperate! There are just too many possibilities. OK, can we find some roots and divide out the corresponding factors? Yes, if we can find any. Notice that the polynomial has degree 6
, an even number. As the degree is even, we are not guaranteed to be able to find any roots (there might not be any!.
At this point, unless we have a great stroke of luck, we need help. I opened up my trusty UltimaCalc calculator, set it to 12 digit precision, and asked it to try finding the roots, using its built-in polynomial roots calculator. It found the following values:
-1.33333333333
, 0.633974596216
, 1.5
and 2.36602540378
It seems that two of the roots are -4/3
and 3/2
. The other two roots are not recognisable as anything simple. They would seem to be the two roots of a quadratic factor. Let's assume that this factor is the product of the two linear factors corresponding to these roots, (x-a)(x-b)
. If we multiply out this expression, we obtain
x2 - x(a+b) + ab
Doing the indicated arithmetic, we find that 0.633974596216+2.36602540378 = 3
and 0.633974596216*2.36602540378 = 1.5
.
So our quadratic term looks like x2 - 3x + 3/2
. Now we know that this cannot be right, as all of the coefficients of the original polynomial are integers. So let's multiply all the coefficients of our quadratic by the lowest common multiple of the denominators of its coefficients. In our case, this LCM is simply 2
, and our quadratic becomes:
2x2 - 6x + 3
. We also need to eliminate the fractions from the factors corresponding to the other two roots. These factors become (3x + 4)
and (2x - 3)
.
Now we are almost finished. We know three of the factors of the original polynomial. Let's multiply them together:
(3x + 4)(2x - 3)(2x2 - 6x + 3)
The result is:
12x4 - 38x3 + 69x - 36
We can divide this polynomial into the original polynomial. The result will be only of second order, just three steps in the division, so this is not a big deal. The result is:
3x2 + 4x + 2
This quadratic has no roots. Its value is always positive. In fact, it is never less than 2/3
regardless of the value of x
.
So we seem to have factorised our original polynomial. Just one more thing is necessary, which is to check for any numerical factor which might have gone missing. A simple way to do this is to multiply together the leading coefficients of all the factors, and compare this with the leading factor of the original. (The leading coefficient of a polynomial is defined as the coefficient of its highest power of x
, or whatever its variable might be.) In our case, the two values are the same, and we therefore do not have a missing numerical factor.
So we have factorised the polynomial:
36x6 - 66x5 - 128x4 + 131x3 + 168x2 - 6x - 72
and we have found its factors to be:
(3x + 4)(2x - 3)(2x2 - 6x + 3)(3x2 + 4x + 2)
Using UltimaCalc, it took longer to describe the process than to actually do it, except maybe for the polynomial division.