2. Let $2 n$ real numbers $a_{1}, a_{2}, \cdots, a_{2 n}$ satisfy the condition $\sum_{i=1}^{2 n-1}\left(a_{i+1}-a_{i}\right)^{2}=1$, find the maximum value of $\left(a_{n+1}+\right.$ $\left.a_{n+2}+\cdots+a_{2 n}\right)-\left(a_{1}+a_{2}+\cdots+a_{n}\right)$. (2003 Western Mathematical Olympiad)
2. When $n=1$, $\left(a_{2}-a_{1}\right)^{2}=1$, so $a_{2}-a_{1}= \pm 1$. It is easy to see that the maximum value sought is 1. When $n \geqslant 2$, let $x_{1}=a_{1}, x_{i+1}=a_{i+1}-a_{i}, i=1,2, \cdots, 2 n-1$, then $\sum_{i=2}^{2 n} x_{i}^{2}=1$, and $a_{k}=x_{1}+x_{2}+\cdots+x_{k}, k=1,2, \cdots, 2 n$. Therefore, by the Cauchy-Schwarz inequality, we have $\left(a_{n+1}+a_{n+2}+\cdots+a_{2 n}\right)-\left(a_{1}+a_{2}+\cdots+a_{n}\right)=n\left(x_{1}+x_{2}+\cdots+\right.$ $\left.x_{n}\right)+n x_{n+1}+(n-1) x_{n+2}+\cdots+x_{2 n}-\left[n x_{1}+(n-1) x_{2}+\cdots+x_{n}\right]=x_{2}+$ $2 x_{3}+\cdots+(n-1) x_{n}+n x_{n+1}+(n-1) x_{n+2}+\cdots+x_{2 n} \leqslant$ $\sqrt{1^{2}+2^{2}+\cdots+(n-1)^{2}+n^{2}+(n-1)^{2}+\cdots+1^{2}} \sqrt{x_{2}^{2}+x_{3}^{2}+\cdots+x_{2 n}^{2}}=$ $\sqrt{n^{2}+2 \times \frac{(n-1) n(2(n-1)+1)}{6}}=\sqrt{\frac{n\left(2 n^{2}+1\right)}{3}}$, when $a_{k}=\frac{\sqrt{3} k(k-1)}{2 \sqrt{n\left(2 n^{2}+1\right)}}$ $(k=1,2, \cdots, n+1), a_{n+k}=\frac{\sqrt{3}\left(n^{2}+2 n k-n-k^{2}+k\right)}{2 \sqrt{n\left(2 n^{2}+1\right)}}(k=2,3, \cdots, n)$, the equality in the above inequality holds. Therefore, the maximum value of $\left(a_{n+1}+a_{n+2}+\cdots+a_{2 n}\right)-\left(a_{1}+a_{2}+\cdots+a_{n}\right)$ is $\sqrt{\frac{n\left(2 n^{2}+1\right)}{3}}$.