Factoring Polynomials

The opposite of multiplying polynomials is factoring. Why would you want to factor a polynomial?

Let $p(x)$ be a polynomial. $p(c) = 0$ is equivalent to $x - c$ dividing $p(x)$ .

Recall that when $p(c) =
   0$ , you say that c is a root of $p(x)$ . The result above means that factoring is related to root-finding, and vice versa.


Example. If $x = 2$ ,

$$x^2 - x - 2 = 4 - 2 - 2 = 0.$$

It follows that $x - 2$ divides $x^2 - x - 2$ ; in fact,

$$x^2 - x - 2 = (x - 2)(x + 1).\quad\halmos$$


Besides root-finding, you may also want to factor an expression in order to simplify something.


Example. Provided that $x \ne 3$ , I can simplify $\dfrac{x^3 - 3x^2}{x - 3}$ by cancellation:

$$\dfrac{x^3 - 3x^2}{x - 3} = \dfrac{x^2(x - 3)}{x - 3} = x^2.$$

I got the last equality by cancelling the $x - 3$ 's, which is valid provided that $x \ne 3$ . I "found" the $x - 3$ on the top by factoring.


I'll look at various methods for factoring polynomials: Removing a common factor, factoring quadratics by trial and error, using special forms for quadratics, using special forms for cubics, and factoring by grouping.

1. Removing a common factor.

In some cases, the terms of a sum have some factors in common. The common factors may be factored out of all the terms:

$$ab + ac = a(b + c).$$

This is the opposite of the distributive law.


Example.

$$4x^4 + 16x^3 + 48x^2 = 4x^2(x^2 + 4x + 12).$$

$$2x^3y + 6x^2y^2 + 14xy^3 = 2xy(x^2 + 3xy + 7y^2).$$

$$7x(x + y)^2 - 15x^2(x + y) = x(x + y)\left(7(x + y) - 15x\right) = x(x + y)\left(7x + 7y - 15x\right) = x(x + y)(7y - 8x).\quad\halmos$$


2. Factoring quadratics.

Now I'll discuss the important case of factoring quadratics. The discussion will be incomplete until later, when I discuss the general quadratic formula.


Example. How do you factor $x^2 + 7x + 12$ ?

To do this, think of two numbers which multiply to 12 and add to give 7. 3 and 4 work: $3\cdot
   4 = 12$ and $3 + 4 = 7$ . So

$$x^2 + 7x + 12 = (x + 3)(x + 4).$$

How do you factor $x^2 -
   5x + 6$ ?

Think of two numbers which multiply to 6 and add to give -5. I must have two negative numbers to make this work; -2 and -3 fit the bill. So

$$x^2 - 5x + 6 = (x - 2)(x - 3).$$

How do you factor $x^2 -
   5x - 6$ ?

Think of two numbers which multiply to -6 and add to give -5. I must have two negative numbers to make this work; -6 and 1 fit the bill. So

$$x^2 - 5x - 6 = (x - 6)(x + 1).$$

How do you factor $x^2 -
   8x + 16$ ?

Think of two numbers which multiply to 16 and add to give -8. I must have two negative numbers to make this work; -4 and -4 fit the bill. So

$$x^2 - 8x + 16 = (x - 4)(x - 4) = (x - 4)^2.\quad\halmos$$


I have factoring formulas which correspond to my special forms for multiplication.

1. $a^2 - b^2 = (a - b)(a
   + b)$

2. $a^2 - 2ab + b^2 = (a
   - b)^2$

3. $a^2 + 2ab + b^2 = (a
   + b)^2$


Example. This is the $a^2 - b^2$ form with $a = x$ and $b =
   8$ :

$$x^2 - 64 = (x - 8)(x + 8).$$

This is the $a^2 - 2ab +
   b^2$ form with $a = x$ and $b =
   5$ :

$$x^2 - 10x + 25 = (x - 5)^2.$$

This is the $a^2 + 2ab +
   b^2$ form with $a = x$ and $b =
   10$ :

$$x^2 + 20x + 100 = (x + 10)^2.$$

In the next example, I'll use the $a^2 - b^2$ form with $a = 2x$ and $b =
   5$ :

$$4x^2 - 25 = (2x - 5)(2x + 5).$$

