We've updated our
Privacy Policy effective December 15. Please read our updated Privacy Policy and tap

Study Guides > Intermediate Algebra

Factoring Special Cases

Learning Objectives

  • Special Cases - Squares
    • Factor a polynomial of the form: a2+2ab+b2{a}^{2}+2ab+{b}^{2}
    • Factor a polynomial of the form: a2b2{a}^{2}-{b}^{2}
  • Special Cases - Cubes
    • Factor the sum of cubes.
    • Factor the difference of cubes

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: a2+2ab+b2{a}^{2}+2ab+{b}^{2}

A difference of squares: a2b2{a}^{2}-{b}^{2}

A sum of cubes: a3+b3{a}^{3}+{b}^{3}

A difference of cubes: a3b3{a}^{3}-{b}^{3}

  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.

Factoring a Perfect Square Trinomial

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.
a2+2ab+b2=(a+b)2anda22ab+b2=(ab)2\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}
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:
a2+2ab+b2=(a+b)2{a}^{2}+2ab+{b}^{2}={\left(a+b\right)}^{2}
In the following example we will show you how to define a, and b so you can use the shortcut.

Exercises

Factor 25x2+20x+425{x}^{2}+20x+4.

Answer: First, notice that 25x225{x}^{2} and 44 are perfect squares because 25x2=(5x)225{x}^{2}={\left(5x\right)}^{2} and 4=224={2}^{2}. This means that a=5x and b=2a=5x\text{ and }b=2 Next, check to see if the middle term is equal to 2ab2ab, which it is:

2ab=2(5x)(2)=20x2ab = 2\left(5x\right)\left(2\right)=20x.

  Therefore, the trinomial is a perfect square trinomial and can be written as (a+b)2=(5x+2)2{\left(a+b\right)}^{2}={\left(5x+2\right)}^{2}.

Answer

25x2+20x+4=(5x+2)225{x}^{2}+20x+4={\left(5x+2\right)}^{2}

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

Example

Factor 49x214x+149{x}^{2}-14x+1.

Answer: First, notice that 49x249{x}^{2} and 11 are perfect squares because 49x2=(7x)249{x}^{2}={\left(7x\right)}^{2} and 1=121={1}^{2}. This means that a=7xa=7x, we could say that b=1b=1, but would that give a middle term of 14x-14x? We will need to choose b=1b = -1 to get the results we want:

2ab=2(7x)(1)=14x2ab = 2\left(7x\right)\left(-1\right)=-14x.

Therefore, the trinomial is a perfect square trinomial and can be written as (ab)2=(7x1)2{\left(a-b\right)}^{2}={\left(7x-1\right)}^{2}.

Answer

49x214x+1=(7x1)249{x}^{2}-14x+1={\left(7x-1\right)}^{2}  

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. https://youtu.be/UMCVGDTxxTI 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 abab.
  3. Write the factored form as (a+b)2{\left(a+b\right)}^{2}, or(ab)2{\left(a-b\right)}^{2}.

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.
a2b2=(a+b)(ab){a}^{2}-{b}^{2}=\left(a+b\right)\left(a-b\right)
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.
a2b2=(a+b)(ab){a}^{2}-{b}^{2}=\left(a+b\right)\left(a-b\right)

Example

Factor 9x2259{x}^{2}-25.

Answer: Notice that 9x29{x}^{2} and 2525 are perfect squares because 9x2=(3x)29{x}^{2}={\left(3x\right)}^{2} and 25=5225={5}^{2}. This means that a=3x, and b=5a=3x,\text{ and }b=5 The polynomial represents a difference of squares and can be rewritten as (3x+5)(3x5)\left(3x+5\right)\left(3x - 5\right). Check that you are correct by multiplying. (3x+5)(3x5)=9x215x+15x25=9x225\left(3x+5\right)\left(3x - 5\right)=9x^2-15x+15x-25=9x^2-25

Answer

9x225=(3x+5)(3x5)9{x}^{2}-25=\left(3x+5\right)\left(3x - 5\right)

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.

Example

Factor 81y214481{y}^{2}-144.

