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: [latex]a^{3}+b^{3}[/latex] and [latex]a^{3}-b^{3}[/latex].
Let us take a look at how to factor sums of cubes $$a^3+b^3$$ and differences of cubes $$a^3-b^3$$.
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 [latex]x[/latex] 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 we talk about factoring sum of cubes, let’s review polynomial multiplication. What do we get when we multiply [latex]\left(a+b\right)\left(a^{2}–ab+b^{2}\right)[/latex]?
Did you see that? Four of the terms cancelled out, leaving us with a binomial [latex]a^{3}+b^{3}[/latex] which is a sum of cubes. To undo this process and get it back to the form we had originally, we need to factor $$a^3+b^3$$.
Because of the above example, it may not be surprising that [latex]a^{3}+b^{3}[/latex] factors to be [latex](a+b)(a^{2}–ab+b^{2})[/latex] but how do we factor it?
You can use this pattern to factor sum of cubes: [latex]a^{3}+b^{3}=(a+b)(a^{2}–ab+b^{2})[/latex].
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].
Examples
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].
Let’s look at some detailed examples to figure out how we can get sum or differences of cubes into factored form.
Example
Factor [latex]x^{3}+8y^{3}[/latex].
Show Solution
Identify that this binomial fits the sum of cubes pattern [latex]a^{3}+b^{3}[/latex]. Then determine $$a$$ and $$b$$.
[latex]a=x[/latex] (since x\dot x\cdot x = x^3, and [latex]b=2y[/latex] (since [latex]2y\cdot2y\cdot2y=8y^{3}[/latex]).
[latex]x^{3}+8y^{3}[/latex]
Factor the binomial as [latex]\left(a+b\right)\left(a^{2}–ab+b^{2}\right)[/latex], substituting [latex]a=x[/latex] and [latex]b=2y[/latex] into the expression.
Multiply [latex]−x\left(2y\right)[/latex] to get $$-2xy$$ (write the coefficient first).
Notice that the third term of the trinomial is the quantity squared [latex](2y)^{2}[/latex] which is $$4y^{2}$$.
The factored form is [latex]\left(x+2y\right)\left(x^{2}-2xy+4y^{2}\right)[/latex].
You should always look for a greatest common factor (GCF) before doing any other factoring.
Example
Factor [latex]16m^{3}+54n^{3}[/latex].
Show Solution
Factor out the common factor [latex]2[/latex].
[latex]16m^{3}+54n^{3}[/latex]
[latex]2\left(8m^{3}+27n^{3}\right)[/latex]
[latex]8m^{3}[/latex] and [latex]27n^{3}[/latex] are perfect cubes, so you can factor [latex]8m^{3}+27n^{3}[/latex] as the sum of two cubes: [latex]a=2m[/latex] and [latex]b=3n[/latex].
Factor the binomial [latex]8m^{3}+27n^{3}[/latex] substituting [latex]a=2m[/latex] and [latex]b=3n[/latex] into the expression [latex]\left(a+b\right)\left(a^{2}-ab+b^{2}\right)[/latex].
Make sure to remember the GCF of $$\require{color}\color{BrickRed}{2}$$ that we factored out previously.
The factored form is [latex]2\left(2m+3n\right)\left(4m^{2}-6mn+9n^{2}\right)[/latex].
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].
Examples
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].
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 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. [latex]a^{3}+b^{3}=(a+b)(a^{2}-ab\color{red}{+}\color{black}{b^{2})}[/latex] and [latex]a^{3}-b^{3}=(a-b)(a^{2}+ab\color{red}{+}\color{black}{b^{2})}[/latex]
Let us go ahead and look at a couple of examples. Remember to factor out all common factors first.
Example
Factor [latex]8x^{3}–1,000[/latex] completely.
Show Solution
Notice that $$8$$ and $$1000$$ are perfect cubes but don’t try to factor using the difference of cubes yet because also notice that they have a GCF of $$8$$ that should be factored out first.
Factor out [latex]8[/latex].
[latex]8(x^{3}–125)[/latex]
Identify that the binomial fits the pattern [latex]a^{3}-b^{3}:a=x[/latex], and [latex]b=5[/latex] (since [latex]5^{3}=125[/latex]).
Factor [latex]x^{3}–125[/latex] as [latex]\left(a–b\right)\left(a^{2}+ab+b^{2}\right)[/latex], substituting [latex]a=x[/latex] and [latex]b=5[/latex] into the expression.
Check to make sure your signs are correct. Did you remember to use SOAP?
Note: If you didn’t notice the GCF of $$8$$, you might start to factor by identifying $$a$$ as $$2x$$ and $$b$$ as $$10$$. when factored we get $$(2x-10)(4x^2+20x+100)$$. This is different than the solution above because this can still be factored more. Notice in the binomial a $$2$$ can be factored out and in the trinomial a $$4$$ can be factored out.
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].
Example
Factor [latex]r^{9}-8s^{6}[/latex].
Show Solution
Identify this binomial as the difference of two cubes. As shown above, it is.
Rewrite [latex]r^{9}[/latex] as [latex]\left(r^{3}\right)^{3}[/latex] and rewrite [latex]8s^{6}[/latex] as [latex]\left(2s^{2}\right)^{3}[/latex].
Now the binomial is written in terms of cubed quantities. Thinking of [latex]a^{3}-b^{3}[/latex], [latex]a=r^{3}[/latex] and [latex]b=2s^{2}[/latex].
Factor the binomial as [latex]\left(a-b\right)\left(a^{2}+ab+b^{2}\right)[/latex], substituting [latex]a=r^{3}[/latex] and [latex]b=2s^{2}[/latex] 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 [latex]1[/latex], factor it out first. Don’t forget to factor out a [latex]-1[/latex] 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: $$ax^2+bx+c$$
A. If [latex]a=1[/latex], apply the “Product and Sum Method.” Ask yourself: What multiplies to be $$c$$ that adds to be $$b$$?
B. If [latex]a\neq 1[/latex], apply the “AC-Method”
C. If it is a perfect square trinomial, use the appropriate formula:
[latex]a^2+2ab+b^2=(a+b)^2[/latex]
[latex]a^2-2ab+b^2=(a-b)^2[/latex]
III. 2 Terms:
A. If the binomial is a difference of squares, use the following formula: [latex]a^2-b^2=(a+b)(a-b)[/latex]
Remember that a sum of squares is not factorable: $$a^2 + b^2$$ is a prime polynomial
B. If the binomial is a sum or difference of cubes use:
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 [latex]-3x^2-3x+6[/latex].
Show Solution
We first check for a common factor, recognizing that all terms share a factor of [latex]3[/latex]. Moreover, since the leading coefficient is negative, we will factor out a GCF of [latex]-3[/latex].
[latex]-3(x^2+x-2)[/latex]
Next, we examine the resulting polynomial. It has 3 terms and a leading coefficient of [latex]a=1[/latex]. So, we can use the Product and Sum Method, searching for two numbers [latex]r[/latex] and [latex]s[/latex] that multiply to [latex]c=-2[/latex] and add to [latex]b=1[/latex], which are [latex]2[/latex] and [latex]-1[/latex].
[latex]-3(x+2)(x-1)[/latex]
Example 2
Factor [latex]-3x^2-7x+6[/latex].
Show Solution
Initially, this looks similar to the previous example. However, this time [latex]3[/latex] is no longer in common. We will still begin by factoring out [latex]-1[/latex] though.
[latex]-1(3x^2+7x-6)[/latex]
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 [latex]ac=3(-6)=-18[/latex] and add to [latex]b=7[/latex], which are [latex]9[/latex] and [latex]-2[/latex].
Rewrite the middle term [latex]7x[/latex] as [latex]9x-2x[/latex] and apply the grouping technique.
[latex]-(3x^2+9x-2x-6)[/latex]
[latex]=-\left[ 3x(x+3)-2(x+3)\right][/latex]
[latex]=-(x+3)(3x-2)[/latex]
The next example includes a perfect square trinomial.
Example 3
Factor [latex]12x^5+60x^4+75x^3[/latex]
Show Solution
We first factor out the GCF of [latex]3x^3[/latex].
[latex]3x^3(4x^2+20x+25)[/latex]
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 [latex]a^2+2ab+b^2[/latex], we have [latex]a=2x[/latex] and[latex]b=5[/latex]. Since [latex]2ab=2(2x)(5)=20[/latex] matches our middle term, we can apply the formula [latex]a^2+2ab+b^2=(a+b)^2[/latex] to factor as
[latex]3x^3(2x+5)^2[/latex]
In the next two examples, we review factoring binomials.
Example 4
Factor [latex]-2x^2+8[/latex]
Show Solution
We first factor out the GCF. Noting that the leading coefficient is negative, we will factor out [latex]-2[/latex].
[latex]-2(x^2-4)[/latex]
The resulting binomial is a difference of squares, which we factor as
[latex]-2(x+2)(x-2)[/latex].
Example 5
Factor [latex]50x^{2}y^{3}-8y[/latex]
Show Solution
Once again, we start by looking for a common factor. We can factor out a GCF of [latex]2y[/latex].
[latex]2y(25x^{2}y^{2}-4)[/latex]
The resulting polynomial has 2 terms and is in the form of a difference of squares with [latex]a=5xy[/latex] and [latex]b=2[/latex].
[latex]2y(5xy+2)(5xy-2)[/latex]
Don’t forget that we cannot factor every polynomial.
Example 6
Factor [latex]5x^2+8x+4[/latex]
Show Solution
Since there are 3 terms and the leading coefficient is [latex]a=5[/latex] (which is not a common factor), we attempt to use the AC-Method. We need two numbers that multiply to [latex]ac=5(4)=20[/latex] and add to [latex]b=8[/latex]. 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 [latex]10[/latex] and [latex]2[/latex] is a potential pair of numbers that would work for this problem. However, to multiply to positive [latex]20[/latex], 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 [latex]8[/latex].
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: [latex]x^4-16[/latex]
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
[latex](x^2)^2-4^2[/latex]
Thus, in the difference of square equation, [latex]a=x^2[/latex] and [latex]b=4[/latex], which leads to the following factored form:
[latex](x^2+4)(x^2-4)[/latex]
We now have two binomials and should consider whether either of these can be factored using our same factoring strategy again. The first binomial, [latex]x^2+4[/latex] is a sum of squares, which is prime. But, [latex]x^2-4[/latex] is another difference of squares, this time with [latex]a=x[/latex] and [latex]b=2[/latex]. This leads us to
[latex](x^2+4)(x+2)(x-2)[/latex]
We now have three binomials, but none are the difference of squares and therefore we do not know how to factor them any further.