You see x³ + 8 on a question paper. The first thing to ask is whether 8 is a perfect cube. It is — 2³ = 8. So the expression is really x³ + 2³, a sum of cubes. There is a standard identity for this. The identity itself is short, but the signs in the factored form trip students up almost every time. Here is how to remember them so you never have to guess.
The two identities
There are exactly two identities you need.
Sum of cubes:
x³ + y³ = (x + y)(x² − xy + y²).
Difference of cubes:
x³ − y³ = (x − y)(x² + xy + y²).
Notice the structure is the same in both cases — a linear factor times a quadratic factor — but three signs change. Those three signs are exactly what the mnemonic locks down.
SOAP — the mnemonic that fixes the signs
The trick is one word: SOAP. It stands for Same, Opposite, Always Positive. Each letter tells you the sign of one term in the factored form.
S — Same. The sign in the linear factor (the small bracket) is the same as the sign between the two cubes. If you have x³ + y³, the linear factor is (x + y). If you have x³ − y³, the linear factor is (x − y). Whatever sign sits between the cubes carries straight into the linear bracket.
O — Opposite. The middle sign of the quadratic factor (the big bracket) is the opposite of the original sign. So x³ + y³ produces −xy in the quadratic, and x³ − y³ produces +xy. The middle term of the quadratic always disagrees with the sign between the cubes.
A and P — Always Positive. The final term of the quadratic factor — the y² part — is always positive. It does not flip. It does not depend on whether you are doing sum or difference. It is +y² every time.
Three letters, three signs. That is the entire rule.
Apply SOAP to x³ + 8
Identify the cubes. x³ is already a cube. 8 = 2³, so y = 2.
The sign between the cubes is +. Now apply SOAP.
S → same sign in the linear factor: (x + 2).
O → opposite sign in the middle of the quadratic: −2x (because xy = 2x here).
AP → always positive at the end: +4 (because y² = 4).
Putting it together:
x³ + 8 = (x + 2)(x² − 2x + 4).
Verify by expanding: (x + 2)(x² − 2x + 4) = x³ − 2x² + 4x + 2x² − 4x + 8 = x³ + 8. The middle terms cancel cleanly, and you are left with exactly what you started with.
Apply SOAP to x³ − 27
Identify the cubes. 27 = 3³, so y = 3. Sign between cubes is −.
S → (x − 3).
O → middle of quadratic is +3x.
AP → last term is +9.
So x³ − 27 = (x − 3)(x² + 3x + 9).
Verify: (x − 3)(x² + 3x + 9) = x³ + 3x² + 9x − 3x² − 9x − 27 = x³ − 27. Done.
Why SOAP works — the algebra behind it
The mnemonic is not arbitrary. It falls out of the multiplication itself. Take the difference of cubes and just expand the product (x − y)(x² + xy + y²) term by term:
x · x² = x³x · xy = x²yx · y² = xy²(−y) · x² = −x²y(−y) · xy = −xy²(−y) · y² = −y³
Add them up: x³ + x²y + xy² − x²y − xy² − y³ = x³ − y³. Every middle term cancels because of the sign disagreement. That cancellation is exactly why the middle of the quadratic must be the opposite sign — if it matched, the cross-terms would not cancel and you would not get a clean cube. The sum-of-cubes identity follows the same logic with one sign flipped.
When does the cubes identity apply?
You can use these identities only when both terms are perfect cubes. Memorise the small cubes you see most often: 1, 8, 27, 64, 125, 216, 343, 512, 729, 1000. For variables, anything that is a third power qualifies — x³, (2x)³ = 8x³, (x²)³ = x⁶, (3a)³ = 27a³. If you can rewrite the expression as (\text{something})³ ± (\text{something else})³, the identity is your tool.
Worked example: 8x³ − 125
Both terms are cubes: 8x³ = (2x)³ and 125 = 5³. This is a difference of cubes with the role of x played by 2x and the role of y played by 5.
Apply SOAP. Linear factor: (2x − 5). Quadratic factor: (2x)² + (2x)(5) + 5² = 4x² + 10x + 25.
So 8x³ − 125 = (2x − 5)(4x² + 10x + 25).
Worked example: 27a³ + 64b³
Cubes: 27a³ = (3a)³ and 64b³ = (4b)³. Sum of cubes with x → 3a, y → 4b.
Linear factor: (3a + 4b). Quadratic: (3a)² − (3a)(4b) + (4b)² = 9a² − 12ab + 16b².
So 27a³ + 64b³ = (3a + 4b)(9a² − 12ab + 16b²).
Does the quadratic factor itself factor further?
A natural worry: can you keep going and break x² − xy + y² into two linear pieces over the real numbers? Treat it as a quadratic in x. The discriminant is (−y)² − 4(1)(y²) = y² − 4y² = −3y². For any non-zero y, that is negative. A negative discriminant means no real roots, which means the quadratic is irreducible over the reals. The same is true for x² + xy + y².
So once you reach (x ± y)(x² ∓ xy + y²), you stop. Do not try to factor the quadratic further. It is fully factored already.
Higher-order identities — cubes are the start, not the end
Once you have cubes down, related identities click into place.
x⁴ − y⁴ = (x²)² − (y²)² = (x² − y²)(x² + y²) = (x − y)(x + y)(x² + y²).
For odd powers, the sum-of-cubes pattern generalises:
x⁵ + y⁵ = (x + y)(x⁴ − x³y + x²y² − xy³ + y⁴).
x⁵ − y⁵ = (x − y)(x⁴ + x³y + x²y² + xy³ + y⁴).
The signs in the longer factor alternate for the sum case and stay positive for the difference case — same SOAP logic, extended.
Mistakes students keep making
Three errors come up over and over.
The first is forgetting the xy term in the quadratic and writing something like (x + 2)(x² + 4). That is a confusion with x² − 4 = (x − 2)(x + 2) (difference of squares). The cubes identity has three terms in the quadratic, not two.
The second is putting the wrong sign on the xy term — using "Same-Same-Always-Positive" or "Opposite-Opposite" by mistake. Re-anchor on SOAP. The middle is opposite of the original sign.
The third is trying to factor x² ± xy + y² further. As shown above, it has negative discriminant. Stop there.
Recognition drill
Run through these in your head and check that the signs match SOAP.
x³ + 1 = (x + 1)(x² − x + 1)x³ − 1 = (x − 1)(x² + x + 1)8 + y³ = (2 + y)(4 − 2y + y²)x³ − 64 = (x − 4)(x² + 4x + 16)27 + 125y³ = (3 + 5y)(9 − 15y + 25y²)
Each one follows the same rule: same sign in the linear bracket, opposite in the middle of the quadratic, plus the constant at the end.
The takeaway
SOAP — Same, Opposite, Always Positive. The sign between the cubes carries into the linear factor unchanged. It flips for the middle of the quadratic. The last term is always plus. Three letters, three signs, and you can factor any sum or difference of cubes that shows up — x³ + 8, 8x³ − 125, 27a³ + 64b³, anything. No guessing, no trying combinations, no checking against the answer. Just SOAP.