7.4 – Factoring Special Cases

Learning Objectives

  • (7.4.1) – Factoring special cases – squares
    • Factoring perfect square trinomials
    • Factoring s difference of squares
  • (7.4.2)- Factoring special cases – cubes
    • Factoring the sum of cubes.
    • Factoring the difference of cubes
  • (7.4.3)- More factoring methods
    • Factoring by substitution
    • Factoring completely
  • (7.4.4) – General factoring strategy

Why learn how to factor special cases?

Repeated pattern of interlocking plus signs, each row a different color following the rainbow spectrum.


Some people like to find patterns in the world around them, like a game.  There are some polynomials that, when factored, follow a specific pattern.



These include:

Perfect square trinomials of the form: [latex]{a}^{2}+2ab+{b}^{2}[/latex] or [latex]{a}^{2}-2ab+{b}^{2}[/latex]

A difference of squares: [latex]{a}^{2}-{b}^{2}[/latex]

A sum of cubes: [latex]{a}^{3}+{b}^{3}[/latex]

A difference of cubes: [latex]{a}^{3}-{b}^{3}[/latex]


In this lesson you will see you can factor each of these types of polynomials following a specific pattern.  You will also learn how to factor polynomials that have negative or fractional exponents.

Picture of a sidewalk leading to a parking lot. There is a path through the grass to teh right of the sidewalk through the trees that has been made by people walking on the grass. The shortcut to the parking lot is the preferred way.

Some people find it helpful to know when they can take a shortcut to avoid doing extra work.  There are some polynomials that will always factor a certain way, and for those we offer a shortcut.  Most people find it helpful to memorize the factored form of a perfect square trinomial or a difference of squares.  The most important skill you will use in this section will be recognizing when you can use the shortcuts.

(7.4.1) – Factoring special cases – squares

Factoring Perfect Square Trinomials

A perfect square trinomial is a trinomial that can be written as the square of a binomial. Recall that when a binomial is squared, the result is the square of the first term added to twice the product of the two terms and the square of the last term.

[latex]\begin{array}{ccc}\hfill {a}^{2}+2ab+{b}^{2}& =& {\left(a+b\right)}^{2}\hfill \\ & \text{and}& \\ \hfill {a}^{2}-2ab+{b}^{2}& =& {\left(a-b\right)}^{2}\hfill \end{array}[/latex]

We can use this equation to factor any perfect square trinomial.

A General Note: Perfect Square Trinomials

A perfect square trinomial can be written as the square of a binomial:


In the following example we will show you how to define a, and b so you can use the shortcut.


Factor [latex]25{x}^{2}+20x+4[/latex].

In the next example, we will show that we can use [latex]1 = 1^2[/latex] to factor a polynomial with a term equal to 1.


Factor [latex]49{x}^{2}-14x+1[/latex].

In the following video we provide another short description of what a perfect square trinomial is, and show how to factor them using a the formula.

We can summarize our process in the following way:

Given a perfect square trinomial, factor it into the square of a binomial.

  1. Confirm that the first and last term are perfect squares.
  2. Confirm that the middle term is twice the product of [latex]ab[/latex].
  3. Write the factored form as [latex]{\left(a+b\right)}^{2}[/latex], or [latex]{\left(a-b\right)}^{2}[/latex].

Factoring a Difference of Squares

A difference of squares is a perfect square subtracted from a perfect square. Recall that a difference of squares can be rewritten as factors containing the same terms but opposite signs because the middle terms cancel each other out when the two factors are multiplied.


We can use this equation to factor any differences of squares.

A General Note: Differences of Squares

A difference of squares can be rewritten as two factors containing the same terms but opposite signs.



Factor [latex]9{x}^{2}-25[/latex].

The most helpful thing for recognizing a difference of squares that can be factored with the shortcut is knowing which numbers are perfect squares, as you will see in the next example.


Factor [latex]81{y}^{2}-144[/latex].


In the following video we show another example of how to use the formula for fact a difference of squares.

We can summarize the process for factoring a difference of squares with the shortcut this way:

How To: Given a difference of squares, factor it into binomials.

  1. Confirm that the first and last term are perfect squares.
  2. Write the factored form as [latex]\left(a+b\right)\left(a-b\right)[/latex].

Think About It

Is there a formula to factor the sum of squares, [latex]a^2+b^2[/latex], into a product of two binomials?

Write down some ideas for how you would answer this in the box below before you look at the answer.

(7.4.2)- Factoring Special Cases – Cubes

