How find this maximum of the value $\sum_{i=1}^{6}x_{i}x_{i+1}x_{i+2}x_{i+3}$? Let 
$$x_{1},x_{2},x_{3},x_{5},x_{6}\ge 0$$ such that
$$x_{1}+x_{2}+x_{3}+x_{4}+x_{5}+x_{6}=1$$
Find the  maximum of the value of
$$\sum_{i=1}^{6}x_{i}\;x_{i+1}\;x_{i+2}\;x_{i+3}$$
where 
$$x_{7}=x_{1},\quad x_{8}=x_{2},\quad x_{9}=x_{3}\,.$$
 A: For $x_i=\frac{1}{6}$ we get $\frac{1}{216}$.
We'll prove that it's a maximal value.
Indeed, let $x_1=\min\{x_i\}$, $x_2=x_1+a$, $x_3=x_1+b$, $x_4=x_1+c$, $x_5=x_1+d$ and $x_6=x_1+e$.
Hence, $a$, $b$, $c$, $d$ and $e$ are non-negatives and we need to prove that:
$$216\sum_{i=1}^6x_ix_{i+1}x_{i+2}x_{i+3}\leq\left(\sum_{i=1}^6x_i\right)^4$$ or
$$216(a^2+b^2+c^2+d^2+e^2-ab-bc-cd-de)x_1^2+$$
$$24((a+b+c+d+e)^3-9(2abc+abd+abe+acd+ade+2bcd+bce+bde+2cde))x_1+$$
$$+(a+b+c+d+e)^4-216(abcd+bcde),$$
which is true because
$$a^2+b^2+c^2+d^2+e^2-ab-bc-cd-de\geq$$
$$\geq a^2+b^2+c^2+d^2+e^2-ab-bc-cd-de-ea=\frac{1}{2}\sum_{cyc}(a-b)^2\geq0,$$
$$216(abcd+bcde)=216bcd(a+e)\leq216\left(\frac{a+b+c+d+e}{4}\right)^4=$$
$$=\frac{216}{256}(a+b+c+d+e)^4\leq(a+b+c+d+e)^4$$ and
$$(a+b+c+d+e)^3\geq9(2abc+abd+abe+acd+ade+2bcd+bce+bde+2cde),$$
but my proof of this statement is very ugly.
A: Let $B=(x_2+x_6)/2,C=(x_3+x_5)/2,tR=(x_2-x_6)/2,tS=(x_3-x_5)/2$.
The numbers are now $A,B(1+tR),C(1+tS),D,C(1-tS),B(1-tR)$.  The sum is
$$2AB^2C+2BC^2D+2ABCD-2t^2(AB^2CR^2+BC^2DS^2-ABCDRS)$$
Let $t$ vary.  The maximum is either when $t=0$ or when $t$ is as large as possible.  
$t$ is at its largest when $B(1-tR)$ or $C(1-tS)$ has reached zero.  It is simple to calculate the sum's maximum when one value is zero; that maximum is $1/256$.  
If the maximum is when $t=0$, then the numbers are $A,B,C,D,C,B$.  That is, $x_2=x_6$ and $x_3=x_5$.
A similar argument shows that any maximum other than $1/256$ has $x_2=x_4$ and $x_1=x_5$.
So the numbers are $C,B,C,B,C,B$ and the sum is $6B^2C^2$.  That is maximum when $B=C=1/6$, and the sum is $1/216$.  
A: Let $x_1=a,\ x_2=b,\ x_3=c,\ x_4=d,\ x_5=e,\ x_6=f.$ 
Objective function is
$$Z(a,b,c,d,e,f) = abcd + bcde + cdef + defa + efab + fabc.$$
Let maximize $Z(a,b,c,d,e,f)$ using Lagrange mulptiplyers method for the function 
$$F(a,b,c,d,e,f,\lambda) = abcd + bcde + cdef + defa + efab + fabc + \lambda(1-a-b-c-d-e-f).$$
Equaling to zero partial derivatives $F'_a,\ F'_b,\ F'_c,\ F'_d,\ F'_e,\ F'_f,\ $ one can obtain the system:
$$\begin{cases}
bcd+bcf+bef+def = \lambda\\
acd+acf+aef+cde = \lambda\\
abd+abf+bde+def = \lambda\\
abc+aef+bce+cef = \lambda\\
abf+adf+bcd+cdf = \lambda\\
abc+abe+ade+cde = \lambda\\
a+b+c+d+e+f = 1.
\end{cases}$$
Note that:


*

*First and third equations contains the common term $def.$

*Second and fourth - $aef.$

*Third and fifth - $abf.$

