Let $a_{1}, a_{2}, \cdots, a_{n}$ be given non-negative real numbers, not all zero, and $r_{1}, r_{2}, \cdots, r_{n}$ be non-negative real numbers such that the inequality
$$
\sum_{k=1}^{n} r_{k}\left(x_{k}-a_{k}\right) \leqslant\left(\sum_{k=1}^{n} x_{k}^{2}\right)^{\frac{1}{2}}-\left(\sum_{k=1}^{n} a_{k}^{2}\right)^{\frac{1}{2}}
$$

holds for any non-negative real numbers $x_{1}, x_{2}, \cdots, x_{n}$. Find the values of $r_{1}$, $r_{2}, \cdots, r_{n}$.

This is the first problem of the Third Mathematical Winter Camp. The problem was not only appreciated and admired by many teachers and students at that time, but it is still recorded as an example in many authors' works to this day. The solution at that time cleverly applied the Cauchy inequality and the conditions for equality through a series of derivations. However, most people may not know that there is also a rather nice derivative method to solve this problem.
Solution: Let $x_{1}=t \neq a_{1}, x_{2}=a_{2}, \cdots, x_{n}=a_{n}$.
From equation (1), we have
$r_{1}\left(t-a_{1}\right)$
$\leqslant\left(t^{2}+\sum_{k=2}^{n} a_{k}^{2}\right)^{\frac{1}{2}}-\left(a_{1}^{2}+\sum_{k=2}^{n} a_{k}^{2}\right)^{\frac{1}{2}}$.
Let $b^{2}=\sum_{k=2}^{n} a_{k}^{2}, f(t)=\left(t^{2}+b^{2}\right)^{\frac{1}{2}}$.
Thus, equation (2) becomes
$r_{1}\left(t-a_{1}\right) \leqslant f(t)-f\left(a_{1}\right)$.
When $t>a_{1}$, from equation (3) we have
$$
r_{1} \leqslant \frac{f(t)-f\left(a_{1}\right)}{t-a_{1}}.
$$

Note that the right side of equation (4) is the difference quotient of the differentiable function $f(t)$. Therefore, we can let $t \rightarrow a_{1}^{+}$, and from equation (4) we get
$$
r_{1} \leqslant f^{\prime}\left(a_{1}\right)=f^{\prime}\left(a_{1}\right),
$$

where $f^{\prime}_{+}\left(a_{1}\right)$ denotes the right derivative.
For a differentiable function, the value of the right derivative at a point is equal to the value of the derivative at that point; the same applies to the left derivative.
Similarly, when $t<a_{1}$, from equation (3) we have
$$
r_{1} \geqslant \frac{f(t)-f\left(a_{1}\right)}{t-a_{1}}.
$$

In equation (6), taking the limit as $t \rightarrow a_{1}^{-}$, we also get
$$
r_{1} \geqslant f_{-}^{\prime}\left(a_{1}\right)=f^{\prime}\left(a_{1}\right).
$$

From equations (5) and (7), we obtain
$$
r_{1}=f^{\prime}\left(a_{1}\right)=a_{1}\left(\sum_{k=1}^{n} a_{k}^{2}\right)^{-\frac{1}{2}}.
$$

Similarly, $r_{i}=a_{i}\left(\sum_{k=1}^{n} a_{k}^{2}\right)^{-\frac{1}{2}}(i=1,2, \cdots, n)$.
It is easy to see that if equation (1) is changed to
$$
\begin{array}{l}
\sum_{k=1}^{n} r_{k}\left(x_{k}-a_{k}\right) \\
\leqslant\left(\sum_{k=1}^{n} x_{k}^{3}\right)^{\frac{1}{3}}-\left(\sum_{k=1}^{n} a_{k}^{3}\right)^{\frac{1}{3}},
\end{array}
$$

then using the same method, we can obtain
$$
r_{i}=a_{i}^{2}\left(\sum_{k=1}^{n} a_{i}^{3}\right)^{-\frac{2}{3}}(i=1,2, \cdots, n),
$$

and this can be generalized to more general cases.