# Factor the Difference of Two Cubes: a^{3} - b^{3}

How to factor the difference of two cubes, a^{3} - b^{3}: formula, 2 examples, and their solutions.

## Formula

### Formula

a^{3} - b^{3} = (a - b)(a^{2} + ab + b^{2})

The sign of -b^{3} is minus.

Then the sign in (a - b) is minus.

And the sign of +ab is plus.

## Example 1

### Example

### Solution

Change x^{3} - 125 to the difference of two cubes.

x^{3} is x^{3}.

-125 is -5^{3}.

x^{3} - 5^{3} is the difference of two cubes.

So x^{3} - 5^{3} = (x - 5)(x^{2} + x⋅5 + 5^{2}).

-5^{3} is minus.

So the sign in (x - 5) is minus.

And the sign of +x⋅5 is plus.

+x⋅5 = +5x

+5^{2} = +25

So (x - 5)(x^{2} + 5x + 25) is the answer.

## Example 2

### Example

### Solution

Change x^{6} - 1 to the difference of two squares.

Then x^{6} - 1 = (x^{3})^{2} - 1^{2}.

Power of a Power

(x^{3})^{2} - 1^{2} = (x^{3} + 1)(x^{3} - 1).

Factor the Difference of Two Squares, a^{2} - b^{2}

+1 = +1^{3}

-1 = -1^{3}

(x^{3} + 1) is the sum of two cubes.

So (x^{3} + 1) = (x + 1)(x^{2} - x⋅1 + 1^{2}).

+1^{3} is plus.

So the sign in (x + 1) is plus.

And the sign of -x⋅1 is minus.

Factor the Sum of Two Cubes, a^{3} + b^{3}

(x^{3} - 1) is the difference of two cubes.

So (x^{3} - 1) = (x - 1)(x^{2} + x⋅1 + 1^{2}).

-1^{3} is minus.

So the sign in (x - 1) is minus.

And the sign of +x⋅1 is plus.

So (x^{3} + 1)(x^{3} - 1)

= (x + 1)(x^{2} - x⋅1 + 1^{2})(x - 1)(x^{2} + x⋅1 + 1^{2}).

-x⋅1 = -x

+1^{2} = 1

+x⋅1 = +x

So (x + 1)(x^{2} - x + 1)(x - 1)(x^{2} + x + 1) is the answer.