a³ + b³ Formula — Sum of Cubes, Proof, Examples

#Formula
TL;DR
The a cube plus b cube formula — $a^3 + b^3 = (a + b)(a^2 - ab + b^2)$ — factors the sum of two cubes into a binomial times a trinomial. This article gives the formula, its algebraic proof, three worked examples at three difficulty tiers, a side-by-side with $a^3 - b^3$, the common factoring slips, and where the identity shows up in engineering and physics.
BT
Bhanzu TeamLast updated on May 29, 20269 min read

A Formula That Turns "Cubes Don't Factor" Into "Yes, They Do"

Most students meet $a^2 - b^2 = (a - b)(a + b)$ in Class 8 and assume that's the whole story for factoring powers. Then they meet a sum of cubes — $x^3 + 8$, say — and freeze. The expression looks unfactorable. It isn't.

The a cube plus b cube formula says:

$$a^3 + b^3 = (a + b)(a^2 - ab + b^2).$$

One sum of cubes becomes one linear factor times one quadratic factor. Every sum of cubes — numerical or algebraic — yields to this identity.

The Formula

For real numbers $a$ and $b$:

$$\boxed{;a^3 + b^3 = (a + b)(a^2 - ab + b^2);}$$

The companion identity for the difference of cubes is:

$$a^3 - b^3 = (a - b)(a^2 + ab + b^2).$$

Notice the sign pattern. The binomial factor matches the sign on the left side (plus for sum, minus for difference). The middle term in the trinomial does the opposite (minus for sum, plus for difference). This is the single sign rule that catches most students out — see Mistake 1 below.

Quick facts.

  • Type: algebraic identity (true for all real $a$, $b$).

  • Reads as: "sum of cubes equals sum-times-(square-minus-product-plus-square)."

  • Grade introduced: CCSS-M HSA-SSE.A.2 (seeing structure in expressions); NCERT Class 9 Chapter 2 — Polynomials Identity VII.

  • Related identity: $a^3 - b^3 = (a - b)(a^2 + ab + b^2)$.

  • Three-variable version: $a^3 + b^3 + c^3 - 3abc = (a + b + c)(a^2 + b^2 + c^2 - ab - bc - ca)$.

How the Formula Is Derived — A Two-Line Proof

The cleanest proof multiplies out the right-hand side and watches the cross-terms cancel.

$$(a + b)(a^2 - ab + b^2)$$ $$= a \cdot a^2 + a \cdot (-ab) + a \cdot b^2 + b \cdot a^2 + b \cdot (-ab) + b \cdot b^2$$ $$= a^3 - a^2 b + a b^2 + a^2 b - a b^2 + b^3$$ $$= a^3 + b^3.$$

The middle four terms cancel in pairs: $-a^2 b$ kills $+a^2 b$, and $+a b^2$ kills $-a b^2$. What survives is exactly $a^3 + b^3$.

The proof is the identity. Once a student has seen the cancellation, the formula stops feeling memorised and starts feeling inevitable.

Three Worked Examples — Quick, Standard, Stretch

Quick. Factorise $x^3 + 27$.

Recognise $27 = 3^3$, so the expression is $x^3 + 3^3$. Apply the formula with $a = x$ and $b = 3$.

$$x^3 + 27 = (x + 3)(x^2 - 3x + 9).$$

Final answer: $(x + 3)(x^2 - 3x + 9)$.

Standard (Wrong Path First — Where Solutions Go Off the Rails). Factorise $8x^3 + 125$.

The wrong path. A student treats $8x^3$ as $(8x)^3 = 512 x^3$ and writes $8x^3 + 125 = (8x + 5)(64x^2 - 40x + 25)$. Expanding the proposed factoring: $(8x)(64x^2) = 512 x^3 \neq 8x^3$. The first term alone is off by a factor of 64. The whole factoring is wrong.

The flaw: $8x^3$ is $(2x)^3$, not $(8x)^3$. The cube root of $8x^3$ is $2x$, not $8x$.

The rescue. Take cube roots cleanly. $8x^3 = (2x)^3$ and $125 = 5^3$. So with $a = 2x$ and $b = 5$:

$$8x^3 + 125 = (2x)^3 + 5^3 = (2x + 5)\bigl((2x)^2 - (2x)(5) + 5^2\bigr) = (2x + 5)(4x^2 - 10x + 25).$$

Check: $(2x + 5)(4x^2 - 10x + 25)$ expanded gives $8x^3 - 20x^2 + 50x + 20x^2 - 50x + 125 = 8x^3 + 125$ ✓.

