Show that if $p$ is a prime of the form $p=4n+1$, then we can solve $x^2\equiv -1\mod p$(with $x$ an integer). 
Show that if $p$ is a prime of the form $p=4n+1$, then we can solve $x^2\equiv -1\mod p$(with $x$ an integer).

My attempt:If $p$ is a prime, then $U_p=${$[x]|1\leq x<p$} is cyclic.

The following is an alternative proof that goes back to Dirichlet. Note that for every $x$ in the interval $1$ to $p=1$, there is a unique $y$ in that interval such that $xy\equiv 1\pmod{p}$.  Let $p=4k+1$. Suppose that $x^2\equiv -1\pmod{p}$ has no solution. We will show that leads to a contradiction.
If $x^2\equiv -1\pmod{p}$ has no solution, then the unique $y$ described above is not congruent to $x$ modulo $p$.
Thus the numbers from $1$ to $p-1$ can be divided into "couples" with product congruent to $-1$ modulo $p$. It follows that $(p-1)!\equiv (-1)^{2k}\equiv 1\pmod{p}$.  This contradicts Wilson's Theorem. 
