3

I currently have six variables $x_1, x_2, x_3, x_4, x_5, x_6$. I am trying to determine how large I can make the difference $x_6-x_1$ while satisfying the constraints:

$\sum_{j=1}^{6} x_j^2 \leq 1$

$\sum_{j=1}^{6} x_j = 0$

So far I have tried to use an optimization package in R but to no avail. Is there a way I can program this out or would it be too much to handle? Thanks!

user136503
  • 2,289
  • 15
  • 24

1 Answers1

3

Note that $$ (x_6-x_1)^2\leq 2(x_6^2+x_1^2)\le2 $$ with all inequalities becoming equalities when $x_6=\pm1/\sqrt{2}$ and $x_1=-x_6$. Thus, $$ \max(x_6-x_1)=\sqrt{2} $$ which realizes when $x_1=-1/\sqrt{2}$, $x_2=x_3=x_4=x_5=0$, and $x_6=1/\sqrt{2}$.

Kim Jong Un
  • 14,794
  • 1
  • 24
  • 49