Here's the $a^2 - b^2$ form with $a = 3x$ and $b =
   4y$ :

$$9x^2 - 16y^2 = (3x - 4y)(3x + 4y).$$

This example uses the $a^2 + 2ab + b^2$ form with $a = 2x$ and $b = y$ :

$$4x^2 + 4xy + y^2 = (2x + y)^2.$$

And this example uses the $a^2 - 2ab + b^2$ form with $a = 5x$ and $b = 2y$ :

$$25x^2 - 20xy + 4y^2 = (5x - 2y)^2.\quad\halmos$$


Note, however, that $a^2
   + b^2$ does not factor (unless you use complex numbers).


Example. How do you factor $2x^2 + 9x - 5$ ?

I expect a factorization that looks like this:

$$2x^2 + 9x - 5 = (2x \pm \ast)(x \pm \ast).$$

What are the missing terms? I write down all possible ways of factoring -5, assuming that this will come out in terms of integers:

$$\matrix{(2x & & )(x & & ) \cr & 5 & & -1 & \cr & -5 & & 1 & \cr & 1 & & -5 & \cr & -1 & & 5 & \cr}$$

I find that

$$2x^2 + 9x - 5 = (2x - 1)(x + 5).$$

You can check this by multiplying out the right side.


Example. Factor $12x^2 + 11x - 5$ .

I need numbers a and b whose product is 12, and such that

$$12x^2 + 11x - 5 = (ax + 5)(bx - 1) \quad\hbox{or}\quad 12x^2 + 11x - 5 = (ax - 5)(bx + 1).$$

If you try various combinations, you'll find that

$$12x^2 + 11x - 5 = (4x + 5)(3x - 1).\quad\halmos$$


Examples. Factoring quadratics is something you should be able to do fluently. Here are some more for practice.

To factor $x^2 + 9x +
   14$ , I need two numbers which add to 9 and multiply to 14. The pairs of numbers multiplying to 14 are $(1,14)$ and $(2,7)$ . $2 + 7 = 9$ , so I use 2 and 7:

$$x^2 + 9x + 14 = (x + 2)(x + 7).$$

To factor $x^2 - 9x +
   18$ , I need two numbers which add to -9 and multiply to 18. The pairs of numbers which multiply to 18 are $(1,18)$ , $(-1,-18)$ , $(2,9)$ , $(-2,-9)$ , $(3,6)$ , and $(-3,-6)$ , $(-3) + (-6) = -9$ , so I use -3 and -6:

$$x^2 - 9x + 18 = (x - 3)(x - 6).$$

To factor $x^2 - 14x +
   49$ , you can look for two numbers which add to -14 and multiply to 49. -7 and -7 work.

I would do it differently: The perfect square 49 makes me think that maybe this is a standard form. $49 = 7^2$ , and $2\cdot 7 = 14$ , which is the middle coefficient --- and that led me to $(x -
   7)^2$ . I used -7 because the middle coefficient was -14. So either way,

$$x^2 - 14x + 49 = (x - 7)^2.$$

To factor $x^2 - 2x -
   24$ , I need two numbers which add to -2 and multiply to -24. The pairs of numbers which multiply to -24 are $(1,-24)$ , $(-1,24)$ , $(2,-12)$ , $(-2,12)$ , $(3,-8)$ , $(-3,8)$ , $(4,-6)$ , and $(-4,6)$ . $4 +
   (-6) = -2$ , so

$$x^2 - 2x - 24 = (x - 6)(x + 4).$$

Don't forget that you can always check your factoring by multiplication!

To factor $4x^2 + 4x +
   1$ , I notice that both the 4 in $4x^2$ and the 1 are perfect squares. $4x^2 = (2x)^2$ and $1 = 1^2$ ; is this a standard form? Well, $2\cdot 2x = 4x$ , so

$$4x^2 + 4x + 1 = (2x + 1)^2.$$

To factor $2x^2 - 5x +
   3$ , I notice that $2x^2$ breaks down as $2x\cdot x$ and 3 could be either $1\cdot 3$ or $(-1)\cdot (-3)$ . To get the -5 in the middle, I must have -1 and -3. So there are two possibilities:

