prove this inequality $(\sum_{i=1}^{n}|x_{i+1}-x_{i}|)^2\le 4(n-1)\sum_{i=1}^{n}x^2_{i}$ if $n$ be odd postive integers,let $x_{i}\in R$,and such $$x_{1}+x_{2}+\cdots+x_{n}=0$$
show that :$$\left(\sum_{i=1}^{n}|x_{i+1}-x_{i}|\right)^2\le 4(n-1)\sum_{i=1}^{n}x^2_{i}\tag{1}$$
where $x_{n+1}=x_{1}$ 
This problem is from this problem  :find the minimum of the positive real value $c$ such $x_{1}+x_{2}+\cdots+x_{n}=1$
I'm more interested in this question with this inequality (1). because I think it might have a very nice answer.such as Cauchy-Schwarz inequality and also
$$(\sum_{i=1}^{n}|x_{i+1}-x_{i}|)^2\le (\sum_{i=1}^{n}(|x_{i}|+|x_{i+1}|))^2=4(\sum_{i=1}^{n}|x_{i}|)^2\le 4n\sum_{i=1}^{n}x^2_{i}$$
But I can't use Cauchy-Schwarz inequality to prove $4n-4$
 A: Let $x_{n+2} = x_2$, and note that
$$
\prod_{i = 1}^n \left[(x_{i + 2} - x_{i + 1})(x_{i+1} - x_{i})\right] = \left[\prod_{i = 1}^n (x_{i+1} - x_{i})\right]^2 \geq 0.
$$
Since $n$ is odd, there exsits $j \in \{1, \dots, n\}$, such that $(x_{j + 2} - x_{j + 1})(x_{j+1} - x_{j}) \geq 0$. Without loss of generality we assume that $j = n - 1$, i.e., $(x_{n+1} - x_{n})(x_{n} - x_{n-1}) \geq 0$. Therefore, we have
$$
|x_{n} - x_{n-1}| + |x_{n+1} - x_n| = |x_{n} - x_{n-1} + x_{n+1} - x_n| = |x_{n +1} - x_{n - 1}| = |x_1 - x_{n - 1}|,
$$
and thus
$$
\sum_{i = 1}^n |x_{i + 1} - x_i| = \sum_{i = 1}^{n-2} |x_{i + 1} - x_i| + |x_1 - x_{n - 1}| = \sum_{i = 1}^{n-1} |y_{i + 1} - y_i|,
$$
where we have defined $y_i = x_i$ for $i = 1, \dots, n - 1$ and $y_{n} = x_1$.
Finally, following either the argument in the problem or the first comment, we have
$$
\left(\sum_{i = 1}^{n-1} |y_{i + 1} - y_i|\right)^2 \leq 4(n-1)\sum_{i = 1}^{n - 1} y_i^2 = 4(n-1)\sum_{i = 1}^{n - 1} x_i^2 \leq 4(n-1)\sum_{i = 1}^{n} x_i^2.
$$
A: Any cycle $C=(x_1,x_2,...,x_n)$ has a subcycle $(u_1,d_1,...,u_m,d_m)$, with $u_{m+1}=u_1$, such that $C$ is non-increasing between each $u_i$ and $d_i$ and non-decreasing between each $d_i$ and $u_{i+1}$. Then
$$\sum_{i=1}^n|x_{i+1}-x_i|=2\sum_{i=1}^mu_i-2\sum_{i=1}^md_i\le 2\sum_{i=1}^m(|u_i|+|d_i|).$$
By Cauchy-Schwarz $$\left(\sum_{i=1}^{n}|x_{i+1}-x_i|\right)^2\le 8m\sum_{i=1}^m(|u_i|^2+|d_i|^2)\le 4(n-1)\sum_{i=1}^n x_i^2.$$
Note
The condition $x_{1}+x_{2}+\cdots+x_{n}=0$ is irrelevant.