Some interesting patterns arise when you are working with cubed quantities within polynomials. Specifically, there are two more special cases to consider: [latex]a^{3}+b^{3}[/latex] and [latex]a^{3}-b^{3}[/latex].

Let’s take a look at how to factor sums and differences of cubes.

Factoring the sum of cubes

The term “cubed” is used to describe a number raised to the third power. In geometry, a cube is a six-sided shape with equal width, length, and height; since all these measures are equal, the volume of a cube with width x can be represented by [latex]x^{3}[/latex]. (Notice the exponent!)

Cubed numbers get large very quickly. [latex]1^{3}=1[/latex], [latex]2^{3}=8[/latex], [latex]3^{3}=27[/latex], [latex]4^{3}=64[/latex], and [latex]5^{3}=125[/latex].

Before looking at factoring a sum of two cubes, let’s look at the possible factors.

It turns out that [latex]a^{3}+b^{3}[/latex] can actually be factored as [latex]\left(a+b\right)\left(a^{2}–ab+b^{2}\right)[/latex]. Let’s check these factors by multiplying.


Does [latex](a+b)(a^{2}–ab+b^{2})=a^{3}+b^{3}[/latex]?

Did you see that? Four of the terms cancelled out, leaving us with the (seemingly) simple binomial [latex]a^{3}+b^{3}[/latex]. So, the factors are correct.

You can use this pattern to factor binomials in the form [latex]a^{3}+b^{3}[/latex], otherwise known as “the sum of cubes.”

The Sum of Cubes

A binomial in the form [latex]a^{3}+b^{3}[/latex] can be factored as [latex]\left(a+b\right)\left(a^{2}–ab+b^{2}\right)[/latex].


The factored form of [latex]x^{3}+64[/latex] is [latex]\left(x+4\right)\left(x^{2}–4x+16\right)[/latex].

The factored form of [latex]8x^{3}+y^{3}[/latex] is [latex]\left(2x+y\right)\left(4x^{2}–2xy+y^{2}\right)[/latex].


Factor [latex]x^{3}+8y^{3}[/latex].

And that’s it. The binomial [latex]x^{3}+8y^{3}[/latex] can be factored as [latex]\left(x+2y\right)\left(x^{2}–2xy+4y^{2}\right)[/latex]! Let’s try another one.

You should always look for a common factor before you follow any of the patterns for factoring.


Factor [latex]16m^{3}+54n^{3}[/latex].

Factoring the difference of cubes

Having seen how binomials in the form [latex]a^{3}+b^{3}[/latex] can be factored, it should not come as a surprise that binomials in the form [latex]a^{3}-b^{3}[/latex] can be factored in a similar way.

The Difference of Cubes

A binomial in the form [latex]a^{3}–b^{3}[/latex] can be factored as [latex]\left(a-b\right)\left(a^{2}+ab+b^{2}\right)[/latex].


The factored form of [latex]x^{3}–64[/latex] is [latex]\left(x–4\right)\left(x^{2}+4x+16\right)[/latex].

The factored form of [latex]27x^{3}–8y^{3}[/latex] is [latex]\left(3x–2y\left)\right(9x^{2}+6xy+4y^{2}\right)[/latex].

Notice that the basic construction of the factorization is the same as it is for the sum of cubes; the difference is in the [latex]+[/latex] and [latex]–[/latex] signs. Take a moment to compare the factored form of [latex]a^{3}+b^{3}[/latex] with the factored form of [latex]a^{3}-b^{3}[/latex].

Factored form of [latex]a^{3}+b^{3}[/latex]: [latex]\left(a+b\right)\left(a^{2}-ab+b^{2}\right)[/latex]

Factored form of [latex]a^{3}-b^{3}[/latex]: [latex]\left(a-b\right)\left(a^{2}+ab+b^{2}\right)[/latex]

This can be tricky to remember because of the different signs—the factored form of [latex]a^{3}+b^{3}[/latex] contains a negative, and the factored form of [latex]a^{3}-b^{3}[/latex] contains a positive! Some people remember the different forms like this:

“Remember one sequence of variables: [latex]a^{3}b^{3}=\left(a\,b\right)\left(a^{2}ab\,b^{2}\right)[/latex]. There are 4 missing signs. Whatever the first sign is, it is also the second sign. The third sign is the opposite, and the fourth sign is always [latex]+[/latex].”

