31 Let $a, b, c, d$ be given positive numbers, and $b<d$, find the maximum value of the function $y=a \sqrt{x-b}+c \sqrt{d-x}$.
31 Solution 1 Since
$$
(\sqrt{x-b})^{2}+(\sqrt{d-x})^{2}=d-b,
$$

we can set
$$
\sqrt{x-b}=\sqrt{d-b} \sin \theta, \sqrt{d-x}=\sqrt{d-b} \cos \theta,
$$

where $0 \leqslant \theta \leqslant \frac{\pi}{2}$. Therefore, we have
$$
\begin{array}{l}
y=a \sqrt{x-b}+c \sqrt{d-x}=\sqrt{d-b}(a \sin \theta+c \cos \theta) \\
=\sqrt{(d-b)}\left(a^{2}+c^{2}\right) \cdot\left(\frac{a}{\sqrt{\left.a^{2}+c^{2}\right)}} \sin \theta+\frac{c}{\sqrt{a^{2}+c^{2}}} \cos \theta\right) \\
=\sqrt{(d-b)\left(a^{2}+c^{2}\right)} \sin (\theta+\varphi) \text {, } \\
\end{array}
$$

where $\cos \varphi=\frac{a}{\sqrt{a^{2}+c^{2}}}, \sin \varphi=\frac{c}{\sqrt{a^{2}+c^{2}}}, 0^{\circ}<\varphi<90^{\circ}$. Clearly, when $\theta+\varphi=90^{\circ}$, $y$ reaches its maximum value $\sqrt{(-b+d)\left(a^{2}+c^{2}\right)}$.
Solution 2 According to the Cauchy-Schwarz inequality, we have
$$
\begin{aligned}
y^{2} & =(a \sqrt{x-b}+c \sqrt{d-x})^{2} \leqslant\left(a^{2}+c^{2}\right)[x-b+d-x] \\
& =\left(a^{2}+c^{2}\right)(d-b) .
\end{aligned}
$$

Thus, when $x=\frac{b c^{2}+d a^{2}}{a^{2}+c^{2}}$, the equality holds.