TITLE: Verifying the inequality $\sum_{i=1}^n \frac{\cos y_i}{\sin x_i}≤ \sum_{i=1}^n\cot x_i $
QUESTION [12 upvotes]: Let $\sum_{i=1}^n x_i=\sum_{i=1}^ny_i= \pi$ , where $n>1$ and $x_i >0 , y_i>0 , \forall i=1,2,..,n$. How can we prove that $$\sum_{i=1}^n \frac{\cos y_i}{\sin x_i}≤ \sum_{i=1}^n\cot x_i $$ ?

REPLY [3 votes]: It turns out that if we're going to use Lagrangian multipliers it's best to keep it utterly simple. 

Let $f(y_1,...,y_n,\lambda)=\sum_{i=1}^n \frac{\cos y_i}{\sin x_i} - \lambda(( \sum_{i=1}^n y_i) -\pi)$. $\sum_{i=1}^n \frac{\cos y_i}{\sin x_i}$ extremised when $\nabla f = 0$.

$\frac {\partial f}{\partial y_i}=0 <=> -\frac {\sin y_i}{\sin x_i}-\lambda=0 <=> \sin y_i=-\lambda \sin x_i$ $\forall i$.

Using the fact that $\sum_{i=1}^n y_i= \sum_{i=1}^n x_i= \pi$, we obtain $\lambda=-1$, and $y_i=x_i$ as the extremum. We can quickly check this is a maximum,  so the inequality holds with equality iff $y_i = x_i$ $\forall i$.