Q:

The sum of $2012$ positive terms is $10.$

A sequence has $2012$ positive terms adding to $10$
Prove that the sum of product of two consecutive terms is less than $25.$
I've tried using the Cauchy-Schwarz inequality but couldn't find the proof.
Also find the maximum value (where equality holds).

A:

Let $a_1, a_2, \cdots, a_{2012}$ be the sequence at hand.
Notice in the sum of consecutive terms
$$\sum_{k=1}^{2011} a_k a_{k+1}$$
One factor comes from the set $\{ a_1, a_3, a_5, \cdots a_{2011} \}$ while the other one comes from the set $\{ a_2, a_4, \cdots, a_{2012} \}$. Furthermore,
not every pair of $a_i a_j$ with $i$ odd, $j$ even are included in the sum.
This leads to
$$\sum_{k=1}^{2011} a_k a_{k+1} < \left(\sum_{i\text{ odd}} a_i\right) \left(\sum_{j\text{ even}} a_j\right)
\le \left(\frac{\sum_{i\text{ odd}} a_i + \sum_{j\text{ even}} a_j}{2}\right)^2
= \left(\frac12 \sum_{i=1}^{2012} a_i\right)^2 = 25\tag{*1}$$
About the other question concerning the maximum value, the maximum value doesn't exist.
For any small $\epsilon$, if we set $a_1 = a_2 = 5-1005\epsilon$ and $a_k = \epsilon$ for $k > 2$, we have 
$$
\sum_{k=1}^{2012} a_k = 10
\quad\text{ and }\quad
\sum_{k=1}^{2011} a_k a_{k+1} = (5-1005\epsilon)^2 + (5-1005\epsilon)\epsilon + 2009 \epsilon^2
$$
This implies
$$S \stackrel{def}{=} \sup \left\{ \sum_{k=1}^{2011} a_k a_{k+1} \right\} \ge \lim_{\epsilon \to 0}
(5-1005\epsilon)^2 + (5-1005\epsilon)\epsilon + 2009 \epsilon^2 = 25$$
Since $(*1)$ implies $S \le 25$, the supremum of the sum $S = 25$. 
Notice the inequality in $(*1)$ is always strict. There are no configuration of $a_k$ which can make the sum $\sum_{k=1}^{2011} a_k a_{k+1}$ equal to the supremum. This means the maximum doesn't exist.

