<s>[INST] Is My Solution Valid? Question from the 1999 Bulgarian Math Olympiad:
Find all pairs $(x,y)\in\mathbb{Z}$ satisfying $$x^3=y^3+2y^2+1$$
My first approach was to take the cube root of both sides: $$x=\sqrt[3]{y^3+2y^2+1}$$
For the sake of comfort, I will switch $x$ and $y$, as I can switch back in the end: $$y=\sqrt[3]{x^3+2x^2+1}$$
This can be seen as a function, which will asymptotically approach $y=x$, which has infinitely many whole whole number $x,y$ pairs for any $x\in\mathbb{Z}$. If we can find the range of $x$ where the distance between that function and $y=x$ is less than 1, then no possible whole number pairs of $x$ and $y$ can exist there. So, we solve the equation
\begin{align*}
1&=\sqrt[3]{x^3+2x^2+1}-x\\
1+x^3+3x^2+3x&=x^3+2x^2+1\\
x^3+3x&=0\\
&\Rightarrow-3\leq x\leq0
\end{align*}
Since this only leaves 4 possible values of $x$, we can test these out manually to find
\begin{align*}
x=-3&\Rightarrow y=-2\\
x=-2&\Rightarrow y=1\\
x=-1&\Rightarrow y=\sqrt[3]{2}\\
x=0&\Rightarrow y=1\
\end{align*}
Answering the question (now with the old variables): The only possible $x,y$ pairs are $(1,0),(1,-2),(-2,-3)$
My question is: Is my reasoning that I wrote in bold correct? Or did I get "lucky" in answering this question?
 [/INST] With some minor adjustments, your approach seems sensible (you do not have to take cube roots so explicitly and you seem to have swapped $x$ and $y$)

*

*on the reals, cubing is an increasing  bijective function

*$2y^2+1 >0$ so $x^3=y^3+2y^2+1 \implies x^3> y^3\implies x>y$

*so any integer solution has $y+1 \le x$ and $(y+1)^3\le x^3$

*$(y+1)^3 \le y^3+2y^2+1 \implies y^2+3y \le 0 \implies -3 \le y \le 0 $ $\implies y \in \{-3,-2,-1,0\}$

*

*$y = -3 \implies  y^3+2y^2+1 = -8=(-2)^3$

*$y = -2 \implies  y^3+2y^2+1 = 1=1^3$

*$y = -1 \implies  y^3+2y^2+1 = 2=(\sqrt[3]2)^3$, and $\sqrt[3]2$ is not an integer

*$y = 0 \implies  y^3+2y^2+1 = 1=1^3$
so integer solutions $(x,y)$ are $(-2,-3) ,(1,-2), (1,0)$, as you found
</s>