How can I find the integer solutions to $x^2+x-2y^2=0$? I enter this equation in Wolfram Alpha :   $x^2+x-2y^2=0$
and it gave me something like this :



and I am wondering how this solution is found and how to know if a given equation would guarantee to have integer solution.

Can anyone teach me what's behind the hood?

Thanks.
Hint:
Rewrite the equation: $x^2+x=2y^2$, that is
$$x(x+1)=2y^2$$
Notice that $(x,x+1)=1$, so we can write $y^2$ as $2a^2b^2$, here $(a,b)=1$ and $2\nmid b$.
Then we get
$$\left\{\begin{array}\\x=2a^2\\x+1=b^2\end{array}\right.\text{ or }\left\{\begin{array}\\x+1=2a^2\\x=b^2\end{array}\right.$$
Hence,
$$b^2-2a^2=\pm 1$$
So we get two Pell-like equations. And you know what's going on then?
Expanding on answerr by @lab bhattacharjee:

z^2 = 8.y^2 + 1 gives us equation of form x^2 = N.y^2 + 1 

which can be done simply https://en.wikipedia.org/wiki/Chakravala_method. 

started in 6th century CE India