Find all positives integers $n$ such that $n^3+1$ is a perfect square A solution as follows:
$n^3+1=x^2$
$n^3=x^2-1$
$n^3=(x-1)(x+1)$
$x-1=(x+1)^2~~or~~x+1=(x-1)^2$
$x^2+x+2=0~~or~~x^2-3x=0$
$x(x-3)=0$
$x=0~~or~~x=3~~\Longrightarrow~~n=2$
Does it cover all possible solutions? How to prove that 2 is the only which solves the problem.

Hint: use that $n^3+1=(n+1)(n^2-n+1)$ so $n+1=n^2-n+1$.
As @Arthur pointed out, it's possible that both factors are not equal. Let's say $n+1=km^2$ and $n^2-n+1=k$. Then we have $n=km^2-1$, $n^2-n+1=k^2m^4-2km^2+1-km^2+1+1=k^2m^4-3km^2+3=k$ or $km^2(km^2-3)=k-3$. The last equation does not have a solution for positive $k>1$, $m>1$ as $km^2-3>k-3$