Answer: Notice that 81y281{y}^{2} and 144144 are perfect squares because 81y2=(9x)281{y}^{2}={\left(9x\right)}^{2} and 144=122144={12}^{2}. This means that a=9x, and b=12a=9x,\text{ and }b=12 The polynomial represents a difference of squares and can be rewritten as (9x+12)(9x12)\left(9x+12\right)\left(9x - 12\right). Check that you are correct by multiplying. (9x+12)(9x12)=81x2108x+108x144=81x2144\left(9x+12\right)\left(9x - 12\right)=81x^2-108x+108x-144=81x^2-144

Answer

81y2144=(9x+12)(9x12)81{y}^{2}-144=\left(9x+12\right)\left(9x - 12\right)

 
In the following video we show another example of how to use the formula for fact a difference of squares. https://youtu.be/Li9IBp5HrFA 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 (a+b)(ab)\left(a+b\right)\left(a-b\right).

Think About It

Is there a formula to factor the sum of squares, a2+b2a^2+b^2, 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. [practice-area rows="1"][/practice-area]

Answer: There is no way to factor a sum of squares into a product of two binomials, this is because of addition - the middle term needs to "disappear" and the only way to do that is with opposite signs.  to get a positive result, you must multiply two numbers with the same signs. The only time a sum of squares can be factored is if they share any common factors, as in the following case: 9x2+369x^2+36 9x2=(3x)2, and 36=629x^2={(3x)}^2, \text{ and }36 = 6^2 The only way to factor this expression is by pulling out the GCF which is 9. 9x2+36=9(x2+4)9x^2+36=9(x^2+4)

Cubes

Some interesting patterns arise when you are working with cubed quantities within polynomials. Specifically, there are two more special cases to consider: a3+b3a^{3}+b^{3} and a3b3a^{3}-b^{3}. Let’s take a look at how to factor sums and differences of cubes.

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 x3x^{3}. (Notice the exponent!) Cubed numbers get large very quickly. 13=11^{3}=1, 23=82^{3}=8, 33=273^{3}=27, 43=644^{3}=64, and 53=1255^{3}=125. Before looking at factoring a sum of two cubes, let’s look at the possible factors. It turns out that a3+b3a^{3}+b^{3} can actually be factored as (a+b)(a2ab+b2)\left(a+b\right)\left(a^{2}–ab+b^{2}\right). Let’s check these factors by multiplying.

Example

Does (a+b)(a2ab+b2)=a3+b3(a+b)(a^{2}–ab+b^{2})=a^{3}+b^{3}?

Answer: Apply the distributive property.

(a)(a2ab+b2)+(b)(a2ab+b2)\left(a\right)\left(a^{2}–ab+b^{2}\right)+\left(b\right)\left(a^{2}–ab+b^{2}\right)

Multiply by a.

(a3a2b+ab2)+(b)(a2ab+b2)\left(a^{3}–a^{2}b+ab^{2}\right)+\left(b\right)\left(a^{2}-ab+b^{2}\right)

Multiply by b.

(a3a2b+ab2)+(a2bab2+b3)\left(a^{3}–a^{2}b+ab^{2}\right)+\left(a^{2}b–ab^{2}+b^{3}\right)

Rearrange terms in order to combine the like terms.

a3a2b+a2b+ab2ab2+b3a^{3}-a^{2}b+a^{2}b+ab^{2}-ab^{2}+b^{3}

Simplify.

Answer

a3+b3a^{3}+b^{3}

Did you see that? Four of the terms cancelled out, leaving us with the (seemingly) simple binomial a3+b3a^{3}+b^{3}. So, the factors are correct. You can use this pattern to factor binomials in the form a3+b3a^{3}+b^{3}, otherwise known as “the sum of cubes.”

The Sum of Cubes

A binomial in the form a3+b3a^{3}+b^{3} can be factored as (a+b)(a2ab+b2)\left(a+b\right)\left(a^{2}–ab+b^{2}\right).

Examples:

The factored form of x3+64x^{3}+64 is (x+4)(x24x+16)\left(x+4\right)\left(x^{2}–4x+16\right). The factored form of 8x3+y38x^{3}+y^{3} is (2x+y)(4x22xy+y2)\left(2x+y\right)\left(4x^{2}–2xy+y^{2}\right).

