Skip to main content

Section 7.5 Factoring Special Polynomials

Certain polynomials have patterns that you can train yourself to recognize. And when they have these patterns, there are formulas you can use to factor them, much more quickly than using the techniques from Section 7.3 and Section 7.4.

Subsection 7.5.1 Difference of Squares

If \(b\) is some positive integer, then when you multiply \((x-b)(x+b)\text{:}\)

\begin{align*} (x-b)(x+b)\amp=x^2-bx+bx-b^2\\ \amp=x^2-b^2\text{.} \end{align*}

The \(-bx\) and the \(+bx\) cancel each other out. So this is telling us that

\begin{equation*} x^2-b^2=(x-b)(x+b)\text{.} \end{equation*}

And so if we ever encounter a polynomial of the form \(x^2-b^2\) (a “difference of squares” ) then we have a quick formula for factoring it. Just identify what “\(b\)” is, and use that in \((x-b)(x+b)\text{.}\)

To use this formula, it's important to recognize which numbers are perfect squares, as in Table 1.4.6.

Example 7.5.1.

Factor \(x^2-16\text{.}\)

Explanation

The “\(16\)” being subtracted here is a perfect square. It is the same as \(4^2\text{.}\) So we can take \(b=4\) and write:

\begin{align*} x^2-16\amp=(x-b)(x+b)\\ \amp=(x-4)(x+4) \end{align*}
Checkpoint 7.5.2.

Try to factor one yourself:

We can do a little better. There is nothing special about starting with “\(x^2\)” in these examples. In full generality:

Example 7.5.4.

Factor \(1-p^2\text{.}\)

Explanation

The “\(1\)” at the beginning of this expression is a perfect square; it's the same as \(1^2\text{.}\) The “\(p^2\)” being subtracted here is also perfect square. We can take \(A=1\) and \(B=p\text{,}\) and use Fact 7.5.3:

\begin{align*} 1-p^2\amp=(A-B)(A+B)\\ \amp=(1-p)(1+p) \end{align*}
Example 7.5.5.

Factor \(m^2n^2-4\text{.}\)

Explanation

Is the “\(m^2n^2\)” at the beginning of this expression a perfect square? By the rules for exponents, it is the same as \((mn)^2\text{,}\) so yes, it is a perfect square and we may take \(A=mn\text{.}\) The “\(4\)” being subtracted here is also perfect square. We can take \(B=2\text{.}\) Fact 7.5.3 tells us:

\begin{align*} m^2n^2-4\amp=(A-B)(A+B)\\ \amp=(mn-2)(mn+2) \end{align*}
Checkpoint 7.5.6.

Try to factor one yourself:

Example 7.5.7.

Factor \(x^6-9\text{.}\)

Explanation

Is the “\(x^6\)” at the beginning of this expression is a perfect square? It may appear to be a sixth power, but it is also a perfect square because we can write \(x^6=\left(x^3\right)^2\text{.}\) So we may take \(A=x^3\text{.}\) The “\(9\)” being subtracted here is also perfect square. We can take \(B=3\text{.}\) Fact 7.5.3 tells us:

\begin{align*} x^6-9\amp=(A-B)(A+B)\\ \amp=(x^3-3)(x^3+3) \end{align*}
Warning 7.5.8.

It's a common mistake to write something like \(x^2+16=(x+4)(x-4)\text{.}\) This is not what Fact 7.5.3 allows you to do, and this is in fact incorrect. The issue is that \(x^2+16\) is a sum of squares, not a difference. And it happens that \(x^2+16\) is actually prime. In fact, any sum of squares without a common factor will always be prime.

Subsection 7.5.2 Perfect Square Trinomials

If we expand \((A+B)^2\text{:}\)

\begin{align*} (A+B)^2\amp=(A+B)(A+B)\\ \amp=A^2+BA+AB+B^2\\ \amp=A^2+2AB+B^2\text{.} \end{align*}

The \(BA\) and the \(AB\) equal each other and double up when added together. So this is telling us that

\begin{equation*} A^2+2AB+B^2=(A+B)^2\text{.} \end{equation*}

And so if we ever encounter a polynomial of the form \(A^2+2AB+B^2\) (a “perfect square trinomial” ) then we have a quick formula for factoring it.

