How can I show that the only solutions of the diophantine equation $x^2+y^2=1$ are the trivial ones: $(x,y)=(0,1), (0,-1), (1,0), (-1,0)$ ?
That's what I thought:
$$x \equiv 0,1 \pmod 2 \Rightarrow x^2 \equiv 0,1 \pmod 2$$ $$y \equiv 0,1 \pmod 2 \Rightarrow y^2 \equiv 0,1 \pmod 2$$
$x^2+y^2 \equiv 0,1 \pmod 2 $
Since $0 \not\equiv 1 $, we want $x^2+y^2 \equiv 1 \pmod 2$ and this relation is satisfied, when $x \equiv 0 \pmod 2 \wedge y \equiv 1 \pmod 2$ and when $x \equiv 1 \pmod 2 \wedge y \equiv 0 \pmod 2$
Is it right so far? If so, how can I continue, in order to show that the only solutions are these one: $(x,y)=(0,1), (0,-1), (1,0), (-1,0)$ ?
You don't need to use mod. Note that $$x^2+y^2=1\Rightarrow 1-x^2=y^2\ge 0\Rightarrow -1\le x\le 1\Rightarrow x=0,\pm 1.$$
For $x=0$, we have $x^2+y^2=1\Rightarrow y^2=1\Rightarrow y=\pm 1.$
For $x=\pm 1$, we have $x^2+y^2=1\Rightarrow 1+y^2=1\Rightarrow y=0.$
Hence, there are only four cases as $$(x,y)=(0,1),(0,-1),(1,0),(-1,0).$$