Example

Factor x3+8y3x^{3}+8y^{3}.

Answer: Identify that this binomial fits the sum of cubes pattern: a3+b3a^{3}+b^{3}. a=xa=x, and b=2yb=2y (since 2y2y2y=8y32y\cdot2y\cdot2y=8y^{3}).

x3+8y3x^{3}+8y^{3}

Factor the binomial as (a+b)(a2ab+b2)\left(a+b\right)\left(a^{2}–ab+b^{2}\right), substituting a=xa=x and b=2yb=2y into the expression.

(x+2y)(x2x(2y)+(2y)2)\left(x+2y\right)\left(x^{2}-x\left(2y\right)+\left(2y\right)^{2}\right)

Square (2y)2=4y2(2y)^{2}=4y^{2}.

(x+2y)(x2x(2y)+4y2)\left(x+2y\right)\left(x^{2}-x\left(2y\right)+4y^{2}\right)

Multiply x(2y)=2xy−x\left(2y\right)=−2xy (writing the coefficient first).

Answer

(x+2y)(x22xy+4y2)\left(x+2y\right)\left(x^{2}-2xy+4y^{2}\right)

And that’s it. The binomial x3+8y3x^{3}+8y^{3} can be factored as (x+2y)(x22xy+4y2)\left(x+2y\right)\left(x^{2}–2xy+4y^{2}\right)! Let’s try another one. You should always look for a common factor before you follow any of the patterns for factoring.

Example

Factor 16m3+54n316m^{3}+54n^{3}.

Answer: Factor out the common factor 2.

16m3+54n316m^{3}+54n^{3}

8m38m^{3} and 27n327n^{3} are cubes, so you can factor 8m3+27n38m^{3}+27n^{3} as the sum of two cubes: a=2ma=2m, and b=3nb=3n.

2(8m3+27n3)2\left(8m^{3}+27^n{3}\right)

Factor the binomial 8m3+27n38m^{3}+27n^{3} substituting a=2ma=2m and b=3nb=3n into the expression (a+b)(a2ab+b2)\left(a+b\right)\left(a^{2}-ab+b^{2}\right).

2(2m+3n)[(2m)2(2m)(3n)+(3n)2]2\left(2m+3n\right)\left[\left(2m\right)^{2}-\left(2m\right)\left(3n\right)+\left(3n\right)^{2}\right]

Square: (2m)2=4m2(2m)^{2}=4m^{2} and (3n)2=9n2(3n)^{2}=9n^{2}.

2(2m+3n)[4m2(2m)(3n)+9n2]2\left(2m+3n\right)\left[4m^{2}-\left(2m\right)\left(3n\right)+9n^{2}\right]

Multiply (2m)(3n)=6mn-\left(2m\right)\left(3n\right)=-6mn.

Answer

2(2m+3n)(4m26mn+9n2)2\left(2m+3n\right)\left(4m^{2}-6mn+9n^{2}\right)

Difference of Cubes

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

The Difference of Cubes

A binomial in the form a3b3a^{3}–b^{3} can be factored as (ab)(a2+ab+b2)\left(a-b\right)\left(a^{2}+ab+b^{2}\right).

Examples

The factored form of x364x^{3}–64 is (x4)(x2+4x+16)\left(x–4\right)\left(x^{2}+4x+16\right). The factored form of 27x38y327x^{3}–8y^{3} is (3x2y)(9x2+6xy+4y2)\left(3x–2y\left)\right(9x^{2}+6xy+4y^{2}\right).
Notice that the basic construction of the factorization is the same as it is for the sum of cubes; the difference is in the ++ and signs. Take a moment to compare the factored form of a3+b3a^{3}+b^{3} with the factored form of a3b3a^{3}-b^{3}. Factored form of a3+b3a^{3}+b^{3}(a+b)(a2ab+b2)\left(a+b\right)\left(a^{2}-ab+b^{2}\right) Factored form of a3b3a^{3}-b^{3}: (ab)(a2+ab+b2)\left(a-b\right)\left(a^{2}+ab+b^{2}\right) This can be tricky to remember because of the different signs—the factored form of a3+b3a^{3}+b^{3} contains a negative, and the factored form of a3b3a^{3}-b^{3} contains a positive! Some people remember the different forms like this: “Remember one sequence of variables: a3b3=(ab)(a2abb2)a^{3}b^{3}=\left(a\,b\right)\left(a^{2}ab\,b^{2}\right). 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 ++.” Try this for yourself. If the first sign is ++, as in a3+b3a^{3}+b^{3}, according to this strategy how do you fill in the rest: (ab)(a2abb2)\left(a\,b\right)\left(a^{2}ab\,b^{2}\right)? Does this method help you remember the factored form of a3+b3a^{3}+b^{3} and a3b3a^{3}–b^{3}? Let’s go ahead and look at a couple of examples. Remember to factor out all common factors first.

