Lesson Explainer: Sum and Difference of Two Cubes Mathematics

In this explainer, we will learn how to factor the sum and the difference of two cubes.

To understand the sum and difference of two cubes, let us first recall a very similar concept: the difference of two squares. For two real numbers 𝑎 and 𝑏, we have 𝑎−𝑏=(𝑎−𝑏)(𝑎+𝑏).īŠ¨īŠ¨

This factoring of the difference of two squares can be verified by expanding the parentheses on the right-hand side of the equation. We find that (𝑎−𝑏)(𝑎+𝑏)=đ‘ŽÃ—đ‘Ž+đ‘ŽÃ—đ‘âˆ’đ‘Ã—đ‘Žâˆ’đ‘Ã—đ‘=𝑎+𝑎𝑏−𝑎𝑏−𝑏=𝑎−𝑏.īŠ¨īŠ¨īŠ¨īŠ¨

As we can see, this formula works because even though two binomial expressions normally multiply together to make four terms, the 𝑎𝑏 and −𝑎𝑏 terms in the middle end up canceling out. This identity is useful since it allows us to easily factor quadratic expressions if they are in the form 𝑎−𝑏īŠ¨īŠ¨. We might wonder whether a similar kind of technique exists for cubic expressions. In other words, is there a formula that allows us to factor 𝑎−𝑏īŠŠīŠŠ?

Let us investigate what a factoring of 𝑎−𝑏īŠŠīŠŠ might look like. We might guess that one of the factors is 𝑎−𝑏, since it is also a factor of 𝑎−𝑏īŠ¨īŠ¨. Supposing that this is the case, we can then find the other factor using long division:

Since the remainder after dividing is zero, this shows that 𝑎−𝑏 is indeed a factor and that the correct factoring is 𝑎−𝑏=(𝑎−𝑏)ī€šđ‘Ž+𝑎𝑏+𝑏ī….īŠŠīŠŠīŠ¨īŠ¨

One might wonder whether the expression 𝑎+𝑎𝑏+𝑏īŠ¨īŠ¨ can be factored further since it is a quadratic expression, however, this is actually the most simplified form that it can take (although we will not prove this in this explainer). We note that as 𝑎 and 𝑏 can be any two numbers, this is a formula that applies to any expression that is a difference of two cubes. Specifically, we have the following definition.

Definition: Difference of Two Cubes

For two real numbers 𝑎 and 𝑏, the expression 𝑎−𝑏īŠŠīŠŠ is called the difference of two cubes. It can be factored as follows: 𝑎−𝑏=(𝑎−𝑏)ī€šđ‘Ž+𝑎𝑏+𝑏ī….īŠŠīŠŠīŠ¨īŠ¨

We can additionally verify this result in the same way that we did for the difference of two squares. If we expand the parentheses on the right-hand side of the equation, we find (𝑎−𝑏)ī€šđ‘Ž+𝑎𝑏+𝑏ī…=đ‘ŽÃ—đ‘Ž+đ‘ŽÃ—đ‘Žđ‘+đ‘ŽÃ—đ‘âˆ’đ‘Ã—đ‘Žâˆ’đ‘Ã—đ‘Žđ‘âˆ’đ‘Ã—đ‘=𝑎+𝑎𝑏+𝑎𝑏−𝑎𝑏−𝑎𝑏−𝑏=𝑎−𝑏.īŠ¨īŠ¨īŠ¨īŠ¨īŠ¨īŠ¨īŠŠīŠ¨īŠ¨īŠ¨īŠ¨īŠŠīŠŠīŠŠ

Much like how the middle terms cancel out in the difference of two squares, we can see that the same occurs for the difference of cubes.

This result is incredibly useful since it gives us an easy way to factor certain types of cubic equations that would otherwise be tricky to factor. Let us see an example of how the difference of two cubes can be factored using the above identity.

Example 1: Finding an Unknown by Factoring the Difference of Two Cubes

Given that đ‘Ĩ−512=(đ‘Ĩ−8)ī€šđ‘Ĩ+𝑘+64ī…īŠŠīŠ¨, find an expression for 𝑘.

Answer

This question can be solved in two ways. One way is to expand the parentheses on the right-hand side of the equation and find what value of 𝑘 satisfies both sides. An alternate way is to recognize that the expression on the left is the difference of two cubes, since 512=8īŠŠ. This allows us to use the formula for factoring the difference of cubes.

Recall that we have 𝑎−𝑏=(𝑎−𝑏)ī€šđ‘Ž+𝑎𝑏+𝑏ī….īŠŠīŠŠīŠ¨īŠ¨

Since the given equation is đ‘Ĩ−512=(đ‘Ĩ−8)ī€šđ‘Ĩ+𝑘+64ī…īŠŠīŠ¨, we can see that if we take 𝑎=đ‘Ĩ and 𝑏=8, it is of the desired form. This means that 𝑘 must be equal to 𝑎𝑏=8đ‘Ĩ.

