Mathwords logoMathwords

Difference of Two Cubes — Definition, Formula & Examples

Difference of two cubes is a factoring pattern that breaks an expression of the form a3b3a^3 - b^3 into the product of a binomial and a trinomial: (ab)(a2+ab+b2)(a - b)(a^2 + ab + b^2).

For any real numbers aa and bb, the algebraic identity a3b3=(ab)(a2+ab+b2)a^3 - b^3 = (a - b)(a^2 + ab + b^2) holds. The trinomial factor a2+ab+b2a^2 + ab + b^2 is irreducible over the reals, meaning it cannot be factored further using real coefficients.

Key Formula

a3b3=(ab)(a2+ab+b2)a^3 - b^3 = (a - b)(a^2 + ab + b^2)
Where:
  • aa = Cube root of the first term
  • bb = Cube root of the second term

How It Works

To apply this formula, first confirm that each term in the expression is a perfect cube. Identify aa (the cube root of the first term) and bb (the cube root of the second term). Then substitute into the pattern: the binomial factor is (ab)(a - b), and the trinomial factor is (a2+ab+b2)(a^2 + ab + b^2). A useful sign mnemonic is "same, opposite, always positive" — the binomial uses the same sign as the original expression (minus), the middle term of the trinomial uses the opposite sign (plus), and the last term is always positive.

Worked Example

Problem: Factor 8x³ − 27 completely.
Identify the cubes: Rewrite each term as a perfect cube.
8x3=(2x)327=338x^3 = (2x)^3 \qquad 27 = 3^3
Apply the formula: Set a = 2x and b = 3, then substitute into (a − b)(a² + ab + b²).
(2x3)((2x)2+(2x)(3)+32)(2x - 3)\bigl((2x)^2 + (2x)(3) + 3^2\bigr)
Simplify the trinomial: Compute each term inside the trinomial.
(2x3)(4x2+6x+9)(2x - 3)(4x^2 + 6x + 9)
Answer: 8x327=(2x3)(4x2+6x+9)8x^3 - 27 = (2x - 3)(4x^2 + 6x + 9)

Why It Matters

This identity appears frequently in Algebra 2 and Precalculus when simplifying rational expressions, solving cubic equations, and performing polynomial long division. Engineers and scientists also use it to factor terms in formulas involving volume differences, since volume scales with the cube of a linear dimension.

Common Mistakes

Mistake: Writing the trinomial factor as a² − ab + b² (using a minus sign on the middle term).
Correction: For the difference of cubes, the middle term of the trinomial is positive: a² + ab + b². The minus middle term belongs to the sum of cubes formula, a³ + b³ = (a + b)(a² − ab + b²).