Example 8 Given a positive integer $n \geqslant 2, x_{1}, x_{2}, \cdots, x_{n} \in \mathbf{R}^{+}$ and $x_{1}+x_{2}+\cdots+x_{n}=\pi$, find the minimum value of $\left(\sin x_{1}+\frac{1}{\sin x_{1}}\right)\left(\sin x_{2}+\frac{1}{\sin x_{2}}\right) \cdots\left(\sin x_{n}+\frac{1}{\sin x_{n}}\right)$.
Analysis We know that $y=\ln \left(x+\frac{1}{x}\right)$ is a convex function.
Solution Since $y=\ln \left(x+\frac{1}{x}\right)$ is a convex function in $(0,1)$, by Jensen's inequality: for $a_{1}, a_{2}, \cdots, a_{i} \in(0,1)$, we have $\frac{1}{n}\left[f\left(a_{1}\right)+f\left(a_{2}\right)+\cdots+f\left(a_{n}\right)\right] \geqslant f\left[\frac{1}{n}\left(a_{1}+\cdots+a_{n}\right)\right]$.
Let $a_{i}=\sin x_{i}(1 \leqslant i \leqslant n)$, then:
$$
\begin{aligned}
& \frac{1}{n}\left[\ln \left(\sin x_{1}+\frac{1}{\sin x_{1}}\right)+\ln \left(\sin x_{2}+\frac{1}{\sin x_{2}}\right)+\cdots+\ln \left(\sin x_{n}+\frac{1}{\sin x_{n}}\right)\right] \\
\geqslant & \ln \left[\frac{1}{n}\left(\sin x_{1}+\cdots+\sin x_{n}\right)+\frac{n}{\sin x_{1}+\cdots+\sin x_{n}}\right],
\end{aligned}
$$

Thus, $\prod_{i=1}^{n}\left(\sin x_{i}+\frac{1}{\sin x_{i}}\right) \geqslant\left[\frac{1}{n}\left(\sin x_{1}+\cdots+\sin x_{n}\right)+\frac{n}{\sin x_{1}+\cdots+\sin x_{n}}\right]^{n}$.
Since $\sin x$ is a concave function in $(0, \pi)$,
we have $0<\frac{1}{n}\left(\sin x_{1}+\sin x_{2}+\cdots+\sin x_{n}\right) \leqslant \sin \frac{x_{1}+\cdots+x_{n}}{n}=\sin \frac{\pi}{n}<1$
and $y=x+\frac{1}{x}$ is a monotonically decreasing function in $(0,1)$,
so $\frac{\sin x_{1}+\sin x_{2}+\cdots+\sin x_{n}}{n}+\frac{n}{\sin x_{1}+\sin x_{2}+\cdots+\sin x_{n}} \geqslant \sin \frac{\pi}{n}+\frac{1}{\sin \frac{\pi}{n}}$,
with equality holding if and only if $x_{1}=x_{2}=\cdots=x_{n}=\frac{\pi}{n}$. Therefore, the minimum value of the original expression is $\left(\sin \frac{\pi}{n}+\frac{1}{\sin \frac{\pi}{n}}\right)^{n}$.
!Comment Here we used the properties of convex functions to solve a general problem. If $n$ is a specific value, such as $n=4$, we can also use the AM-GM inequality: $\sin x_{1}+\frac{1}{2 \sin x_{1}}+\frac{1}{2 \sin x_{1}} \geqslant 3 \sqrt[3]{\frac{1}{4 \sin x_{1}}}$.
Thus, the original expression $\geqslant 3^{4} \sqrt[3]{\frac{1}{4^{4} \sin x_{1} \sin x_{2} \sin x_{3} \sin x_{4}}} \geqslant \frac{81}{4}$.