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}$$
 A: 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$.)
A: 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.)
A: "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
