2B. Find $x$ for which the function $y=\left(x-x_{1}\right)^{2}+\left(x-x_{2}\right)^{2}+\ldots+\left(x-x_{1996}\right)^{2}$ takes the smallest value.
Solution. We have

$$
y=1996 x^{2}-2\left(x_{1}+x_{2}+\ldots+x_{1996}\right)+\left(x_{1}^{2}+x_{2}^{2}+\ldots+x_{1996}^{2}\right)
$$

The last function is a quadratic with coefficient $a=1996>0$, so it attains its minimum value at $\frac{x_{1}+x_{2}+\ldots+x_{1996}}{1996}$.

NOTE. If $\left(x+\sqrt{x^{2}+1}\right)\left(y+\sqrt{y^{2}+1}\right)=1$, then $x+y=0$. Prove it!