# Ramanujan, sum of two cubes - how was it discovered?

I'm looking for motivation for, and hopefully a derivation of, Ramanujan's sum of cubes formula $$\left(x^2+7xy-9y^2\right)^3+\left(2x^2-4xy+12y^2\right)^3=\left(2x^2+10y^2\right)^3+\left(x^2-9xy-y^2\right)^3$$

I can't see where one could start to justify this without actually expanding everything out.

Additionally, does it provide a parametrisation of the surface $$X^3+Y^3=Z^3+1$$ in $$\mathbb{Q}^3$$ with $$X=\frac{x^2+7xy-9y^2}{2x^2+10y^2}$$ $$Y=\frac{2x^2-4xy+12y^2}{2x^2+10y^2}$$ $$Z=\frac{x^2-9xy-y^2}{2x^2+10y^2}$$

• The derivation of an identity like this is really, really straight-forward: Just expand everything and see that they turn out to be equal. As for how one would come up with something like this in the first place, that's a whole other question. Oct 16, 2019 at 13:13
• If you want to know he arrived at these , then according to him , the mathematical knowledge he displayed was revealed to him by his family goddess. "An equation for me has no meaning," he once said, "unless it expresses a thought of God." (Source - Wikipedia) Oct 16, 2019 at 13:15
• I'm looking for how one could come up with it. Oct 16, 2019 at 13:20
• @Arthur I would argue that "expanding everything out and seeing that both sides are equal" is the characterization of verifying an identity, which is very different from deriving the identity in the first place. The derivation is a more complicated problem. Oct 16, 2019 at 22:04
• Writing it as $Q_1^3-Q_2^3= Q_3^3-Q_4^3$ where each $q_j$ is homogeneous degree $2$ you can factor both sides in linear factors, it becomes a simple quadratic identity in the ring of Eisenstein integers. Oct 16, 2019 at 23:37

The most general homogeneous quadratic function of two variables is $$ax^2+bxy+cy^2$$. Cubing this gives $$a^3x^6+3a^2bx^5y+(3a^2c+3ab^2)x^4y^2+(b^3+6abc)x^3y^3+(3ac^2+3b^2c)x^2y^4+3bc^2xy^5+c^3y^6.$$(The fact that this sextic is homogeneous makes the above easy to deduce from combinatorics, without manually expanding out brackets. There's even an $$x\leftrightarrow y$$ symmetry to almost halve the work.) The sum of two such cubes equals another viz.$$(ax^2+bxy+cy^2)^3+(dx^2+exy+fy^2)^3=(gx^2+hxy+iy^2)^3+(jx^2+kxy+ly^2)^3$$iff coefficients match. The first requirement this gives is$$a^3+d^3=g^3+j^3.$$Ramanujan was famous for noting the least positive integer expressible as the sum of two cubes in two different ways is $$1729=1^3+12^3=9^3+10^3$$, but in this example we work with much smaller examples, so we just swap variables. The "simplest" option is $$a=1,\,d=2$$ (so that $$d\ne a$$), whence $$g=d=2,\,j=a=1$$. For the $$y^6$$ coefficients, Ramanujan actually does work with the above result about $$1729$$, rearranging the equality of two sums of cubes as$$(-9)^3+12^3=10^3+(-1)^3$$to reduce the size of the total to $$999$$. So we try $$c=-9,\,f=12,\,i=10,\,l=-1$$. We now only need to find $$b,\,e,\,h,\,k$$, which in the case at hand turn out to be $$7,\,-4,\,0,\,-9$$. History probably doesn't record whether Ramaujan found these through trial and error or by working with the other coefficient-matching conditions, but I'm sure he did the latter, and you can try it as an exercise. (Remember to plug in the $$8$$ coefficients we've already fixed to simplify it to a problem in the other $$4$$.)

Observe that the discriminants of $$x^2 + 7 x y -9 y^2$$ and $$x^2 - 9 xy - y^2$$ are $$85$$ and the discriminants of $$2x^2 - 4 x y + 12 y^2$$ and $$2x^2 + 10 y^2$$ are $$-80$$. This suggests that these integral binary quadratic forms might be equivalent in pairs. Testing this, we find $$\left. x^2 + 7 x y -9 y^2 \right|_{\pmatrix{x \\ y} \mapsto \pmatrix{\frac{11}{\sqrt{85}}x - \frac{7}{\sqrt{85}}y \\ \frac{9}{\sqrt{85}}x + \frac{2}{\sqrt{85}}y}} = x^2 -9x y - y^2$$ and $$\left. 2x^2 - 4 x y + 12 y^2 \right|_{\pmatrix{x \\ y} \mapsto \pmatrix{x + y \\ y}} = 2x^2 + 10y^2$$

Now we know that the sets of integers generated by each member of the first pair are the same. (Generically, each member of that set is generated by different choices of $$x$$ and $$y$$ in the two forms.) Likewise, there is a set of integers generated by each member of the second pair.

The minimum positive member of the first set is $$1$$, from $$x^2 - 9 x y - y^2$$ with $$x = 1, y = 0$$. The minimum positive member of the second set is $$2$$ from $$2x^2 + 10y^2$$ with $$x = 1$$, $$y = 0$$. This suggests a method of choosing pairs from the class of the first pair and the class of the second pair:

• Pick random representatives from each class. Find the minimum positive representable value in each class and find $$(x,y)$$ pairs that realize that minimal value for the randomly chosen forms.
• If possible, find a change of variables that transforms one of the random class members to represent the minimal value at the same $$(x,y)$$ pair as the member from the other class. This gives the two forms on the right-hand sides of the two above display equations.
• Now perform a "random" transform on one. This gives the lower-left member in the above displays.
• Figure out where the lower transform moves the $$(x,y)$$ location of the minimal positive representable value and find a transform to the upper-right form moves its minimal point to the same place. This transform produces the upper-left form from the upper-right form.

(There's probably a slick way to get that upper transform from the lower transform, but I'm still working through my first cup of coffee, so I'll just leave the procedure above.)

"OP" inquired about finding parameterization of two cubes in two different way's.

Consider the below equation;

$$s^3+t^3=u^3+v^3$$ ----$$(1)$$

Tomita has given a method to parameterize equation $$(1)$$.

In his solution, take $$(p,q,r,s)=(-1,9,10,12)$$

then the below mentioned solution is arrived at:

$$s=36x^2+22xy+y^2$$

$$t=40x^2-40xy+12y^2$$

$$u=48x^2-40xy+10y^2$$

$$v= 4x^2+22xy+9y^2$$

For, $$(x,y)=(0,1)$$, we get,

$$(s,t,u,v)=(1,12,10,9)$$

His webpage link is given Here