Mathwarehouse Logo

Factoring Differences of Cubes

Quick Overview

  • $$a^3 - b^3 = (a - b)(a^2 + ab + b^2)$$
  • This factoring works for any binomial that can be written as $$a^3 - b^3$$.
  • The discussion below includes three separate ways of demonstrating that this formula is valid.
Download this web page as a pdf with answer key

Explanation of the Formula -- Using the Sum of Cubes

On the page about the sum of cubes we showed that $$a^3 + b^3 = a^2 - ab + b^2$$. We can use this formula to find a factorization for $$a^3 - b^3$$.

We start by writing $$a^3 - b^3$$ as $$a^3 + (-b)^3$$ and then using the sum of cubes pattern.

$$ \begin{align*} a^3 - b^3 & = a^3 + (-b)^3\\ & = \left(a + (-b)\right)\left(a^2 + a(-b) + (-b)^2\right)\\ & = (a - b)(a^2 - ab + b^2) \end{align*} $$

We could also determine the validity of the formula using the same methods we established in the sum of cubes lesson.

Explanation of the Formula -- Direct Method

We can verify the factoring formula by expanding the result and seeing that it simplifies to the original, as follows.

$$ \begin{align*} \blue{(a-b)}(a^2 + ab + b^2) & = a^2\blue{(a-b)} + ab\blue{(a-b)} + b^2\blue{(a-b)}\\ & = a^3 - a^2b + a^2b - ab^2 + ab^2 - b^3\\ & = a^3 \blue{- a^2b + a^2b}\,\,\red{ - ab^2 + ab^2} - b^3\\ & = a^3 + \blue 0 + \red 0 - b^3\\ & = a^3 - b^3 \end{align*} $$

Explanation of the Formula---Division Method

Another way to confirm to the formula is to find a solution to $$a^3 - b^3 = 0$$, and then use division to find the factored form.

Step 1

Find a solution to $$a^3 - b^3 = 0$$.

$$ \begin{align*} a^3 - b^3 & = 0\\ a^3 & = b^3\\ \sqrt[3]{a^3} & = \sqrt[3]{b^3}\\ a & = b \end{align*} $$

One of the solutions is $$a = b$$. Adding $$b$$ to both sides of this equation gives us $$a - b = 0$$, which means $$(a - b)$$ is a factor of $$a^3 - b^3$$.

Step 2

Find the other factor of $$a^3 - b^3$$ using polynomial division.

$$ \begin{align*} \begin{array}{rrcrcrcr} & a^2 \hspace{2mm} +ab \hspace{2mm} +b^2 \hspace{22mm} \\ & {a - b\,\,} \enclose{longdiv}{a^3 + 0\, a^2b + 0\, ab^2 - b^3} \hspace{10mm} \\ & \underline{-(a^3 - a^2b)} \hspace{35mm} \\ & a^2b + 0\,ab^2 - b^3\ \hspace{12mm} \\ & - \underline{(a^2b - ab^2)} \hspace{23mm}\\ & ab^2 - b^3 \hspace{15mm} \\ & - \underline{ab^2 - b^3)} \hspace{13mm}\\ & 0 \hspace{15mm} \end{array} \end{align*} $$

Since $$a - b$$ divides evenly into $$a^3 - b^3$$, we know

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

Difference Of Cubes Calculator

Example

Show that $$x^3 - 27$$ factors into $$(x - 3)(x^2 + 3x + 9)$$.

Step 1

Show that expanding $$(x - 3)(x^2 + 3x + 9)$$ results in $$x^3 - 27$$.

$$ \begin{align*} \blue{(x - 3)}(x^2 + 3x + 9) & = x^2\blue{(x - 3)} + 3x\blue{(x - 3)} + 9\blue{(x - 3)}\\ & = x^3 - 3x^2 + 3x^2 - 9x + 9x - 27\\ & = x^3 - 27 \end{align*} $$

Step 1 (Alternate Solution)

Show that $$(x - 3)(x^2 + 3x + 9)$$ matches the correct pattern for the formula.

Since we want to factor $$x^3 - 27$$, we first identify $$a$$ and $$b$$.

Since $$a$$ is the cube root of the first term, we know $$a = \sqrt[3]{x^3} = x$$.

Likewise, since $$b$$ is the cube root of the second term, we know $$b = \sqrt[3]{27} = 3$$.

Step 2

Write down the factored form.

$$ \begin{align*} a^3 + b^3 & = (\blue a - \red b)(\blue a^2 + \blue a \red b + \red b^2)\\ x^3 - 27 & = (\blue x - \red 3)(\blue x^2 + \blue x\cdot \red 3 + \red 3^2)\\ & = (x-3)(x^2 + 3x + 9) \end{align*} $$

Answer

$$ x^3 - 27 = (x-3)(x^2 + 3x + 9) $$

Download this web page as a pdf with answer key
Continue to Practice Problems
Back to Factoring Sums of Cubes Next to Practice Problems