2. Find the smallest possible value of the function

$$
f(x)=|x+1|+|x+2|+\ldots+|x+100|
$$

$(25$ points. $)$
Answer: 2500.

Using the known inequality $|a|+|b| \geqslant|a-b|$, then $|x+k|+|x+m| \geqslant|k-m|$. Grouping in the original sum the terms equally distant from the ends, we get

$$
\begin{aligned}
f(x) & =(|x+1|+|x+100|)+(|x+2|+|x+99|)+\ldots+(|x+50|+|x+51|) \geqslant \\
& \geqslant(100-1)+(99-2)+\ldots+(51-50)
\end{aligned}
$$

The last sum of 50 terms is an arithmetic progression, it equals $\frac{1}{2} 100 \cdot 50=2500$. This value is the minimum for $f(x)$, it is achieved, for example, at $x=-50$.

Criteria. Only the answer - 0 points. The minimum value found - 18 points. The value of $x$ at which it is achieved is indicated - another 7 points.