Find all integral solutions of $y^2=x^3+7$ Find all integral solutions of $y^2 = x^3+7$.
I tried to use many different moduli, but it never works. With modulo $9$, you can get $x$ is divisible by $3$.

Lemma. If $p=4n+3$ is a prime then $x^2+y^2\equiv 0\pmod p$ implies $x,y\equiv 0\pmod p$.
Proof. Suppose that $x\not\equiv \pm y\pmod p$. (Because if this is the case, then $(x,y)\equiv (\ell,\pm \ell)\pmod p$, and then $x^2+y^2\equiv 0\pmod p$ would imply $2\ell^2\equiv 0\pmod p$, i.e. $\ell\equiv 0\pmod p$, so the lemma holds in this case.)
Multiply $x^2+y^2\equiv 0\pmod p$ by $x^2-y^2$ (which is not $\equiv 0$, by what we said above) to get $x^4\equiv y^4\pmod p$. Raise this to the $n$th power to get $x^{4n}\equiv y^{4n}$. Multiply both sides by $x^2y^2$ to get $x^{4n+2} y^2\equiv y^{4n+2} x^2\pmod p$. Now $p=4n+3$ implies $p-1=4n+2$, hence the previous equation re-writes as $x^{p-1} y^2\equiv y^{p-1} x^2\pmod p$, or by Fermat's Little Theorem, $x^2\equiv y^2\pmod p$. But we also have $x^2+y^2\equiv 0\pmod p$. Thus subtracting yields $2y^2\equiv 0\pmod p$ and so $y\equiv 0\pmod p$; and this gives $x\equiv 0\pmod p$. Q.E.D.
Solution. Obviously $x$ cannot be even, or else $y^2=x^3+7\equiv 7\pmod 4$, i.e. $y^2\equiv 3\pmod 4$, which is absurd (quadratic residues). So $x$ must be odd.
Now then, add $1$ to both sides and factor as $$y^2+1=(x+2)((x-1)^2+3).$$ Since $x$ is odd, $(x-1)^2+3\equiv 3\pmod 4$. Thus there exists a prime $p$ of the form $4n+3$ dividing $(x-1)^2+3$. Then $p$ divides the $\text{LHS}$ $y^2+1$, and so by the lemma it divides $y$ and $1$. But a prime cannot divide $1$. We conclude that our supposition cannot be true. Therefore, there exist no integral solutions to the equation. Q.E.D.