To show how this answer comes about, let us examine what would normally happen if we tried to expand the parentheses. We would have (đ‘Ĩ−8)ī€šđ‘Ĩ+𝑘+64ī…=đ‘Ĩ×đ‘Ĩ+đ‘ĨÃ—đ‘˜+đ‘Ĩ×64−8×đ‘Ĩ−8Ã—đ‘˜âˆ’8×64=đ‘Ĩ+𝑘đ‘Ĩ−8đ‘Ĩ+64đ‘Ĩ−8𝑘−512=đ‘Ĩ+đ‘Ĩ(𝑘−8đ‘Ĩ)−8(𝑘−8đ‘Ĩ)−512.īŠ¨īŠ¨īŠ¨īŠŠīŠ¨īŠŠ

In order for this expression to be equal to đ‘Ĩ−512īŠŠ, the terms in the middle must cancel out. These terms have been factored in a way that demonstrates that choosing 𝑘=8đ‘Ĩ leads to both terms being equal to zero. If we do this, then both sides of the equation will be the same.

Therefore, we can confirm that 𝑘=8đ‘Ĩ satisfies the equation.

In the previous example, we demonstrated how a cubic equation that is the difference of two cubes can be factored using the formula with relative ease. We note, however, that a cubic equation does not need to be in this exact form to be factored. Suppose, for instance, we took 𝑏=−𝑐 in the formula for the factoring of the difference of two cubes. Then, we would have 𝑎−(−𝑐)=(𝑎−(−𝑐))ī€ē𝑎+𝑎(−𝑐)+(−𝑐)ī†.īŠŠīŠŠīŠ¨īŠ¨

Using the fact that (−𝑐)=𝑐īŠ¨īŠ¨ and (−𝑐)=−𝑐īŠŠīŠŠ, we can simplify this to get 𝑎+𝑐=(𝑎+𝑐)ī€šđ‘Žâˆ’đ‘Žđ‘+𝑐ī….īŠŠīŠŠīŠ¨īŠ¨

We also note that 𝑎−𝑎𝑐+𝑐īŠ¨īŠ¨ is in its most simplified form (i.e., it cannot be factored further). This leads to the following definition, which is analogous to the one from before.

Definition: Sum of Two Cubes

For two real numbers 𝑎 and 𝑏, the expression 𝑎+𝑏īŠŠīŠŠ is called the sum of two cubes. It can be factored as follows: 𝑎+𝑏=(𝑎+𝑏)ī€šđ‘Žâˆ’đ‘Žđ‘+𝑏ī….īŠŠīŠŠīŠ¨īŠ¨

Let us verify once more that this formula is correct by expanding the parentheses on the right-hand side. We have (𝑎+𝑏)ī€šđ‘Žâˆ’đ‘Žđ‘+𝑏ī…=đ‘ŽÃ—đ‘Žâˆ’đ‘ŽÃ—đ‘Žđ‘+đ‘ŽÃ—đ‘+đ‘Ã—đ‘Žâˆ’đ‘Ã—đ‘Žđ‘+đ‘Ã—đ‘=𝑎−𝑎𝑏+𝑎𝑏+𝑎𝑏−𝑎𝑏+𝑏=𝑎+𝑏.īŠ¨īŠ¨īŠ¨īŠ¨īŠ¨īŠ¨īŠŠīŠ¨īŠ¨īŠ¨īŠ¨īŠŠīŠŠīŠŠ

Just as for previous formulas, the middle terms end up canceling out each other, leading to an expression with just two terms.

Let us demonstrate how this formula can be used in the following example.

Example 2: Factoring a Sum of Two Cubes

Factorize fully đ‘Ĩ+8đ‘ĻīŠŠīŠŠ.

Answer

Note that although it may not be apparent at first, the given equation is a sum of two cubes. To see this, let us look at the term 8đ‘ĻīŠŠ. We can see this is the product of 8, which is a perfect cube, and đ‘ĻīŠŠ, which is a cubic power of đ‘Ļ. Therefore, if we take the cube root, we find īŽĸīŽĸīŽĸ√8đ‘Ļ=√8√đ‘Ļ=2đ‘Ļ.īŠŠīŠŠ

So, 8đ‘ĻīŠŠ is the cube of 2đ‘Ļ. Now, we recall that the sum of cubes can be written as 𝑎+𝑏=(𝑎+𝑏)ī€šđ‘Žâˆ’đ‘Žđ‘+𝑏ī….īŠŠīŠŠīŠ¨īŠ¨

