(2) Let $n \geqslant 2, a_{1}, a_{2}, \cdots, a_{n}$ be positive real numbers, determine the largest real number $C_{n}$ such that the inequality: $\frac{a_{1}^{2}+a_{2}^{2}+\cdots+a_{n}^{2}}{n} \geqslant\left(\frac{a_{1}+a_{2}+\cdots+a_{n}}{n}\right)^{2}+C_{n}\left(a_{1}-a_{n}\right)^{2}$. (2010 Central European Mathematical Olympiad)
(2) When $a_{1}=a_{n}$, $C_{n}$ can take any real number. Below, let's assume $a_{1} \neq a_{n}$, and denote $a_{1}=a$, $a_{n}=c$, $a_{2}+\cdots+a_{n-1}=b$. Then, by the Cauchy-Schwarz inequality, we have
$$\begin{array}{l}
f\left(a_{1}, a_{2}, \cdots, a_{n}\right)=\frac{\frac{a_{1}^{2}+a_{2}^{2}+\cdots+a_{n}^{2}}{n}-\left(\frac{a_{1}+a_{2}+\cdots a_{n}}{n}\right)^{2}}{\left(a_{1}-a_{n}\right)^{2}} \geqslant \\
\frac{\frac{a^{2}+(n-2) b^{2}+c^{2}}{n}-\left(\frac{a+(n-2) b+c}{n}\right)^{2}}{(a-c)^{2}}= \\
\frac{(n-2)(a+c-2 b)^{2}+n(a-c)^{2}}{2 n^{2}(a-c)^{2}} \geqslant \frac{1}{2 n}
\end{array}$$

When $a_{2}=\pi=a_{n-1}=\frac{a_{1}+a_{n}}{2}$, the equality holds, thus the maximum $C_{n}=\frac{1}{2 n}$.