Sum and Difference of Cubes
Learning goals
- Factor a sum or difference of cubes into a binomial times a trinomial
- Place the three signs correctly using the SOAP pattern
- Explain why the middle terms must cancel to prove each identity
- Pull out the greatest common factor before checking for a hidden cube pattern
Why a sum or difference of cubes factors
Try a specific case first: . Since , both terms are perfect cubes, and the claim is that this factors as . Check that claim the way you check any proposed factoring, by expanding the product:
The and cancel, and so do and , leaving . Nothing about and was special there; the same cancellation happens for any two terms and , which gives two general identities, one for each sign:
Each is a binomial times a trinomial, and neither asks to be taken on faith. The proof below confirms both in general, the same way you already confirmed the difference of squares: expand the right-hand side, multiplying every term of the binomial by every term of the trinomial, and see what survives.
Why #
Expand the product on the right, taking each term of against each term of :
Just like the concrete case above, the two middle pairs, with and with , are exact opposites and cancel, for every and , not just and :
Read right to left, that is the factoring rule for a sum of cubes. The difference identity works the same way:
The same two middle pairs cancel, only this time the surviving last term is .
Nothing about that cancellation is arbitrary, and it is also what forces every sign in the two identities, which is the next thing to pin down.
The SOAP sign pattern
The two identities differ only in where the signs go, and there is a tidy way to remember the pattern. It is often called SOAP, for Same, Opposite, Always Positive, read across the three signs you have to fill in:
- Same. The binomial takes the same sign as the original expression. A sum of cubes gives ; a difference gives .
- Opposite. The middle term of the trinomial takes the opposite sign. A sum gives ; a difference gives .
- Always Positive. The sign before the trinomial’s last term, , is always plus, in both identities.
These are not three rules to accept blindly; the proof above forces all three. Same: the sign on decides whether the product ends in or . Opposite: that sign on the middle term is exactly what makes the four cross terms cancel instead of piling up. Always Positive: that sign work all happens on the binomial’s , so the trinomial’s last term keeps a plain plus in both identities.
Check your understanding
In , why must the trinomial's middle term be and not ?
Expanding gives . The sign is exactly what makes pair with , and pair with , so all four middle terms cancel and only survives. A middle term would make those same pairs add instead of cancel, leaving unwanted middle terms behind. The sign is forced by this cancellation, not chosen by convention.
One warning the pattern makes visible: the middle term is a single , not . The doubled middle term belongs to a perfect-square trinomial like , which is a different animal. The cube trinomial never doubles it.
Recognizing perfect cubes
Before you can use either identity you have to see two perfect cubes. A perfect cube is a whole number, or a term with a whole-number coefficient, that is something cubed. The perfect cubes from through are worth knowing on sight:
Variable terms can be cubes too, but a term needs two things to qualify: its coefficient must be a perfect cube, and every variable’s exponent must be a multiple of (since cubing multiplies an exponent by ). A bare power like is , and , , and all pass both tests. But is not a perfect cube, even though is: the exponent is not a multiple of . This lesson sticks to that plain case, exponent , so is always a single variable term like or . To set up a factorization, take the cube root of each term to find and . The cube root of is , not , because you must cube both the and the to rebuild .
Worked example 1 Which expressions are sums or differences of cubes?
Ask two things of each expression: are both terms perfect cubes, and are they added or subtracted?
is a difference of cubes. Both terms are cubes, since and , and they are subtracted, so and .
is a sum of cubes, since and . Here and .
is neither. The first term is a cube, but is not a perfect cube, since no whole number cubes to .
is not a difference of cubes. The number is a cube, but is a square, not a cube, so the pattern does not apply. This one is a difference of squares instead.
Check your understanding
Which of these is a difference of two perfect cubes?
A difference of cubes is two perfect-cube terms joined by a minus sign. In , both and are cubes, and they are subtracted.
The expression is a sum, is a square rather than a cube, and is not a perfect cube.
Factoring cubes that carry coefficients
Nothing in the pattern requires bare variables. Once you can take the cube root of each term, coefficient and all, you just read off and and let SOAP place the signs.
Worked example 2 Factor
Take the cube root of each term. Since , you have , and since , you have . This is a sum, so the binomial keeps the same sign, , the trinomial’s middle term takes the opposite sign, and the last term is positive:
The trinomial terms are , then with a minus in front, then . The middle term is , a single , not .
Worked example 3 Factor and
For , the cube roots are and (the small marks a cube root instead of a square root, so means the number that cubes to ), so and . It is a difference, so the binomial is , the middle sign is opposite that minus (so plus), and the last term is positive:
For , read the terms in the order they appear as , a difference with and . The number comes first, and the pattern does not mind:
The binomial matches the difference, the middle term is opposite that minus, and the last term is positive, exactly as SOAP predicts.
Check your understanding
Factor .
Take the cube root of each term: and , so and . This is a sum, so the binomial keeps the plus sign and the trinomial's middle term takes the opposite (minus) sign.
The first term of the trinomial is , so a is wrong, and the middle sign must be minus for a sum.
Why the trinomial does not factor further
After you factor a sum or difference of cubes, you are left with a trinomial like or . It is tempting to keep going and try to factor that trinomial as well; try it on and see what happens.
To factor into you would need two integers whose product is and whose sum is . Since both and are positive, and must both be positive too (two negatives would multiply to a positive but add to a negative). The positive integer pairs that multiply to are and , and , and and , which sum to , , and . None of them sum to , so no such factoring exists.
That is the pattern for every sum or difference of cubes in this lesson: once you have removed any common factor and applied the cube identity, you have the final, complete factorization with integer coefficients.
Pulling out a common factor first
An expression that is not a sum or difference of cubes as written can turn into one after you factor out a common factor. So always check for a common factor first. Take . Neither nor is a perfect cube, so the pattern does not apply yet. But both terms are even, and once you pull out the , what is left is a clean sum of cubes:
The habit is to factor out the greatest common factor first, then check whether what remains is a sum or difference of cubes. Skip that step and you either miss the cubes entirely or leave the answer half done.
Worked example 4 Factor completely
Find the greatest common factor of and first. They share a factor of and a factor of , so the common factor is :
What is left inside is , a difference of cubes with and :
Keeping the common factor out front, the complete factorization is
There was no cube to see until the came out.
Worked example 5 Factor completely
The terms and are both even, and their greatest common factor is :
Now is a sum of cubes with and :
So the complete factorization is
Pulling out the is what turned , which is not itself a sum of cubes, into one that is.
Check your understanding
Factor completely.
Pull out the greatest common factor, , first. What remains is a difference of cubes, since .
The binomial takes the same (minus) sign, the middle term is the opposite (plus) sign, and it is a single , not .