
Problem T-2. For each integer $n \geq 2$, determine the largest real constant $C_{n}$ such that for all positive real numbers $a_{1}, \ldots, a_{n}$, we have

$$
\frac{a_{1}^{2}+\cdots+a_{n}^{2}}{n} \geq\left(\frac{a_{1}+\cdots+a_{n}}{n}\right)^{2}+C_{n} \cdot\left(a_{1}-a_{n}\right)^{2}
$$


Solution. Define $x_{i j}=a_{i}-a_{j}$ for $1 \leq i<j \leq n$. After multiplication with $n^{2}$, the difference of the squares of quadratic and arithmetic mean equals

$$
\begin{aligned}
n^{2}\left(\mathrm{QM}^{2}-\mathrm{AM}^{2}\right) & =n\left(a_{1}^{2}+\cdots+a_{n}^{2}\right)-\left(a_{1}+\cdots+a_{n}\right)^{2}=(n-1) \sum_{i=1}^{n} a_{i}^{2}-\sum_{i<j} 2 a_{i} a_{j}= \\
& =\sum_{i<j} x_{i j}^{2}=x_{1 n}^{2}+\sum_{i=2}^{n-1}\left(x_{1 i}^{2}+x_{i n}^{2}\right)+\sum_{1<i<j<n} x_{i j}^{2}
\end{aligned}
$$

Here the last sum is clearly non-negative. By the AM-QM inequality the sum in the middle is at least

$$
\sum_{i=2}^{n-1}\left(x_{1 i}^{2}+x_{i n}^{2}\right) \geq \frac{1}{2} \sum_{i=2}^{n-1}\left(x_{1 i}+x_{i n}\right)^{2}=\frac{n-2}{2} \cdot x_{1 n}^{2}
$$

Hence we finally get

$$
n^{2}\left(\mathrm{QM}^{2}-\mathrm{AM}^{2}\right) \geq x_{1 n}^{2}+\frac{n-2}{2} \cdot x_{1 n}^{2}=\frac{n}{2} \cdot\left(a_{1}-a_{n}\right)^{2}
$$

with equality if and only if $a_{2}=\cdots=a_{n-1}=\frac{1}{2}\left(a_{1}+a_{n}\right)$. The largest such constant is therefore

$$
C=\frac{1}{2 n}
$$
