3.7 Factoring the Sum or Difference of Cubes and a General Approach to Factoring
Learning Objectives
Factor the sum or difference of cubes.
Apply factoring strategies to completely factor polynomial expressions.
Some interesting patterns arise when you are working with cubed quantities within polynomials. Specifically, there are two more special cases to consider: a3+b3a3+b3 and a3−b3a3−b3.
Let us take a look at how to factor sums of cubes a3+b3a3+b3 and differences of cubes a3−b3a3−b3.
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 xx can be represented by x3x3. (Notice the exponent!)
Cubed numbers get large very quickly: 13=113=1, 23=823=8, 33=2733=27, 43=6443=64, and 53=12553=125
Before we talk about factoring sum of cubes, let’s review polynomial multiplication. What do we get when we multiply (a+b)(a2–ab+b2)(a+b)(a2–ab+b2)?
Rearrange terms in order to combine the like terms.
a3−a2b+a2b+ab2−ab2+b3a3−a2b+a2b+ab2−ab2+b3
Simplify.
a3+b3a3+b3
Did you see that? Four of the terms cancelled out, leaving us with a binomial a3+b3a3+b3 which is a sum of cubes. To undo this process and get it back to the form we had originally, we need to factor a3+b3a3+b3.
Because of the above example, it may not be surprising that a3+b3a3+b3 factors to be (a+b)(a2–ab+b2)(a+b)(a2–ab+b2) but how do we factor it?
You can use this pattern to factor sum of cubes: a3+b3=(a+b)(a2–ab+b2)a3+b3=(a+b)(a2–ab+b2).
The Sum of Cubes
A binomial in the form a3+b3a3+b3 can be factored as (a+b)(a2–ab+b2)(a+b)(a2–ab+b2).
Examples
The factored form of x3+64x3+64 is (x+4)(x2–4x+16)(x+4)(x2–4x+16).
The factored form of 8x3+y38x3+y3 is (2x+y)(4x2–2xy+y2)(2x+y)(4x2–2xy+y2).
Let’s look at some detailed examples to figure out how we can get sum or differences of cubes into factored form.
Example
Factor x3+8y3x3+8y3.
Show Solution
Identify that this binomial fits the sum of cubes pattern a3+b3a3+b3. Then determine aa and bb.
a=xa=x (since x\dot x\cdot x = x^3, and b=2yb=2y (since 2y⋅2y⋅2y=8y32y⋅2y⋅2y=8y3).
x3+8y3x3+8y3
Factor the binomial as (a+b)(a2–ab+b2)(a+b)(a2–ab+b2), substituting a=xa=x and b=2yb=2y into the expression.
(x+2y)(x2−x(2y)+(2y)2)(x+2y)(x2−x(2y)+(2y)2)
Multiply −x(2y)−x(2y) to get −2xy−2xy (write the coefficient first).
Notice that the third term of the trinomial is the quantity squared (2y)2(2y)2 which is 4y24y2.
The factored form is (x+2y)(x2−2xy+4y2)(x+2y)(x2−2xy+4y2).
You should always look for a greatest common factor (GCF) before doing any other factoring.
Example
Factor 16m3+54n316m3+54n3.
Show Solution
Factor out the common factor 22.
16m3+54n316m3+54n3
2(8m3+27n3)2(8m3+27n3)
8m38m3 and 27n327n3 are perfect cubes, so you can factor 8m3+27n38m3+27n3 as the sum of two cubes: a=2ma=2m and b=3nb=3n.
Factor the binomial 8m3+27n38m3+27n3 substituting a=2ma=2m and b=3nb=3n into the expression (a+b)(a2−ab+b2)(a+b)(a2−ab+b2).
Make sure to remember the GCF of 22 that we factored out previously.
The factored form is 2(2m+3n)(4m2−6mn+9n2)2(2m+3n)(4m2−6mn+9n2).
Difference of Cubes
Having seen how binomials in the form a3+b3a3+b3 can be factored, it should not come as a surprise that binomials in the form a3−b3a3−b3 can be factored in a similar way.
The Difference of Cubes
A binomial in the form a3–b3a3–b3 can be factored as (a−b)(a2+ab+b2)(a−b)(a2+ab+b2).
Examples
The factored form of x3–64x3–64 is (x–4)(x2+4x+16)(x–4)(x2+4x+16).
The factored form of 27x3–8y327x3–8y3 is (3x–2y)(9x2+6xy+4y2)(3x–2y)(9x2+6xy+4y2).
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+b3a3+b3 with the factored form of a3−b3a3−b3.
a3+b3a3+b3=(a+b)(a2−ab+b2)(a+b)(a2−ab+b2)
a3−b3a3−b3= (a−b)(a2+ab+b2)(a−b)(a2+ab+b2)
This can be tricky to remember because of the different signs. The factored form of a3+b3a3+b3 contains a negative, and the factored form of a3−b3a3−b3contains a positive! Some people remember the different forms like this:
Remember to use SOAP
SOAP is a memory device used for factoring sum or differences of cubes, to help you remember which signs you should use on each term in factored form.
“S” stands for Same
“O” stands for Opposite
“AP” stands for Always Positive
ALWAYS POSITIVE: the third term of the trinomial will always be positive because you are squaring that term. A negative times a negative is always positive and a positive times a positive is always positive. a3+b3=(a+b)(a2−ab+b2)a3+b3=(a+b)(a2−ab+b2) and a3−b3=(a−b)(a2+ab+b2)a3−b3=(a−b)(a2+ab+b2)
Let us go ahead and look at a couple of examples. Remember to factor out all common factors first.
Example
Factor 8x3–1,0008x3–1,000 completely.
Show Solution
Notice that 88 and 10001000 are perfect cubes but don’t try to factor using the difference of cubes yet because also notice that they have a GCF of 88 that should be factored out first.
Factor out 88.
8(x3–125)8(x3–125)
Identify that the binomial fits the pattern a3−b3:a=xa3−b3:a=x, and b=5b=5 (since 53=12553=125).
Factor x3–125x3–125 as (a–b)(a2+ab+b2)(a–b)(a2+ab+b2), substituting a=xa=x and b=5b=5 into the expression.
8(x−5)[x2+(x)(5)+52]8(x−5)[x2+(x)(5)+52]
Square the first and last terms, and rewrite (x)(5)(x)(5) as 5x5x.
8(x–5)(x2+5x+25)8(x–5)(x2+5x+25)
Check to make sure your signs are correct. Did you remember to use SOAP?
Note: If you didn’t notice the GCF of 88, you might start to factor by identifying aa as 2x2x and bb as 1010. when factored we get (2x−10)(4x2+20x+100)(2x−10)(4x2+20x+100). This is different than the solution above because this can still be factored more. Notice in the binomial a 22 can be factored out and in the trinomial a 44 can be factored out.
Here is one more example. Note that r9=(r3)3r9=(r3)3 and that 8s6=(2s2)38s6=(2s2)3.
Example
Factor r9−8s6r9−8s6.
Show Solution
Identify this binomial as the difference of two cubes. As shown above, it is.
Rewrite r9r9 as (r3)3(r3)3 and rewrite 8s68s6 as (2s2)3(2s2)3.
(r3)3−(2s2)3(r3)3−(2s2)3
Now the binomial is written in terms of cubed quantities. Thinking of a3−b3a3−b3, a=r3a=r3 and b=2s2b=2s2.
Factor the binomial as (a−b)(a2+ab+b2)(a−b)(a2+ab+b2), substituting a=r3a=r3 and b=2s2b=2s2 into the expression.
Check to make sure your signs are correct. Did you remember to use SOAP?
In the following two video examples, we show more binomials that can be factored as a sum or difference of cubes.
Review of Factoring
In a previous section, you have learned several factoring techniques. Now it is time to put it all together.
We focus on two important questions you should ask yourself when encountering any factoring problem:
Which factoring technique should I use for this problem?
Can I factor the polynomial more?
Choosing the Best Factoring Technique
Here, we present a strategy you can apply to any factoring problem. Refer back to Section 3.5 if you need more practice with factoring.
Factoring strategy
1. If there is a GCF other than 11, factor it out first. Don’t forget to factor out a −1−1 if the leading coefficient is negative.
2. Count the number of terms in the remaining polynomial and select an appropriate technique.
I.4 Terms: Factor by Grouping
II.3 Terms: ax2+bx+cax2+bx+c
A. If a=1a=1, apply the “Product and Sum Method.” Ask yourself: What multiplies to be cc that adds to be bb?
B. If a≠1a≠1, apply the “AC-Method”
C. If it is a perfect square trinomial, use the appropriate formula:
a2+2ab+b2=(a+b)2a2+2ab+b2=(a+b)2
a2−2ab+b2=(a−b)2a2−2ab+b2=(a−b)2
III. 2 Terms:
A. If the binomial is a difference of squares, use the following formula: a2−b2=(a+b)(a−b)a2−b2=(a+b)(a−b)
Remember that a sum of squares is not factorable: a2+b2a2+b2 is a prime polynomial
B. If the binomial is a sum or difference of cubes use:
a3+b3a3+b3=(a+b)(a2−ab+b2)(a+b)(a2−ab+b2)
a3−b3a3−b3= (a−b)(a2+ab+b2)(a−b)(a2+ab+b2)
3. If none of the above applies, it is possible that the polynomial is not factorable, or “prime.”
Let us try some examples.
Example 1
Factor −3x2−3x+6−3x2−3x+6.
Show Solution
We first check for a common factor, recognizing that all terms share a factor of 33. Moreover, since the leading coefficient is negative, we will factor out a GCF of −3−3.
−3(x2+x−2)−3(x2+x−2)
Next, we examine the resulting polynomial. It has 3 terms and a leading coefficient of a=1a=1. So, we can use the Product and Sum Method, searching for two numbers rr and ss that multiply to c=−2c=−2 and add to b=1b=1, which are 22 and −1−1.
−3(x+2)(x−1)−3(x+2)(x−1)
Example 2
Factor −3x2−7x+6−3x2−7x+6.
Show Solution
Initially, this looks similar to the previous example. However, this time 33 is no longer in common. We will still begin by factoring out −1−1 though.
−1(3x2+7x−6)−1(3x2+7x−6)
The resulting polynomial has 3 terms, but a leading coefficient other than 1. So, we use the AC-Method. We need two numbers that multiply to ac=3(−6)=−18ac=3(−6)=−18 and add to b=7b=7, which are 99 and −2−2.
Rewrite the middle term 7x7x as 9x−2x9x−2x and apply the grouping technique.
−(3x2+9x−2x−6)−(3x2+9x−2x−6)
=−[3x(x+3)−2(x+3)]=−[3x(x+3)−2(x+3)]
=−(x+3)(3x−2)=−(x+3)(3x−2)
The next example includes a perfect square trinomial.
Example 3
Factor 12x5+60x4+75x312x5+60x4+75x3
Show Solution
We first factor out the GCF of 3x33x3.
3x3(4x2+20x+25)3x3(4x2+20x+25)
We could proceed by applying the AC-Method to the resulting trinomial with leading coefficient other than 1, but let us check whether the result is a Perfect Square Trinomial. Comparing to a2+2ab+b2a2+2ab+b2, we have a=2xa=2x andb=5b=5. Since 2ab=2(2x)(5)=202ab=2(2x)(5)=20 matches our middle term, we can apply the formula a2+2ab+b2=(a+b)2a2+2ab+b2=(a+b)2 to factor as
3x3(2x+5)23x3(2x+5)2
In the next two examples, we review factoring binomials.
Example 4
Factor −2x2+8−2x2+8
Show Solution
We first factor out the GCF. Noting that the leading coefficient is negative, we will factor out −2−2.
−2(x2−4)−2(x2−4)
The resulting binomial is a difference of squares, which we factor as
−2(x+2)(x−2)−2(x+2)(x−2).
Example 5
Factor 50x2y3−8y50x2y3−8y
Show Solution
Once again, we start by looking for a common factor. We can factor out a GCF of 2y2y.
2y(25x2y2−4)2y(25x2y2−4)
The resulting polynomial has 2 terms and is in the form of a difference of squares with a=5xya=5xy and b=2b=2.
2y(5xy+2)(5xy−2)2y(5xy+2)(5xy−2)
Don’t forget that we cannot factor every polynomial.
Example 6
Factor 5x2+8x+45x2+8x+4
Show Solution
Since there are 3 terms and the leading coefficient is a=5a=5 (which is not a common factor), we attempt to use the AC-Method. We need two numbers that multiply to ac=5(4)=20ac=5(4)=20 and add to b=8b=8. However, two such integers do not exist. We conclude that the polynomial is not factorable.
Answer: Prime
Note: This example reminds of of the important role that signs play in this process. You may be tempted to conclude that 1010 and 22 is a potential pair of numbers that would work for this problem. However, to multiply to positive 2020, the numbers must have the same sign (both positive or both negative), and there is no pair of numbers that will then also add to 88.
Factoring More
Sometimes after we factor, one or more of the resulting polynomials can be factored even further. You will see this more in future classes, but present one example here for you to think about.
think about it
Factor completely: x4−16x4−16
Show Solution
Applying our factoring strategy, we first see that there is no common factor other than 1. Moving onto step 2, the polynomial has two terms and is a difference of squares since it can be written as
(x2)2−42(x2)2−42
Thus, in the difference of square equation, a=x2a=x2 and b=4b=4, which leads to the following factored form:
(x2+4)(x2−4)(x2+4)(x2−4)
We now have two binomials and should consider whether either of these can be factored using our same factoring strategy again. The first binomial, x2+4x2+4 is a sum of squares, which is prime. But, x2−4x2−4 is another difference of squares, this time with a=xa=x and b=2b=2. This leads us to
(x2+4)(x+2)(x−2)(x2+4)(x+2)(x−2)
We now have three binomials, but none are the difference of squares and therefore we do not know how to factor them any further.