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

$$
A=\frac{\sqrt{1-x_{1}}+\ldots+\sqrt{1-x_{n}}}{\sqrt{\frac{1}{x_{1}}+\ldots+\frac{1}{x_{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{\frac{1}{x_{1}}+\ldots+\frac{1}{x_{n}}}} \leqslant \frac{\sqrt{n}}{\frac{1}{\sqrt{x_{1}}}+\ldots+\frac{1}{\sqrt{x_{n}}}} \leqslant \frac{\sqrt{x_{1}}+\ldots+\sqrt{x_{n}}}{n \sqrt{n}}
$$

Then by the Cauchy-Schwarz inequality,

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

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