<s>[INST] Let p be a prime. Prove that $x^4 + 4 y^4 = p$ has integer solutions if and only if $p = 5$. In this case, find the solutions for x and y. I have tried to factor
$$x^4 + 4 y^4 = p$$
using the Sophie Germain's Identity, as someone suggested in the comments, which yields:
$$((x+y)^2 + y^2)((x-y)^2 + y^2) = p$$
Since p is a prime, either
$$(x+y)^2 + y^2 = 1$$
or
$$(x-y)^2 + y^2 = 1$$
I do not know how to solve this for $x,y$. And I do not see how this will proves that p can only be 5. Furthermore, I do not know how to find the integer solutions for the equation:
$$x^4 + 4 y^4 = 5$$
 [/INST] The only prime ramified in the ring of Gauss integers $\mathbb Z[i]$ it is known to be $2=i^3((1+i)^2$ so we have since $i^4=1$ $$x^4+4y^4=(x^2+i2y^2)(x^2-i2y^2)=(x^2+(1+i)^2y^2)(x^2-(1+i)^2y^2)$$
then the factorization in $\mathbb Z[i]$ of $x^4+4y^4$ becomes
$$(x+i(1+i)y)(x-i(1+i)y)(x+(1+i)y)(x-(1+i)y)$$ which gives
$$(x-y+iy)(x+y-iy)(x+y+iy)(x-y-iy)=[(x-y)^2+y^2][(x+y)^2+y^2]$$ Consequently we must consider the two cases $(x-y)^2+y^2=1$ and $(x+y)^2+y^2=p$ and the correlative $(x+y)^2+y^2=1$ and $(x-y)^2+y^2=p$  which easily give the solution to the problem.
</s>