Article · Wikipedia archive · Last revised Jun 20, 2026

Sum of two cubes

In mathematics, the sum of two cubes is a cubed number added to another cubed number.

Last revised
Jun 20, 2026
Read time
≈ 3 min
Length
729 w
Citations
11
Source
Visual proof of the formulas for the sum and difference of two cubes source ↗

In mathematics, the sum of two cubes is a cubed number added to another cubed number.

Factorization

Every sum of cubes may be factored according to the identity a 3 + b 3 = ( a + b ) ( a 2 a b + b 2 ) {\displaystyle a^{3}+b^{3}=(a+b)(a^{2}-ab+b^{2})} in elementary algebra.1

Binomial numbers generalize this factorization to higher odd powers.

Proof

Starting with the expression, a 2 a b + b 2 {\displaystyle a^{2}-ab+b^{2}} and multiplying by a + b1 ( a + b ) ( a 2 a b + b 2 ) = a ( a 2 a b + b 2 ) + b ( a 2 a b + b 2 ) . {\displaystyle (a+b)(a^{2}-ab+b^{2})=a(a^{2}-ab+b^{2})+b(a^{2}-ab+b^{2}).} distributing a and b over a 2 a b + b 2 {\displaystyle a^{2}-ab+b^{2}} ,1 a 3 a 2 b + a b 2 + a 2 b a b 2 + b 3 {\displaystyle a^{3}-a^{2}b+ab^{2}+a^{2}b-ab^{2}+b^{3}} and canceling the like terms,1 a 3 + b 3 . {\displaystyle a^{3}+b^{3}.}

Similarly for the difference of cubes, ( a b ) ( a 2 + a b + b 2 ) = a ( a 2 + a b + b 2 ) b ( a 2 + a b + b 2 ) = a 3 + a 2 b + a b 2 a 2 b a b 2 b 3 = a 3 b 3 . {\displaystyle {\begin{aligned}(a-b)(a^{2}+ab+b^{2})&=a(a^{2}+ab+b^{2})-b(a^{2}+ab+b^{2})\\&=a^{3}+a^{2}b+ab^{2}\;-a^{2}b-ab^{2}-b^{3}\\&=a^{3}-b^{3}.\end{aligned}}}

"SOAP" mnemonic

The mnemonic "SOAP", short for "Same, Opposite, Always Positive", helps recall of the signs:234

original
sign
Same Opposite Always
Positive
a3 + b3    =    (a + b)(a2 ab + b2)
a3 b3    =    (a b)(a2 + ab + b2)

Fermat's Last Theorem

Fermat's Last Theorem in the case of exponent 3 states that the sum of two non-zero integer cubes does not result in a non-zero integer cube. The first recorded proof of the exponent 3 case was given by Euler.5

Taxicab and Cabtaxi numbers

A Taxicab number is the smallest positive number that can be expressed as a sum of two positive integer cubes in n distinct ways. The smallest taxicab number after Ta(1) = 2, is Ta(2) = 1729 (the Ramanujan number),6 expressed as

1 3 + 12 3 {\displaystyle 1^{3}+12^{3}} or 9 3 + 10 3 {\displaystyle 9^{3}+10^{3}}

Ta(3), the smallest taxicab number expressed in 3 different ways, is 87,539,319, expressed as

436 3 + 167 3 {\displaystyle 436^{3}+167^{3}} , 423 3 + 228 3 {\displaystyle 423^{3}+228^{3}} or 414 3 + 255 3 {\displaystyle 414^{3}+255^{3}}

A Cabtaxi number is the smallest positive number that can be expressed as a sum of two integer cubes in n ways, allowing the cubes to be negative or zero as well as positive. The smallest cabtaxi number after Cabtaxi(1) = 0, is Cabtaxi(2) = 91,7 expressed as:

3 3 + 4 3 {\displaystyle 3^{3}+4^{3}} or 6 3 5 3 {\displaystyle 6^{3}-5^{3}}

Cabtaxi(3), the smallest Cabtaxi number expressed in 3 different ways, is 4104,8 expressed as

16 3 + 2 3 {\displaystyle 16^{3}+2^{3}} , 15 3 + 9 3 {\displaystyle 15^{3}+9^{3}} or 12 3 + 18 3 {\displaystyle -12^{3}+18^{3}}
See also

See also

References

References

  1. McKeague, Charles P. (1986). Elementary Algebra (3rd ed.). Academic Press. p. 388. ISBN 0-12-484795-1.
  2. Kropko, Jonathan (2016). Mathematics for social scientists. Los Angeles, LA: Sage. p. 30. ISBN 9781506304212.
  3. Vedic Mathematics: Secrets skills for quick, accurate mental calculations. V&S Publishers. June 2015. ISBN 978-93-5057-456-0.
  4. Clemens, Meg; Clemens, Glenn (3 September 2019). Algebra 2: The Easy Way. Simon and Schuster. ISBN 978-1-4380-1214-8.
  5. Dickson, L. E. (1917). "Fermat's Last Theorem and the Origin and Nature of the Theory of Algebraic Numbers". Annals of Mathematics. 18 (4): 161–187. doi:10.2307/2007234. ISSN 0003-486X. JSTOR 2007234.
  6. "A001235 - OEIS". oeis.org. Retrieved 2023-01-04.
  7. Schumer, Peter (2008). "Sum of Two Cubes in Two Different Ways". Math Horizons. 16 (2): 8–9. doi:10.1080/10724117.2008.11974795. JSTOR 25678781.
  8. Silverman, Joseph H. (1993). "Taxicabs and Sums of Two Cubes". The American Mathematical Monthly. 100 (4): 331–340. doi:10.2307/2324954. ISSN 0002-9890. JSTOR 2324954.
Further reading

Further reading