Given $n \ge 3$ real numbers $a_1, a_2, \cdots, a_n \in [0,1]$ such that $a_1 + a_2+ \cdots +a_n =2$, find the maximum value of: $$P =\sqrt{1-\sqrt{a_1}} + \sqrt{1-\sqrt{a_2}} + \cdots + \sqrt{1-\sqrt{a_n}}.$$

So far my only guess is that the equality occurs when there are $n-x$ numbers equal to $0$ and $x$ numbers equal to $\dfrac{2}{x}$, then we have: $$P \le n-x + x \sqrt{1-\sqrt{\frac{2}{x}}} = n-x + \sqrt{x^2-x\sqrt{2x}}$$ The function above reaches maximum at $x=3$, so we have: $$P \le n-3 + \sqrt{9 -3\sqrt{6}} $$ And I didn't know how to proceed any further.

  • 1
    $\begingroup$ For whatever it's worth, that's a good guess. If tries zillions of combinations of a1, a2,...a6, then you'll see the combinations resulting in near the maximum with 3 zeros and 3 values close to 2/3. (Take a large sample from a Dirichlet distribution, multiply by 2, and then filter out the samples where the maximum is greater than one.) $\endgroup$
    – JimB
    Feb 8, 2022 at 5:08

2 Answers 2


A brute force method: $f(x)=\sqrt{1-\sqrt x}$, then, $f'(x)=-\frac{1}{4\sqrt{x}\sqrt{1-\sqrt{x}}}$, $f''(x)=\frac{2-3\sqrt x}{16\sqrt{(1-\sqrt x)x}^3}$. Therefore, the function $f(x)$ is convex for $x<4/9$ and concave for $x>4/9$. So, we can make $f(x_1)+f(x_2)$ (WLOG $x_1\le x_2$) larger we do the adjustment:

(a) If $0\le x_1\le x_2\le 4/9$, $f(x_1)+f(x_2)\le f(x_1-\delta)+f(x_2+\delta)$ for all $\delta\in[0,\min(4/9-x_2,x_1)]$.

(a) If $4/9\le x_1\le x_2\le 1$, $f(x_1)+f(x_2)\le f(x_1+\delta)+f(x_2-\delta)$ for all $\delta\in[0,\frac{x_2-x_1}2]$.

Therefore, $\sum_{i}f(x_i)$ reach maximum when it can't be adjusted by the method above. Specifically:

(a) all the $x\ge 4/9$'s are equal.

(b) all the other $x\le 4/9$ are hitting the boundary (that is, being $0$ or one single value.)

So, we have $0=x_1=\dots=x_k\le x_{k+1}<4/9\le x_{k+2}=\dots=x_n$.

Since all $x_i\le 1$, we have $2\le n-k\le 4$. We have three cases:

Case 1: $n-k=2$. So, we have $0=x_1=\dots=x_{n-3}\le x_{n-2}<4/9\le x_{n-1}=x_n$. Let $x_n=x$, and we have $x_n\ge 7/9$. Therefore, we have

\begin{align}&\sum_i f(x_i)=n-3+\sqrt{1-\sqrt{x_{n-2}}}+\sqrt{1-\sqrt{x_{n-1}}}+\sqrt{1-\sqrt{x_{n}}}\\ \le &n-3+1+2\sqrt{1-\sqrt{7/9}}\le n-3+1.236\dots\end{align}

Notice that $n-3+\sqrt{9-3\sqrt{6}}=n-3+1.285\dots$, so this case is smaller.

Case 2: $n-k=3$. So, we have $0=x_1=\dots=x_{n-4}\le x_{n-3}<4/9\le x_{n-2}= x_{n-1}=x_n$. Let $x_n=x$, and we have $14/27\le x_n\le 2/3$. Therefore, we have

\begin{align}&\sum_i f(x_i)=n-4+\sqrt{1-\sqrt{2-3x}}+3\sqrt{1-\sqrt{x}}\end{align}

