Sums and Differences of Cubes

Lesson Features »

Lesson Priority: Normal

Algebra Two $\longrightarrow$
Polynomial Functions $\longrightarrow$
  • Know and (probably) memorize the sum of cubes and difference of cubes formulas
  • Practice using the formulas on simple cases of sums and difference of cubes
  • Use GCF factoring and other prior techniques for complex expressions of sums and differences that have one or more variables
Lesson Description

Similar to the Difference of Squares formula we already know, the Sum and Difference of Cubes formula provides a successful factoring approach to expressions of the form $a^3 \pm b^3$.

Practice Problems

Practice problems and worksheet coming soon!


Another Formula to Know (Sorry)

Recently, we mastered the difference of squares » factoring technique, which was useful because it is the only way to factor a specific type of expression. Namely,$$a^2 -b^2 = (a+b)(a-b)$$The difference of squares is named that way because the thing we seek to factor in that case is literally a difference of two things squared. In this lesson, we will learn the formula for factoring a sum or difference of cubes, instead of squares. For better or worse, this means we just need to memorize a formula - but as per usual, we won't be ready to get an A unless we practice using it, so we can see all the ways we might be expected to use it.

Sum / Difference of Cubes Formula(s)

The formula for factoring a sum of two cubes is nearly identical to the formulas for factoring a difference of two cubes. In fact, they are so similar that many teachers present this factoring approach as a single formula.
Define: Sum or Difference of CubesA sum of two cubes can be factored in the following way:$$a^3 + b^3 = (a + b) \left(a^2 - ab + b^2\right)$$A difference of two cubes can be factored in the following way:$$a^3 - b^3 = (a - b)\left(a^2 + ab + b^2\right)$$Both of these factoring forms can be summarized by a single formula:$$a^3 \pm b^3 = (a \pm b) \left(a^2 \mp ab + b^2\right)$$
You could prove these formulas very quickly by simply multiplying out the right side and verifying that you end up with the sum or difference on the left side of the formula. In fact, if you're freaked out on a quiz and worried you mixed up your plus and minus signs, this is a good way to double check that you have the formula written down correctly.
Pro Tip
You should absolutely learn this concept as a summarized single formula, with the $\pm$ and $\mp$ signs. I earnestly find that students are more apt to mess it up when they memorize them separately. Knowing a single formula means you're equally prepared for either case - and you while you will not see this nearly as often as you will see quadratic factoring, you absolutely will see it from time to time, and will be expected to know what to do.
Also, it's worth quickly mentioning that the only reason with didn't have two formulas to use when we learned the Difference of Squares factoring technique is that a "Sum of Squares" cannot be factored with real numbers. The reason that a sum of cubes can be factored while a sum of squares cannot comes from the fact that you can take the cube root of a negative number, but you cannot take the square root of a negative number.Let's see an example.
Example 1Factor the expression$$x^3 - 8$$$\blacktriangleright$ This is as simple as a cubes factoring gets, since it lines up well with the formula. The form we look for $a^3 - b^3$ is present, where $a=x$ and $b=2$. We'll follow along with the formula.$$\left(a^3 - b^3 \right) = (a - b)\left(a^2 + ab + b^2\right)$$$$\left(x^3 - 8 \right) = (x - 2)\left(x^2 + 2x + 4\right)$$
You Should Know
When you factor a sum or difference of cubes of a one variable expression, you get a linear factor and a quadratic factor. That quadratic factor is guaranteed to be prime, or irreducible. In other words, don't waste any time trying to factor it further - you won't be able to.

Mr. Math Makes It Mean

