Determine the number of real roots of the equation $$|x|+|x+1|+\cdots+|x+2018|=x^2+2018x-2019$$
Problem
Source: All-Russian Olympiad 2018
Tags: algebra
24.04.2018 15:25
Let $f(x) = |x|+|x+1|+\cdots+|x+2018|$ and $g(x) =x^2+2018x-2019$. Let $d(x) = f(x)-g(x)$. When $-2017 \le x \le 0$, we have $d(x-1)=d(x)$. To see this note that $f(x)-f(x-1) = 2x+2017=g(x)-g(x-1)$. When $-1 \le x \le 0$, $f(x) = 2017x +1+2+ \cdots + 2018$. So in this interval, $d(x) = 1+2+ \cdots + 2018+2019-x-x^2 >>0$. Hence there are no solutions on $[-2018,0]$. Outside those interval, $f(x)$ simplifies to a linear function on each of the connected open rays so simple counting of solution of quadratic equation gives only two solutions. Therefore, there are exactly two solutions.
24.04.2018 22:19
TwoTimes3TimesSeven wrote: Determine the number of real roots of the equation $$|x|+|x+1|+\cdots+|x+2018|=x^2+2018x-2019$$ Solution. Since $x^2+2018x-2019=(x-1)(x+2019)$, it follows that \begin{align*}&(x-1)(x+2019)=|x|+|x+1|+\cdots+|x+2018|>0\\ \Longrightarrow &x>1\text{ or }x<-2019. \end{align*}$x>1$ implies that $x+x+1+\cdots+x+2018=x^2+2018x-2019$, namely, $$x^2-x-1010\times2019=0,$$which gives one solution to original equation. $x<-2019$ implies that $-(x+x+1+\cdots+x+2018)=x^2+2018x-2019$, namely, $$x^2+4037x-1008\times2019=0,$$which gives one solution to original equation. Therefore, the number of real roots of original equation is $2$. $\blacksquare$
22.10.2018 12:58
Denote $x+1009=y$. $ |y-1009|+|y-1008|+...+|y+1008|+|y+1009|=y^2-1010^2$ $y$ is a solution if and only if $-y$ is a solution. We may assume $y \ge 0$, $ y^2-1010^2 \ge 0 \implies y \ge 1010 \implies 2019y=y^2-1010^2.$ one solution. $y \le 0 $ one solution. Answer: 2