Create your own
Lesson illustration

Factoring Sums and Differences of Cubes

Welcome back. In the previous lesson, you learned to recognize and factor perfect-square trinomials and differences of squares. Those identities depended on squares; today’s patterns involve cubes. The expressions still have two terms, but their factorizations have a distinct linear factor and a three-term factor.

By the end of this lesson, you should be able to recognize a sum or difference of perfect cubes, factor it completely, and avoid the sign errors that make these patterns initially tricky. This extends your factoring toolkit before the course moves to factoring by grouping.


The two cube identities

The identities are:

Read these carefully: the sign in the first binomial factor matches the original sign, while the sign of the middle term in the trinomial factor is the opposite.

Original expressionFirst factorMiddle term in second factorLast term

A common mnemonic is SOAP:

  • Same: the first sign stays the same.
  • Opposite: the middle sign switches.
  • Always
  • Positive: the final term is positive.

The mnemonic helps you recall the pattern, but the algebra explains why it works. Expand the sum-of-cubes factorization:

The two pairs of mixed terms cancel. The difference formula works similarly:

So these are not arbitrary recipes: the signs are exactly what makes the unwanted middle terms disappear.


A concise visual walkthrough

Watch this short explanation from Mario’s Math Tutoring. It introduces the identities, the SOAP sign pattern, and several examples. Pay particular attention to the step of taking the cube root of each term before substituting into the formula.

Factoring Sum and Difference of Cubes

In “Factoring Sum and Difference of Cubes,” Mario’s Math Tutoring gives a quick, example-driven introduction to both identities and the signs within them.

Watch the core examples. First note the frequently used perfect cubes and SOAP mnemonic; then follow how each example identifies a and b before writing the factors. Notice that the final term of the trinomial factor remains positive in every example.


Recognition comes before the formula

A cube pattern applies only when both terms are perfect cubes, after any GCF has been removed.

Useful numerical cubes include:

For variable terms, every exponent must be a multiple of . For example,

But these are not perfect cubes as written:

The first has an exponent not divisible by ; the latter two have coefficients that are not cubes. A GCF may reveal a cube pattern hidden inside an expression, so retain the habit from earlier lessons:

Always factor out the GCF before testing for a special pattern.


Factoring a sum of cubes

Factor:

First write each term as a cube:

This is a sum of cubes, so let

Apply the sum formula:

Simplify:

The trinomial factor is the expected endpoint for ordinary integer or rational factoring. Do not try to treat it as a perfect-square trinomial: its middle term is negative, but it does not satisfy that pattern.

A quick verification is worthwhile:

The cancelling terms confirm both the coefficient and sign choices.

Cube bases may be expressions

The base of a cube does not have to be a single term. Factor:

Since

this is a sum of cubes with

Now simplify each factor:

Keeping grouped until after applying the identity prevents most errors in this type of problem.


Factoring a difference of cubes

Now factor:

Identify the cubes:

This time the expression is a difference:

Use the difference-of-cubes identity:

Therefore,

Compare this carefully with the sum example:

The original sign changes both the first factor and the middle term of the trinomial factor. The last term remains positive.


GCF first, cubes second

Consider the expression

It is not immediately a difference of cubes, because the terms are not both cubes in their current form. But the terms share :

Now the expression inside parentheses is a difference of cubes:

Apply the identity:

So the complete factorization is

Stopping at

would leave the factorization incomplete. On the other hand, continuing to force the quadratic factor apart would be a mistake in ordinary real or integer factoring.


Near misses: when not to use a cube identity

Not every two-term expression with a high exponent is a sum or difference of cubes.

A coefficient that is not a cube

has , but is not a perfect cube. There is no GCF to extract, so this is not a sum-of-cubes pattern over the integers.

An exponent that is not a multiple of three

has , but is not a cube polynomial. So the difference-of-cubes formula does not apply.

A sum of squares, not cubes

contains , but the first term is a square rather than a cube. It does not fit any of the cube identities.

The diagnosis should always be structural:

  1. Factor out a GCF.
  2. Check that exactly two terms remain.
  3. Decide whether they are added or subtracted.
  4. Confirm that both remaining terms are perfect cubes.
  5. Identify the cube roots, then substitute into the appropriate identity.
  6. Simplify and check by multiplication if needed.

Key takeaways

The sum and difference of cubes patterns are:

To factor accurately:

  • remove a GCF before looking for special patterns;
  • express each term as a cube and identify its cube root;
  • keep the first factor’s sign the same as the original expression;
  • reverse the sign of the middle term in the trinomial factor;
  • keep the final term positive;
  • simplify fully, but do not force the resulting trinomial to factor when it has no ordinary integer or rational factorization.

Next, you will factor four-term polynomials by grouping, a flexible method that often creates a common binomial factor where no immediate special-product identity is visible.

Can't find a good explanation? Sign up and we'll make it for you

Sign up