It's also easy to factor the sum *or* the difference of
two cubes. For example, suppose we need to factor
8*x*^{3} + 27. This is the sum of
8*x*^{3} (the cube of 2*x*) and 27 (the cube of
3). So it factors as (2*x* + 3)(4*x*^{2}
− 6*x* + 9). The second factor is the square of the
first number being cubed, minus the product of the two numbers,
plus the square of the second number.

If instead we had to factor 8*x*^{3} − 27, the
answer would be (2*x* − 3)(4*x*^{2} +
6*x* + 9). Note the different signs. Remember, the sign in
the linear factor is the same as the sign in the problem. The
first sign in the quadratic factor is opposite to the sign in the
problem. And the second sign in the quadratic factor is always
positive.