1. If the real numbers $m, n, x, y$ satisfy
$$
m^{2}+n^{2}=a, x^{2}+y^{2}=b \text {, }
$$

where $a, b$ are constants, then the maximum value of $m x+n y$ is $(\quad)$.
(A) $\frac{a+b}{2}$
(B) $\sqrt{a b}$
(C) $\sqrt{\frac{a^{2}+b^{2}}{2}}$
(D) $\frac{\sqrt{a^{2}-b^{2}}}{2}$
-、1.B.
Solution 1: By Cauchy-Schwarz inequality,
$$
\begin{array}{l}
(m x+n y)^{2} \leqslant\left(m^{2}+n^{2}\right)\left(x^{2}+y^{2}\right)=a b \\
\Rightarrow m x+n y \leqslant \sqrt{a b} .
\end{array}
$$

Equality holds if and only if $m=n=\sqrt{\frac{a}{2}}$, i.e., $x=y=\sqrt{\frac{b}{2}}$,
$$
m x+n y=\sqrt{a b} \text {. }
$$

Solution 2: Let $m=\sqrt{a} \cos \alpha, n=\sqrt{a} \sin \alpha$,
$$
x=\sqrt{b} \cos \beta, y=\sqrt{b} \sin \beta \text {. }
$$

Then $m x+n y=\sqrt{a b} \cos (\alpha-\beta) \leqslant \sqrt{a b}$.