I come across the following problem in my study. 


Let $x\_i, y\_i\in \mathbb{R}, i=1,2,\cdots,n$ with $\sum\limits\_{i=1}^nx\_i^2=\sum\limits\_{i=1}^ny\_i^2=1$, and $a\_1\ge a\_2\ge \cdots \ge a\_n>0 $. Is it true $$\left(\frac{\sum\limits\_{i=1}^na\_i(x\_i^2-y\_i^2)}{a\_1-a\_n}\right)^2\le 1-\left(\sum\limits\_{i=1}^nx\_iy\_i\right)^2~~?$$


Has anyone seen this inequality before, or can you give a counterexample?



A plausible inequality
[Wrong ounter-example deleted]


This it true for all $n$. The case $n=2$ is handled by Hailong Dao, let's reduce the general case to $n=2$.


First, we may assume that $a\_1=1$ and $a\_n=0$ as others mentioned. So remove the denominator in LHS. Then forget the condition that $a\_i$ are monotone, let's only assume that they are in $[0,1]$ (we can rearrange the indices anyway). Also we may assume that the sum under the square in the LHS is nonnegative - otherwise swap $x$ and $y$.


Then, for every $i$ such that $x\_i^2-y\_i^2>0$, set $a\_i=1$, otherwise $a\_i=0$. The LHS grows, the RHS stays. So it suffices to prove the inequality for $a\_i\in\{0,1\}$. Rearrange indices so that the first $k$ of $a\_i$'s are 1. We arrive to
$$
 \left(\sum\_{i=1}^k x\_i^2-\sum\_{i=1}^ky\_i^2 \right)^2 \le 1 - \left(\sum\_{i=1}^n x\_iy\_i\right)^2 .
$$
Define $X\_1,X\_2,Y\_1,Y\_2\ge 0$ by
$$
 X\_1^2 = \sum\_{i=1}^k x\_i^2, \ \ \ X\_2^2 = \sum\_{i=k+1}^n x\_i^2, \ \ \
 Y\_1^2 = \sum\_{i=1}^k y\_i^2, \ \ \ Y\_2^2 = \sum\_{i=k+1}^n y\_i^2.
$$
Then the LHS equals $(X\_1^2-Y\_1^2)^2$ and $X\_1^2+X\_2^2=Y\_1^2+Y\_2^2=1$. By Cauchy-Schwarz,
$$
 \left|\sum x\_iy\_i\right| \le X\_1Y\_1+X\_2Y\_2 ,
$$
so the RHS is greater or equal to $1-(X\_1Y\_1+X\_2Y\_2)^2$. Now the inequality follows from
$$
 (X\_1^2-Y\_1^2)^2 \le 1-(X\_1Y\_1+X\_2Y\_2)^2
$$
which is the same inequality for $n=2$.