Final answer: $(2x + 5)(4x^2 - 10x + 25)$.

The lesson — identify the cube root of each term first, then plug $a$ and $b$ into the formula. Half of all factoring slips in this topic come from mistaking the coefficient for the value of $a$.

Stretch. Factorise $a^6 + b^6$ over the real numbers.

Rewrite as a sum of cubes: $a^6 + b^6 = (a^2)^3 + (b^2)^3$. Apply the formula with $a^2$ in place of $a$ and $b^2$ in place of $b$:

$$a^6 + b^6 = (a^2 + b^2)\bigl((a^2)^2 - (a^2)(b^2) + (b^2)^2\bigr) = (a^2 + b^2)(a^4 - a^2 b^2 + b^4).$$

Final answer: $(a^2 + b^2)(a^4 - a^2 b^2 + b^4)$.

Neither factor factors further over the reals — both quadratic-in-disguise expressions have negative discriminants. The factoring stops here unless complex numbers are on the table.

This is the version of the formula that shows up in JEE Advanced algebra problems: spot the cube structure inside higher powers and apply the identity at the right level.

a³ + b³ vs a³ − b³ — Side by Side

The two cube identities are mirror images of each other. The mistake students make most is mixing up the signs.

Identity

Binomial factor

Trinomial factor (middle term)

$a^3 + b^3$ (sum of cubes)

$(a + b)$ — plus

$a^2 \mathbf{-} ab + b^2$ — minus $ab$

$a^3 - b^3$ (difference of cubes)

$(a - b)$ — minus

$a^2 \mathbf{+} ab + b^2$ — plus $ab$

The mnemonic Bhanzu trainers use on the McKinney center whiteboard: "SOAP"Same sign in the binomial, Opposite sign on the middle term, Always Positive on the squared terms. Same-Opposite-Always-Positive. Once a student has SOAP in their head, the sign confusion dies.

Where the a³ + b³ Formula Shows Up

The identity isn't a textbook curiosity. It appears wherever cubic structure does.

  • Volume problems. Adding the volumes of two cubes of side lengths $a$ and $b$ gives $a^3 + b^3$. Factoring it expresses that total volume as the side-sum times an irreducible quadratic — useful in optimisation and packing problems.

  • Polynomial root-finding. Every cubic of the form $x^3 + k = 0$ uses this identity to spot one real root ($x = -\sqrt[3]{k}$) directly, then quadratic-formula the remaining two complex roots.

  • Number theory. Fermat's Last Theorem for $n = 3$ — there are no positive integer solutions to $a^3 + b^3 = c^3$ — was proved by Euler in 1770, and the proof leans on the algebraic structure of the cube identity.

  • Physics — heat capacity at low temperatures. Debye's $T^3$ model for solids leads to expressions that factor through identities like this one when computing differences of cubic terms.

  • Engineering — pipe-volume calculations. Total cubic-foot volume of two cylindrical bores often factors via the identity when one cross-section is set as a difference of cubes.

For Class 9 and Class 10 students, the most-encountered context is just factoring — but the identity carries forward into JEE prep, calculus optimisation, and any problem where a cube appears as part of a larger expression.

Tripping Points to Avoid

Mistake 1: Flipping the middle-term sign.

Where it slips in: A student factors $a^3 + b^3$ as $(a + b)(a^2 + ab + b^2)$ — putting a plus where the formula needs a minus.

Don't do this: Assume the trinomial mirrors the binomial sign. The signs do not match — they're opposite.

The correct way: Use SOAP. Sum identity → trinomial middle term is minus $ab$. Difference identity → trinomial middle term is plus $ab$. Same-Opposite-Always-Positive.

Mistake 2: Cube-rooting the coefficient instead of the term.

Where it slips in: Factoring $27x^3 + 64$, a student takes $a = 27x$ and $b = 64$ instead of $a = 3x$ and $b = 4$.

Don't do this: Treat the coefficient as the value of $a$. The formula needs the cube root of each term.

The correct way: Find $a$ and $b$ such that $a^3$ equals the first term and $b^3$ equals the second. For $27x^3 + 64$: $a = \sqrt[3]{27x^3} = 3x$ and $b = \sqrt[3]{64} = 4$. Then $27x^3 + 64 = (3x + 4)(9x^2 - 12x + 16)$.

Mistake 3: Forgetting that the trinomial factor is usually irreducible.

Where it slips in: After factoring $x^3 + 8 = (x + 2)(x^2 - 2x + 4)$, a student tries to factor the quadratic $x^2 - 2x + 4$ further.

