Factoring Sum and Difference of Cubes

The sum and difference of cubes are special cases of binomials that can be factored easily using specific patterns.

As the name implies, the sum of two cubes involves adding two cubed terms:

$$a^3+b^3$$

Similarly, the difference of two cubes involves subtracting one cubed term from another:

$$a^3\,-\,b^3$$

The factoring process for both is quite similar, with the only difference being the signs.

For the sum of two cubes, the factors consist of a binomial and a trinomial. The binomial has a positive middle sign (think “sum”), while the trinomial has a middle term with the opposite sign, which is negative.

$$a^3 + b^3 = (a + b)(a^2 – ab + b^2)$$

For the difference of two cubes, the factors are also a binomial and a trinomial. In this case, the binomial has a negative middle sign (think “difference”), while the trinomial has a middle term with the opposite sign, which is positive.

$$a^3 \,- \,b^3 = (a\, -\, b)(a^2 + ab + b^2)$$

Notice that in both cases, the third term of the trinomial factor is always positive.

Now, let’s look at some examples!

Example 1: Factor \({x^3} + 8\)

Before we can apply the factoring pattern, we need to confirm that each term in the binomial can be expressed as a power of \(3\). The first term is clearly a cube since \(x\) is raised to the power of \(3\). The second term, \(8\), can also be written as a power of \(3\), specifically \(8 = 2^3\). This confirms that we are dealing with the sum of two cubes, where \(a = x\) and \(b = 2\).

$$\eqalign{
  {x^3} + 8 &= {\left( x \right)^3} + {\left( 2 \right)^3}  \cr 
    &= \left( {x + 2} \right)\left[ {{x^2} – \left( x \right)\left( 2 \right) + {2^2}} \right]  \cr 
    &= \left( {x + 2} \right)\left( {{x^2} – 2x + 4} \right) \cr} $$

Example 2: Factor \({y^3} – 27\)


The first term is a cube because the exponent of \(x\) is \(3\). Similarly, the second term is also a cube since \(27 = 3^3\). This is a classic example of the difference of two cubes, where \(a = y\) and \(b = 3\).

$$\eqalign{
   {y^3} – 27 &= {\left( y \right)^3} – {\left( 3 \right)^3}  \cr 
  &  = \left( {y – 3} \right)\left[ {{x^2} + \left( y \right)\left( 3 \right) + {3^2}} \right]  \cr 
  &  = \left( {y – 3} \right)\left( {{x^2} + 3y + 9} \right) \cr} $$

Example 3: Factor \(64{x^3} + {y^3}\)


The second term is a cube because \(y\) is raised to the power of 3. However, the first term needs a bit more attention since it contains two components: a number and a variable. The variable is indeed a cube, as \(x\) is raised to the third power. But what about \(64\)? Can we express it as a cube of some number? Yes, \(64 = 4^3\). Now, we can factor this expression since \(a = 4x\) and \(b = y\).

$$\eqalign{
   & 64{x^3} + {y^3} = {\left( {4x} \right)^3} + {\left( y \right)^3}  \cr 
  &  = \left( {4x + y} \right)\left[ {{{\left( {4x} \right)}^2} – \left( {4x} \right)\left( y \right) + {{\left( y \right)}^2}} \right]  \cr 
  &  = \left( {4x + y} \right)\left( {16{x^2} – 4xy + {y^2}} \right) \cr} $$