Skip to main content
Mathematics LibreTexts

12.2.3: Special Cases- Cubes

  • Page ID
    69582
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    \( \newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\)

    ( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\)

    \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

    \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\)

    \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

    \( \newcommand{\Span}{\mathrm{span}}\)

    \( \newcommand{\id}{\mathrm{id}}\)

    \( \newcommand{\Span}{\mathrm{span}}\)

    \( \newcommand{\kernel}{\mathrm{null}\,}\)

    \( \newcommand{\range}{\mathrm{range}\,}\)

    \( \newcommand{\RealPart}{\mathrm{Re}}\)

    \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

    \( \newcommand{\Argument}{\mathrm{Arg}}\)

    \( \newcommand{\norm}[1]{\| #1 \|}\)

    \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

    \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    \( \newcommand{\vectorA}[1]{\vec{#1}}      % arrow\)

    \( \newcommand{\vectorAt}[1]{\vec{\text{#1}}}      % arrow\)

    \( \newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vectorC}[1]{\textbf{#1}} \)

    \( \newcommand{\vectorD}[1]{\overrightarrow{#1}} \)

    \( \newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}} \)

    \( \newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}} \)

    \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    \(\newcommand{\avec}{\mathbf a}\) \(\newcommand{\bvec}{\mathbf b}\) \(\newcommand{\cvec}{\mathbf c}\) \(\newcommand{\dvec}{\mathbf d}\) \(\newcommand{\dtil}{\widetilde{\mathbf d}}\) \(\newcommand{\evec}{\mathbf e}\) \(\newcommand{\fvec}{\mathbf f}\) \(\newcommand{\nvec}{\mathbf n}\) \(\newcommand{\pvec}{\mathbf p}\) \(\newcommand{\qvec}{\mathbf q}\) \(\newcommand{\svec}{\mathbf s}\) \(\newcommand{\tvec}{\mathbf t}\) \(\newcommand{\uvec}{\mathbf u}\) \(\newcommand{\vvec}{\mathbf v}\) \(\newcommand{\wvec}{\mathbf w}\) \(\newcommand{\xvec}{\mathbf x}\) \(\newcommand{\yvec}{\mathbf y}\) \(\newcommand{\zvec}{\mathbf z}\) \(\newcommand{\rvec}{\mathbf r}\) \(\newcommand{\mvec}{\mathbf m}\) \(\newcommand{\zerovec}{\mathbf 0}\) \(\newcommand{\onevec}{\mathbf 1}\) \(\newcommand{\real}{\mathbb R}\) \(\newcommand{\twovec}[2]{\left[\begin{array}{r}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\ctwovec}[2]{\left[\begin{array}{c}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\threevec}[3]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\cthreevec}[3]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\fourvec}[4]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\cfourvec}[4]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\fivevec}[5]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\cfivevec}[5]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\mattwo}[4]{\left[\begin{array}{rr}#1 \amp #2 \\ #3 \amp #4 \\ \end{array}\right]}\) \(\newcommand{\laspan}[1]{\text{Span}\{#1\}}\) \(\newcommand{\bcal}{\cal B}\) \(\newcommand{\ccal}{\cal C}\) \(\newcommand{\scal}{\cal S}\) \(\newcommand{\wcal}{\cal W}\) \(\newcommand{\ecal}{\cal E}\) \(\newcommand{\coords}[2]{\left\{#1\right\}_{#2}}\) \(\newcommand{\gray}[1]{\color{gray}{#1}}\) \(\newcommand{\lgray}[1]{\color{lightgray}{#1}}\) \(\newcommand{\rank}{\operatorname{rank}}\) \(\newcommand{\row}{\text{Row}}\) \(\newcommand{\col}{\text{Col}}\) \(\renewcommand{\row}{\text{Row}}\) \(\newcommand{\nul}{\text{Nul}}\) \(\newcommand{\var}{\text{Var}}\) \(\newcommand{\corr}{\text{corr}}\) \(\newcommand{\len}[1]{\left|#1\right|}\) \(\newcommand{\bbar}{\overline{\bvec}}\) \(\newcommand{\bhat}{\widehat{\bvec}}\) \(\newcommand{\bperp}{\bvec^\perp}\) \(\newcommand{\xhat}{\widehat{\xvec}}\) \(\newcommand{\vhat}{\widehat{\vvec}}\) \(\newcommand{\uhat}{\widehat{\uvec}}\) \(\newcommand{\what}{\widehat{\wvec}}\) \(\newcommand{\Sighat}{\widehat{\Sigma}}\) \(\newcommand{\lt}{<}\) \(\newcommand{\gt}{>}\) \(\newcommand{\amp}{&}\) \(\definecolor{fillinmathshade}{gray}{0.9}\)
    Learning Objectives
    • Factor the sum of cubes.
    • Factor the difference of cubes.

    Introduction

    In many ways, factoring is about patterns: if you recognize the patterns that numbers make when they are multiplied together, you can use those patterns to separate these numbers into their individual factors.

    Some interesting patterns arise when you are working with cubed quantities within polynomials. Specifically, there are two more special cases to consider: \(\ a^{3}+b^{3}\) and \(\ a^{3}-b^{3}\).

    Let’s take a look at how to factor sums and differences of cubes.

    Sum of Cubes

    The term “cubed” is used to describe a number raised to the third power. In geometry, a cube is a six-sided shape with equal width, length, and height; since all these measures are equal, the volume of a cube with width \(\ x\) can be represented by \(\ x^{3}\).

    (Notice the exponent!)

    Cubed numbers get large very quickly. \(\ 1^{3}=1,2^{3}=8,3^{3}=27,4^{3}=64\), and \(\ 5^{3}=125\).

    Before looking at factoring a sum of two cubes, let’s look at the possible factors.

    It turns out that \(\ a^{3}+b^{3}\) can actually be factored as \(\ (a+b)\left(a^{2}-a b+b^{2}\right)\). Let’s check these factors by multiplying.

    Does \(\ (a+b)\left(a^{2}-a b+b^{2}\right)=a^{3}+b^{3}\)?
    \(\ \text { (a) }\left(a^{2}-a b+b^{2}\right)+(b)\left(a^{2}-a b+b^{2}\right)\) Apply the distributive property.
    \(\ \left(a^{3}-a^{2} b+a b^{2}\right)+(b)\left(a^{2}-a b+b^{2}\right)\) Multiply by \(\ a\).
    \(\ \left(a^{3}-a^{2} b+a b^{2}\right)+\left(a^{2} b-a b^{2}+b^{3}\right)\) Multiply by \(\ b\).
    \(\ a^{3}-a^{2} b+a^{2} b+a b^{2}-a b^{2}+b^{3}\) Rearrange terms in order to combine the like terms.
    \(\ a^{3}+b^{3}\) Simplify.

    Did you see that? Four of the terms cancelled out, leaving us with the (seemingly) simple binomial \(\ a^{3}+b^{3}\). So, the factors are correct.

    You can use this pattern to factor binomials in the form \(\ a^{3}+b^{3}\), otherwise known as “the sum of cubes.”

    The Sum of Cubes

    A binomial in the form \(\ a^{3}+b^{3}\) can be factored as \(\ (a+b)\left(a^{2}-a b+b^{2}\right)\).

    Examples:

    The factored form of \(\ x^{3}+64\) is \(\ (x+4)\left(x^{2}-4 x+16\right)\).

    The factored form of \(\ 8 x^{3}+y^{3}\) is \(\ (2 x+y)\left(4 x^{2}-2 x y+y^{2}\right)\).

    Example

    Factor \(\ x^{3}+8 y^{3}\).

    Solution

    \(\ x^{3}+8 y^{3}\) Identify that this binomial fits the sum of cubes pattern: \(\ a^{3}+b^{3} \cdot a=x\) and \(\ b=2 y\) (since \(\ 2 y \cdot 2 y \cdot 2 y=8 y^{3}\)).
    \(\ (x+2 y)\left(x^{2}-x(2 y)+(2 y)^{2}\right)\) Factor the binomial as \(\ (a+b)\left(a^{2}-a b+b^{2}\right)\), substituting \(\ a=x\) and \(\ b=2 y\) into the expression.
    \(\ (x+2 y)\left(x^{2}-x(2 y)+4 y^{2}\right)\) Square \(\ (2 y)^{2}=4 y^{2}\)
    \(\ (x+2 y)\left(x^{2}-2 x y+4 y^{2}\right)\) Multiply \(\ -x \cdot 2 y=-2 x y\) (writing the coefficient first).

    And that’s it. The binomial \(\ x^{3}+8 y^{3}\) can be factored as \(\ (x+2 y)\left(x^{2}-2 x y+4 y^{2}\right)\). Let’s try another one.

    You should always look for a common factor before you follow any of the patterns for factoring.

    Example

    Factor \(\ 16 m^{3}+54 n^{3}\).

    Solution

    \(\ 16 m^{3}+54 n^{3}\) Factor out the common factor, 2.
    \(\ 2\left(8 m^{3}+27 n^{3}\right)\) \(\ 8 m^{3}\) and \(\ 27 n^{3}\) are cubes, so you can factor \(\ 8 m^{3}+27 n^{3}\) as the sum of two cubes: \(\ a=2 m\) and \(\ b=3 n\).
    \(\ 2(2 m+3 n)\left[(2 m)^{2}-(2 m)(3 n)+(3 n)^{2}\right]\) Factor the binomial \(\ 8 m^{3}+27 n^{3}\) substituting \(\ a=2 m\) and \(\ b=3 n\) into the expression \(\ \color{red}(a+b)\left(a^{2}-a b+b^{2}\right)\).
    \(\ 2(2 m+3 n)\left[\mathbf{4 m^{2}}-(2 m)(3 n)+\mathbf{9 n^{2}}\right]\) Square: \(\ (2 m)^{2}=4 m^{2}\) and \(\ (3 n)^{2}=9 n^{2}\).
    \(\ 2(2 m+3 n)\left(4 m^{2}-6 m n+9 n^{2}\right)\) Multiply \(\ -(2 m)(3 n)=-6 m n\).
    Exercise

    Factor \(\ 125 x^{3}+64\).

    1. \(\ (5 x+64)\left(25 x^{2}-125 x+16\right)\)
    2. \(\ (5 x+4)\left(25 x^{2}-20 x+16\right)\)
    3. \(\ (x+4)\left(x^{2}-2 x+16\right)\)
    4. \(\ (5 x+4)\left(25 x^{2}+20 x-64\right)\)
    Answer
    1. Incorrect. Check your values for \(\ a\) and \(\ b\) here. \(\ b^{3}=64\), so what is \(\ b\)? The correct answer is \(\ (5 x+4)\left(25 x^{2}-20 x+16\right)\).
    2. Correct. \(\ 5 x\) is the cube root of \(\ 125 x^{3}\), and 4 is the cube root of 64. Substituting these values for \(\ a\) and \(\ b\), you find \(\ (5 x+4)\left(25 x^{2}-20 x+16\right)\).
    3. Incorrect. Check your values for \(\ a\) and \(\ b\) here. \(\ a^{3}=125 x^{3}\), so what is \(\ a\)? The correct answer is \(\ (5 x+4)\left(25 x^{2}-20 x+16\right)\).
    4. Incorrect. Check the mathematical signs; the \(\ b^{2}\) term is positive, not negative, when factoring a sum of cubes. The correct answer is \(\ (5 x+4)\left(25 x^{2}-20 x+16\right)\).

    Difference of Cubes

    Having seen how binomials in the form \(\ a^{3}+b^{3}\) can be factored, it should not come as a surprise that binomials in the form \(\ a^{3}-b^{3}\) can be factored in a similar way.

    The Difference of Cubes

    A binomial in the form \(\ a^{3}-b^{3}\) can be factored as \(\ (a-b)\left(a^{2}+a b+b^{2}\right)\).

    Examples:

    The factored form of \(\ x^{3}-64\) is \(\ (x-4)\left(x^{2}+4 x+16\right)\).

    The factored form of \(\ 27 x^{3}-8 y^{3}\) is \(\ (3 x-2 y)\left(9 x^{2}+6 x y+4 y^{2}\right)\).

    Notice that the basic construction of the factorization is the same as it is for the sum of cubes; the difference is in the + and - signs. Take a moment to compare the factored form of \(\ a^{3}+b^{3}\) with the factored form of \(\ a^{3}-b^{3}\).

    Factored form of \(\ a^{3}+b^{3}\): \(\ (a+b)\left(a^{2}-a b+b^{2}\right)\)

    Factored form of \(\ a^{3}-b^{3}\): \(\ (a-b)\left(a^{2}+a b+b^{2}\right)\)

    This can be tricky to remember because of the different signs. The factored form of \(\ a^{3}+b^{3}\) contains a negative, and the factored form of \(\ a^{3}-b^{3}\) contains a positive! Some people remember the different forms like this:

    “Remember one sequence of variables: \(\ a^{3} b^{3}=(a b)\left(a^{2}\ a b\ b^{2}\right)\). There are 4 missing signs. Whatever the first sign is, it is also the second sign. The third sign is the opposite, and the fourth sign is always +.”

    Try this for yourself. If the first sign is +, as in \(\ a^{3}+b^{3}\), according to this strategy how do you fill in the rest: \(\ (a b)\left(a^{2}\ a b\ b^{2}\right)\)?

    Does this method help you remember the factored form of \(\ a^{3}+b^{3}\) and \(\ a^{3}-b^{3}\)?

    Let’s go ahead and look at a couple of examples. Remember to factor out all common factors first.

    Example

    Factor \(\ 8 x^{3}-1,000\).

    Solution

    \(\ 8\left(x^{3}-125\right)\) Factor out 8.
    \(\ 8\left(x^{3}-125\right)\) Identify that the binomial fits the pattern \(\ a^{3}-b^{3}\): \(\ a=x\) and \(\ b=5\) (since \(\ 5^{3}=125\)).
    \(\ 8(x-5)\left[x^{2}+(x)(5)+5^{2}\right]\) Factor \(\ x^{3}-125\) as \(\ (a-b)\left(a^{2}+a b+b^{2}\right)\), substituting \(\ a=x\) and \(\ b=5\) into the expression.
    \(\ 8(x-5)\left(x^{2}+5 x+25\right)\) Square the first and last terms, and rewrite \(\ (x)(5)\) as \(\ 5x\).

    \(\ 8(x-5)\left(x^{2}+5 x+25\right)\)

    Let’s see what happens if you don’t factor out the common factor first. In this example, it can still be factored as the difference of two cubes. However, the factored form still has common factors, which need to be factored out.

    Example

    Factor \(\ 8 x^{3}-1,000\).

    Solution

    \(\ 8 x^{3}-1,000\) Identify that this binomial fits the pattern \(\ a^{3}-b^{3}\): \(\ a=2 x\) and \(\ b=10\) (since \(\ 10^{3}=1,000\)).
    \(\ (2 x-10)\left[(2 x)^{2}+2 x \cdot 10+10^{2}\right]\) Factor as \(\ (a-b)\left(a^{2}+a b+b^{2}\right)\), substituting \(\ a=2 x\) and \(\ b=10\) into the expression.
    \(\ (2 x-10)\left(4 x^{2}+20 x+100\right)\) Square and multiply: \(\ (2 x)^{2}=4 x^{2}\), \(\ (2 x)(10)=20 x\), and \(\ 10^{2}=100\).
    \(\ 2(x-5)(4)\left(x^{2}+5 x+25\right)\) Factor out remaining common factors in each factor. Factor out 2 from the first factor, factor out 4 from the second factor.
    \(\ (2 \cdot 4)(x-5)\left(x^{2}+5 x+25\right)\) Multiply the numerical factors.

    \(\ 8(x-5)\left(x^{2}+5 x+25\right)\)

    As you can see, this last example still worked, but required a couple of extra steps. It is always a good idea to factor out all common factors first. In some cases, the only efficient way to factor the binomial is to factor out the common factors first.

    Here is one more example. Note that \(\ r^{9}=\left(r^{3}\right)^{3}\) and that \(\ 8 s^{6}=\left(2 s^{2}\right)^{3}\).

    Example

    Factor \(\ r^{9}-8 s^{6}\).

    Solution

    \(\ r^{9}-8 s^{6}\) Identify this binomial as the difference of two cubes. As shown above, it is. Using the laws of exponents, rewrite \(\ r^{9}\) as \(\ \left(r^{3}\right)^{3}\).
    \(\ \left(r^{3}\right)^{3}-\left(2 s^{2}\right)^{3}\) Rewrite \(\ r^{9}\) as \(\ \left(r^{3}\right)^{3}\) and rewrite \(\ 8 s^{6}\) as \(\ \left(2 s^{2}\right)^{3}\).
    \(\ \left(r^{3}-2 s^{2}\right)\left[\left(r^{3}\right)^{2}+\left(r^{3}\right)\left(2 s^{2}\right)+\left(2 s^{2}\right)^{2}\right]\)

    Now the binomial is written in terms of cubed quantities. Thinking of \(\ a^{3}-b^{3}\), \(\ a=r^{3}\) and \(\ b=2 s^{2}\).

    Factor the binomial as \(\ (a-b)\left(a^{2}+a b+b^{2}\right)\), substituting \(\ a=r^{3}\) and \(\ b=2 s^{2}\) into the expression.

    \(\ \left(r^{3}-2 s^{2}\right)\left(r^{6}+2 r^{3} s^{2}+4 s^{4}\right)\) Multiply and square the terms.

    \(\ \left(r^{3}-2 s^{2}\right)\left(r^{6}+2 r^{3} s^{2}+4 s^{4}\right)\)

    Exercise

    Using the difference of cubes, identify the product of \(\ 3(x-3 y)\left(x^{2}+3 x y+9 y^{2}\right)\).

    1. \(\ x^{3}-y^{3}\)
    2. \(\ 3 x-81 y\)
    3. \(\ 3 x^{3}+81 y^{3}\)
    4. \(\ 3 x^{3}-81 y^{3}\)
    Answer
    1. Incorrect. If this were true, the expression shown above would be \(\ (x-y)\left(x^{2}+x y+y^{2}\right)\). The correct answer is \(\ 3 x^{3}-81 y^{3}\).
    2. Incorrect. Neither of the terms in this binomial is a cubed number! The correct answer is \(\ 3 x^{3}-81 y^{3}\).
    3. Incorrect. Check your signs. If this expression falls into the difference of cubes category, the symbol between \(\ 3 x^{3}\) and \(\ 81 y^{3}\) should be -. The correct answer is \(\ 3 x^{3}-81 y^{3}\).
    4. Correct. Recognizing that this expression is in the form \(\ (a-b)\left(a^{2}+a b+b^{2}\right)\), you find \(\ a=x\) and \(\ b=3 y\). This means the resulting \(\ a^{3}-b^{3}\) monomial is \(\ x^{3}-27 y^{3}\). It \(\ 3 x^{3}-81 y^{3}\).

    Summary

    You encounter some interesting patterns when factoring. Two special cases, the sum of cubes and the difference of cubes, can help you factor some binomials that have a degree of three (or higher, in some cases). The special cases are:

    • A binomial in the form \(\ a^{3}+b^{3}\) can be factored as \(\ (a+b)\left(a^{2}-a b+b^{2}\right)\)
    • A binomial in the form \(\ a^{3}-b^{3}\) can be factored as \(\ (a-b)\left(a^{2}+a b+b^{2}\right)\)

    Always remember to factor out any common factors first.


    This page titled 12.2.3: Special Cases- Cubes is shared under a CC BY-NC-SA 4.0 license and was authored, remixed, and/or curated by The NROC Project via source content that was edited to the style and standards of the LibreTexts platform.