# Factoring the Sum and Difference of Two Cubes

In algebra class, the teacher would always discuss the topic of **sum of two cubes** and **difference of two cubes** side by side. The reason is that they are similar in structure. The key is to “memorize” or remember the patterns involved in the formulas.

**Case 1**: The polynomial in the form [latex]{a^3} + {b^3}[/latex] is called the**sum**of two cubes because two cubic terms are being added together.

**Case 2**: The polynomial in the form [latex]{a^3} – {b^3}[/latex] is called the**difference**of two cubes because two cubic terms are being subtracted.

So here are the formulas that summarize how to factor the sum and difference of two cubes. Study them carefully.

## Case 1: Sum of Two Cubes

**Observations:**

- For the “sum” case, the binomial factor on the right side of the equation has a middle sign that is
**positive**.

- In addition to the “sum” case, the middle sign of the trinomial factor will always be opposite the middle sign of the given problem. Therefore, it is
**negative**.

## Case 2: Difference of Two Cubes

**Observations:**

- For the “difference” case, the binomial factor on the right side of the equation has a middle sign that is
**negative**.

- In addition to the “difference” case, the middle sign of the trinomial factor will always be opposite the middle sign of the given problem. Therefore, it is
**positive**.

### Examples of How to Factor Sum and Difference of Two Cubes

Let’s go over some examples and see how the rules are applied.

**Example 1:** Factor [latex]{x^3} + 27[/latex].

Currently, the problem is not written in the form that we want. Each term must be written as a cube, that is, an expression raised to a power of [latex]3[/latex]. The term with variable [latex]x[/latex] is okay but the [latex]27[/latex] should be taken care of. Obviously, we know that [latex]27 = \left( 3 \right)\left( 3 \right)\left( 3 \right) = {3^3}[/latex].

Rewrite the original problem as sum of two cubes, and then simplify. Since this is the “sum” case, the binomial factor and trinomial factor will have positive and negative middle signs, respectively.

**Example 2:** Factor [latex]{y^3} – 8[/latex].

This is a case of difference of two cubes since the number [latex]8[/latex] can be written as a cube of a number, where [latex]8 = \left( 2 \right)\left( 2 \right)\left( 2 \right) = {2^3}[/latex].

Apply the rule for difference of two cubes, and simplify. Since this is the “difference” case, the binomial factor and trinomial factor will have negative and positive middle signs, respectively.

**Example 3:** Factor [latex]27{x^3} + 64{y^3}[/latex].

The first step as always is to express each term as cubes. We know that [latex]27 = {3^3}[/latex] and [latex]64 = {4^3}[/latex]. Rewrite the problem as

**Example 4:** Factor [latex]125{x^3} – 27[/latex].

Since [latex]125 = \left( 5 \right)\left( 5 \right)\left( 5 \right) = {5^3}[/latex] and [latex]27 = \left( 3 \right)\left( 3 \right)\left( 3 \right) = {3^3}[/latex], this is clearly a problem on difference of two cubes.

Here’s the solution.

**Example 5:** Factor [latex]1 – 216{x^3}{y^3}[/latex].

At first, this problem may look “difficult”. However, if you stick to what we know already about sum and difference of two cubes we should be able to recognize that this problem is rather easy.

The good thing is that the variables are cubes so they are fine. Now for the number, it is easy to see that that [latex]1 = \left( 1 \right)\left( 1 \right)\left( 1 \right) = {1^3}[/latex] while [latex]216 = \left( 6 \right)\left( 6 \right)\left( 6 \right) = {6^3}[/latex]. This is really a case of difference of two cubes.

**Example 6:** Factor [latex]8{x^6}{y^{12}} + 27[/latex].

This problem is a bit different. The coefficients are definitely cubes because [latex]8 = {2^3}[/latex] and [latex]27 = {3^3}[/latex]. Now, how do we express the term with variables as a cube? Well, simply factor out [latex]3[/latex] from the existing exponents of “[latex]x[/latex]” and “[latex]y[/latex]”. Use the law of exponent known as Power to a Power Rule to justify this step. We take out [latex]3[/latex] because to be a cube implies that any expression must have an outer exponent of [latex]3[/latex].

**Example 7:** Factor [latex]3xy – 24{x^4}y[/latex].

Sometimes the problem may not appear to be factorable by either sum or difference of two cubes. If you see something like this, try to take out common factors. For the numbers, the greatest common factor is [latex]3[/latex] and for the variables, the greatest common factor is “[latex]xy[/latex]”. Therefore the overall common factor would be their product which is [latex]\left( 3 \right)\left( {xy} \right) = 3xy[/latex].

After factoring it out, you’ll see that we have an easy problem on the difference of two cubes.

**You might also be interested in:**

Factoring Difference of Two Squares

Factoring Difference of Two Squares Practice Problems

Factoring Sum and Difference of Two Cubes Practice Problems