## Task B-1.5.

Determine all integers $a$ for which the solution $(x, y)$ of the system of equations

$$
\begin{aligned}
& x+(a+1) y=2 \\
& a(2 x-y)-a(a y+1)=3
\end{aligned}
$$

satisfies the condition $|x+y| \leqslant \frac{2018}{a+1}$.
## Solution.

After rearranging the second equation of the system, we get

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

After multiplying the first equation by $-2 a$ and adding it to the second, we obtain $y=\frac{a-1}{a(a+1)}$, and then from the first equation, we get

$$
x=\frac{a+1}{a}, a \neq-1 \text { and } a \neq 0
$$

$$
\begin{aligned}
& \left|\frac{a+1}{a}+\frac{a-1}{a(a+1)}\right| \leqslant \frac{2018}{a+1} \\
& \left|\frac{a^{2}+2 a+1+a-1}{a(a+1)}\right| \leqslant \frac{2018}{a+1} \Leftrightarrow\left|\frac{a^{2}+3 a}{a(a+1)}\right| \leqslant \frac{2018}{a+1} \\
& \Leftrightarrow\left|\frac{a+3}{a+1}\right| \leqslant \frac{2018}{a+1} \Leftrightarrow|a+3| \leqslant \frac{2018}{a+1}|a+1|, a \neq-1 .
\end{aligned}
$$

Now we have two cases.

I. If $a+1 > 0 \Leftrightarrow a > -1$, then:

$$
\begin{aligned}
& |a+3| \leqslant 2018 \\
& \Leftrightarrow -2018 \leqslant a+3 \leqslant 2018 \\
& \Leftrightarrow -2021 \leqslant a \leqslant 2015
\end{aligned}
$$

Since $a > -1$, it follows that $a \in (-1, 2015] \cap \mathbb{Z}$.

Since $a \neq 0$ due to $\left(^{*}\right)$, the solution consists of all integers in the set $\{1, 2, \ldots, 2015\}$.

## NATIONAL MATHEMATICS COMPETITION

## 2nd grade - high school - B variant

Poreč, April 13, 2018.