*Fourth and six - $abc.$

*Fifth and first - $bcd.$

*Sixth and second - $cde.$


So
$$\begin{cases}
bcd+bcf+bef = abd+abf+bde\qquad(1)\\
acd+acf+cde = abc+bce+cef\qquad(2)\\
abd+bde+def = adf+bcd+cdf\qquad(3)\\
aef+bce+cef = abe+ade+cde\qquad(4)\\
abf+adf+cdf = bcf+bef+def\qquad(5)\\
abc+abe+ade = acd+acf+aef\qquad(6)\\
a+b+c+d+e+f = 1.\qquad\qquad\qquad(7)
\end{cases}$$
Easy to see that:


*

*Both $Z(a,b,c,d,e,f)$ and accordingly the system $(1-7)$ WLOG allows any cyclic permutation of $(a,b,c,d,e,f)$.

*Substitution of any pair of zero unknowns equals objective function to zero if that unknowns are not neighbours in the list of unknowns.


Let us consider zero cases in detail.
"Neighbouring zeros" case $b=c=0$ (and cyclic permutations).
Equations $(1)$ and $(2)$ give $LHS=RHS=0,$ remaining equations can be simplified to the form of 
$$a=e,\quad d=f,\quad a+d = \frac12,$$
with the object function 
$$Z(a, 0, 0, d, a, d) = a^2\left(\frac12-a\right)^2\quad\text{for } a\in\left(0,\dfrac12\right).$$
That gives
$$Z_{max} = \frac1{256}\text{ for } a=\frac14.$$
"Single zero" case $b=0, a>0, c>0.$ (and cyclic permutations).
And condition $Z>0$ requires $d>0, e>0, f>0.$
The equations $(3,4,6)$ forms a system
$$\begin{cases}
def = adf+cdf\\
aef+cef = ade+cde\\
ade = acd+acf+aef
\end{cases}\rightarrow
\begin{cases}
e = a+c\\
(a+c)f = (a+c)d\\
de = cd+cf+ef,
\end{cases}$$
$ef=de,\ c(d+f)=0.$ 
This contradicts the conditions $c>0,\ d>0,\ f>0.$
Case $abcdef>0.$
This case allows reduction of $(1-6)$:
$$\begin{cases}
cd+cf+ef = ad+af+de\qquad(1a)\\
ad+af+de = ab+be+ef\qquad(2a)\\
ab+be+ef = af+bc+cf\qquad(3a)\\
af+bc+cf = ab+ad+cd\qquad(4a)\\
ab+ad+cd = bc+be+de\qquad(5a)\\
bc+be+de = cd+cf+ef\qquad(6a)\\
a+b+c+d+e+f = 1.\qquad\quad(7)
\end{cases}$$
Summations $(1a+2a),\ (2a+3a),\ (3a+4a),\ (4a+5a),\ (5a+6a),\ $ leads to the system
$$\begin{cases}
cd+cf = ab+be\qquad\qquad(1b)\\
ad+de = bc+cf\qquad\qquad(2b)\\
be+ef = ad+cd\qquad\qquad(3b)\\
af+cf = be+de\qquad\qquad(4b)\\
ab+ad = cf+ef\qquad\qquad(5b)\\
a+b+c+d+e+f = 1.\quad(7)
\end{cases}$$
Now weighted sums $(1b)\cdot d+(2b)\cdot b,$ $(2b)\cdot e+(3b)\cdot,$ $(3b)\cdot f+(4b)\cdot d,$ $(4b)\cdot a+(5b)\cdot c$ form the system
$$\begin{cases}
cd^2+cdf = b^2c+bcf\\
ade+de^2 = acd+c^2d\\
bef+ef^2 = bde+d^2e\\
a^2f+acf = cef+e^2f\\
a+b+c+d+e+f = 1
\end{cases}\rightarrow
\begin{cases}
(d-b)\cdot(b+d+f) = 0\\
(e-c)\cdot(c+e+a) = 0\\
(f-d)\cdot(f+d+b) = 0\\
(a-e)\cdot(a+e+c) = 0\\
a+b+c+d+e+f = 1
\end{cases}$$
$$f=d=b,\quad e=c=a,\quad a+b = \dfrac13.$$
The object function is
$$Z(a, b, a, b,a,b) = 6a^3\left(\dfrac13 - a\right)^3$$ 
for $a\in\left(0,\dfrac13\right)$.
That gives
$$Z_{max}(a) = \frac1{216}\text{ for } a=\frac16,$$
and finally
$$\boxed{\max Z(\vec x) = \dfrac 1{216}\quad\text{ for all }x_i=\dfrac16.}$$
