Solving the diophantine equation $y^{2}=x^{3}-2$
It is known that the diophantine equation $y^{2}=x^{3}-2$ has only one positive integer solution $(x,y)=(3,5)$. The proof of it can be read from the book "About Indeterminate Equation" (in Chinese, by Ke Zhao and Sun Qi). But the method I have known of solving this problem is algebraic number theory.
My question:
Does there exists an elementary method for solving the diophantine equation $y^{2}=x^{3}-2$?
I have gotten an elementary method by the assumption that "$x$" is a prime. That is, we can get a conclusion from the equation that $3\mid x$. Since $x$ is a prime we get the only solution $(x,y)=(3,5)$. But if $x$ is not a prime, the answer seems to be difficult.
Thank you for your help.
The key is to factor this over $\mathbf{Z}[\sqrt{-2}]$ as $(y-\sqrt{-2})(y+\sqrt{-2})=x^3$. Working mod $8$ it is not too hard to see that $x$ and $y$ must be odd, and that $\gcd((y-\sqrt{-2}),(y+\sqrt{-2}))=1$; else every divisor would have an even norm, contradiction.
Therefore since $\mathbf{Z}[\sqrt{-2}]$ is a UFD and since the only units are $\pm 1$, each factor must be a cube. Thus we can write $$(y+\sqrt{-2})=(a+b\sqrt{-2})^3=(a^3-6ab^2)+(3a^2b-2b^3)\sqrt{-2}$$ Then, $y=a^3-6ab^2$ and $1=3a^2b-2b^3=b(3a^2-2b^2)$. From the two equations it is clear that $b=\pm 1\implies a=\pm 1$, so the only possible solutions are $(x,y)=(3,\pm 5)$.
A completely elementary proof can be found on page 561 of the Nov 2012 edition of The Mathematical Gazette, where a descent mechanism first used by Stan Dolan in the March 2012 edition is adapted (as per his challenge to the “interested reader”) to solve both of Fermat’s “elliptic curve” theorems. The method uses math which was clearly available in Fermat’s time, and in particular to Fermat himself.
Lemma. Let $a$ and $b$ be coprime integers, and let $m$ and $n$ be positive integers such that $a^2+2b^2=mn$. Then there are coprime integers $r$ and $s$ such that $m=r^2+2s^2$ divides $br-as$. Furthermore, for any such choice of $r$ and $s$, there are coprime integers $t$ and $u$ such that $a=rt-2su$, $b=ru+st$, and $n=t^2+2u^2$ divides $bt-au$.
Proof. Assume the theorem is false, and let $m$ be a minimal counterexample. Evidently $m > 1$ since the theorem is trivially true for $m=1$.
Note that $b$ is coprime to $m$. Let $A$ be an integer such that $Ab \equiv a\!\pmod{m}$, chosen so that $\tfrac{-m}{2} < A \le \tfrac{m}{2}$. Then $A^2+2 = lm$ for some positive integer $l < m$. Clearly $l$ cannot be a smaller counterexample than $m$, and so there exist coprime integers $r$ and $s$ such that $m=r^2+2s^2$ divides $br-as$.
Let $t = \tfrac{ar+2bs}{m}$ and $u=\tfrac{br-as}{m}$. Direct calculation confirms the equations for $a$, $b$, and $n$. From $n=t^2+2u^2$, we deduce that $t$ is an integer because $u$ is an integer, and $t$ and $u$ are coprime because $\gcd(t,u)$ divides both $a$ and $b$. Finally, note that $n$ divides $bt-au=sn$.
Hence $m$ is not a counterexample, contradicting the original assumption. $\blacksquare$
Corollary. Let $a$ and $b$ be coprime integers with $m$ and integer such that $m^3=a^2+2b^2$. Then there are coprime integers $r$ and $s$ such that $a=r(r^2-6s^2)$ and $b=s(3r^2-2s^2)$.
Proof. Evidently $m$ is odd since $a^2+2b^2$ is at most singly even. And $a$ and $m$ must be coprime. Using the theorem, we have $m=r^2+2s^2$ and $m^2=t^2+2u^2$. Then $m$ divides $a(ur-ts)=t(br-as)-r(bt-au)$, and therefore $m \mid (ur-ts)$. The theorem can then be reapplied with $a$ and $b$ replaced by $t$ and $u$. Repeating the process, we eventually obtain integers $p$ and $q$ such that $p^2+2q^2=1$. The only solution is $q=0$ and $p=\pm1$. Ascending the path back to $a$ and $b$ (reversing signs along the way, if necessary) yields $a=r(r^2-6s^2)$ and $b=s(3r^2-2s^2)$, as claimed. $\blacksquare$
Theorem. The Diophantine equation $X^3 = Y^2+2$ has only one integer solution, namely $(x,y) = (3, \pm 5)$.
Proof. Evidently $y$ and $2$ are coprime. By the corollary, we must have $b=1=s(3r^2-2s^2)$ for integers $r$ and $s$. The only solutions are $(r,s)=(1,\pm 1)$. Hence $a=y=r(r^2-6s^2)=\pm 5$, so $(x,y)=(3,\pm 5)$. $\blacksquare$
I personally believe this finally puts to rest any questions of whether Fermat could have had a proof of these two claims.