Solve in $\mathbb{Z}$ the equation $x^4 + 1 = 2y^2$. Find all pairs of intergers $(x,y)$ such that $x^4 + 1 = 2y^2$.
I'm thinking of Gaussian integers, since the LHS can be factored in $\mathbb{C}$. But I don't know how to continue here.
 A: Certainly, $x$ must be odd.  Note that $(x^2+1)^2 = x^4+2x^2+1 = 2y^2+2x^2$ and $(x^2-1)^2 = x^4-2x^2+1 = 2y^2-2x^2.$  Multiply these two equations together to get
$$(x^4-1)^2 = 4(y^4-x^4).$$
Since $x^4\equiv 1 \pmod{4}$, we can write
$$\left(\frac{x^4-1}{2}\right)^2 = y^4-x^4.$$
This implies a solution to the better-known Diophantine equation
$$X^4-Y^4 =Z^2.$$ 
This equation can be proved to have only trivial solutions by infinite descent, so we must have $x^4-1 = 0$.  Hence $x=\pm 1$ which forces $y=\pm 1$.
For the descent (switching to lower case):
We have $z^2 + (y^2)^2 = (x^2)^2.$ By the usual construction of solutions to the Pythagorean equation, either $y^2=2mn$ or $y^2=m^2-n^2.$ If $y^2 = 2mn,$ then $m = u^2,$ and 
$n = 2v^2.$ Then $z^2 = m^2 - n^2 = u^4 - v^4,$ and $u^4 = m^2 < m^2 + n^2 <
x^2 < x^4,$ so we have a smaller positive solution. If $y^2 = m^2 - n^2,$ 
$z = 2mn,$
and $x^2 = m^2 + n^2,$ then $x^2y^2 = m^4 - n^4$ which is a smaller solution, because $m^2 < x^2.$
A: With $z=x^2$ we can consider $z^2-2y^2=-1$, which is a well studied Pell-like equation: $a^2-D\,b^2=-1$, where $D$ is a positive, nonsquare natural number.
Solving it involves finding the continued fraction representation for $\sqrt D=\sqrt 2$, which is quite simple:
\begin{align}\sqrt 2
&= [1,2,2,2,\dots].
\end{align}
For these $D$, the representation is always eventually periodic and of the form
$$\sqrt D = [a_0,\overline{a_1,a_2,\dots,a_r,2a_0}].$$
When $r$ is odd, there is no solution, but when $r$ is even $($as in our case, with $r=0)$, the smallest (or fundamental) solution is given by $(a,b)=(p_r,q_r)$, where $p_n/q_n$ is the $n$-th convergent $[a_0,a_1,\dots,a_n]$ of $\sqrt D$.
Our case is all too simple, and $p_0=q_0=1$.

Once we have the fundamental solution, all other solutions can be obtained by taking $n$-th powers, where $n$ is odd.
Indeed, from $p_r^2-Dq_r^2=-1$ it follows that $\left(p_r^2-Dq_r^2\right)^n=-1$.
Settin $a^2-Db^2=\left(p_r^2-Dq_r^2\right)^n$, we can do some factoring and manipulations to arrive at
$$a=\frac{\left(p_r+\sqrt Dq_r\right)^n+\left(p_r-\sqrt Dq_r\right)^n}2$$
$$b=\frac{\left(p_r+\sqrt Dq_r\right)^n-\left(p_r-\sqrt Dq_r\right)^n}{2\sqrt D}$$
In our case, with $n=2k+1$ our solutions look like
\begin{align}
z
&=\frac{\left(1+\sqrt 2\right)^{2k+1}+\left(1-\sqrt 2\right)^{2k+1}}2\tag{$*$}
\end{align}
These particular number have been studied before, and are called Newman-Shanks-Williams number, or NSW numbers;
Our question hinges on: for which values of $k$ is $z$ a square number?
Well, a simple application of Newton's binomial theorem shows that
\begin{align}
z
&=\sum_{\substack{0\leq i \leq 2k+1\\i\,\text{ even}}}\binom{2k+1}i\left(\sqrt{2}\right)^i\\
&=\sum_{0\leq j \leq k}\binom{2k+1}{2j}2^j
\end{align}
The first few $z$ are $1,7,41,239, \dots$ and can be found on the OEIS.
I am not quite managing to show that $z$ cannot be a square for $k>0$, so I might turn back on this later.
A: We consider $x, y$ positive (if $x$ is solution then $-x$ is solution, same with $y$). From $x^4+1=2y^2$ we deduce that $2y^2=t^2+1$, where $t=x^2$ must be odd. Let $t=2k+1$, so $y^2=k^2+(k+1)^2$. We can now use the fact that $y=(m+n)^2$ and $k=(m-n)^2$ and $(k+1)=2mn$ or $k=2mn$ and $(k+1)=(m-n)^2$, where $m, n\in \mathbb Z$. 
Case 1. $k=(m-n)^2$ and $(k+1)=2mn$.
Then $k+2(k+1)=(m+n)^2=y$, so $y=3k+2$ so $$9k^2+12k+4=2k^2+2k+1$$ and we find k.
Case 2. $k=2mn$ and $(k+1)=(m-n)^2$
Then $2k+k+1=(m+n)^2=y$, so $y=3k+1$ so $$9k^2+6k+1=2k^2+2k+1$$ and we find k.
EDIT: It is NOT right, sorry for the confusion
A: Partial answer:
We know that $x$ must be odd, so let $x=2k+1$ where $k\in\mathbb{Z}$. Hence $$\begin{align}(2k+1)^4+1=2y^2&\implies8k^4+16k^3+12k^2+4k+1=y^2\\&\implies4k(k+1)(2k(k+1)+1)+1=y^2\end{align}$$ so $y^2$, and hence $y$, are odd. Let $y=2n+1$ where $n\in\mathbb{Z}$. This gives $$k(k+1)(2k(k+1)+1)=n(n+1)\implies 2(k(k+1))^2=(n-k)(n+k+1)$$ Neither $n-k$ nor $n+k+1$ can both be odd, so RHS is even. This means that $$(k(k+1))^2=l$$ for some $l\in\mathbb{N}$. 
If we can show that $l=\dfrac12(n-k)(n+k+1)$ cannot be a square, then $k$ is forced to satisfy $k(k+1)=0\implies k=0,-1$ giving the only pairs of solutions $$(x,y)=(\pm1,\pm1)$$