The tricky part is recognizing when a trinomial you have encountered is in this special form. Ask yourself:

  1. Is the first term a perfect square? If so, jot down what \(A\) would be.

  2. Is the second term a perfect square? If so, jot down what \(B\) would be.

  3. When you multiply \(2\) with what you wrote down for \(A\) and \(B\text{,}\) i.e. \(2AB\text{,}\) do you have the middle term? If you have this middle term exactly, then your polynomial factors as \((A+B)^2\text{.}\) If the middle term is the negative of \(2AB\text{,}\) then the sign on your \(B\) can be reversed, and your polynomial factors as \((A-B)^2\text{.}\)

Example 7.5.10.

Factor \(x^2+6x+9\text{.}\)

Explanation

The first term, \(x^2\text{,}\) is clearly a perfect square. So we could take \(A=x\text{.}\) The last term, \(9\text{,}\) is also a perfect square since it is equal to \(3^2\text{.}\) So we could take \(B=3\text{.}\) Now we multiply \(2AB=2\cdot x\cdot3\text{,}\) and the result is \(6x\text{.}\) This is the middle term, which is what we hope to see.

So we can use Fact 7.5.9:

\begin{align*} x^2+6x+9\amp=(A+B)^2\\ \amp=(x+3)^2 \end{align*}
Example 7.5.11.

Factor \(4x^2-20xy+25y^2\text{.}\)

Explanation

The first term, \(4x^2\text{,}\) is a perfect square because it equals \((2x)^2\text{.}\) So we could take \(A=2x\text{.}\) The last term, \(25y^2\text{,}\) is also a perfect square since it is equal to \((5y)^2\text{.}\) So we could take \(B=5y\text{.}\) Now we multiply \(2AB=2\cdot (2x)\cdot(5y)\text{,}\) and the result is \(20xy\text{.}\) This is the negative of the middle term, which we can work with. The factored form will be \((A-B)^2\) instead of \((A+B)^2\text{.}\)

So we can use Fact 7.5.9:

\begin{align*} 4x^2-20xy+25y^2\amp=(A-B)^2\\ \amp=(2x-5y)^2 \end{align*}
Checkpoint 7.5.12.

Try to factor one yourself:

Warning 7.5.13.

It is not enough to just see that the first and last terms are perfect squares. For example, \(9x^2+10x+25\) has its first term equal to \((3x)^2\) and its last term equal to \(5^2\text{.}\) But when you examine \(2\cdot(3x)\cdot5\) the result is \(30x\text{,}\) not equal to the middle term. So Fact 7.5.9 doesn't apply here. In fact, this polynomial doesn't factor at all.

Remark 7.5.14.

To factor these perfect square trinomials, we could use methods from Section 7.3 and Section 7.4. As an exercise for yourself, try to factor each of the three previous examples using those methods. The advantage to using Fact 7.5.9 is that it is much faster. With some practice, all of the work for using it can be done mentally.

Subsection 7.5.3 Difference/Sum of Cubes Formulas

The following calculation may seem to come from nowhere at first, but see it through. If we multiply \((A-B)\left(A^2+AB+B^2\right)\text{:}\)

\begin{align*} (A-B)\left(A^2+AB+B^2\right)\amp=A^3-\highlight{BA^2}+A^2B-\highlight{BAB}+AB^2-B^3\\ \amp=A^3-\highlight{A^2B}+A^2B-\highlight{AB^2}+AB^2-B^3\\ \amp=A^3\overbrace{{}-A^2B+A^2B}\overbrace{{}-AB^2+AB^2}-B^3\\ \amp=A^3-B^3\text{.} \end{align*}

This is telling us that

\begin{equation*} A^3-B^3=(A-B)\left(A^2+AB+B^2\right)\text{.} \end{equation*}

And so if we ever encounter a polynomial of the form \(A^3-B^3\) (a “difference of cubes” ) then we have a quick formula for factoring it.

A similar formula exists for factoring a sum of cubes, \(A^3+B^3\text{.}\) Here are both formulas, followed by some tips on how to memorize them.