By far, the most common use of this factoring method is for one variable cubic expressions, used in instances where we are also factoring quadratics or other polynomial functions and equations. However, there are two notable ways that teachers can give this concept a spin to try and diminish your grade.GCF FactoringTeachers love the GCF trick, but if you know what to look for, you'll still recognize the sum or difference of cubes without difficulty. First and foremost, if you have been following my lessons since the glory days where you first got acquainted with factoring, you know to always seek out a GCF in every factoring problem, every time. If you're not following my unwaveringly correct advice on factoring, you will still get accustomed to seeking a GCF in sum or difference of cube factoring problems, just like you probably did in problems that required difference of squares factoring. In short, teachers love to test this, so if you've done your due diligence to practice, it's likely that you ran into a few of these.The idea is that the expression initially contains a greatest common factor, and that once you remove it by factoring it out, the remaining expression you're left with has a recognizable special factoring pattern.
Example 2Factor the expression$$81x^5 - 375x^2$$$\blacktriangleright$ At first glance, there isn't anything recognizable about this expression. We don't have any tricks for fifth order polynomials, and there are only two terms. However, having only two terms may be a tip-off that we're either going to use the difference of squares or the difference of cubes factoring method. Let's start by factoring out the greatest common factor of $3x^2$.$$81x^5 - 375x^2 = 3x^2\left( 27x^3 - 125 \right)$$Now we can proceed with factoring the simpler expression remaining in the parenthesis, which requires the difference of cubes formula.$$3x^2\left( 27x^3 - 125 \right)$$$$3x^2 (3x - 5) \big(9x^2 + 15x + 25\big)$$Once again, we don't even need to prod and poke at the remaining quadratic - the quadratic term in the sum / difference of cubes factoring will never be further factorable.Multiple VariablesJust as we saw in the lesson on advanced difference of squares » factoring, situations involving monomials with multiple variables are not handled very differently, though more care must be taken to find the proper square root, or in this case, cube root. Let's see how the sum / difference of cubes formula works the same way, through an example.
Example 3Factor the expression$$x^3 + 64y^6$$$\blacktriangleright$ Even though each term has a different variable, this is still a sum of cubes, due to the fact that each object is indeed a cubed object. The cube root of the first object is $x$, while the cube root of the second object is $4y^2$.$$x^3 + 64y^6 = \left(x + 4y^2\right) \left(x^2 - 4xy^2 + 16y^4\right)$$It's worth noting that more complex sum or difference of cubes problems could have both of these two qualities (GCF requirement and multiple variables) at the same time. We'll see examples of that in the lesson-end problems, as well as in the lesson worksheet.

Put It to the Test

