Range of $(a_{1}-a_{2})^2+(a_{2}-a_{3})^2+(a_{3}-a_{4})^2+(a_{4}-a_{1})^2$ is 
If $a_{1},a_{2},a_{3},a_{4}\in \mathbb{R}$ and $a_{1}+a_{2}+a_{3}+a_{4}=0$ and $a^2_{1}+a^2_{2}+a^2_{3}+a^2_{4}=1.$
Then Range of $$E =(a_{1}-a_{2})^2+(a_{2}-a_{3})^2+(a_{3}-a_{4})^2+(a_{4}-a_{1})^2$$ is

Try:
From $$(a_{1}-a_{2})^2+(a_{2}-a_{3})^2+(a_{3}-a_{4})^2+(a_{4}-a_{1})^2$$
$$=2(a^2_{1}+a^2_{2}+a^2_{3}+a^2_{4})+2(a_{1}a_{2}+a_{2}a_{3}+a_{3}a_{4}+a_{4}a_{1})$$
$$=2-2(a_{1}+a_{3})(a_{2}+a_{4})=2+2(a_{1}+a_{3})^2\geq 2$$
and equality hold when $\displaystyle a_{1}=-a_{3}$ and $a_{2}=-a_{4}$
Could some help me how to find its upper bound, Thanks

Let $\boldsymbol{x}=(a_1,a_2,a_3,a_4) \in \mathbb{R}^4$,
$$E=\boldsymbol{x}
\begin{pmatrix}
  2 & -1 & 0 & -1 \\
  -1 & 2 & -1 & 0 \\
  0 & -1 & 2 & -1 \\
  -1 & 0 &-1 & 2
\end{pmatrix}
\boldsymbol{x}^T$$


*

*Eigenvalues: $$\lambda_1=4, \, \lambda_2=\lambda_3=2, \, \lambda_4=0$$

*Unit eigenvectors:
\begin{align}
  \boldsymbol{v}_1 &= \frac{(-1,1,-1,1)}{2} \\
  \boldsymbol{v}_2 &= \frac{(0,-1,0,1)}{\sqrt{2}} \\
  \boldsymbol{v}_3 &= \frac{(-1,0,1,0)}{\sqrt{2}} \\
  \boldsymbol{v}_4 &= \frac{(1,1,1,1)}{2} \\
  \boldsymbol{v}_i \cdot \boldsymbol{v}_j &= \delta_{ij}
\end{align}


*

*Note that $\boldsymbol{v}_k$ satisfies $a_1+a_2+a_3+a_4=0$ for $k=1$, $2$ or $3$ whereas $\boldsymbol{v}_4$ is normal to the hyperplane $a_1+a_2+a_3+a_4=0$.  Therefore,


$$\boldsymbol{x}=
\alpha \, \boldsymbol{v}_1+
\beta \, \boldsymbol{v}_2+
\gamma \, \boldsymbol{v}_3$$
$$\lambda_{2,3} \Vert \boldsymbol{x} \Vert^2
\le E \le
\lambda_{1} \Vert \boldsymbol{x} \Vert^2$$
$$2\le E  \le 4$$