To memorize this, focus on:

  • The factorization is a binomial times a trinomial.

  • The sign you start with appears again in the binomial.

  • The three terms in the trinomial are all quadratic: \(A^2\text{,}\) \(AB\text{,}\) and \(B^2\text{.}\)

  • In the trinomial, it's always adding \(A^2\) and \(B^2\text{.}\) But the sign on \(AB\) is always the opposite of the sign in the sum/difference of cubes.

To use these formulas effectively, we need to recognize when numbers are perfect cubes. Perfect cubes become large fast before you can list too many of them. Try to memorize as many of these as you can:

\begin{align*} 1^3\amp=1\amp 2^3\amp=8\amp 3^3\amp=27\amp 4^3\amp=64\\ 5^3\amp=125\amp 6^3\amp=216\amp 7^3\amp=343\amp 8^3\amp=512\\ 9^3\amp=729\amp 10^3\amp=1000\amp 11^3\amp=1331\amp 12^3\amp=1728 \end{align*}

Let's look at a few examples.

Example 7.5.16.

Factor \(x^3-27\text{.}\)

Explanation

We recognize that \(x^3\) is a perfect cube and \(27=3^3\text{,}\) so we can use Fact 7.5.15 to factor the binomial. Note that since we have a difference of cubes, the binomial factor from the formula will subtract two terms, and the middle term from the trinomial will be \(+AB\text{.}\)

\begin{alignat*}{3} x^3-27\amp=(A-B)\big(A^2 \amp\amp +AB\amp\amp+B^2\big)\\ \amp=(x-3)\big(x^2 \amp\amp +(x)(3)\amp\amp+3^2\big)\\ \amp=(x-3)\big(x^2 \amp\amp +3x\amp\amp+9\big) \end{alignat*}
Example 7.5.17.

Factor \(27m^3+64n^3\text{.}\)

Explanation

We recognize that \(27m^3=(3m)^3\) and \(64n^3=(4n)^3\) are both perfect cubes, so we can use Fact 7.5.15 to factor the binomial. Note that since we have a sum of cubes, the binomial factor from the formula will add two terms, and the middle term from the trinomial will be \(-AB\text{.}\)

\begin{alignat*}{5} 27m^3+64n^3\amp=(A \amp\amp+B)\amp\amp\big(A^2\amp\amp-AB\amp\amp+B^2\big)\\ \amp=(3m\amp\amp+4n)\amp\amp\big((3m)^2\amp\amp-(3m)(4n)\amp\amp+(4n)^2\big)\\ \amp=(3m\amp\amp+4n)\amp\amp\big(9m^2\amp\amp-12mn\amp\amp+16n^2\big) \end{alignat*}
Checkpoint 7.5.18.

Try to factor one yourself:

Subsection 7.5.4 Factoring in Stages

Sometimes factoring a polynomial will take two or more “stages.” For instance you might use one of the special formulas from this section to factor something into two factors, and then those factors might be factor even more. When the task is to factor a polynomial, the intention is that you fully factor it, breaking down the pieces into even smaller pieces when that is possible.

Example 7.5.19. Factor out any greatest common factor.

Factor \(12z^3-27z\text{.}\)

Explanation

The two terms of this polynomial have greatest common factor \(3z\text{,}\) so the first step in factoring should be to factor this out:

\begin{equation*} 3z\left(4z^2-9\right)\text{.} \end{equation*}

Now we have two factors. There is nothing for us to do with \(3z\text{,}\) but we should ask if \(\left(4z^2-9\right)\) can factor further. And in fact, that is a difference of squares. So we can apply Fact 7.5.3. The full process would be:

\begin{align*} 12z^3-27z\amp=3z\left(4z^2-9\right)\\ \amp=3z(2z-3)(2z+3) \end{align*}
Example 7.5.20. Recognize a second special pattern.

Factor \(p^4-1\text{.}\)

Explanation

Since \(p^4\) is the same as \(\left(p^2\right)^2\text{,}\) we have a difference of squares here. We can apply Fact 7.5.3:

\begin{align*} p^4-1\amp=\left(p^2-1\right)\left(p^2+1\right)\\ \end{align*}

It doesn't end here. Of the two factors we found, \(\left(p^2+1\right)\) cannot be factored further. But the other one, \(\left(p^2-1\right)\) is also a difference of squares. So we should apply Fact 7.5.3 again:

\begin{align*} \phantom{p^4-1}\amp=(p-1)(p+1)\left(p^2+1\right) \end{align*}
Checkpoint 7.5.21.

Try to factor one yourself:

The trinomial from Fact 7.5.15 will never factor further. However, in some cases, the binomial from that formula will factor further, and you should look for this.

Example 7.5.22.

Factor \(64p^6-729\text{.}\)

Explanation

We recognize that \(64p^6\) is a perfect square because it equals \(\left(8p^3\right)^2\text{.}\) And \(729\) is also a perfect square because \(729=27^2\text{.}\) So we can use Fact 7.5.3 to factor the binomial.

\begin{align*} 64p^6-729\amp=\left(A-B\right)\left(A+B\right)\\ \amp=\highlight{\left(8p^3-27\right)}\lighthigh{\left(8p^3+27\right)}\\ \end{align*}

Next, note that in each of the factors we have an \(8p^3\) and a \(27\text{,}\) both of which can be viewed as perfect cubes: \(8p^3=(2p)^3\) and a \(27=3^3\text{.}\) So we will use both the difference of cubes and the sum of cubes formulas.

\begin{align*} \amp=\highlight{(A-B)\left(A^2+AB+B^2\right)}\lighthigh{(A+B)\left(A^2-AB+B^2\right)}\\ \amp=\highlight{(2p-3)\left((2p)^2+(2p)\cdot3+3^2\right)}\lighthigh{(2p+3)\left((2p)^2-(2p)\cdot3+3^2\right)}\\ \amp=\highlight{(2p-3)\left(4p^2+6p+9\right)}\lighthigh{(2p+3)\left(4p^2-6p+9\right)} \end{align*}
Example 7.5.23.

Factor \(32x^6y^2-48x^5y+18x^4\text{.}\)

Explanation

The first step of factoring any polynomial is to factor out the common factor if possible. For this trinomial, the common factor is \(2x^4\text{,}\) so we write

\begin{equation*} 32x^6y^2-48x^5y+18x^4=2x^4(16x^2y^2-24xy+9)\text{.} \end{equation*}

The square numbers \(16\) and \(9\) in \(16x^2y^2-24xy+9\) hint that maybe we could use Fact 7.5.9 . Taking \(A=4xy\) and \(B=3\text{,}\) we multiply \(2AB=2\cdot(4xy)\cdot 3\text{.}\) The result is \(24xy\text{,}\) which is the negative of our middle term. So the whole process is:

\begin{align*} 32x^6y^2-48x^5y+18x^4\amp=2x^4(16x^2y^2-24xy+9)\\ \amp=2x^4(a-b)^2\\ \amp=2x^4(4xy-3)^2 \end{align*}

Exercises 7.5.5 Exercises

Review and Warmup
1.

Expand the square of a binomial.

\(\left({3r+4}\right)^2=\)

2.

Expand the square of a binomial.

\(\left({9r+8}\right)^2=\)

3.

Expand the square of a binomial.

\(\left({t-6}\right)^2=\)

4.

Expand the square of a binomial.

\(\left({t-10}\right)^2=\)

5.

Expand the square of a binomial.

\(\left({x^{3}+7}\right)^2=\)

6.

Expand the square of a binomial.

\(\left({x^{6}-3}\right)^2=\)

7.

Multiply the polynomials.

\(\left({y-12}\right)\left({y+12}\right)=\)

8.

Multiply the polynomials.

\(\left({y+5}\right)\left({y-5}\right)=\)

9.

Multiply the polynomials.

\(\left({3y+4}\right)\left({3y-4}\right)=\)

10.

Multiply the polynomials.

\(\left({2r-8}\right)\left({2r+8}\right)=\)

11.

Multiply the polynomials.

\(\left({5r^{6}+1}\right)\left({5r^{6}-1}\right)=\)

12.

Multiply the polynomials.

\(\left({3t^{4}+12}\right)\left({3t^{4}-12}\right)=\)

Factoring
13.

Factor the given polynomial.

\({t^{2}-144}=\)

14.

Factor the given polynomial.

\({x^{2}-64}=\)

15.

Factor the given polynomial.

\({16x^{2}-9}=\)

16.

Factor the given polynomial.

\({144y^{2}-1}=\)

