$\square$ Example 7 Given that $a, b$ are positive constants, and $x$ is an acute angle, find the minimum value of the function $y=\frac{a}{\sin ^{n} x}+$ $\frac{b}{\cos ^{n} x}$.
By Hölder's inequality, we have
$$\begin{aligned}
& \left(\frac{a}{\sin ^{n} x}+\frac{b}{\cos ^{n} x}\right)^{\frac{2}{n+2}}\left(\sin ^{2} x+\cos ^{2} x\right)^{\frac{n}{n+2}} \\
\geqslant & \left(\frac{a}{\sin ^{n} x}\right)^{\frac{2}{n+2}}\left(\sin ^{2} x\right)^{\frac{n}{n+2}}+\left(\frac{b}{\cos ^{n} x}\right)^{\frac{2}{n+2}}\left(\cos ^{2} x\right)^{\frac{n}{n+2}} \\
= & a^{\frac{2}{n+2}}+b^{\frac{2}{n+2}}
\end{aligned}$$

That is,
$$\begin{array}{c}
y^{\frac{2}{n+2}} \geqslant a^{\frac{2}{n+2}}+b^{\frac{2}{n+2}} \\
y \geqslant\left(a^{\frac{2}{n+2}}+b^{\frac{2}{n+2}}\right)^{\frac{n+2}{2}}
\end{array}$$

Since $y>0$, the equality holds if and only if $\frac{a}{\sin ^{n+2} x}=\frac{b}{\cos ^{n+2} x}$, i.e., $x=\arctan \sqrt[n+2]{\frac{a}{b}}$. Therefore,
$$y_{\min }=\left(a^{\frac{2}{n+2}}+b^{\frac{2}{n+2}}\right)^{\frac{n+2}{2}} .$$