The volume of a rectangular prism is \begin{align*}2x^4 - 128x\end{align*}

### Sum and Difference of Cubes

Previously, you learned how to factor several different types of quadratic equations. Here, we will expand this knowledge to certain types of polynomials. The first is the sum of cubes. The sum of cubes is what it sounds like, the sum of two cube numbers or \begin{align*}a^3+b^3\end{align*}

#### Investigation: Sum of Cubes Formula

1. Pictorially, the sum of cubes looks like this:

Or, we can put one on top of the other.

2. Recall that the formula for volume is \begin{align*}length \times width \times depth\end{align*}

\begin{align*}V = a^3+b^3\end{align*}

3. Now, we will find the volume in a different way. Using the second picture above, we will add in imaginary lines so that these two cubes look like one large prism. Find the volume of this prism.

\begin{align*}V &= a \times a \times(a+b)\\
&= a^2(a+b)\end{align*}

4. Subtract the imaginary portion on top. In the picture, they are prism 1 and prism 2.

\begin{align*}V = a^2(a+b) - \left[\underbrace{ab(a-b)}_{{\color{red}Prism \ 1}} + \underbrace{b^2(a-b)}_{{\color{red}Prism \ 2}}\right]\end{align*}

5. Pull out any common factors within the brackets.

\begin{align*}V = a^2(a+b)-b(a-b)[a+b]\end{align*}

6. Notice that both terms have a common factor of \begin{align*}(a + b)\end{align*}. Pull this out, put it in front, and get rid of the brackets.

\begin{align*}V = (a+b)(a^2-b(a-b))\end{align*}

7. Simplify what is inside the second set of parenthesis.

\begin{align*}V = (a+b)(a^2-ab+b^2)\end{align*}

In the last step, we found that \begin{align*}a^3+b^3\end{align*} factors to \begin{align*}(a+b)(a^2-ab+b^2)\end{align*}. This is the **Sum of Cubes Formula**.

#### Solve the following problems

Factor \begin{align*}8x^3+27\end{align*}.

First, determine if these are “cube” numbers. A cube number has a cube root. For example, the cube root of 8 is 2 because \begin{align*}2^3 = 8\end{align*}. \begin{align*}3^3 = 27, 4^3 = 64, 5^3 = 125\end{align*}, and so on.

\begin{align*}a^3 &= 8x^3 = (2x)^3 \qquad b^3 = 27 = 3^3\\ a &= 2x \qquad \qquad \qquad \ b = 3\end{align*}

In the formula, we have:

\begin{align*}(a+b)(a^2-ab+b^2) &= (2x+3)((2x)^2-(2x)(3)+3^2)\\ &= (2x+3)(4x^2-6x+9)\end{align*}

Therefore, \begin{align*}8x^3+27 = (2x+3)(4x^2-6x+9)\end{align*}. The second factored polynomial does not factor any further.

#### Investigation: Difference of Cubes

1. Pictorially, the difference of cubes looks like this:

Imagine the smaller cube is taken out of the larger cube.

2. Recall that the formula for volume is \begin{align*}length \times width \times depth\end{align*}. Find the volume of the difference of these two cubes.

\begin{align*}V = a^3-b^3\end{align*}

3. Now, we will find the volume in a different way. Using the picture here, will add in imaginary lines so that the shape is split into three prisms. Find the volume of prism 1, prism 2, and prism 3.

\begin{align*}& \text{Prism} \ 1: a \cdot a \cdot (a-b)\\ & \text{Prism} \ 2: a \cdot b \cdot (a-b)\\ & \text{Prism} \ 3: b \cdot b \cdot (a-b)\end{align*}

4. Add the volumes together to get the volume of the entire shape.

\begin{align*}V = a^2(a-b)+ab(a-b)+b^2(a-b)\end{align*}

5. Pull out any common factors and simplify.

\begin{align*}V = (a-b)(a^2+ab+b^2)\end{align*}

In the last step, we found that \begin{align*}a^3-b^3\end{align*} factors to \begin{align*}(a-b)(a^2+ab+b^2)\end{align*}. This is the **Difference of Cubes Formula**.

Factor \begin{align*}x^5-125x^2\end{align*}.

First, take out any common factors.

