I am reading through a proof that the only integer solutions to $m^3-n^2=2$ are $(m,n)=(3,\pm 5)$.
Working in $\mathbf{Z}[\sqrt{-2}]:$ we have $m^3=n^2+2=(n+\sqrt{-2})(n-\sqrt{-2})$. Also: $$\text{gcd}\,\big(n+\sqrt{-2},n-\sqrt{-2}\big)\,\big|\,2\sqrt{-2}$$ That's all fine. The next step says that from unique factorisation, for some $x\in\mathbf{Z}[\sqrt{-2}]:$ $$n+\sqrt{-2}=x^3\quad\text{or}\quad 2x^3\quad\text{or}\quad \sqrt{-2}\,x^3$$ I'm a bit confused by this assertion, maybe I am missing something simple. I see that the $\gcd$ is $\pm1,\,\pm2,\,\pm\sqrt{-2}$ or $\pm2\sqrt{-2}$, but how does the claim about $x$ follow?
Thanks for any help.
First: $2$ can't divide $n+\sqrt{-2}$, and thus neither can $2\sqrt{-2}$. So $\gcd(n+\sqrt{-2},n-\sqrt{-2})\mid \sqrt{-2}$.
If two numbers are relatively prime and their product is a cube in a unique factorization domain, then both numbers are cubes times a unit. Since the only units here are also cubes, this means if $\gcd(n+\sqrt{-2},n-\sqrt{-2})=1$ then $n+\sqrt{-2}=x^3$ for some $x\in\mathbb Z[\sqrt{-2}]$.
If $a$ and $b$ have a GCD of $\sqrt{-2}$ and $ab=m^3$for $m\in\mathbb Z$, then $m^3$ must be even, so $m$ must be even, and $ab=m^3$ is divisible by $(\sqrt{-2})^6$. So one of $a$ or $b$ must be divisible by $4\sqrt{-2}$. That isn't possible for $a=n+\sqrt{-2}$ or $b=n-\sqrt{-2}$.