Substituting 𝑎=đ‘Ĩ and 𝑏=2đ‘Ļ into the above formula, this gives us đ‘Ĩ+8đ‘Ļ=(đ‘Ĩ+2đ‘Ļ)ī€ēđ‘Ĩ−đ‘Ĩ×2đ‘Ļ+(2đ‘Ļ)ī†=(đ‘Ĩ+2đ‘Ļ)ī€šđ‘Ĩ−2đ‘Ĩđ‘Ļ+4đ‘Ļī….īŠŠīŠŠīŠ¨īŠ¨īŠ¨īŠ¨

As demonstrated in the previous example, we should always be aware that it may not be immediately obvious when a cubic expression is a sum or difference of cubes. Sometimes, it may be necessary to identify common factors in an expression so that the result becomes the sum or difference of two cubes. Let us consider an example where this is the case.

Example 3: Factoring a Difference of Two Cubes

Factorize fully 54đ‘Ĩ−16đ‘ĻīŠŠīŠŠ.

Answer

Before attempting to fully factor the given expression, let us note that there is a common factor of 2 between the terms. Therefore, it can be factored as follows: 54đ‘Ĩ−16đ‘Ļ=2ī€š27đ‘Ĩ−8đ‘Ļī….īŠŠīŠŠīŠŠīŠŠ

From here, we can see that the expression inside the parentheses is a difference of cubes. This is because each of 27đ‘ĨīŠŠ and 8đ‘ĻīŠŠ is a product of a perfect cube number (i.e., 3=27īŠŠ and 2=8īŠŠ) and a cubed variable (đ‘ĨīŠŠ and đ‘ĻīŠŠ). In other words, we have (3đ‘Ĩ)−(2đ‘Ļ)=27đ‘Ĩ−8đ‘Ļ.īŠŠīŠŠīŠŠīŠŠ

Recall that the difference of two cubes can be written as 𝑎−𝑏=(𝑎−𝑏)ī€šđ‘Ž+𝑎𝑏+𝑏ī….īŠŠīŠŠīŠ¨īŠ¨

Thus, the full factoring is 54đ‘Ĩ−16đ‘Ļ=2ī€š27đ‘Ĩ−8đ‘Ļī…=2(3đ‘Ĩ−2đ‘Ļ)ī€ē(3đ‘Ĩ)+(3đ‘Ĩ)(2đ‘Ļ)+(2đ‘Ļ)ī†=2(3đ‘Ĩ−2đ‘Ļ)ī€š9đ‘Ĩ+6đ‘Ĩđ‘Ļ+4đ‘Ļī….īŠŠīŠŠīŠŠīŠŠīŠ¨īŠ¨īŠ¨īŠ¨

Let us continue our investigation of expressions that are not evidently the sum or difference of cubes by considering a polynomial expression with sixth-order terms and seeing how we can combine different formulas to get the solution.

Example 4: Factoring a Difference of Squares That Results in a Product of a Sum and Difference of Cubes

Factor the expression đ‘Ĩ−đ‘ĻīŠŦīŠŦ.

Answer

Although the given expression involves sixth-order terms and we do not have any formula for dealing with them explicitly, we note that we can apply the laws of exponents to help us. Specifically, the expression can be written as a difference of two squares as follows: đ‘Ĩ−đ‘Ļ=ī€šđ‘Ĩī…−ī€šđ‘Ļī….īŠŦīŠŦīŠŠīŠ¨īŠŠīŠ¨

Note that it is also possible to write this as the difference of cubes, but the resulting expression is more difficult to simplify. Recall that the difference of two squares can be written as 𝑎−𝑏=(𝑎+𝑏)(𝑎−𝑏).īŠ¨īŠ¨

Letting 𝑎=đ‘ĨīŠŠ and 𝑏=đ‘ĻīŠŠ here, this gives us đ‘Ĩ−đ‘Ļ=ī€šđ‘Ĩ+đ‘Ļī…ī€šđ‘Ĩ−đ‘Ļī….īŠŦīŠŦīŠŠīŠŠīŠŠīŠŠ

Now, we have a product of the difference of two cubes and the sum of two cubes. Thus, we can apply the following sum and difference formulas: 𝑎+𝑏=(𝑎+𝑏)ī€šđ‘Žâˆ’đ‘Žđ‘+𝑏ī…,𝑎−𝑏=(𝑎−𝑏)ī€šđ‘Ž+𝑎𝑏+𝑏ī….īŠŠīŠŠīŠ¨īŠ¨īŠŠīŠŠīŠ¨īŠ¨

