Example 1 Given $x_{i} \in \mathbf{R}^{+}(i=1,2, \cdots, n), \sum_{i=1}^{n} x_{i}=m, p, q \in \mathbf{R}^{+}, 2 \leqslant k \in \mathbf{N}^{+}$. Find the maximum value of the function $f(x)=\sum_{i=1}^{n} \sqrt[n]{p x_{i}+q}$.
Since the function $y=\sqrt[5]{x}(k \geqslant 2)$ is a convex function, we have
$$
\frac{\sqrt[k]{x_{1}}+\sqrt[k]{x_{2}}+\cdots+\sqrt[k]{x_{n}}}{n} \leqslant \sqrt[k]{\frac{x_{1}+x_{2}+\cdots+x_{n}}{n}},
$$

where the equality holds if and only if $x_{1}=x_{2}=\cdots=x_{n}$. 
Thus, $\sum_{i=1}^{n} \sqrt[k]{p x_{i}+q} \leqslant n \sqrt[k]{\frac{1}{n}\left[\sum_{i=1}^{n}\left(p x_{i}+q\right)\right]}=\sqrt[k]{p m n^{k-1}+q n^{k}}$,

where the equality holds if and only if $x_{1}=x_{2}=\cdots=x_{n}=\frac{m}{n}$. 
Therefore, when $x_{1}=x_{2}=\cdots=x_{n}=\frac{m}{n}$, $f(x)_{\text {max }}=\sqrt[k]{p m n^{k-1}+q n^{k}}$.