$$(2x - 1)(x - 3) \quad\quad\hbox{or}\quad\quad (2x - 3)(x - 1).$$

In fact,

$$2x^2 - 5x + 3 = (2x - 3)(x - 1).$$

$4x^2 + 4x - 3$ is more complicated. The $4x^2$ could be $4x\cdot x$ or $2x\cdot 2x$ . The -3 is either $1\cdot (-3)$ or $(-1)\cdot 3$ . Here are the possibilities:

$$(4x + 1)(x - 3) = 4x^2 - 11x - 3, \quad (4x - 3)(x + 1) = 4x^2 + x - 3,$$

$$(4x - 1)(x + 3) = 4x^2 + 11x - 3, \quad (4x + 3)(x - 1) = 4x^2 - x - 3,$$

$$(2x + 1)(2x - 3) = 4x^2 - 4x - 3, \quad (2x - 1)(2x + 3) = 4x^2 + 4x - 3.$$

So

$$4x^2 + 4x - 3 = (2x - 1)(2x + 3).\quad\halmos$$


Example. Factor $16x^4 - 81$ .

First,

$$16x^4 - 81 = (4x^2)^2 - 9^2 = (4x^2 - 9)(4x^2 + 9) = (2x - 3)(2x + 3)(4x^2 + 9).$$

Fact: A sum of two squares does not factor. Thus, $4x^2 + 9 = (2x)^2 + 3^2$ can't be factored. The factorization is $(2x -
   3)(2x + 3)(4x^2 + 9)$ .


Example. ( More than one variable) Factor $a^3 - 6a^2b - 7ab^2$ .

I take out a common factor, then factor the remaining quadratic term by trial:

$$a^3 - 6a^2b - 7ab^2 = a(a^2 - 6ab - 7b^2) = a(a - 7b)(a + b).$$

Notice that $a^2 - 6ab -
   7b^2 = (a - 7b)(a + b)$ is like $a^2 - 6 - 7 = (a - 7)(a
   + 1)$ , except with the additional b's.


3. Cubic formulas.

1. $a^3 - b^3 = (a -
   b)(a^2 + ab + b^2)$

2. $a^3 + b^3 = (a +
   b)(a^2 - ab + b^2)$


Example.

$$x^3 - 64 = (x - 4)(x^2 + 4x + 16).$$

$$x^3 + 8y^3 = (x + 2y)(x^2 - 2xy + 4y^2).$$

$$\dfrac{1}{x^3} - \dfrac{1}{125} = \left(\dfrac{1}{x} - \dfrac{1}{5}\right) \left(\dfrac{1}{x^2} + \dfrac{1}{5x} + \dfrac{1}{25}\right). \quad\halmos$$


4. Factoring by grouping.

In some cases, you can factor an expression by factoring pieces of the expression separately, then looking for common factors in the pieces. This is easier to show than to explain, so here are some examples.


Example. Factor $x^3 - 4x^2 + 5x - 20$ .

I don't have a rule for factoring a cubic of this form. I'll break the polynomial up into two pieces:

$$x^3 - 4x^2 + 5x - 20 = (x^3 - 4x^2) + (5x - 20).$$

Now I'll take a common factor out of each piece, then look for a common factor of the whole expression.

$$x^3 - 4x^2 + 5x - 20 = (x^3 - 4x^2) + (5x - 20) = x^2(x - 4) + 5(x - 4) = (x^2 + 5)(x - 4).\quad\halmos$$


Example. Factor $x^3 - 7x^2 - 9x + 63$ .

$$x^3 - 7x^2 - 9x + 63 = (x^3 - 7x^2) - (9x - 63) = x^2(x - 7) - 9(x - 7) = (x^2 - 9)(x - 7) = (x - 3)(x + 3)(x - 7).\quad\halmos$$


Example. Factor $x^2 - 3xy + 5x - 15y$ .

$$x^2 - 3xy + 5x - 15y = (x^2 - 3xy) + (5x - 15y) = x(x - 3y) + 5(x - 3y) = (x + 5)(x - 3y).\quad\halmos$$


Send comments about this page to: Bruce.Ikenaga@millersville.edu.

Bruce Ikenaga's Home Page

Copyright 2013 by Bruce Ikenaga