Let $g(x)=\sqrt{1-\sqrt{2-3x}}+3\sqrt{1-\sqrt{x}}$. Therefore, $g'(x)=\frac{3}{4}(\frac 1{\sqrt{2-3x}\sqrt{1-\sqrt{2-3x}}}-\frac 1{\sqrt{1-x}\sqrt{1-\sqrt{x}}})$ Notice that $\sqrt{x}\sqrt{1-\sqrt{x}}$ is an increasing function in $[0,1]$. Also, $2-3x\le x$ since $14/27\le x_n\le 2/3$. Therefore, we have ${\sqrt{2-3x}\sqrt{1-\sqrt{2-3x}}}\le {\sqrt{1-x}\sqrt{1-\sqrt{x}}}$, and thus $\frac 1{\sqrt{2-3x}\sqrt{1-\sqrt{2-3x}}}-\frac 1{\sqrt{1-x}\sqrt{1-\sqrt{x}}}\ge 0$, $g'(x)\ge 0$. Therefore, in this case, $x=2/3$ get the maximum value, which is your proposed solution \begin{align}&\sum_i f(x_i)=n-4+\sqrt{1-\sqrt{2-3\times 2/3}}+3\sqrt{1-\sqrt{2/3}}=n-3+\sqrt{9-6\sqrt 3}\end{align}

Case 3: $n-k=4$. So, we have $0=x_1=\dots=x_{n-5}\le x_{n-4}<4/9\le x_{n-3}=\dots =x_n$. Let $x_n=x$, and we have $4/9\le x_n\le 1/2$. Therefore, we have

\begin{align}&\sum_i f(x_i)=n-5+\sqrt{1-\sqrt{2-4x}}+4\sqrt{1-\sqrt{x}}\end{align}

Let $g(x)=\sqrt{1-\sqrt{2-4x}}+4\sqrt{1-\sqrt{x}}$. Therefore, $g'(x)=\frac 1{\sqrt{2-4x}\sqrt{1-\sqrt{2-4x}}}-\frac 1{\sqrt{1-x}\sqrt{1-\sqrt{x}}}$. Similar to the previous case, $g'(x)\ge 0$, and we take $x=1/2$. Therefore, we have

\begin{align}&\sum_i f(x_i)=n-5+1+4\sqrt{1-\sqrt{1/2}}=n-3+1.164...\end{align} which is also smaller.

Therefore, the maximum value is $n-3+\sqrt{9-3\sqrt 6}$

  • $\begingroup$ You have a typo your wrote $2\leq n-k\geq 4$ $\endgroup$
    – Erik Satie
    Feb 8, 2022 at 9:01
  • $\begingroup$ @ErikSatie Thank you for pointing out. $\endgroup$
    – JetfiRex
    Feb 8, 2022 at 13:17
  • $\begingroup$ you have (perhaps?) another typo at the beginning where $\min(9/4\cdots)$ $\endgroup$
    – Erik Satie
    Feb 8, 2022 at 15:02
  • $\begingroup$ @ErikSatie Thank you for pointing out again! $\endgroup$
    – JetfiRex
    Feb 8, 2022 at 18:11

Hint : use the EV method with :


We have on $(0,\infty)$:


With the constraint (for $0<x_i\leq 1$):


Now use corollary 1.4 (see http://emis.maths.adelaide.edu.au/journals/JIPAM/images/059_06_JIPAM/059_06_www.pdf )

  • $\begingroup$ EV theorem states that the maximum/minimum occurs when $n - 1$ variables are equal. However, in the OP, the minimum occurs when $n-3$ variables are zero and the remaining $3$ variables are equal to $2/3$. How did you apply EV theorem? $\endgroup$
    – River Li
    Feb 11, 2022 at 2:54
  • $\begingroup$ @RiverLi I think it works for small case like $n=3$ no ? $\endgroup$
    – Erik Satie
    Feb 11, 2022 at 8:53
  • 1
    $\begingroup$ You may delete it if it only works for $n=3$. You do not provide a solution for general $n$ (like the other answer). In the future, you find a solution, and you can reopen this answer. $\endgroup$
    – River Li
    Feb 11, 2022 at 9:28

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .