Example 2 Let $p, q \in \mathbf{R}^{+}, x \in\left(0, \frac{\pi}{2}\right)$, try to find
$$\frac{p}{\sqrt{\sin x}}+\frac{q}{\sqrt{\cos x}}$$

the minimum value.
By Cauchy-Schwarz inequality, we have
$$(\sqrt{p m}+\sqrt{q n})^{2} \leqslant\left(\frac{p}{\sqrt{\sin x}}+\frac{q}{\sqrt{\cos x}}\right)(m \sqrt{\sin x}+n \sqrt{\cos x})$$

Equality holds if and only if $\frac{\frac{p}{\sqrt{\sin x}}}{m \sqrt{\sin x}}=\frac{\frac{q}{\sqrt{\cos x}}}{n \sqrt{\cos x}}$. Hence,
$$\tan x=\frac{n p}{m q}$$

Also, 
$$(m \sqrt{\sin x}+n \sqrt{\cos x})^{2}=\left(\frac{m}{a} \cdot a \sqrt{\sin x}+\frac{n}{b} \cdot b \sqrt{\cos x}\right)^{2}$$
$$\begin{array}{l}
\leqslant\left(\frac{m^{2}}{a^{2}}+\frac{n^{2}}{b^{2}}\right)\left(a^{2} \sin x+b^{2} \cos x\right) \\
\leqslant\left(\frac{m^{2}}{a^{2}}+\frac{n^{2}}{b^{2}}\right) \sqrt{a^{4}+b^{4}}
\end{array}$$

Equality holds if and only if $\tan x=\frac{a^{2}}{b^{2}}, \frac{a^{2} \sin x}{\frac{m^{2}}{a^{2}}}=\frac{b^{2} \cos x}{\frac{n^{2}}{b^{2}}}$, i.e., $\tan x=\frac{b^{4} m^{2}}{a^{4} n^{2}}=\frac{a^{2}}{b^{2}}$. Hence,
$$\frac{m}{n}=\frac{a^{3}}{b^{3}}, \tan x=\left(\frac{m}{n}\right)^{\frac{2}{3}}$$

And
$$m \sqrt{\sin x}+n \sqrt{\cos x} \leqslant\left(m^{\frac{4}{3}}+n^{\frac{4}{3}}\right)^{\frac{3}{4}},$$

Thus,
$$\begin{array}{l}
\left(\frac{m}{n}\right)^{\frac{2}{3}}=\frac{n p}{m q} \\
\frac{m}{n}=\left(\frac{p}{q}\right)^{\frac{3}{5}}
\end{array}$$

Let $m=p^{\frac{3}{5}}, n=q^{\frac{3}{5}}$, then
$$\frac{p}{\sqrt{\sin x}}+\frac{q}{\sqrt{\cos x}} \geqslant \frac{(\sqrt{p m}+\sqrt{n q})^{2}}{\left(m^{\frac{4}{3}}+n^{\frac{4}{3}}\right)^{\frac{3}{4}}}=\left(p^{\frac{4}{5}}+q^{\frac{4}{5}}\right)^{\frac{5}{4}},$$

Equality holds if and only if $\tan x=\left(\frac{m}{n}\right)^{\frac{2}{3}}=\left[\left(\frac{p}{q}\right)^{\frac{3}{5}}\right]^{\frac{2}{3}}=\left(\frac{p}{q}\right)^{\frac{2}{5}}$.