MathLabs
TheoremProved

Sum and difference of two cubes

Statement

For all real numbers a,ba,b: a3−b3=(a−b)(a2+ab+b2)a^3 - b^3 = (a-b)(a^2 + ab + b^2) and a3+b3=(a+b)(a2−ab+b2)a^3 + b^3 = (a+b)(a^2 - ab + b^2).

Why is it true?

Unlike a difference of squares, a difference or sum of cubes cannot be split using only linear factors of degree one; the quadratic factor a2±ab+b2a^2\pm ab+b^2 is unavoidable, and recognizing this pattern lets students factor expressions that otherwise look unfactorable.

Proof sketch

Step 1 (algebraic proof by expanding the right side). Expand (a−b)(a2+ab+b2)=a3+a2b+ab2−a2b−ab2−b3(a-b)(a^2+ab+b^2)=a^3+a^2b+ab^2-a^2b-ab^2-b^3. The middle terms a2ba^2b and −a2b-a^2b cancel, as do ab2ab^2 and −ab2-ab^2, leaving exactly a3−b3a^3-b^3.

Step 2 (geometric proof by volume). Take a cube of edge length aa (volume a3a^3) and remove a smaller cube of edge length bb from one corner (volume b3b^3); the leftover solid has volume a3−b3a^3-b^3. This leftover solid can be sliced into three rectangular slabs, each of thickness a−ba-b: a slab a×a×(a−b)a\times a\times(a-b), a slab a×b×(a−b)a\times b\times(a-b), and a slab b×b×(a−b)b\times b\times(a-b). Their volumes add to (a−b)a2+(a−b)ab+(a−b)b2=(a−b)(a2+ab+b2)(a-b)a^2+(a-b)ab+(a-b)b^2=(a-b)(a^2+ab+b^2), matching the leftover volume exactly.

Step 3 (the sum-of-cubes version, by substitution). Replacing bb with −b-b in the difference-of-cubes identity gives a3−(−b)3=(a−(−b))(a2+a(−b)+(−b)2)a^3-(-b)^3=(a-(-b))(a^2+a(-b)+(-b)^2), which simplifies to a3+b3=(a+b)(a2−ab+b2)a^3+b^3=(a+b)(a^2-ab+b^2).

Topics that use this theorem

Step-by-step proofs

No step-by-step proof yet for this theorem.