If $x$ and $y$ are prime numbers which satisfy $x^2-2y^2=1$, solve for $x$ and $y$.
My attempt:
$x^2-2y^2=1$
$\implies (x+\sqrt{2}y)(x-\sqrt{2}y)=1$
$\implies (x+\sqrt{2}y)=1$ and $(x-\sqrt{2}y)=1$
$\implies x=1$ and $y=0$
Clearly $x$ and $y$ are not prime numbers . Why is my solution not working. I have been able to solve similar type of equations by factorizing and then listing down the integer factors and the different cases. Why is it not working here?
What about
Since $2\mid (x+1)(x-1)$, we conclude that both $(x+1)$ and $(x-1)$ have to be even, and hence $$4\mid 2y^2\implies 2\mid y^2\implies 2\mid y$$ and since $y$ is prime, $\color{red}{y=2}$. Can you end it now?
From (1), it follows immediately that $x^2-2y^2=x^2-8=1$. Thus, the only solution is $\color{blue}{(3, 2)}$.
Addendum
The problem with your method is that for $a,b\in\mathbb R$
$$a·b=1\not\Rightarrow a=1\;\text{ and }\;b=1$$
In fact, this only works if $$a·b=0\implies a=0\;\text{ or }\;b=0$$