Having seen a few examples, we're ready to finish mastering this factoring method. Unlike many other formulas we learn in Algebra, you'll never need to use this formula backward, so just a little practice is all it takes to know how to crush any problem that requires us to factor using this technique. Make sure to work the problems below to ensure you're ready, as well as the worksheet problems for this lesson.
Example 4$$243 - x^9$$
Show solution
$\blacktriangleright$ There is no GCF, and both terms are perfect cubes, so we can apply the formula verbatim.$$243 - x^9 = \left( 7 - x^3\right) \left( 49 + 7x^3 + x^6\right)$$
Example 5$$x^{18} + 216$$
Show solution
$\blacktriangleright$ Once again, these terms are perfect cubes, so we will simply apply the formula.$$x^{18} + 216 = \left(x^6 + 6 \right) \left(x^{12} - 6x^6 + 36 \right)$$
Example 6$$4w^5 + 108w^8$$
Show solution
$\blacktriangleright$ A GCF factor exists, and like any factoring problem, we need to remove it to avoid having a bad time.$$4w^5 + 108w^8 = 4w^5 (1 + 27w^3)$$The remaining factor is a difference of cubes.$$= 4w^5 (1 + 3w) \left( 1 - 3w + 9w^2 \right)$$
Example 7$$x^6 + y^9$$
Show solution
$\blacktriangleright$ Two variables are present, but no GCF, and each term is a perfect cube. We can proceed in one step by applying the formula.$$x^6 + y^9 = \left( x^2 + y^3\right) \left(x^4 - x^2 y^3 + y^6 \right)$$
Example 8$$x^{15} y^3 - 8$$
Show solution
$\blacktriangleright$ Again, two variables are present with no GCF, and each term is a perfect cube. We can proceed in one step by applying the formula.$$x^{15} y^3 - 8 = \left(x^5 y - 2\right) \left(x^{10} y^2 + 2 x^5 y + 4 \right)$$
Example 9$$\frac{w^3 z^{12}}{2} - 32$$
Show solution
$\blacktriangleright$ This is an odd problem but a good exercise in thinking outside the box. There is no common factor, yet neither of the terms is exactly a perfect cube. However, if we multiplied the expression by $2$, each term would indeed be a perfect cube. Since we cannot simply take an expression and multiply it by $2$ (as that would change the expression, which we are not allowed to do), we must somehow manipulate it. There are two ways to look at this process:1) Multiply by $2/2$Multiplying by $2/2$ doesn't fundamentally change the expression, since we are in essence multiplying by $1$. However, in order for this to accomplish anything here, we need to apply each $2$ separately, so to speak:$$\frac{w^3 z^{12}}{2} - 32 = \frac{2}{2} \, \left( \frac{w^3 z^{12}}{2} - 32 \right)$$$$= \frac{1}{2} \cdot 2 \cdot \left( \frac{w^3 z^{12}}{2} - 32 \right)$$$$= \frac{1}{2} \, \left( w^3 z^{12} - 64 \right)$$$$= \frac{1}{2} \, \left( wz^4 - 4 \right) \left( w^6 + 4wz^4 + 8 \right)$$2) Factor out a $1/2$ from each term$$\frac{w^3 z^{12}}{2} - 32 = \frac{1}{2} \, \left(w^3 z^{12} - 64 \right)$$$$\frac{1}{2} \, \left( wz^4 - 4 \right) \left( w^6 + 4wz^4 + 8 \right)$$
Example 10$$128x^3 y - 250y^4$$
Show solution
$\blacktriangleright$ Identify and remove the GCF to proceed with the difference of cubes formula for factoring this expression.$$128x^3 y - 250y^4 = 2y \left( 64x^3 - 125 y^3 \right)$$$$= 2y \big( 4x - 5y \big) \big(16x^2 + 20xy + 25y^2 \big)$$
Example 11$$8z^6 - 512 a^6$$
Show solution
$\blacktriangleright$ First, take care of the GCF of $8$. Then we will proceed as expected.$$8z^6 - 512 a^6 = 8 \big( z^6 - 64a^6 \big)$$$$= 8 \left(z^2 - 4a^2 \right) \left( z^4 + 4a^2 z^2 + 16a^4\right)$$We need to recognize that the first factor in this result is a difference of squares, and can itself be further factored. Particularly, if our instructions tell us to "factor completely" and we fail to recognize and act on this, we can expect to lose points.$$= 8 \left(z + 2a \right) \left( z - 2a \right) \left( z^4 + 4a^2 z^2 + 16a^4\right)$$
Example 12$$x^9 - y^{27}$$
Show solution
$\blacktriangleright$ No GCF is present here. While the two terms are each perfect cubes as is, and the cubes factoring formula does apply outright, note that the result we get will contain a term that can further be factored, similar to the last problem.$$x^9 - y^{27} = \big(x^3 - y^9 \big) \big( x^6 + x^3 y^9 + y^{18} \big)$$The first factor in the result is itself a difference of cubes. Therefore,$$= \big(x - y^3 \big) \big(x^2 + xy^3 + y^6 \big) \big( x^6 + x^3 y^9 + y^{18} \big)$$
Lesson Takeaways
  • Learn and memorize the double formula for factoring the sum or difference of cubes
  • Factor cubes besides those raised to the power $3$, such as $x^6$
  • Recognize GCF factoring opportunities and check for them every time you factor
  • Be familiar factoring sum and difference of cube patters for multivariable sums and differences
  • Although the leftover quadratic will never be factorable, remember to check the first factor in the formula for possible further factoring (e.g. examples 11 and 12)

Lesson Metrics

At the top of the lesson, you can see the lesson title, as well as the DNA of Math path to see how it fits into the big picture. You can also see the description of what will be covered in the lesson, the specific objectives that the lesson will cover, and links to the section's practice problems (if available).

Key Lesson Sections

Headlines - Every lesson is subdivided into mini sections that help you go from "no clue" to "pro, dude". If you keep getting lost skimming the lesson, start from scratch, read through, and you'll be set straight super fast.

Examples - there is no better way to learn than by doing. Some examples are instructional, while others are elective (such examples have their solutions hidden).

Perils and Pitfalls - common mistakes to avoid.

Mister Math Makes it Mean - Here's where I show you how teachers like to pour salt in your exam wounds, when applicable. Certain concepts have common ways in which teachers seek to sink your ship, and I've seen it all!

Put It To The Test - Shows you examples of the most common ways in which the concept is tested. Just knowing the concept is a great first step, but understanding the variation in how a concept can be tested will help you maximize your grades!

Lesson Takeaways - A laundry list of things you should be able to do at lesson end. Make sure you have a lock on the whole list!

Special Notes

Definitions and Theorems: These are important rules that govern how a particular topic works. Some of the more important ones will be used again in future lessons, implicitly or explicitly.

Pro-Tip: Knowing these will make your life easier.

Remember! - Remember notes need to be in your head at the peril of losing points on tests.

You Should Know - Somewhat elective information that may give you a broader understanding.

Warning! - Something you should be careful about.

Return to Lesson