# Let $a_1,a_2,a_3,…a_n\geq0$ and $a_1+a_2+a_3+…+a_n=2m$,then prove that the greatest possible value of $\sum_{i=1}^{n}a_i.a_{i+1}$.

Let $a_1,a_2,a_3,....a_n\geq0$ and $a_{n+1}=a_1$ with $a_1+a_2+a_3+....+a_n=2m$,then find the greatest possible value of $$\sum_{i=1}^{n}\ a_i\cdot a_{i+1}$$

I tried Cauchy-Schwarz but did not achieve success.How should I get its greatest value. Please suggest me some method.The answer given in the book is $m^2$.

• Did you try Lagrange multiplier? – user99914 Sep 23 '15 at 12:08
• Upper limit of sum is $n$given not $n-1$@jameselmore – Vinod Kumar Punia Sep 23 '15 at 12:10
• @VinodKumarPunia, sorry for not running that change by you first. You just didn't define a value for $a_{n+1}$, so the limit doesn't make much sense – jameselmore Sep 23 '15 at 12:12
• @VinodKumarPunia I corrected your question. As several people commented, your problem doesnt make sense if $a_{n+1}$ is not defined – Ewan Delanoy Sep 23 '15 at 12:24
• If $a_1=a_2=a_3=\frac{2m}{3}$ then $\sum_{i=1}^{3}\ a_i.a_{i+1}=\frac{4m^2}{3}\ne m^2.$ So, the answer in your book is not correct, unless something more is missed. Could you want to bound $\sum_{i=1}^{n-1}\ a_i.a_{i+1}?$ – mfl Sep 23 '15 at 12:47

The question is equivalent to proving that $$4(a_1a_2+a_2a_3+...+a_na_1) \leq (a_1+a_2+...+a_n)^2.$$

Yes, we can prove it. WLOG, let $a_1=\max \{a_1,a_2,...,a_n\}$, then $$\begin{eqnarray} 4(a_1a_2+a_2a_3+...+a_na_1) &\leq& 4a_1(a_2+a_4+a_5+...+a_n)+4a_2a_3 \\ &\leq& 4(a_1+a_3)(a_2+a_4+a_5+...+a_n) \\ &\leq& (a_1+a_2+...+a_n)^2. \text{(AM-GM)} \end{eqnarray}$$

The equality holds if and only if $a_1=a_2=m, a_3=a_4=...=a_n=0$.

Edited:

However, this argument works only if $n>3$. If $n=3$, mfl has given a counterexample such that $a_1=a_2=a_3=2m/3$. To see what is wrong, notice that if $n>3$, $a_3$ won't appear in this part of the third formula $(a_2+a_4+a_5+...+a_n)$ and the proof works well. However, once we consider $n=3$, then $a_n=a_3$ - something wrong happens. As a result, the inequality doesn't holds anymore.

For $n=1$, it is trivial, since the sum is fixed. It equals to $a_1^2=4m^2$.

For $n=2$, it is still trivial. You only need to use $\text {AM-GM}$ inequality: $$a_1a_2+a_2a_1=2a_2a_1\leq \frac{(a_1+a_2)^2}{2}=2m^2.$$ The equality holds if and only if $a_1=a_2=m$.

For $n=3$, $a_2+a_3=2m-a_1$. $$\begin{eqnarray} a_1a_2+a_2a_3+a_3a_1 &=&a_1(2m-a_1)+a_2a_3 \\ &\leq& a_1(2m-a_1)+\frac{(2m-a_1)^2}{4} \\ &=&\frac{-3a_1^2}{4}+ma_1+m^2 \\ &=&-\frac{3}{4}(a_1-\frac{2m}{3})^2+\frac{4m^2}{3} \\ &\leq& \frac{4m^2}{3}. \end{eqnarray}$$ The equality holds if and only if $a_1=a_2=a_3=\frac{2m}{3}$.

• @mfl There is indeed a mistake in my answer (and the question). See the addition part in answer. – Asydot Sep 23 '15 at 13:31
• @mfl The argument has been fixed and now I think you can see that I didn't bound wrong formula. ;) – Asydot Sep 23 '15 at 14:02