10.1. Find the number of roots of the equation

$$
|x|+|x+1|+\ldots+|x+2018|=x^{2}+2018 x-2019
$$

(V. Dubinskaya)
Answer: 2.

Solution. For $x \in(-2019,1)$ there are no roots, since on the given interval the left side is non-negative, while the right side is negative.

For $x \in[1, \infty)$ all absolute values are resolved with a positive sign, so the equation will take the form $g(x)=0$, where $g(x)=x^{2}-x-2009+(1+2+\ldots+2018)$. Since $g(1)<0$, this quadratic equation has a single root on the interval $[1, \infty)$.

Since the graphs of the functions on the left and right sides are symmetric with respect to the line $x=-1009$ (i.e., $f(x)=f(-2018-x)$), there are as many roots on the interval $(-\infty,-2019]$ as there are on the interval $[1,+\infty)$, i.e., exactly one root. In total, the given equation has two roots.