2-2. Find the minimum value of the function

$$
f(x)=x^{2}+(x-2)^{2}+(x-4)^{2}+\ldots+(x-102)^{2}
$$

If the result is a non-integer, round it to the nearest integer and write it as the answer.
Solution. $f(x)=52 x^{2}-2(2+4+\ldots+102) x+2^{2}+4^{2}+\ldots+102^{2}=52 x^{2}-2 \cdot 51 \cdot 52 x+4\left(1^{2}+2^{2}+3^{2}+\ldots+51^{2}\right)$.

The minimum of the function $f$ is achieved at the point $x_{0}=51 . f(51)=51^{2}+49^{2}+\ldots 1^{2}+1^{2}+3^{2}+\ldots+49^{2}+51^{2}=$ $2\left(1^{2}+3^{2}+\ldots 51^{2}\right)$. Since $1^{2}+3^{2}+\ldots+(2 n-1)^{2}=\frac{n\left(4 n^{2}-1\right)}{3}$ (a less well-known formula, but it can also be derived), then $f(51)=\frac{26\left(52^{2}-1\right)}{3}=46852$.

Answer: 46852 .