TITLE: Finding maximum of sum of square roots
QUESTION [6 upvotes]: Let $0 \leq x_1, \dots, x_n \leq 1$ and $\sum_{i=1}^n x_i = 1$, i.e. $x_i$ form a probability distribution. Let $m_1, \dots, m_n \geq 1$ be fixed numbers. I'm looking for $x_i$ that maximize the following:
\begin{align}
       \sum_i \frac{\sqrt{x_i}}{\sqrt{m_i}}
\end{align}
I was able to show that for case of $n = 2$ (where we only have a single variable) the maximum is at $x_1 = \frac{m_2}{m_1+m_2}$ and $x_1 = 1-x_2$. Let $M = \sum_i m_i$. From this, I think $x_i$ that maximize the above might be
$$x_i \propto {M - m_i}?$$

REPLY [3 votes]: Apply the Cauchy-Schwarz inequality
$$\left(\sum \frac{\sqrt{x_i}}{\sqrt{m_i}}\right)^2 \le \sum \frac{1}{m_i} \cdot \sum x_i $$
with equality only when $x_i$ and $\frac{1}{m_i}$ are proportional.