2. Given numbers $x, y \in\left(0, \frac{\pi}{2}\right)$. Find the maximum value of the expression

$$
A=\frac{\sqrt{\cos x \cos y}}{\sqrt{\operatorname{ctg} x}+\sqrt{\operatorname{ctg} y}}
$$
Answer: $\frac{\sqrt{2}}{4}$.

Solution. Note that $\sqrt{a}+\sqrt{b} \leqslant \sqrt{2(a+b)}$ for any $a, b \geqslant 0$. Applying the inequality for the harmonic mean and the arithmetic mean, we get

$$
\begin{aligned}
A \leqslant \frac{1}{4} \sqrt{\cos x \cos y}(\sqrt{\operatorname{tg} x}+\sqrt{\operatorname{tg} y}) & =\frac{1}{4}(\sqrt{\sin x \cos y}+\sqrt{\cos x \sin y}) \leqslant \\
& \leqslant \frac{\sqrt{2}}{4} \sqrt{\sin x \cos y+\cos x \sin y}=\frac{\sqrt{2}}{4} \sqrt{\sin (x+y)} \leqslant \frac{\sqrt{2}}{4}
\end{aligned}
$$

Equality is achieved when $x=y=\frac{\pi}{4}$.