2. (China Mathematical Olympiad 1993) Given $k \in \mathbf{N}$ and a real number $a>0$, let $k_{1}, k_{2}, \cdots, k_{r}$ satisfy the following conditions $k_{1}+k_{2}+\cdots+$ $k_{r}=k, k_{i} \in \mathbf{N}, 1 \leqslant r \leqslant k$,
find the maximum value of $a^{k_{1}}+a^{k_{2}}+\cdots+a^{k_{r}}$.
2. Clearly, when $0 < a < 1$, for any $s, t \in \mathbf{N}$, we have
$$
a\left(a^{\prime \prime 1}-1\right) a\left({ }^{(-1}-1\right) \geqslant 0,
$$

thus we have $a^{5}+a^{t} \leqslant a+a^{s+t} \cdot$
Using this inequality, we can obtain
$$
a^{k_{1}}+a^{k_{2}}+\cdots+a^{k_{r}} \leqslant(r-1) a+a^{k-(r-1)}
$$

Consider the equation $\quad a+a^{m}=a^{m+1}$.
It is easy to solve for $m=\log _{a}\left(\frac{a}{a-1}\right)$, and we can see that
$$
\left\{\begin{array}{l}
a+a^{m} \leqslant a^{m+1}, \text { if } m \geqslant \log _{a}\left(\frac{a}{a-1}\right), \\
a+a^{m} \geqslant a^{m+1}, \text { if } m \leqslant \log _{a}\left(\frac{a}{a-1}\right) .
\end{array}\right.
$$

Using (2) recursively, we get
$$
(r-1) a+a^{k(r \cdots 1)} \leqslant\left\{\begin{array}{l}
a^{k} ， \text { if } r \leqslant(k+1)-\log _{a}\left(\frac{a}{a-1}\right) \\
k a ， \text { if } r \geqslant(k+1)-\log _{a}\left(\frac{a}{a-1}\right) .
\end{array}\right.
$$

From (1) and (3), we have
$$
a^{k_{1}}+a^{k_{2}}+\cdots+a^{k_{r}} \leqslant \max \left\{a^{k}, k a\right\}
$$

Obviously, both values in the parentheses on the left side of (4) can be achieved, so the maximum value we seek is
$$
\max \left\{k a, a^{k}\right\}=\left\{\begin{array}{l}
k a, a \leqslant \frac{1}{k^{k} 1}, k \geqslant 2, \\
a^{k}, k=1 \text { or } a>k^{\frac{1}{k-1}}, k \geqslant 2 .
\end{array}\right.
$$