Don't do this: Assume every quadratic factor breaks down. The trinomial $a^2 - ab + b^2$ has discriminant $b^2 - 4(a^2 \cdot b^2 / b^2) \cdot 1 = -3 b^2 < 0$ for real $b \neq 0$ — it never factors over the reals.

The correct way: Stop after the first factoring. Note that the quadratic factor is irreducible over the reals. The cube identity is one factoring step, not the start of a chain.

A real-world version of this kind of "force the next step" mistake. In 1996, the Ariane 5 rocket exploded 37 seconds after launch when its control software tried to convert a 64-bit floating-point velocity into a 16-bit signed integer — an operation that overflowed on the larger velocities of Ariane 5 (the code had been reused unchanged from the slower Ariane 4). The pattern is identical: assuming one more conversion step works, when the structure of the values forbids it. Mathematics — and rockets — punish the assumption.

Conclusion

  • The a cube plus b cube formula is $a^3 + b^3 = (a + b)(a^2 - ab + b^2)$ — sum of cubes equals binomial times trinomial.

  • The companion identity is $a^3 - b^3 = (a - b)(a^2 + ab + b^2)$, with opposite sign on the middle trinomial term.

  • SOAP — Same, Opposite, Always Positive — is the sign-pattern mnemonic that prevents the most common factoring error.

  • The trinomial factor $a^2 - ab + b^2$ is irreducible over the real numbers; the factoring stops in one step.

  • The identity underlies polynomial factoring, cubic root-finding, Fermat's Last Theorem (n = 3), and volume-sum calculations across physics and engineering.

Five Minutes of Practice — Three Problems

  1. Factorise $x^3 + 64$.

  2. Factorise $27a^3 + 8b^3$.

  3. Factorise $x^6 + 1$ over the reals.

If Problem 2 went straight to $(27a + 8b)(\dots)$, return to Mistake 2 above.

Want a live Bhanzu trainer to walk your child through factoring identities and the Class 9 algebra chapter? Book a free demo class — online globally.

Book a Free Demo

Was this article helpful?

Your feedback helps us write better content

Frequently Asked Questions

What is the a cube plus b cube formula?
It's the algebraic identity $a^3 + b^3 = (a + b)(a^2 - ab + b^2)$ — the sum of two cubes factored as a binomial times a trinomial.
How do you prove a³ + b³ = (a + b)(a² − ab + b²)?
Multiply out the right side. The cross-terms $-a^2 b$ and $+a^2 b$ cancel, as do $+a b^2$ and $-a b^2$. What's left is $a^3 + b^3$.
What's the difference between a³ + b³ and (a + b)³?
$(a + b)^3 = a^3 + 3a^2 b + 3ab^2 + b^3$, which is the expansion of a cubed binomial. $a^3 + b^3$ is just the sum of the two cubes — three middle terms shorter — and it factors as $(a + b)(a^2 - ab + b^2)$.
Does a³ + b³ factor for any pair of cubes?
Yes. The identity is universal — true for all real (and complex) values of $a$ and $b$. The factored form may simplify further only when $a$ and $b$ share an obvious common structure.
What is the sum of cubes formula used for?
For factoring polynomials of the form (cube) + (cube), solving cubic equations like $x^3 + k = 0$, simplifying volume sums, and proving algebraic identities in higher mathematics.
Is a³ + b³ the same as a³ + b³ + c³?
No. The three-cube identity is $a^3 + b^3 + c^3 - 3abc = (a + b + c)(a^2 + b^2 + c^2 - ab - bc - ca)$ — a different (and more powerful) formula that requires the $-3abc$ correction term to factor cleanly.
Can the trinomial factor (a² − ab + b²) be factored further?
Not over the real numbers. Its discriminant is negative, which means it has no real roots — it's irreducible. Over the complex numbers it factors into two linear pieces involving cube roots of unity, but that's a Class 12 / JEE Advanced topic.
✍️ Written By
BT
Bhanzu Team
Content Creator and Editor
Bhanzu’s editorial team, known as Team Bhanzu, is made up of experienced educators, curriculum experts, content strategists, and fact-checkers dedicated to making math simple and engaging for learners worldwide. Every article and resource is carefully researched, thoughtfully structured, and rigorously reviewed to ensure accuracy, clarity, and real-world relevance. We understand that building strong math foundations can raise questions for students and parents alike. That’s why Team Bhanzu focuses on delivering practical insights, concept-driven explanations, and trustworthy guidance-empowering learners to develop confidence, speed, and a lifelong love for mathematics.
Related Articles
Book a FREE Demo ClassBook Now →