# 8.2: Factoring Polynomials

$$\newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} }$$

$$\newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}}$$

$$\newcommand{\id}{\mathrm{id}}$$ $$\newcommand{\Span}{\mathrm{span}}$$

( \newcommand{\kernel}{\mathrm{null}\,}\) $$\newcommand{\range}{\mathrm{range}\,}$$

$$\newcommand{\RealPart}{\mathrm{Re}}$$ $$\newcommand{\ImaginaryPart}{\mathrm{Im}}$$

$$\newcommand{\Argument}{\mathrm{Arg}}$$ $$\newcommand{\norm}[1]{\| #1 \|}$$

$$\newcommand{\inner}[2]{\langle #1, #2 \rangle}$$

$$\newcommand{\Span}{\mathrm{span}}$$

$$\newcommand{\id}{\mathrm{id}}$$

$$\newcommand{\Span}{\mathrm{span}}$$

$$\newcommand{\kernel}{\mathrm{null}\,}$$

$$\newcommand{\range}{\mathrm{range}\,}$$

$$\newcommand{\RealPart}{\mathrm{Re}}$$

$$\newcommand{\ImaginaryPart}{\mathrm{Im}}$$

$$\newcommand{\Argument}{\mathrm{Arg}}$$

$$\newcommand{\norm}[1]{\| #1 \|}$$

$$\newcommand{\inner}[2]{\langle #1, #2 \rangle}$$

$$\newcommand{\Span}{\mathrm{span}}$$ $$\newcommand{\AA}{\unicode[.8,0]{x212B}}$$

$$\newcommand{\vectorA}[1]{\vec{#1}} % arrow$$

$$\newcommand{\vectorAt}[1]{\vec{\text{#1}}} % arrow$$

$$\newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} }$$

$$\newcommand{\vectorC}[1]{\textbf{#1}}$$

$$\newcommand{\vectorD}[1]{\overrightarrow{#1}}$$

$$\newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}}$$

$$\newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}}$$

$$\newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} }$$

$$\newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}}$$

$$\newcommand{\avec}{\mathbf a}$$ $$\newcommand{\bvec}{\mathbf b}$$ $$\newcommand{\cvec}{\mathbf c}$$ $$\newcommand{\dvec}{\mathbf d}$$ $$\newcommand{\dtil}{\widetilde{\mathbf d}}$$ $$\newcommand{\evec}{\mathbf e}$$ $$\newcommand{\fvec}{\mathbf f}$$ $$\newcommand{\nvec}{\mathbf n}$$ $$\newcommand{\pvec}{\mathbf p}$$ $$\newcommand{\qvec}{\mathbf q}$$ $$\newcommand{\svec}{\mathbf s}$$ $$\newcommand{\tvec}{\mathbf t}$$ $$\newcommand{\uvec}{\mathbf u}$$ $$\newcommand{\vvec}{\mathbf v}$$ $$\newcommand{\wvec}{\mathbf w}$$ $$\newcommand{\xvec}{\mathbf x}$$ $$\newcommand{\yvec}{\mathbf y}$$ $$\newcommand{\zvec}{\mathbf z}$$ $$\newcommand{\rvec}{\mathbf r}$$ $$\newcommand{\mvec}{\mathbf m}$$ $$\newcommand{\zerovec}{\mathbf 0}$$ $$\newcommand{\onevec}{\mathbf 1}$$ $$\newcommand{\real}{\mathbb R}$$ $$\newcommand{\twovec}[2]{\left[\begin{array}{r}#1 \\ #2 \end{array}\right]}$$ $$\newcommand{\ctwovec}[2]{\left[\begin{array}{c}#1 \\ #2 \end{array}\right]}$$ $$\newcommand{\threevec}[3]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \end{array}\right]}$$ $$\newcommand{\cthreevec}[3]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \end{array}\right]}$$ $$\newcommand{\fourvec}[4]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}$$ $$\newcommand{\cfourvec}[4]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}$$ $$\newcommand{\fivevec}[5]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}$$ $$\newcommand{\cfivevec}[5]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}$$ $$\newcommand{\mattwo}[4]{\left[\begin{array}{rr}#1 \amp #2 \\ #3 \amp #4 \\ \end{array}\right]}$$ $$\newcommand{\laspan}[1]{\text{Span}\{#1\}}$$ $$\newcommand{\bcal}{\cal B}$$ $$\newcommand{\ccal}{\cal C}$$ $$\newcommand{\scal}{\cal S}$$ $$\newcommand{\wcal}{\cal W}$$ $$\newcommand{\ecal}{\cal E}$$ $$\newcommand{\coords}[2]{\left\{#1\right\}_{#2}}$$ $$\newcommand{\gray}[1]{\color{gray}{#1}}$$ $$\newcommand{\lgray}[1]{\color{lightgray}{#1}}$$ $$\newcommand{\rank}{\operatorname{rank}}$$ $$\newcommand{\row}{\text{Row}}$$ $$\newcommand{\col}{\text{Col}}$$ $$\renewcommand{\row}{\text{Row}}$$ $$\newcommand{\nul}{\text{Nul}}$$ $$\newcommand{\var}{\text{Var}}$$ $$\newcommand{\corr}{\text{corr}}$$ $$\newcommand{\len}[1]{\left|#1\right|}$$ $$\newcommand{\bbar}{\overline{\bvec}}$$ $$\newcommand{\bhat}{\widehat{\bvec}}$$ $$\newcommand{\bperp}{\bvec^\perp}$$ $$\newcommand{\xhat}{\widehat{\xvec}}$$ $$\newcommand{\vhat}{\widehat{\vvec}}$$ $$\newcommand{\uhat}{\widehat{\uvec}}$$ $$\newcommand{\what}{\widehat{\wvec}}$$ $$\newcommand{\Sighat}{\widehat{\Sigma}}$$ $$\newcommand{\lt}{<}$$ $$\newcommand{\gt}{>}$$ $$\newcommand{\amp}{&}$$ $$\definecolor{fillinmathshade}{gray}{0.9}$$

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 $$ax^2 + bx + c$$ are

$\dfrac{-b ± \sqrt{b^2 -4ac}}{2a}$

Notice that this does not tell us immediately how to factor $$ax^2 + bx + c$$, because it’s missing a constant factor of a. So if we want to factor $$ax^2 + bx + c$$, we actually get

$ax^2 + bx + c = a \left(x - \left( \dfrac{-b + \sqrt{b^2 -4ac}}{2a} \right) \right) \left(x - \left( \dfrac{-b - \sqrt{b^2 -4ac}}{2a} \right) \right)$

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 $$ax^2 + bx + c$$, you can also factor a quadratic polynomial directly into the form we want, using the following formula:

$ax^2 + bx + c = c \left(1 - \dfrac{-b + \sqrt{b^2 -4ac}}{2c} x \right) \left(1 - \dfrac{-b - \sqrt{b^2 -4ac}}{2c} x \right)$

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 $$\PageIndex{1}$$

Factor $$3x^2 − 2x + 1$$ into linear factors.

Solution

We will use the formula given above. We have $$a = 3$$, $$b = −2$$, and $$c = 1$$. Then

$$$$\begin{split} 3x^2 − 2x + 1&= \left(1 - \dfrac{2 + \sqrt{4 -12}}{2} x \right) \left(1 - \dfrac{2 - \sqrt{4 -12}}{2} x \right) \\ &= (1 − (1 + i\sqrt{2})x)(1 − (1 − i\sqrt{2})x). \end{split}$$$$

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 $$\PageIndex{2}$$

Find the coefficient of $$x^r$$ in $$f(x)$$, where

$$f(x) = \dfrac{1}{3x^2 − 2x + 1}$$

Solution

We have determined in the previous example, that

$$3x^2 − 2x + 1 = (1 − (1 + i \sqrt{2})x)(1 − (1 − i \sqrt{2})x),$$

so we need to solve for $$A$$ and $$B$$, where

$$$$\begin{split} f(x)&= \dfrac{1}{3x^2 − 2x + 1} \\ &= \dfrac{A}{1 − (1 + i\sqrt{2})x} + \dfrac{B}{1 − (1 - i\sqrt{2})x} \\ &= \dfrac{A(1 − (1 − i\sqrt{2})x) + B(1 − (1 + i\sqrt{2})x)}{3x^2 − 2x + 1}, \end{split}$$$$

Thus,

$$A(1 − (1 − i\sqrt{2})x) + B(1 − (1 + i\sqrt{2})x) = 1 + 0x$$,

so the constant term gives $$A+B = 1$$, while the coefficient of $$x$$ gives $$A(1−i \sqrt{2})+B(1+i \sqrt{2}) = 0$$. Substituting $$B = 1 − A$$ into the latter equation, gives

$$A − i \sqrt{2}A + 1 + i \sqrt{2} − A − i \sqrt{2}A = 0$$,

so $$1 + i \sqrt{2} = i2 \sqrt{2}A$$. Hence

$$A = \dfrac{1 + i \sqrt{2}}{i2 \sqrt{2}} = \dfrac{1}{2 \sqrt{2}i} + \dfrac{1}{2}$$

We make the denominator of the first fraction rational, by multiplying numerator and denominator by $$\sqrt{2}i$$, giving

$$A = -\dfrac{\sqrt{2}i}{4} + \dfrac{1}{2}$$

Now since $$B = 1 − A$$, we have

$$B = \dfrac{1}{2} + \dfrac{\sqrt{2}i}{4}$$

To make things a bit simpler, we’ll rewrite $$A$$ as $$\dfrac{(2 − \sqrt{2}i)}{4}$$, and $$B = \dfrac{(2 + \sqrt{2}i)}{4}$$.

Thus we have

$$f(x) = \dfrac{\dfrac{(2 − \sqrt{2}i)}{4}}{1 − (1 + i \sqrt{2})x} + \dfrac{\dfrac{(2 + \sqrt{2}i)}{4}}{1 − (1 - i \sqrt{2})x}$$

Using the Generalised Binomial Theorem and $$y = (1 + i \sqrt{2})x$$, we see that the first fraction expands as

$$\left[\left(\dfrac{(2 − \sqrt{2}i)}{4}\right)\right](1 + y + y^2 + y^3 + . . .)$$,

and the coefficient of $$x^r$$ in this, will be $$\left[\left(\dfrac{(2 − \sqrt{2}i)}{4}\right)\right](1 +i \sqrt{2})^r$$. Similarly, with $$y = (1−i \sqrt{2})x$$, the second fraction expands as

$$\left[\left(\dfrac{(2 + \sqrt{2}i)}{4}\right)\right](1 + y + y^2 + y^3 + . . .)$$,

and the coefficient of $$x^r$$ in this, will be $$\left[\left(\dfrac{(2 + \sqrt{2}i)}{4}\right)\right](1 − i \sqrt{2})^r$$.

So the coefficient of $$x^r$$ in $$f(x)$$ is

$$\left[\left(\dfrac{(2 − \sqrt{2}i)}{4}\right)\right](1 +i \sqrt{2})^r + \left[\left(\dfrac{(2 + \sqrt{2}i)}{4}\right)\right](1 − i \sqrt{2})^r$$

You can see from this example that the algebra can get ugly, but the process of finding the coefficient of $$x^r$$ is nonetheless straightforward.

Exercise $$\PageIndex{1}$$

For each of the generating functions given, factor the denominator and use the method of partial fractions to determine the coefficient of $$x^r$$.

1. $$\dfrac{x}{x^2+5x−1}$$
2. $$\dfrac{2+x}{2x^2+x−1}$$
3. $$\dfrac{x}{x^2−3x+1}$$

This page titled 8.2: Factoring Polynomials is shared under a CC BY-NC-SA license and was authored, remixed, and/or curated by Joy Morris.