\begin{align*}x^5-125x^2 = x^2(x^3-125)\end{align*}

What is inside the parenthesis is a difference of cubes. Use the formula.

\begin{align*}x^5-125x^2 &= x^2(x^3-125)\\ &= x^2(x^3-5^3)\\ &= x^2(x-5)(x^2+5x+25)\end{align*}

Find the real-number solutions of \begin{align*}x^3-8 = 0\end{align*}.

Factor using the difference of cubes.

\begin{align*}x^3-8 &= 0\\ (x-2)(x^2+2x+4) &= 0\\ x& = 2\end{align*}

In the last step, we set the first factor equal to zero. The second factor, \begin{align*}x^2+2x+4\end{align*}, will give imaginary solutions. For both the sum and difference of cubes, this will always happen.

### Examples

#### Example 1

Earlier, you were asked what are the lengths of the prism's sides.

We need to factor \begin{align*}2x^4 - 128x\end{align*}.

First, take out any common factors.

\begin{align*}2x^4 - 128x = 2x(x^3 - 64)\end{align*}

What is inside the parenthesis is a difference of cubes. Use the Difference of Cubes Formula.

\begin{align*}2x(x^3 - 64)\\ &= 2x(x^3 - 4^3)\\ &= 2x(x - 4)(x^2 + 4x + 16)\end{align*}

Therefore, the side lengths of the rectangular prism are \begin{align*}2x\end{align*}, \begin{align*}x +4\end{align*}, and \begin{align*}x^2 + 4x + 16\end{align*}.

Factor using the sum or difference of cubes.

#### Example 2

\begin{align*}x^3-1\end{align*}

Factor using the difference of cubes.

\begin{align*}x^3-1 &= x^3-1^3\\ &= (x-1)(x^2+x+1)\end{align*}

#### Example 3

\begin{align*}3x^3+192\end{align*}

Pull out the 3, then factor using the sum of cubes.

\begin{align*}3x^3+192 &= 3(x^3+64)\\ &= 3(x^3+4^3)\\ &= 3(x+4)(x^2-4x+16)\end{align*}

#### Example 4

\begin{align*}125-216x^3\end{align*}

Factor using the difference of cubes.

\begin{align*}125-216x^3 &= 5^3-(6x)^3\\ &= (5-6x)(5^2+(5)(6x)+(6x)^2)\\ &= (5-6x)(25+30x+36x^2)\end{align*}

#### Example 5

Find the real-number solution to \begin{align*}27x^3+8=0\end{align*}.

Factor using the sum of cubes and then solve.

\begin{align*}27x^3+8 &= 0\\ (3x)^3+2^3 &=0\\ (3x+2)(9x^2-6x+4) &= 0\\ x &= -\frac{2}{3}\end{align*}

### Review

Factor each polynomial by using the sum or difference of cubes.

- \begin{align*}x^3-27\end{align*}
- \begin{align*}64+x^3\end{align*}
- \begin{align*}32x^3-4\end{align*}
- \begin{align*}64x^3+343\end{align*}
- \begin{align*}512-729x^3\end{align*}
- \begin{align*}125x^4+8x\end{align*}
- \begin{align*}648x^3+81\end{align*}
- \begin{align*}5x^6-135x^3\end{align*}
- \begin{align*}686x^7-1024x^4\end{align*}

Find the real-number solutions for each equation.

- \begin{align*}125x^3+1=0\end{align*}
- \begin{align*}64-729x^3 = 0\end{align*}
- \begin{align*}8x^4-343x = 0\end{align*}
**Challenge**Find ALL solutions (real and imaginary) for \begin{align*}5x^5+625x^2 = 0\end{align*}.**Challenge**Find ALL solutions (real and imaginary) for \begin{align*}686x^3+2000 = 0\end{align*}.**Real Life Application**You have a piece of cardboard that you would like to fold up and make an open (no top) box out of. The dimensions of the cardboard are \begin{align*}36^{\prime\prime} \times 42^{\prime\prime}\end{align*}. Write a factored equation for the volume of this box. Find the volume of the box when \begin{align*}x = 1, 3,\end{align*} and 5.

### Answers for Review Problems

To see the Review answers, open this PDF file and look for section 6.6.