Exercise 5. For all integers $n \geqslant 1$, determine all $n$-tuples of real numbers $\left(x_{1}, \ldots, x_{n}\right)$ such that

$$
\sqrt{x_{1}-1^{2}}+2 \sqrt{x_{2}-2^{2}}+\ldots+n \sqrt{x_{n}-n^{2}}=\frac{1}{2}\left(x_{1}+\ldots+x_{n}\right)
$$
Solution to Exercise 5: Note that for any integer $i$ between 1 and $n$, $i \sqrt{x_{i}-i^{2}}=\sqrt{i^{2}\left(x_{i}-i^{2}\right)}$. By the arithmetic-geometric mean inequality,

$$
i \sqrt{x_{i}-i^{2}} \leqslant \frac{i^{2}+\left(x_{i}-i^{2}\right)}{2}=\frac{x_{i}}{2}
$$

In particular,

$$
\sqrt{x_{1}-1^{2}}+2 \sqrt{x_{2}-2^{2}}+\ldots+n \sqrt{x_{n}-n^{2}} \leqslant \sum_{i=1}^{n} \frac{1}{2}\left(\mathfrak{i}^{2}+\left(\sqrt{x_{i}-\mathfrak{i}^{2}}\right)^{2}\right)=\frac{1}{2}\left(x_{1}+\ldots+x_{n}\right)
$$

The case of equality is therefore when, for all $i$ between 1 and $n, x_{i}-i^{2}=i^{2}$, i.e., $x_{i}=2 i^{2}$ for all $i$ between 1 and $n$.

Grader's Comment: The exercise is very well solved. Most of the time, students show that $k \sqrt{x_{k}-k^{2}} \leqslant \frac{x_{k}}{2}$ by recreating a square, but do not notice that they are re-proving the mean inequality.