Thus, we let 𝑎=đ‘Ĩ and 𝑏=đ‘Ļ and we obtain the full factoring of the expression: đ‘Ĩ−đ‘Ļ=ī€šđ‘Ĩ+đ‘Ļī…ī€šđ‘Ĩ−đ‘Ļī…=(đ‘Ĩ+đ‘Ļ)ī€šđ‘Ĩ−đ‘Ĩđ‘Ļ+đ‘Ļī…(đ‘Ĩ−đ‘Ļ)ī€šđ‘Ĩ+đ‘Ĩđ‘Ļ+đ‘Ļī….īŠŦīŠŦīŠŠīŠŠīŠŠīŠŠīŠ¨īŠ¨īŠ¨īŠ¨

For our final example, we will consider how the formula for the sum of cubes can be used to solve an algebraic problem.

Example 5: Evaluating an Expression Given the Sum of Two Cubes

If đ‘Ĩđ‘Ļ=4 and đ‘Ĩ+5đ‘Ļ=−3, what is the value of đ‘Ĩ+125đ‘ĻīŠŠīŠŠ?

Answer

We begin by noticing that đ‘Ĩ+125đ‘ĻīŠŠīŠŠ is the sum of two cubes. This is because 125đ‘ĻīŠŠ is 125 times đ‘ĻīŠŠ, both of which are cubes. So, if we take its cube root, we find īŽĸīŽĸīŽĸ√125đ‘Ļ=√125√đ‘Ļ=5đ‘Ļ.īŠŠīŠŠ

Recall that we have the following formula for factoring the sum of two cubes: 𝑎+𝑏=(𝑎+𝑏)ī€šđ‘Žâˆ’đ‘Žđ‘+𝑏ī….īŠŠīŠŠīŠ¨īŠ¨

Here, if we let 𝑎=đ‘Ĩ and 𝑏=5đ‘Ļ, we have đ‘Ĩ+125đ‘Ļ=(đ‘Ĩ+5đ‘Ļ)ī€ēđ‘Ĩ−(đ‘Ĩ)(5đ‘Ļ)+(5đ‘Ļ)ī†=(đ‘Ĩ+5đ‘Ļ)ī€šđ‘Ĩ−5đ‘Ĩđ‘Ļ+25đ‘Ļī….īŠŠīŠŠīŠ¨īŠ¨īŠ¨īŠ¨

Note that we have been given the value of đ‘Ĩ+5đ‘Ļ but not đ‘Ĩ−5đ‘Ĩđ‘Ļ+25đ‘ĻīŠ¨īŠ¨. However, it is possible to express this factor in terms of the expressions we have been given. Suppose we multiply đ‘Ĩ+5đ‘Ļ with itself: (đ‘Ĩ+5đ‘Ļ)(đ‘Ĩ+5đ‘Ļ)=đ‘Ĩ+10đ‘Ĩđ‘Ļ+25đ‘Ļ.īŠ¨īŠ¨

This is almost the same as the second factor but with 15đ‘Ĩđ‘Ļ added on. In other words, by subtracting 15đ‘Ĩđ‘Ļ from both sides, we have (đ‘Ĩ+5đ‘Ļ)−15đ‘Ĩđ‘Ļ=đ‘Ĩ−5đ‘Ĩđ‘Ļ+25đ‘Ļ.īŠ¨īŠ¨īŠ¨

Since we have been given the value of đ‘Ĩđ‘Ļ, the left-hand side of this equation is now purely in terms of expressions we know the value of. Therefore, we can rewrite đ‘Ĩ+125đ‘ĻīŠŠīŠŠ as follows: đ‘Ĩ+125đ‘Ļ=(đ‘Ĩ+5đ‘Ļ)ī€šđ‘Ĩ−5đ‘Ĩđ‘Ļ+25đ‘Ļī…=(đ‘Ĩ+5đ‘Ļ)ī€ē(đ‘Ĩ+5đ‘Ļ)−15đ‘Ĩđ‘Ļī†=(−3)ī€ē(−3)−15×4ī†=153.īŠŠīŠŠīŠ¨īŠ¨īŠ¨īŠ¨

Let us summarize the key points we have learned in this explainer.

Key Points

  • The difference of two cubes can be written as 𝑎−𝑏=(𝑎−𝑏)ī€šđ‘Ž+𝑎𝑏+𝑏ī….īŠŠīŠŠīŠ¨īŠ¨
  • Similarly, the sum of two cubes can be written as 𝑎+𝑏=(𝑎+𝑏)ī€šđ‘Žâˆ’đ‘Žđ‘+𝑏ī….īŠŠīŠŠīŠ¨īŠ¨
  • Using substitutions (e.g., 𝑎=2đ‘Ĩ or 𝑏=3đ‘Ļ), we can use the above formulas to factor various cubic expressions.
  • By identifying common factors in cubic expressions, we can in some cases reduce them to sums or differences of cubes.
  • We can combine the formula for the sum or difference of cubes with that for the difference of squares to simplify higher-order expressions.

Nagwa uses cookies to ensure you get the best experience on our website. Learn more about our Privacy Policy.