# Understanding Euler's Sums of Cubes Substitution:

Distant relationship with this post.

In Euler's proof for $A^3+B^3+C^3=D^3$, he started with $$p(p^2+3q^2)=s(s^2+3r^2)\tag1$$ And made the substitution $\color{red}{p=ax+3by,q=bx-ay,s=3cy-dx,r=dy+cx}$ to get it into$$(a^2+3b^2)(x^2+3y^2)(ax+3by)=(d^2+3c^2)(x^2+3y^2)(3cy-dx)\tag2$$$$\beta(ax+3by)=\gamma(3cy-dx)\tag3$$ With $\beta=a^2+3b^2,\gamma=3c^2+d^2$.

Euler even made another substitution. Starting with $(3)$, substitute $\color{blue}{x=-3nb\beta+3nc\gamma,y=na\beta+nd\gamma}$.

Question: How did Euler know to substitute $p=ax+3by,q=bx-ay,s=3cy-dx,r=dy+cx$ and $x=-3nb\beta+3nc\gamma,y=na\beta+nd\gamma$?

The book does say that Euler used the identity$$A^3+B^3+C^3-D^3=n^3(\gamma^3-\beta^3)(\lambda+\mu)(\lambda^2-\lambda\mu+\mu^2-3\beta\gamma)\tag4$$But I'm not sure how this fits into the problem.

• Those substitutions (in particular the maps from $(x,y) \to (p,q)$ and $(x,y) \to (s,r)$ are very similar to Brahmagupta's identity which Euler surely was aware of in his extensive work on quadratic forms. Have you pursued this approach? – Erick Wong Jan 3 '17 at 20:11
• It's also true that Euler was probably very, very good at this sort of thing (e.g. en.wikipedia.org/wiki/Euler's_four-square_identity which could be viewed in terms of quaternions but predates their development by a century), or perhaps had an intuitive grasp of elements of algebraic geometry. I really don't think the calculations involved are so arduous that one would need to rely on computers to perform them. Even less skilled mathematicians routinely compiled tables of primes, logarithms, etc. long before calculators. – Erick Wong Jan 3 '17 at 20:13
• Taking a closer look, yes that seems to be a very reasonable explanation (for the red part). I suggest you read up the first link I provided. Or I'll try to write up an answer later today. By the way, do you have a link to the remainder of Euler's argument after the "..." ? – Erick Wong Jan 3 '17 at 20:28
• @ErickWong Sure: Page $552$ in ia802705.us.archive.org/32/items/historyoftheoryo02dickuoft/… – Frank Jan 3 '17 at 20:39
• @ErickWong I'm sorry, but even after reading the two Wikipedia links you posted, I am still confused about the substitutions. Perhaps you can post an answer that details it in depth? – Frank Jan 5 '17 at 21:36

We'll generalize Euler's method so we can solve, $$x_1^3+x_2^3 =y_1^3+y_2^3\tag1$$ as well as, $$x_1^k+x_2^k =y_1^k+y_2^k\tag2$$ though for $k>4$ the latter will need square roots.

I. Third Powers

First, do the substitution, $$(p+q)^3+(p-q)^3=(r+s)^3+(r-s)^3$$ to get $$p(p^2+3q^2) = r(r^2+3s^2)\tag3$$ an old trick to reduce the degree. (Notice $q,s$ is only degree $2$.) To reduce the degree even further, what Euler did was to find a substitution so each side will have a common factor that will "fall out". Assume, $$p^2+3q^2 = (a^2+3b^2)\color{blue}{(u^2+3v^2)}$$ then factor each side separately over $\sqrt{-3}$. We get two linear equations, $$p+q\sqrt{-3} = (a+b\sqrt{-3})(u+v\sqrt{-3})\\ p-q\sqrt{-3} = (a-b\sqrt{-3})(u-v\sqrt{-3})$$ in two unknowns $p,q$. You have Mathematica, solve for these so, $$p = au-3bv,\quad q = bu+av$$ Changing the sign of $v$ will get the form in your post. Do the same to the other side, $$r^2+3s^2 = (c^2+3d^2)\color{blue}{(u^2+3v^2)}$$ factor over $\sqrt{-3}$, again get the two equations, solve for $r,s$, $$r = cu-3dv,\quad s = du+cv$$ If you substitute these formulas for $p,q,r,s$ into $(3)$, you'll have, $$(au-3bv)(a^2+3b^2)\color{blue}{(u^2+3v^2)}=(cu-3dv)(c^2+3d^2)\color{blue}{(u^2+3v^2)}$$ Drop the common factor, $$(au-3bv)(a^2+3b^2)=(cu-3dv)(c^2+3d^2)$$ equivalently, $$\color{brown}{u}\big(a(a^2+3b^2)-c(c^2+3d^2)\big)=\color{brown}{3v}\big(b(a^2+3b^2)-d(c^2+3d^2)\big)$$ and, voila, you get an equation that is only linear in $u,v$ and easily solved! Euler was clever, wasn't he? (The next substitutions he took are not really necessary but just aesthetics.)

