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}\,.$$

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.}$$
