# Factoring 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 formis called the*a*^{3}+*b*^{3}**sum**of two cubes because two cubic terms are being added together.**Case 2**: The polynomial in the formis called the*a*^{3}−*b*^{3}**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 ** x^{3} + 27**.

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 3. The term with variable *x* is okay but the 27 should be taken care of. Obviously we know that 27 = (3)(3)(3) = 3^{3}.

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 ** y^{3} – 8**.

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

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 **27 x^{3} + 64y^{3}**.

The first step as always is to express each term as cubes. We know that 27 = 3^{3} and 64 = 4^{3}. Rewrite the problem as sum of two cubic terms and apply the rule, so we get

**Example 4:** Factor **125 x^{3} – 27**.

Since 125 = (5)(5)(5) = 5^{3}, and 27 = (3)(3)(3) = 3^{3}, this is clearly a problem on difference of two cubes.

Here’s the solution.

**Example 5:** Factor **1 – 216 x^{3}y^{3}**.

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 1 = (1)(1)(1) = 1^{3} while 216 = (6)(6)(6) = 6^{3}. This is really a case of difference of two cubes.

**Example 6:** Factor **8 x^{6}y^{12} + 27**.

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

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

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 3 and for the variables, the greatest common factor is ” *xy*“. Therefore the overall common factor would be their product which is (3)(*xy*) = 3*xy*.

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