17.

Factor the given polynomial.

\({y^{2}r^{2}-100}=\)

18.

Factor the given polynomial.

\({y^{2}x^{2}-36}=\)

19.

Factor the given polynomial.

\({121r^{2}t^{2}-9}=\)

20.

Factor the given polynomial.

\({144r^{2}y^{2}-1}=\)

21.

Factor the given polynomial.

\({9-t^{2}}=\)

22.

Factor the given polynomial.

\({4-t^{2}}=\)

23.

Factor the given polynomial.

\({49-36x^{2}}=\)

24.

Factor the given polynomial.

\({49-4x^{2}}=\)

25.

Factor the given polynomial.

\({y^{4}-100}=\)

26.

Factor the given polynomial.

\({y^{4}-36}=\)

27.

Factor the given polynomial.

\({9y^{4}-49}=\)

28.

Factor the given polynomial.

\({100r^{4}-49}=\)

29.

Factor the given polynomial.

\({r^{6}-36}=\)

30.

Factor the given polynomial.

\({t^{10}-4}=\)

31.

Factor the given polynomial.

\({144x^{4}-121y^{4}}=\)

32.

Factor the given polynomial.

\({4x^{4}-25y^{4}}=\)

33.

Factor the given polynomial.

\({x^{6}-9y^{14}}=\)

34.

Factor the given polynomial.

\({x^{6}-9y^{12}}=\)

35.

Factor the given polynomial.

\({y^{2}+8y+16}=\)

36.

Factor the given polynomial.

\({y^{2}+24y+144}=\)

37.

Factor the given polynomial.

\({r^{2}-16r+64}=\)

38.

Factor the given polynomial.

\({r^{2}-8r+16}=\)

39.

Factor the given polynomial.

\({144t^{2}+24t+1}=\)

40.

Factor the given polynomial.

\({64t^{2}+16t+1}=\)

41.

Factor the given polynomial.

\({16x^{2}-8x+1}=\)

42.

Factor the given polynomial.

\({121x^{2}-22x+1}=\)

43.

Factor the given polynomial.

\({121y^{2}r^{2}-22yr+1}=\)

44.

Factor the given polynomial.

\({25y^{2}x^{2}-10yx+1}=\)

45.

Factor the given polynomial.

\({y^{2}+18yt+81t^{2}}=\)

46.

Factor the given polynomial.

\({r^{2}+4ry+4y^{2}}=\)

47.

Factor the given polynomial.

\({r^{2}-14rx+49x^{2}}=\)

48.

Factor the given polynomial.

\({t^{2}-6tx+9x^{2}}=\)

49.

Factor the given polynomial.

\({16t^{2}+40ty+25y^{2}}=\)

50.

Factor the given polynomial.

\({16x^{2}+24xt+9t^{2}}=\)

51.

Factor the given polynomial.

\({16x^{2}-40xt+25t^{2}}=\)

52.

Factor the given polynomial.

\({4y^{2}-44yr+121r^{2}}=\)

53.

Factor the given polynomial.

\({y^{3}+8}=\)

54.

Factor the given polynomial.

\({y^{3}+729}=\)

Hint: \(729=9^3\text{.}\)

55.

Factor the given polynomial.

\({r^{3}-125}=\)

56.

Factor the given polynomial.

\({r^{3}-8}=\)

57.

Factor the given polynomial.

\({343t^{3}+1}=\)

Hint: \(343 = 7^3\text{.}\)

58.

Factor the given polynomial.

\({64t^{3}+1}=\)

59.

Factor the given polynomial.

\({1000x^{3}-1}=\)

Hint: \(1000 = 10^3\text{.}\)

60.

Factor the given polynomial.

\({343x^{3}-1}=\)

Hint: \(343 = 7^3\text{.}\)

61.

Factor the given polynomial.

\({64y^{3}+125}=\)

62.

Factor the given polynomial.

\({1000y^{3}+729}=\)

Hint: \(1000=10^3\text{,}\) \(729=9^3\text{.}\)

63.

Factor the given polynomial.

\({343y^{3}-27}=\)

Hint: \(343=7^3\text{.}\)

64.

Factor the given polynomial.

\({64r^{3}-343}=\)

Hint: \(-343=-7^3\text{.}\)

