160. Solve the equation in integers

$$
x^{2}+x=y^{4}+y^{3}+y^{2}+y
$$
160. Let's complete the left side of the equation to a perfect square, for which it is sufficient to multiply both sides of the equation by 4 and add 1 to each:

$$
(2 x+1)^{2}=4 y^{4}+4 y^{3}+4 y^{2}+4 y+1
$$

But

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

Since the quadratic trinomial $Q(y)=3 y^{2}+4 y+1$ has (real) roots $y_{1}=-1$ and $y_{2}=-\frac{1}{3}$, for all integers $y$ different from $y=-1$, this trinomial is positive (see the graph of the function $t=$ $=3 y^{2}+4 y+1$ in Fig. 16a), and thus $(2 x+1)^{2}>(P(y))^{2}=$ $=\left(2 y^{2}+y\right)^{2}$.

On the other hand, we have

$4 y^{4}+4 y^{3}+4 y^{2}+4 y+1=$

$$
=\left(2 y^{2}+y+1\right)^{2}+\left(2 y-y^{2}\right)\left(=\left(P_{1}(y)\right)^{2}+Q_{1}(y)\right)
$$

But the graph of the function $Q_{1}(y)=2 y-y^{2}$ has the shape shown in Fig. 16b (the roots of the quadratic binomial $Q_{1}(y)$ are 0 and 2), and thus, for all integers $y$ different from 0, 1, and 2, we have $Q_{1}(y)<0$, and therefore

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

i.e., for such $y$, the value $(2 x+1)^{2}$ is between the squares of

![](https://cdn.mathpix.com/cropped/2024_05_21_b937612abb2773f7abffg-198.jpg?height=436&width=398&top_left_y=374&top_left_x=193)
a)

![](https://cdn.mathpix.com/cropped/2024_05_21_b937612abb2773f7abffg-198.jpg?height=436&width=396&top_left_y=374&top_left_x=582)

b)

Fig. 16.

two consecutive integers $Q(y)$ and $Q_{1}(y)$, and therefore the number $2 x+1$ cannot be an integer.

Thus, if $y$ is an integer, then $x$ can only be an integer when $y=-1, 0, 1$, and 2, i.e., when the right side of the original equation equals $0, 0, 4$, and 30. We are left to solve 3 quadratic equations

$$
x^{2}+x=c \text {, where } c=0,4 \text { or } 30 .
$$

The integer roots of these equations are:

$$
x=0 \text { or }-1(\text { when } c=0) ; x=5 \text { or }-6 \text { (when } c=30 ;
$$

$$
\text { when } c=4 \text { the equation ( }{ }^{*} \text { ) has no integer roots). }
$$

Thus, we finally obtain the following set of solutions to the given equation in integers (here the notation $(a, b)$ means that $x=a, y=b$):

$$
(0,-1),(-1,-1) ;(0,0),(-1,0) ;(5,2),(-6,2)
$$

(in total, 6 solutions).