8.2: Factoring Polynomials
( \newcommand{\kernel}{\mathrm{null}\,}\)
You should be familiar with the quadratic formula, which allows us to factor any polynomial of degree two, into linear factors. Specifically, it tells us that the roots of ax2+bx+c are
−b±√b2−4ac2a
Notice that this does not tell us immediately how to factor ax2+bx+c, because it’s missing a constant factor of a. So if we want to factor ax2+bx+c, we actually get
ax2+bx+c=a(x−(−b+√b2−4ac2a))(x−(−b−√b2−4ac2a))
Recall that in order to use the Generalised Binomial Theorem, we need the constant term to be 1. If you are very comfortable with algebraic manipulations, you can use the quadratic formula to factor as above, and then divide each factor by the appropriate value so as to make the constant term 1. This may create a messy constant outside the whole thing, and a messy coefficient of x in each term, but if you are careful, you can get the correct answer this way.
If you are more confident in memorising another formula (closely related to the quadratic formula) for factoring ax2+bx+c, you can also factor a quadratic polynomial directly into the form we want, using the following formula:
ax2+bx+c=c(1−−b+√b2−4ac2cx)(1−−b−√b2−4ac2cx)
Sometimes a denominator will already be factored in the formula for a generating function, but when it isn’t, either of the above methods can be used to factor it.
Example 8.2.1
Factor 3x2−2x+1 into linear factors.
Solution
We will use the formula given above. We have a=3, b=−2, and c=1. Then
3x2−2x+1=(1−2+√4−122x)(1−2−√4−122x)=(1−(1+i√2)x)(1−(1−i√2)x).
It is always a good idea to check your result, by multiplying the factors back out.
When coefficients in the factorisation get ugly (even complex, as in the example above), you might find the algebra involved in working out the coefficients hard to deal with. Let’s work through an example of this, using the factorisation we’ve just completed.
Example 8.2.2
Find the coefficient of xr in f(x), where
f(x)=13x2−2x+1
Solution
We have determined in the previous example, that
3x2−2x+1=(1−(1+i√2)x)(1−(1−i√2)x),
so we need to solve for A and B, where
f(x)=13x2−2x+1=A1−(1+i√2)x+B1−(1−i√2)x=A(1−(1−i√2)x)+B(1−(1+i√2)x)3x2−2x+1,
Thus,
A(1−(1−i√2)x)+B(1−(1+i√2)x)=1+0x,
so the constant term gives A+B=1, while the coefficient of x gives A(1−i√2)+B(1+i√2)=0. Substituting B=1−A into the latter equation, gives
A−i√2A+1+i√2−A−i√2A=0,
so 1+i√2=i2√2A. Hence
A=1+i√2i2√2=12√2i+12
We make the denominator of the first fraction rational, by multiplying numerator and denominator by √2i, giving
A=−√2i4+12
Now since B=1−A, we have
B=12+√2i4
To make things a bit simpler, we’ll rewrite A as (2−√2i)4, and B=(2+√2i)4.
Thus we have
f(x)=(2−√2i)41−(1+i√2)x+(2+√2i)41−(1−i√2)x
Using the Generalised Binomial Theorem and y=(1+i√2)x, we see that the first fraction expands as
[((2−√2i)4)](1+y+y2+y3+...),
and the coefficient of xr in this, will be [((2−√2i)4)](1+i√2)r. Similarly, with y=(1−i√2)x, the second fraction expands as
[((2+√2i)4)](1+y+y2+y3+...),
and the coefficient of xr in this, will be [((2+√2i)4)](1−i√2)r.
So the coefficient of xr in f(x) is
[((2−√2i)4)](1+i√2)r+[((2+√2i)4)](1−i√2)r
You can see from this example that the algebra can get ugly, but the process of finding the coefficient of xr is nonetheless straightforward.
Exercise 8.2.1
For each of the generating functions given, factor the denominator and use the method of partial fractions to determine the coefficient of xr.
- xx2+5x−1
- 2+x2x2+x−1
- xx2−3x+1