# Coefficients in $\pm 1$

Let $n$ be a positive integer and $x_1,x_2,\ldots,x_n$ be positive reals. Show that there are numbers $a_1,a_2,\ldots, a_n \in \{-1,1\}$ such that the following holds: $$\displaystyle a_1x_1^2+a_2x_2^2+\cdots+a_nx_n^2 \ge (a_1x_1+a_2x_2 +\cdots+a_nx_n)^2$$

This is an olympiad problem but I don't know how to do it. Thanks for any help.

• Seems like an Arithmetic-Geometric inequality type problem. Commented Jun 17, 2014 at 5:52
• Really? I thought about Cauchy-Schwartz but I would love to know your solution. Thanks. Commented Jun 17, 2014 at 5:53
• Sorry if I misled you, I was being sort-of temptative, but let me see if I can come up with something substantial. Commented Jun 17, 2014 at 6:05
• This is (almost) [Jensen's inequality][1] $$\varphi\left( \sum_i a_i x_i \right) \leq \sum_i a_i \varphi(x_i)$$ with $\varphi(x_i) = x_i^2$. It is not quite Jensen's inequality in that it does not meet the hypotheses that $\sum_i a_i = 1$ and $a_i \geq 0$. [1]: en.wikipedia.org/wiki/… Commented Jun 17, 2014 at 6:51

Hint: without loss of generality assume that the $x_j$ are arranged in nonascending order: $x_1\ge x_2\ge\dots$. Then take $a_j=(-1)^{j-1}$.
• How is that working? The inequality becomes : $(x_1^2-x_2^2+\ldots )\ge (x_1-x_2+\ldots)^2$ how to prove this? Expanding is going to be confusing I think, can you prove it completely? @Vladimir Commented Jun 17, 2014 at 5:59
• In the proof that was just edited away, the signs assigned to the $x_i$ oscillate with every increment of $j$. Consider the sign of $x_n$ in your sums $b_j$ and $c_j$ when $j=n$ versus $j=n-1$. Commented Jun 17, 2014 at 6:36