# $x_1 + x_2 + x_3 + x_4 + x_5=5$ . Determine the maximum value of $x_1x_2+x_2x_3+x_3x_4+x_4x_5$.

Let $$x_1 , x_2 , x_3 , x_4 , x_5$$ be non-negative real numbers such that $$x_1 + x_2 + x_3 + x_4 + x_5=5$$ . Determine the maximum value of $$x_1x_2+x_2x_3+x_3x_4+x_4x_5$$.

Normally in such questions I use the fact that the equation is symmetric and thus extremum is attained when all the variables are equal , but this can not be done here , and I have spent quite a long time on this but nothing worth-mentioning came to my mind . Could someone please help me find the maximum value ?

Thanks !

• Have you tried Lagrange multipliers? Commented Jul 31, 2020 at 8:51
• This question is similar to this one math.stackexchange.com/questions/252103/… Commented Jul 31, 2020 at 15:28

## 4 Answers

$$x_1x_2+x_2x_3+x_3x_4+x_4x_5=(x_1+x_3+x_5)(x_2+x_4) - (x_2x_5+x_1x_4)$$

Now we try to find maximum value of $$(x_1+x_3+x_5)(x_2+x_4)$$ when $$(x_1+x_3+x_5)+(x_2+x_4)=5$$ And try to minimize the value of $$(x_2x_5+x_1x_4)$$.

Take, $$a=(x_1+x_3+x_5)$$ and $$b=(x_2+x_4)$$ By , A.M. $$\ge$$ G.M. $$\implies$$ $$\sqrt(ab) \le \frac{a+b}{2} \implies (ab) \le (\frac{5}{2})^2$$ So, max value of $$(x_1+x_3+x_5)(x_2+x_4)$$ is $$(\frac{5}{2})^2$$

And , clearly, minimum value of $$(x_2x_5+x_1x_4)$$ is $$0$$. So , max value of $$x_1x_2+x_2x_3+x_3x_4+x_4x_5$$ is $$(\frac{5}{2})^2$$

Hint: Reduce the number of variables, $$x_1x_2+x_2x_3+x_3x_4+x_4x_5\leq x_2(x_1+x_3)+(x_1+x_3)x_4+x_4x_5\leq\dots$$

In general, for $$n\ge2$$, given the constraint $$x_1+\cdots+x_n=c,\qquad x_i\ge0$$ then $$x_1x_2+\cdots+x_{n-1}x_n\le\frac{c^2}{4}$$ with the maximum achieved by $$x_1=x_2=c/2$$, $$x_i=0$$ ($$i>2$$) (or any other pair equal).

Using Lagrange multipliers, a critical point is achieved when $$x_2=\lambda,\quad x_{i-1}+x_{i+1}=\lambda,\quad x_{n-1}=\lambda$$ As $$x_2=x_2+x_4$$, then $$x_4=0$$. Since one of the variables has to be zero, we can without loss of generality let it be $$x_n$$, since it contributes to just one term in the expression. Then the problem reduces to the same one for $$n-1$$ terms, which achieves the maximum at $$x_1=x_2=c/2$$, by induction. The starting steps for $$n=2$$ and $$n=3$$ are trivial.

• Actually, I am getting there but , Langrange multipliers is not familiar to me yet , I'll comeback to this answer once I learn it , thanks Commented Aug 6, 2020 at 11:48

Hint. Note that $$(x_1+x_3+x_5)+(x_2+x_4)=5$$ and $$x_1x_2+x_2x_3+x_3x_4+x_4x_5\leq(x_1+x_3+x_5)(x_2+x_4).$$ Can you end now?

• Yes , I was able to end it from here , thanks Commented Aug 6, 2020 at 11:47