Factoring a Sum of Cubes Without Prior Knowledge of the Formula

Many solutions related to factoring a sum of cubes suppose knowledge of the sum of cubes formula, $$a^3 + b^3 = (a+b)(a^2 - ab + b^2)$$

If you did not possess prior knowledge of this formula, how would you go about factoring a sum of cubes? I understand that some experimentation with distributing polynomials could lead to the formula, which could then be used. I think there must be a way to factor a sum of cubes without invoking it directly. For instance, how would you find some polynomial $$p(x)$$ such that $$p(x) \cdot \, (x+c) = x^3 + c^3$$

Without first resorting to applying the sum of cubes formula?

• We can show $a^3\equiv(-b)^3= -b^3 \mod (a+b)$ , so we can derive from this that $a+b$ must be a factor. Aug 26, 2023 at 19:28
• Consider $a^n-b^n$. Denote $a = x$. We have the polynomial $p(x) = x^n - b^n$, which has $x = b$ as a root, because $p(b) = 0$. So $x^n-b^n$ is divisible by $(x-b)$ . Now set $n=3$, $x = a$, and replace $b$ with $-b$. We get $a^3 - (-b)^3$ is divisible by $a - (-b)$. Aug 26, 2023 at 19:30
• To answer the last question on the latest edit, polynomial long division. Aug 26, 2023 at 19:34
• Your idea with the polynomial is fine. You just should write $p(x)\cdot (x-c)=x^3-c^3.$ Then you know that both sides are zero at $x=c.$ You can therefore perform a long division bei $(x^3-c^3):(x-c)=p(x).$ It works like a division of numbers by hand. Here is an example with polynomials: physicsforums.com/threads/… Aug 26, 2023 at 19:36
• Somewhat alternative approach (not worth posting as an answer). Notice that $$(a + b)^3 = a^3 + 3a^2b + 3ab^2 + b^3 = (a^3 + b^3) + 3ab(a+b).$$ Therefore, $$~a^3 + b^3 = (a+b)^3 - 3ab(a+b).$$ Therefore, since $~(a+b)~$ is a factor of both of the RHS terms immediately above, it must be a factor of the LHS term. Aug 26, 2023 at 19:55

If you are allowed to apply the binomial theorem, we can proceed as follows: \begin{align*} (a + b)^{3} = & {3\choose 0}a^{3}b^{0} + {3\choose 1}a^{2}b^{1} + {3\choose 2}a^{1}b^{2} + {3\choose 3}a^{0}b^{3}\\\\ & = a^{3} + 3a^{2}b + 3ab^{2} + b^{3}\\\\ & = a^{3} + b^{3} + 3ab(a + b) \end{align*}

Consequently, one arrives at the desired result according to the rearrangement: \begin{align*} a^{3} + b^{3} & = (a + b)^{3} - 3ab(a + b)\\\\ & = (a + b)[(a + b)^{2} - 3ab]\\\\ & = (a + b)(a^{2} - ab + b^{2}) \end{align*}

Hopefully this helps!

As other comments and answers have suggested (perhaps indirectly), long division of polynomials—which is an algorithm of repeatedly putting in a term in the quotient that you want then dealing with the consequences—does the trick.

Instead, here's a pretty natural way that you might discover factoring a sum of cubes on your own. (It generalizes to sum of odd powers naturally.)

Perhaps you're messing around with Pascal's triangle and binomial powers (as one does), and you write down $$(a+b)^3 = a^3 + 3a^2b + 3ab^2 + b^3.$$ Notice the $$a^3 + b^3$$. Let's isolate it: $$a^3 + b^3 = (a+b)^3 - (3a^2b + 3ab^2).$$ Now, it's pretty clear that $$3ab$$ is a common factor of the last two terms. Let's pull it out:
$$a^3 + b^3 = (a+b)^3 - 3ab\, (a + b).$$ Now, $$(a+b)$$ is a common factor, which is fantastic news. Pull it out and clean up the contents of the quantity on the right: \begin{align} a^3 + b^3 &= (a+b) \, \bigl((a+b)^2 - 3ab \bigr) \\ &= (a+b) \, \bigl(a^2 + 2ab + b^2 - 3ab \bigr) \\ &= (a+b) \,(a^2 - ab + b^2). \end{align} Voilà, sum of cubes!

Incidentally, you can produce this identity in one chain of equations, but the adding and subtracting the same quantity (in blue) seems to come out of nowhere. It is, of course, motivated by knowing what a binomial cube looks like and the previous messing around.

\begin{align} a^3 + b^3 &= (a^3 \color{blue}{{}+ 3a^2b + 3ab^2} + b^3) \color{blue}{{}- (3a^2b + 3ab^2)} \\ &= (a+b)^3 - 3ab\,(a+b) \\ &= (a+b) \, \bigl((a+b)^2 - 3ab \bigr) \\ &= (a+b) \,(a^2 - ab + b^2) \\ \end{align}

Many helpful commenters have suggested polynomial long division to solve the question I posed, and I have carried it out here:

$$p(x) \cdot (x+c) = x^3+c^3 \\$$

$$p(x) = \frac{x^3+c^3}{x+c} \\$$

$$\begin{array}{r} x^2-cx+c^2\\ x+c{\overline{\smash{\big)}\,x^3+c^3\phantom{))))))}}}\\ \underline{-(x^3+cx^2)\phantom{))))}}\\ -cx^2+c^3\phantom{))}\\ \underline{-(-cx^2-c^2x)}\\ c^2x+c^3\phantom{)}\\ \underline{-(c^2x+c^3)}\\ 0 \end{array} \\ \\$$

$$p(x) = x^2-cx+c^2$$

Therefore,

$$p(x) \cdot (x+c) = x^3+c^3 \\$$

$$(x^2-cx+c^2)(x+c) = x^3+c^3$$

You can build up $$P(x)$$ sequentially. To get the term $$x^3$$ on the right side, first guess $$P_1(x) = x^2$$. Then $$P_1(x) (x + c) = x^3 + x^2 c$$. To get rid of this second term on the right side, try $$P_2 (x) = P_1(x) - x c$$. Then $$P_2 (x) (x + c) = x^3 - x c^2$$. To get rid of this second term on the right side, take $$P_3(x) = P_2(x) + c^2$$. We get $$P_3(x) (x-c) = x^3 + c^3$$ as desired, and we have $$P_3(x) = x^2 - xc + c^2$$.

• By the way, this is just polynomial long division in disguise! Aug 26, 2023 at 19:40