# Chebyshev Holds a Key

### Solution 1

The sine function is increasing, the cosine function decreasing on $\left[0,\displaystyle\frac{\pi}{2}\right],\,$ so that a rearrangement of the given sequence $\{a_k\}\,$ would lead two oppositely ordered sequences $\{\sin a_k\}\,$ and $\{\cos a_k\},\,$ making possible to apply Chebyshev's Inequality. Making use of the double argument formula for sine,

\displaystyle\begin{align} \left(\sum_{i=1}^k\sin a_i\right)\left(\sum_{i=1}^k\cos a_i\right)&\le k\left(\sum_{i=1}^k\sin a_i\cos a_i\right)\\ &=\frac{k}{2}\sum_{i=1}^k\sin 2a_i\\ &\le\frac{k^2}{2}. \end{align}

It follows that

$\displaystyle\sum_{k=1}^n\left[\left(\sum_{i=1}^k\sin a_i\right)\left(\sum_{i=1}^k\cos a_i\right)\right]\le\sum_{k=1}^n\frac{k^2}{2}=\frac{n(n+1)(2n+1)}{12}.$

Note that for $\displaystyle a_k=\displaystyle\frac{\pi}{4},\,$ we have an equality.

### Solution 2

First apply the AM-GM inquality:

$\displaystyle\sum_{k=1}^n\left[\left(\sum_{i=1}^k\sin a_i\right)\left(\sum_{i=1}^k\cos a_i\right)\right]\le\frac{1}{2}\sum_{k=1}^n\left[\left(\sum_{i=1}^k\sin a_i\right)^2+\left(\sum_{i=1}^k\cos a_i\right)^2\right],$

with equality only if $\displaystyle\sum_{i=1}^k\sin a_i=\sum_{i=1}^k\cos a_i,\,$ $k\in\overline{1,n}.$

Then using the Cauchy-Schwarz inequality, we deduce

$\displaystyle\left(\sum_{i=1}^k\sin a_i\right)^2\le k\sum_{i=1}^k\sin^2 a_i,$

with equality only if $\sin a_1=\sin a_2 =\ldots =\sin a_k,\,$ and

$\displaystyle\left(\sum_{i=1}^k\cos a_i\right)^2\le k\sum_{i=1}^k\cos^2 a_i,$

with equality only if $\cos a_1=\cos a_2 =\ldots =\cos a_k.\,$

$\displaystyle\left(\sum_{i=1}^k\sin a_i\right)^2+\left(\sum_{i=1}^k\cos a_i\right)^2\le k\sum_{i=1}^k(\sin^2 a_i+\cos^2 a_i)=k^2,$

with equality only if $a_1=a_2=\ldots =a_k.\,$ Thus, finally,

$\displaystyle\sum_{k=1}^n\left[\left(\sum_{i=1}^k\sin a_i\right)\left(\sum_{i=1}^k\cos a_i\right)\right]\le\frac{1}{2}\sum_{k=1}^nk^2=\frac{n(n+1)(2n+1)}{12},$

with equality only if $a_1=a_2=\ldots =a_n=\displaystyle\frac{\pi}{2}.\,$ Thus, finally,

### Solution 3

Note that functions $\sin x\,$ and $\cos x\,$ are concave on $\left[0,\frac{\pi}{2}\right],\,$ implying, by Jensen's inequality,

\displaystyle\begin{align} \sum_{k=1}^n\left[\left(\sum_{i=1}^k\sin a_i\right)\left(\sum_{i=1}^k\cos a_i\right)\right]&\le \sum_{k=1}^n\left[k^2\sin\frac{\displaystyle\sum_{i=1}^ka_i}{k}\cos\frac{\displaystyle\sum_{i=1}^ka_i}{k}\right]\\ &=\sum_{k=1}^n\left[\frac{k^2}{2}\sin\frac{\displaystyle 2\sum_{i=1}^ka_i}{k}\right]\\ &\le\sum_{k=1}^n\frac{k^2}{2}\\ &=\frac{n(n+1_(2n+)}{12}. \end{align}

Equality if $a_1=a_2=\ldots =a_n=\displaystyle\frac{\pi}{2}.\,$

### Solution 4

\displaystyle\begin{align} \left(\sum_{i=1}^k\sin a_i\right)\left(\sum_{i=1}^k\cos a_i\right)&=\sum_{i=1}^k\sin a_i\cos a_i+\sum_{i\lt j}\sin (a_i+a_j)\\ &=\frac{1}{2}\sum_{i=1}^k\sin 2a_i+ \sum_{i\lt j}\sin (a_i+a_j)\\ &\le\frac{1}{2}\sum_{i=1}^k1+\sum_{i\lt j}1\\ &=\frac{k}{2}+\frac{k(k-1)}{2}\\ &=\frac{k^2}{2}. \end{align}

It follows that

$\displaystyle\sum_{k=1}^n\left[\left(\sum_{i=1}^k\sin a_i\right)\left(\sum_{i=1}^k\cos a_i\right)\right]\le\sum_{k=1}^n\frac{k^2}{2}=\frac{n(n+1)(2n+1)}{12}.$

Equality holds iff $a_i=z_i\pi+\displaystyle\frac{\pi}{4},\,$ $z_i\in\mathbb{Z}_i\,$ and $z_i+z_j=2z,\,$ $z\in\mathbb{Z},\,$ $i\ne j.$

### Acknowledgment

The problem above has been posted on the CutTheKnotMath facebook page by Dorin Marghidanu and commented on with Solution 1 by Leo Giugiuc. Solution 2 is by Dorin Marghidanu; Solution 3 is by Richdad Phuc; Solution 4 is by Lampros Katsapas.