Using these values of $u,v$, the complete solution to,

$$(p+q)^3+(p-q)^3=(r+s)^3+(r-s)^3$$ is then, $$p = 3(bc-ad)(c^2+3d^2),\quad q= (a^2+3b^2)^2-(ac+3bd)(c^2+3d^2)$$ $$r = 3(bc-ad)(a^2+3b^2),\quad s= -(c^2+3d^2)^2+(ac+3bd)(a^2+3b^2)$$

J. Binet would later give a solution in fewer variables, though there is a simple transformation between Euler's and Binet's.

II. Fifth Powers

This time, do the substitution, $$(\sqrt{p}+\sqrt{q})^5+(\sqrt{p}-\sqrt{q})^5= (\sqrt{r}+\sqrt{s})^5+(\sqrt{r}-\sqrt{s})^5$$ to get $$\sqrt{p}(p^2+10pq+5q^2) = \sqrt{r}(r^2+10rs+5s^2)$$ Assume again a common factor, $$p^2+10pq+5q^2 = (a^2+10ab+5b^2)\color{blue}{(u^2+10uv+5v^2)}$$ and factor each side separately over $\sqrt{5}$ to get two equations again linear in $p,q$. (The Mathematica command is Factor[P(x),Extension->Sqrt[5]].)

Repeat the method in Part 1, and some squaring, the complete solution to,

$$(\sqrt{p}+\sqrt{q})^5+(\sqrt{p}-\sqrt{q})^5= (\sqrt{r}+\sqrt{s})^5+(\sqrt{r}-\sqrt{s})^5$$ is, $$\small p = 5(bc-ad)(c^2+10cd+5d^2)^2,\quad q = (a^2+10ab+5b^2)^3-(ac+10bc+5bd)(c^2+10cd+5d^2)^2$$ $$\small r = 5(bc-ad)(a^2+10ab+5b^2)^2,\quad s = -(c^2+10cd+5d^2)^3+(ac+10bc+5bd)(a^2+10ab+5b^2)^2$$

Notice the similar "shape" the formulas for power $k=3$ and $k=5$ have. For $k=4$, $$x_1^4+x_2^4 = y_1^4+y_2^4$$ well, that's a different story that uses elliptic curves...

$\color{green}{Added:}$

III. Sixth Powers

Similarly, $$(\sqrt{p}+\sqrt{q})^6+(\sqrt{p}-\sqrt{q})^6= (\sqrt{r}+\sqrt{s})^6+(\sqrt{r}-\sqrt{s})^6$$ yields, $$(p+q)(p^2+14pq+q^2) = (r+s)(r^2+14rs+s^2)$$ and the method used for $k=3$ still applies.

IV. Eighth Powers

The higher we go, the harder it gets. For $k=8$, $$(\sqrt{p}+\sqrt{q})^8+(\sqrt{p}-\sqrt{q})^8= (\sqrt{r}+\sqrt{s})^8+(\sqrt{r}-\sqrt{s})^8$$ a bunch of square roots is needed, but a special case has rational $p,q,r,s$ given by, $$p = (n-1)(n^2-n-1),\quad r= n^3-n-1\\ q = (n+1)(n^2+n-1),\quad s= n^3-n+1$$

• And do you know why you substitute $p\pm q,r\pm s$ for $x_1^3+x_2^3=y_1^3+y_2^3$, substitute $\sqrt{p}\pm\sqrt{q},\sqrt{r}\pm\sqrt{s}$ for $x_1^5+x_2^5=y_1^5+y_2^5$. Would that mean you substitute $\sqrt[4]{p}\pm\sqrt[4]{q},\sqrt[4]{r}\pm\sqrt[4]{s}$ for $x_1^7+x_2^7=y_1^7+y_2^7$? – Frank Jan 14 '17 at 4:38
• @Frank: No, for $k >4$, the useful substitution is just $\sqrt{p} +\sqrt{q}$. I don't remember results for $k=7$, but I knew I had for $x_1^8+x_2^8 = y_1^8+y_2^8$. – Tito Piezas III Jan 14 '17 at 4:46
• @Frank: $k=6,8$ has been added. – Tito Piezas III Jan 14 '17 at 5:03
• @Frank: Ah, good spot. Yes, it should be $5$. – Tito Piezas III Jan 15 '17 at 15:40
• So what's the point of substituting $\sqrt{p}\pm\sqrt{q}$ and $\sqrt{r}\pm\sqrt{s}$? If you substitute $A=p+q,B=p-q,C=r+s,D=r-s$, then you get$$A^5+B^5=C^5+D^5$$$$p(p^4+10p^2q^2+5q^2)=r(r^4+10r^2s^2+5s^2)$$ – Frank Jan 15 '17 at 22:18