Example

Factor 8x31,0008x^{3}–1,000.

Answer: Factor out 8.

8(x3125)8(x^{3}–125)

Identify that the binomial fits the pattern a3b3:a=xa^{3}-b^{3}:a=x, and b=5b=5 (since 53=1255^{3}=125).

8(x3125)8\left(x^{3}–125\right)

Factor x3125x^{3}–125 as (ab)(a2+ab+b2)\left(a–b\right)\left(a^{2}+ab+b^{2}\right), substituting a=xa=x and b=5b=5 into the expression.

8(x5)[x2+(x)(5)+52]8\left(x-5\right)\left[x^{2}+\left(x\right)\left(5\right)+5^{2}\right]

Square the first and last terms, and rewrite (x)(5)\left(x\right)\left(5\right) as 5x5x.

8(x5)(x2+5x+25)8\left(x–5\right)\left(x^{2}+5x+25\right)

Answer

8(x5)(x2+5x+25)8\left(x–5\right)\left(x^{2}+5x+25\right)

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 r9=(r3)3r^{9}=\left(r^{3}\right)^{3} and that 8s6=(2s2)38s^{6}=\left(2s^{2}\right)^{3}.

Example

Factor r98s6r^{9}-8s^{6}.

Answer: Identify this binomial as the difference of two cubes. As shown above, it is. Using the laws of exponents, rewrite r9r^{9} as (r3)3\left(r^{3}\right)^{3}.

r98s6r^{9}-8s^{6}

Rewrite r9r^{9} as (r3)3\left(r^{3}\right)^{3} and rewrite 8s68s^{6} as (2s2)3\left(2s^{2}\right)^{3}.

(r3)3(2s2)3\left(r^{3}\right)^{3}-\left(2s^{2}\right)^{3}

Now the binomial is written in terms of cubed quantities. Thinking of a3b3a^{3}-b^{3}, a=r3a=r^{3} and b=2s2b=2s^{2}. Factor the binomial as (ab)(a2+ab+b2)\left(a-b\right)\left(a^{2}+ab+b^{2}\right), substituting a=r3a=r^{3} and b=2s2b=2s^{2} into the expression.

(r32s2)[(r3)2+(r3)(2s2)+(2s2)2]\left(r^{3}-2s^{2}\right)\left[\left(r^{3}\right)^{2}+\left(r^{3}\right)\left(2s^{2}\right)+\left(2s^{2}\right)^{2}\right]

Multiply and square the terms.

(r32s2)(r6+2r3s2+4s4)\left(r^{3}-2s^{2}\right)\left(r^{6}+2r^{3}s^{2}+4s^{4}\right)

Answer

(r32s2)(r6+2r3s2+4s4)\left(r^{3}-2s^{2}\right)\left(r^{6}+2r^{3}s^{2}+4s^{4}\right)

In the following two video examples we show more binomials that can be factored as a sum or difference of cubes. https://youtu.be/tFSEpOB262M https://youtu.be/J_0ctMrl5_0 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 a3+b3a^{3}+b^{3} can be factored as (a+b)(a2ab+b2)\left(a+b\right)\left(a^{2}–ab+b^{2}\right)
  • A binomial in the form a3b3a^{3}-b^{3} can be factored as (ab)(a2+ab+b2)\left(a-b\right)\left(a^{2}+ab+b^{2}\right)
Always remember to factor out any common factors first.  

Licenses & Attributions