FrontierMath
Algebra II/Number Systems & Polynomials/Factoring Perfect Cubes
Algebra II Regents in 15 days
Algebra II · Lesson 2

Factoring Perfect Cubes

Recognizing the hidden cube and applying the sum and difference formulas.


A sculptor orders a block of marble that measures 5 cm on each side — a perfect cube with volume 125 cubic centimeters. Later, a hollow cube of side 2 cm is carved out of the interior. What's left has volume 1258=117125 - 8 = 117 cubic centimeters. That difference — one perfect cube minus another — shows up constantly in algebra, and there is a clean formula for factoring it every single time.

Before reaching the formula, you need to recognize what a perfect cube looks like. A perfect cube is any expression of the form n3n^3. The numbers 1, 8, 27, 64, 125, 216 are all perfect cubes. In variable terms, x3x^3, 8x38x^3, and 27x627x^6 are all perfect cubes because their coefficients and exponents are exact cubes.

There are two formulas. The first handles a sum of cubes:

a3+b3=(a+b)(a2ab+b2)a^3 + b^3 = (a + b)(a^2 - ab + b^2)

The second handles a difference of cubes:

a3b3=(ab)(a2+ab+b2)a^3 - b^3 = (a - b)(a^2 + ab + b^2)

The pattern is worth memorizing carefully. The binomial factor carries the same sign as the original expression — plus for sum, minus for difference. The trinomial factor always has a minus sign on the middle term for sum of cubes, and a plus sign on the middle term for difference of cubes. A useful shorthand some students use: the signs go Same, Opposite, Always Positive, or SOAP. The first sign matches the original, the second is opposite, the third is always positive.

The hardest part of applying these formulas is identifying aa and bb. Once you name them correctly, the formula does the rest. For x3+8x^3 + 8, you see that 8=238 = 2^3, so a=xa = x and b=2b = 2.

Factoring x³ + 8
a=x,b=2a = x, \quad b = 2
8 is 2 cubed, so b = 2. The cube root of x³ is x, so a = x.
(a+b)(a2ab+b2)(a + b)(a^2 - ab + b^2)
This is the sum of cubes formula. Write the template before filling it in.
(x+2)(x2(x)(2)+22)(x + 2)(x^2 - (x)(2) + 2^2)
Substitute a = x and b = 2 into every slot.
(x+2)(x22x+4)(x + 2)(x^2 - 2x + 4) \checkmark
Simplify each term in the trinomial. Done.

Now try a difference of cubes with a coefficient on the variable term. For 27x36427x^3 - 64, you need the cube root of 27x327x^3, which is 3x3x, and the cube root of 6464, which is 44.

Factoring 27x³ − 64
a=3x,b=4a = 3x, \quad b = 4
The cube root of 27x³ is 3x because (3x)³ = 27x³. The cube root of 64 is 4.
(ab)(a2+ab+b2)(a - b)(a^2 + ab + b^2)
This is the difference of cubes formula. The signs flip compared to the sum version.
(3x4)((3x)2+(3x)(4)+42)(3x - 4)((3x)^2 + (3x)(4) + 4^2)
Substitute a = 3x and b = 4 into every slot.
(3x4)(9x2+12x+16)(3x - 4)(9x^2 + 12x + 16) \checkmark
Square 3x to get 9x², multiply (3x)(4) to get 12x, square 4 to get 16.

One more layer: sometimes a greatest common factor hides in front of the cubes. Always factor out any GCF before trying the cube formulas.

Factoring 2x⁴ + 54x
2x(x3+27)2x(x^3 + 27)
Factor out 2x from both terms first. What's left is a sum of cubes.
a=x,b=3a = x, \quad b = 3
27 = 3³, so b = 3. The cube root of x³ is x.
2x(x+3)(x23x+9)2x(x + 3)(x^2 - 3x + 9) \checkmark
Apply the sum of cubes formula inside, then keep the 2x out front.
Interactive graph — scroll to zoom, drag to pan

The two expressions graph as the same curve — confirming that the factored form and the original are identical functions.

Practice Questions
x3125x^3 - 125
8x3+278x^3 + 27
3x524x23x^5 - 24x^2
Regents Corner

On Part II and Part III of the Algebra II Regents, factoring perfect cubes appears both as a standalone problem and as a step inside a larger problem — for instance, simplifying a rational expression whose numerator or denominator is a sum or difference of cubes. Leaving the trinomial unfactored or forgetting the GCF step will cost partial credit.

Students mix up the signs in the trinomial and write (x + 2)(x² + 2x + 4) for x³ + 8. The trinomial in the sum of cubes formula always has a minus on the middle term: (x + 2)(x² − 2x + 4). Multiply it back out to check — if the x² and x terms don't cancel to zero in the middle, the signs are wrong.
← Previous
Factoring by Grouping
Next →
Factoring Review — GCF and Trinomials