If y=0 or y=−1, the right hand side of the given equation is equal to zero so x3+x2+x=x(x2+x+1)=0, and hence x=0. That gives us two solutions: (0,0) and (0,−1).
We shall prove that no other solutions exist.
Assume that y∈Z∖{−1,0}. Then y2+y>0 so x(x2+x+1)>0, and it follows that x>0.
If (x,y) is the solution of the given equation, then (x,−y−1) is also the solution since y2+y=(−y−1)2+(−y−1). In other words, if there are no solutions for y>0, then there are no other solutions. Therefore, we can assume that y>0.
The given equation can be written as:
x3=(y−x)(x+y+1).
Let us prove that gcd(y−x,x+y+1)=1. Assume the contrary, let p be the common prime divisor of the numbers y−x and x+y+1.
From the above we conclude that p∣x3 and hence p∣x. Now we have:
p∣y−x,p∣x+y+1,p∣x⟹p∣(x+y+1)−(y−x)−2x=1,
which means that our assumption was wrong, i.e. y−x and x+y+1 are relatively prime numbers whose product is x3 so each of them is a cube of an integer. Furthermore, x3>0 and x+y+1>0 so y−x>0, which means that y−x and x+y+1 are cubes of positive integers. Let us denote:
y−x=a3x+y+1=b3.
Notice that from 2x+1>0 it follows that y−x<x+y+1, that is a<b, i.e. b−a≥1. Subtracting the previous two equations we get 2x+1=b3−a3, and from above it follows x=ab. Therefore, 2ab+1=b3−a3. Now:
2ab+1=b3−a3=(b−a)(a2+ab+b2)≥a2+ab+b2≥3ab,
i.e. ab≤1, which is clearly not possible since a and b are distinct positive integers. Hence, the only solutions of the given equation are (0,0) and (0,−1).