difference of cubes
The difference of two cubes is the subtraction twin of the sum of cubes, and it too factors by a fixed formula: a^3 - b^3 = (a - b)(a^2 + ab + b^2). Both cube patterns work over the real numbers, which makes them more cooperative than squares, where only the difference factors.
The pattern follows the same SOAP rhythm: Same sign as the original gives the binomial (a - b); then Opposite sign and Always Positive give the trinomial (a^2 + ab + b^2). Notice the only differences from the sum-of-cubes formula are two sign changes — the binomial's middle sign and the trinomial's middle sign flip together.
As with the sum of cubes, the trinomial a^2 + ab + b^2 normally does not factor further over the reals. The main mistakes to avoid are confusing the two cube formulas' signs and forgetting to check that both terms are genuine perfect cubes before you apply the rule.
27x^3 - 1 = (3x)^3 - 1^3 = (3x - 1)(9x^2 + 3x + 1).
Cube roots 3x and 1; trinomial uses 9x^2, +3x, +1.