Try this for yourself. If the first sign is [latex]+[/latex], as in [latex]a^{3}+b^{3}[/latex], according to this strategy how do you fill in the rest: [latex]\left(a\,b\right)\left(a^{2}ab\,b^{2}\right)[/latex]? Does this method help you remember the factored form of [latex]a^{3}+b^{3}[/latex] and [latex]a^{3}–b^{3}[/latex]?

Let’s go ahead and look at a couple of examples. Remember to factor out all common factors first.


Factor [latex]8x^{3}–1,000[/latex].

Let’s see what happens if you don’t factor out the common factor first. In this example, it can still be factored as the difference of two cubes. However, the factored form still has common factors, which need to be factored out.

As you can see, this last example still worked, but required a couple of extra steps. It is always a good idea to factor out all common factors first. In some cases, the only efficient way to factor the binomial is to factor out the common factors first.

Here is one more example. Note that [latex]r^{9}=\left(r^{3}\right)^{3}[/latex] and that [latex]8s^{6}=\left(2s^{2}\right)^{3}[/latex].


Factor [latex]r^{9}-8s^{6}[/latex].

In the following two video examples we show more binomials that can be factored as a sum or difference of cubes.

You encounter some interesting patterns when factoring. Two special cases—the sum of cubes and the difference of cubes—can help you factor some binomials that have a degree of three (or higher, in some cases). The special cases are:

  • A binomial in the form [latex]a^{3}+b^{3}[/latex] can be factored as [latex]\left(a+b\right)\left(a^{2}–ab+b^{2}\right)[/latex]
  • A binomial in the form [latex]a^{3}-b^{3}[/latex] can be factored as [latex]\left(a-b\right)\left(a^{2}+ab+b^{2}\right)[/latex]

Always remember to factor out any common factors first.

(7.4.3) – More factoring methods

Factoring using substitution

We are going to move back to factoring polynomials – our exponents will be positive integers. Sometimes we encounter a polynomial that looks similar to something we know how to factor, but isn’t quite the same. Substitution is a useful tool that can be used to “mask” a term or expression to make algebraic operations easier.

You may recall that substitution can be used to solve systems of linear equations, and to check whether a point is a solution to a system of linear equations. for example:

To determine whether the ordered pair [latex]\left(5,1\right)[/latex] is a solution to the given system of equations.

[latex]\begin{array}{l}x+3y=8\hfill \\ 2x - 9=y\hfill \end{array}[/latex]

We can substitute the ordered pair [latex]\left(5,1\right)[/latex] into both equations.

[latex]\begin{array}{ll}\left(5\right)+3\left(1\right)=8\hfill & \hfill \\ \text{ }8=8\hfill & \text{True}\hfill \\ 2\left(5\right)-9=\left(1\right)\hfill & \hfill \\ \text{ }\text{1=1}\hfill & \text{True}\hfill \end{array}[/latex]

We replaced the variable with a number and then performed the algebraic operations specified.  In the next example we will see how we can use a similar technique to factor a fourth degree polynomial.


Factor [latex]x^4+3x^2+2[/latex]

In the following video we show two more examples of how to use substitution to factor a fourth degree polynomial and an expression with fractional exponents.

Factoring completely

Sometimes you may encounter a polynomial that takes an extra step to factor. In our next example we will first find the GCF of a trinomial, and after factoring it out we will be able to factor again so that we end up with a product of a monomial, and two binomials.


Factor completely [latex]6m^2k-3mk-3k[/latex].

In our last example we shoe that it is important to factor out a GCF if there is one before you being using the techniques shown in this module.

Try It

Try It

Try It

(7.4.4) – General Factoring Strategy

With so many different tools used to factor, it is easy to get lost as to which tool to use when. Here we will attempt to organize all the different factoring types we have seen. A large part of deciding how to solve a problem is based on how many terms are in the problem. For all problem types we will always try to factor out the GCF first.

Factoring Strategy

1) Factor out the GCF! (lookout for substitutions!)

2) 2 terms: sum or difference of squares or cubes:

  • [latex]a^2 - b^2 = (a + b) (a - b)[/latex]
  • [latex]a^2 + b^2 = \text{ Prime}[/latex]
  • [latex]a^3 + b^3 = (a + b) (a^2 - a b + b^2)[/latex]
  • [latex]a^3 - b^3 = (a - b) (a^2 + \text{ ab} + b^2)[/latex]

3) 3 terms: watch for perfect square!

  • [latex]a^2 + 2 a b + b^2 = (a + b)^2[/latex]
  • [latex]a^2 - 2ab +b^2 = (a-b)^2[/latex]
  • grouping
  • factoring by trial and error

4) 4 terms:

  • grouping