3. Given numbers $x_{1}, \ldots, x_{n} \in\left(0, \frac{\pi}{2}\right)$. Find the maximum value of the expression

$$
A=\frac{\sin x_{1}+\ldots+\sin x_{n}}{\sqrt{\operatorname{tg}^{2} x_{1}+\ldots+\operatorname{tg}^{2} x_{n}+n}}
$$
Answer: $\frac{\sqrt{n}}{2}$.

Solution. Note that for any $a_{1}, \ldots, a_{n}$

$$
\left(\sum_{k=1}^{n} a_{k}\right)^{2} \leqslant n \sum_{k=1}^{n} a_{k}^{2}
$$

From this, by the inequality for the harmonic mean and the arithmetic mean,

$$
\frac{1}{\sqrt{\operatorname{tg}^{2} x_{1}+\ldots+\operatorname{tg}^{2} x_{n}+n}}=\frac{1}{\sqrt{\frac{1}{\cos ^{2} x_{1}}+\ldots+\frac{1}{\cos ^{2} x_{n}}}} \leqslant \frac{1}{\frac{1}{\cos x_{1}}+\ldots+\frac{1}{\cos x_{n}}} \leqslant \frac{\cos x_{1}+\ldots+\cos x_{n}}{n \sqrt{n}}
$$

Then by the Cauchy-Schwarz inequality,

$$
A \leqslant \frac{\left(\sum_{k=1}^{n} \sin x_{k}\right) \cdot\left(\sum_{k=1}^{n} \cos x_{k}\right)}{n \sqrt{n}} \leqslant \frac{\left(\sum_{k=1}^{n} \sin x_{k}\right)^{2}+\left(\sum_{k=1}^{n} \cos x_{k}\right)^{2}}{2 n \sqrt{n}} \leqslant \frac{\sum_{k=1}^{n} \sin ^{2} x_{k}+\sum_{k=1}^{n} \cos ^{2} x_{k}}{2 \sqrt{n}}=\frac{\sqrt{n}}{2}
$$

Equality is achieved when $x_{1}=\ldots=x_{n}=\frac{\pi}{4}$.