Show $x=0$ and $x=1$ are the only integer solutions I'm trying to show that the only solutions to $x^2-x+1=y^2$ are when $x=0$ and $x=1$. All I can think of is completing the square gives $x^2-x+1=(x-\frac{1}{2})^2+\frac{3}{4}$, which is clearly not a perfect square. Does this suffice? Should I use induction? 
 A: Note that we have (for positive $x$):
$$
(x-1)^2\leq x^2-x+1\leq x^2
$$
so your expression lies between two consecutive squares. Now you just have to check for equality on either side, and you will have found all cases.
A: $$x^2-x+1=y^2\\
4x^2-4x+4=4y^2 \\
(2y)^2-(2x-1)^2=3 \\
\left( 2y-2x+1\right) \left(2y+2x-1 \right)=3
$$
A: Multiply by $4$ to obtain $$(2x-1)^2+3=4y^2$$ or $$4y^2-(2x-1)^2=3$$ or $$(2y-2x+1)(2y+2x-1)=3$$
And the factors are in some order either $3,1$ or $-3, -1$
The sum of the two factors is $4y=4, -4$ respectively, so $y=\pm 1$
The difference between the two factors is $4x-2=\pm 2$ so $x=0,1$
All four combinations actually work.
A: Multiply by the equation by $4$ and complete the square for $x$. We have 
\begin{eqnarray*}
(2x-1)^2+3=(2y)^2 \\
(2y+2x-1)(2y-2x+1)=3
\end{eqnarray*}
So Either 
\begin{eqnarray*}
\cases{2y+2x-1=3 \\
2y-2x+1=1} \text{or}
\cases{2y+2x-1=-3 \\
2y-2x+1=-1}
\end{eqnarray*}
or 
\begin{eqnarray*}
\cases{2y+2x-1=1 \\
2y-2x+1=3} \text{or} \cases{2y+2x-1=-1 \\
2y-2x+1=-3}
\end{eqnarray*}
so  $(x,y)$ has solutions $\color{blue}{(1, \pm 1)}$ and $\color{green}{(0, \pm 1)}$.
