An expression of the form
*a*
^{3} - *b*
^{3}
is called a difference of
cubes. The factored form of
*a*
^{3} - *b*
^{3}
is
(*a* - *b*)(*a*
^{2} + *ab* + *b*
^{2})
:

(For example, the factored form of 27a-b)(a^{2}+ab+b^{2}) =a^{3}-a^{2}b+a^{2}b-ab^{2}+ab^{2}-b^{3}=a^{3}-b^{3}

Similarly, the factored form of 125

To factor a difference of cubes, find
*a*
and
*b*
and plug them into
(*a* - *b*)(*a*
^{2} + *ab* + *b*
^{2})
.

An expression of the form
*a*
^{3} + *b*
^{3}
is called a sum of cubes. The
factored form of
*a*
^{3} + *b*
^{3}
is
(*a* + *b*)(*a*
^{2} - *ab* + *b*
^{2})
:

(For example, the factored form of 64a+b)(a^{2}-ab+b^{2}) =a^{3}+a^{2}b-a^{2}b-ab^{2}+ab^{2}+b^{3}=a^{3}-b^{3}.

Similarly, the factored form of 343

To factor a sum of cubes, find
*a*
and
*b*
and plug them into
(*a* + *b*)(*a*
^{2} - *ab* + *b*
^{2})
.

You can remember these two factored forms by remembering that the sign in the binomial is always the same as the sign in the original expression, the first sign in the trinomial is the opposite of the sign in the original expression, and the second sign in the trinomial is always a plus sign.

*ax*
^{3} + *bx*
^{2} + *cx* + *d*
can be easily factored if
=
First, group the terms:
(*ax*
^{3} + *bx*
^{2}) + (*cx* + *d* )
.
Next, factor
*x*
^{2}
out of the first group of terms:
*x*
^{2}(*ax* + *b*) + (*cx* + *d* )
. Factor the constants out of both groups.
This should leave an expression of the form
*d*
_{1}
*x*
^{2}(*ex* + *f* )+ *d*
_{2}(*ex* + *f* )
. We can add these two terms by adding their "coefficients":
(*d*
_{1}
*x*
^{2} + *d*
_{2})(*ex* + *f* )
.

*Example 1*: Factor
3*x*
^{3} +6*x*
^{2} + 4*x* + 8
.

3*x*
^{3} +6*x*
^{2} -4*x* - 8 = (3*x*
^{3} +6*x*
^{2}) + (4*x* + 8) = 3*x*
^{2}(*x* + 2) + 4(*x* + 2) = (3*x*
^{2} + 4)(*x* + 2)
.

*Example 2*: Factor
45*x*
^{3} +18*x*
^{2} - 5*x* - 2
.

45*x*
^{3} +18*x*
^{2} -5*x* - 2 = (45*x*
^{3} +18*x*
^{2}) - (5*x* + 2) = 9*x*
^{2}(5*x* + 2) - 1(5*x* + 2) = (9*x*
^{2} - 1)(5*x* + 2)
.

This can be further factored as a difference of squares:
(9*x*
^{2} - 1)(5*x* + 2) = (3*x* + 1)(3*x* - 1)(5*x* + 2)
.