5. Determine how many integer solutions \((x, y)\) the equation

$$
y^{3}+x^{2} y+2 x y^{2}+x^{2}+3 x y+2 y^{2}+3 x+y+2=0
$$

has, for which \(|x| \leqslant 20\) and \(|y| \leqslant 18\).

## SOLUTIONS TO THE MUNICIPAL COMPETITION IN MATHEMATICS FOR HIGH SCHOOL STUDENTS, 13. 1. 2018.

## First Grade - A Category
5. Let's write the given equation in the form

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

Notice that for $y=-1$ we are left with $2 x+2=0$, i.e., the pair $(-1,-1)$ is one solution. Now assume $y \neq-1$. Then we can consider the equation as a quadratic equation in $x$; let's calculate its solutions:

$$
\begin{aligned}
x_{1 / 2} & =\frac{-\left(2 y^{2}+3 y+3\right) \pm \sqrt{\left(2 y^{2}+3 y+3\right)^{2}-4(y+1)\left(y^{3}+2 y^{2}+y+2\right)}}{2(y+1)} \\
& =\frac{-2 y^{2}-3 y-3 \pm \sqrt{4 y^{4}+12 y^{3}+21 y^{2}+18 y+9-4 y^{4}-12 y^{3}-12 y^{2}-12 y-8}}{2(y+1)} \\
& =\frac{-2 y^{2}-3 y-3 \pm \sqrt{9 y^{2}+6 y+1}}{2(y+1)}=\frac{-2 y^{2}-3 y-3 \pm(3 y+1)}{2(y+1)}
\end{aligned}
$$

i.e., $x=\frac{-2 y^{2}-2}{2(y+1)}=\frac{-\left(y^{2}+1\right)}{y+1}$ or $x=\frac{-2 y^{2}-6 y-4}{2(y+1)}=\frac{-2(y+1)(y+2)}{2(y+1)}=-(y+2)$. In the case $x=-(y+2)$, note that for any integer $y$ satisfying $|y| \leqslant 18$ we have $|x| \leqslant 20$, i.e., the corresponding $x$ also satisfies the given condition, so there are 36 solutions of this type (each such $y$ corresponds to exactly one $x$, and we exclude $y=-1$). Now consider the case $x=\frac{-\left(y^{2}+1\right)}{y+1}$. Note that $\frac{-\left(y^{2}+1\right)}{y+1}=\frac{-\left(y^{2}-1\right)-2}{y+1}=\frac{-(y-1)(y+1)}{y+1}-\frac{2}{y+1}=1-y-\frac{2}{y+1}$, so $x$ is an integer if and only if $y+1 \mid 2$, i.e., $y+1 \in\{-2,-1,1,2\}$, i.e., finally $y \in\{-3,-2,0,1\}$. Thus, we obtain the following pairs as solutions: $(x, y) \in\{(5,-3),(5,-2),(-1,0),(-1,1)\}$, i.e., 4 more solutions.

Therefore, the total number of solutions that satisfy the given conditions is: $1+36+4=41$

## Content

Belgrade ..... 1
State Commission ..... 4
Municipal Competition ..... 5
District Competition ..... 10
State Competition ..... 15