65.

Factor the given polynomial.

\({x^{3}y^{3}+729}=\)

Hint: \(729=9^3\text{.}\)

66.

Factor the given polynomial.

\({x^{3}y^{3}+1000}=\)

Hint: \(1000=10^3\text{.}\)

67.

Factor the given polynomial.

\({x^{3}-1728y^{3}}=\)

Hint: \(-1728=-12^3\text{.}\)

68.

Factor the given polynomial.

\({x^{3}-8y^{3}}=\)

69.

Factor the given polynomial.

\({16x^{4}-81}=\)

70.

Factor the given polynomial.

\({y^{4}-16}=\)

71.

Factor the given polynomial.

\({4y^{2}-100}=\)

72.

Factor the given polynomial.

\({2y^{2}-18}=\)

73.

Factor the given polynomial.

\({6r^{3}-24r}=\)

74.

Factor the given polynomial.

\({5r^{3}-20r}=\)

75.

Factor the given polynomial.

\({7t^{4}y^{4}-112t^{2}y^{2}}=\)

76.

Factor the given polynomial.

\({2t^{3}x^{4}-32tx^{2}}=\)

77.

Factor the given polynomial.

\({44-11x^{2}}=\)

78.

Factor the given polynomial.

\({81-9x^{2}}=\)

79.

Factor the given polynomial.

\({36x^{2}+36x+9}=\)

80.

Factor the given polynomial.

\({16y^{2}+16y+4}=\)

81.

Factor the given polynomial.

\({36y^{2}r^{2}+36yr+9}=\)

82.

Factor the given polynomial.

\({72r^{2}t^{2}+48rt+8}=\)

83.

Factor the given polynomial.

\({100r^{2}-40r+4}=\)

84.

Factor the given polynomial.

\({12t^{2}-12t+3}=\)

85.

Factor the given polynomial.

\({144t^{6}+24t^{5}+t^{4}}=\)

86.

Factor the given polynomial.

\({64x^{9}+16x^{8}+x^{7}}=\)

87.

Factor the given polynomial.

\({16x^{5}-8x^{4}+x^{3}}=\)

88.

Factor the given polynomial.

\({121x^{8}-22x^{7}+x^{6}}=\)

89.

Factor the given polynomial.

\({98y^{9}+28y^{8}+2y^{7}}=\)

90.

Factor the given polynomial.

\({96y^{7}+48y^{6}+6y^{5}}=\)

91.

Factor the given polynomial.

\({50r^{7}-20r^{6}+2r^{5}}=\)

92.

Factor the given polynomial.

\({40r^{5}-40r^{4}+10r^{3}}=\)

93.

Factor the given polynomial.

\({27t^{4}+512t}=\)

Hint: \(512=8^3\text{.}\)

94.

Factor the given polynomial.

\({729t^{4}+125t}=\)

Hint: \(729=9^3\text{.}\)

95.

Factor the given polynomial.

\({8x^{3}+27y^{3}}=\)

96.

Factor the given polynomial.

\({27x^{3}+8y^{3}}=\)

97.

Factor the given polynomial.

\({2x^{4}-162}=\)

98.

Factor the given polynomial.

\({5y^{4}-80}=\)

99.

Factor the given polynomial.

\({y^{6}+8y^{3}}=\)

100.

Factor the given polynomial.

\({r^{9}+729r^{6}}=\)

Hint: \(729=9^3\text{.}\)

101.

Factor the given polynomial.

\({r^{2}+25}=\)

102.

Factor the given polynomial.

\({t^{2}+1}=\)

103.

Factor the given polynomial.

\({3t^{3}+48t}=\)

104.

Factor the given polynomial.

\({5x^{3}+80x}=\)

105.

Factor the given polynomial.

\({x-x^{3}}=\)

106.

Factor the given polynomial.

\({0.49x-x^{3}}=\)

107.

Factor the given polynomial.

\({\left(y-5\right)^{2}-64}=\)

108.

Factor the given polynomial.

\({\left(y+9\right)^{2}-144}=\)

109.

Factor the given polynomial.

\({x^{2}+4x+4-64y^{2}}=\)

110.

Factor the given polynomial.

\({x^{2}+8x+16-100y^{2}}=\)