## 4. In the set $\mathbb{N} \cup\{0\}$, solve the equation

$$
x^{2}+x=y^{4}+y^{3}+y^{2}+y
$$
Solution. It is obvious that $(0,0)$ is a solution to the equation. We transform the initial equation into the form

$$
x(x+1)=\left(y^{2}+1\right)\left(y^{2}+y\right)
$$

For $y=1$, we get the equation $x(x+1)=4$ which has no solution in the set $\mathbb{N} \cup\{0\}$. For $y=2$, we get the equation $x(x+1)=5 \cdot 6$ and the pair $(5,2)$ is its only solution in the set $\mathbb{N} \cup\{0\}$. Let $y \geq 3$. Then

$$
\begin{aligned}
& \left(y^{2}+1\right)\left(y^{2}+y\right)=y^{4}+y^{3}+y^{2}+yy^{4}+y^{3}+\frac{y^{2}}{4}-\frac{1}{4}=\left(y^{2}+\frac{y}{2}-\frac{1}{2}\right)\left(y^{2}+\frac{y}{2}+\frac{1}{2}\right)
\end{aligned}
$$

According to this,

$$
\left(y^{2}+\frac{y}{2}-\frac{1}{2}\right)\left(y^{2}+\frac{y}{2}+\frac{1}{2}\right)<x(x+1)<\left(y^{2}+\frac{y}{2}\right)\left(y^{2}+\frac{y}{2}+1\right)
$$

and since $x, y \in \mathbb{N} \cup\{0\}$, from the last inequalities, the following inequalities follow

$$
y^{2}+\frac{y}{2}-\frac{1}{2}<x<y^{2}+\frac{y}{2}
$$

(if not, it is easy to show that the inequalities (1) are not satisfied). Now, if $y=2 k$, then from (2) it follows that $4 k^{2}+2 k-\frac{1}{2}<x<4 k^{2}+2 k$, which is not possible for any $x \in \mathbb{N} \cup\{0\}$. Furthermore, if $y=2 k+1$, then from (2) it follows that $(2 k+1)^{2}+k<x<(2 k+1)^{2}+k+\frac{1}{2}$, which is not possible for any $x \in \mathbb{N} \cup\{0\}$. Therefore, for $y \geq 3$ the equation has no solution.

Thus, the only solutions to the equation are $(0,0)$ and $(5,2)$.