# Factor the Difference of Two Cubes: a3 - b3

How to factor the difference of two cubes, a3 - b3: formula, 2 examples, and their solutions.

## Formula

### Formula

a3 - b3 = (a - b)(a2 + ab + b2)

The sign of -b3 is minus.
Then the sign in (a - b) is minus.
And the sign of +ab is plus.

## Example 1

### Solution

Change x3 - 125 to the difference of two cubes.

x3 is x3.
-125 is -53.

x3 - 53 is the difference of two cubes.
So x3 - 53 = (x - 5)(x2 + x⋅5 + 52).

-53 is minus.
So the sign in (x - 5) is minus.
And the sign of +x⋅5 is plus.

+x⋅5 = +5x
+52 = +25

So (x - 5)(x2 + 5x + 25) is the answer.

## Example 2

### Solution

Change x6 - 1 to the difference of two squares.
Then x6 - 1 = (x3)2 - 12.

Power of a Power

(x3)2 - 12 = (x3 + 1)(x3 - 1).

Factor the Difference of Two Squares, a2 - b2

+1 = +13
-1 = -13

(x3 + 1) is the sum of two cubes.
So (x3 + 1) = (x + 1)(x2 - x⋅1 + 12).

+13 is plus.
So the sign in (x + 1) is plus.
And the sign of -x⋅1 is minus.

Factor the Sum of Two Cubes, a3 + b3

(x3 - 1) is the difference of two cubes.
So (x3 - 1) = (x - 1)(x2 + x⋅1 + 12).

-13 is minus.
So the sign in (x - 1) is minus.
And the sign of +x⋅1 is plus.

So (x3 + 1)(x3 - 1)
= (x + 1)(x2 - x⋅1 + 12)(x - 1)(x2 + x⋅1 + 12).

-x⋅1 = -x
+12 = 1

+x⋅1 = +x

So (x + 1)(x2 - x + 1)(x - 1)(x2 + x + 1) is the answer.