<s>[INST] prove using Lagrange multipliers that for $x,y>0,\space n\in \mathbb N,\space (\frac{x+y}2)^n \leq \frac{x^n+y^n}2 $ I have been asked to prove using Lagrange multipliers that for 
\begin{equation*}
\space (\frac{x+y}2)^n \leq \frac{x^n+y^n}2,~x,y>0,~n\in \mathbb {N}  
\end{equation*}
I am familiar with the proof by induction, but I can't think of a way to prove it using Lagrange multipliers. I tried working with the function 
\begin{equation*}
f(x,y)=\frac{x^n+y^n}2-(\frac{x+y}2)^n 
\end{equation*}
but couldn't figure how to constrain it to $\{(x,y):x,y>0\}$. Maybe the constrain should be $g(x,y)=\sqrt x +\sqrt y -r$ for a given $r>0$ and then prove it for all $r$?
 [/INST] Let $a=\frac{x}{x+y},b=\frac{y}{x+y}$. The inequality 
$$(\frac{x+y}2)^n \leq \frac{x^n+y^n}2$$
is equivalent to
$$\frac{a^n+b^n}2\ge\frac{1}{2^n} $$
for $a,b>0$ and $a+b=1$. Let
$$ f(a,b,\lambda)=\frac{a^n+b^n}2-\lambda[(\frac{a+b}2)^n-1]. $$
Then solving
$$ \frac{\partial f}{\partial a}=\frac n2a^{n-1}-\frac{\lambda n}{2^n}(a+b)^{n-1}=0,\frac{\partial f}{\partial b}=\frac n2b^{n-1}-\frac{\lambda n}{2^n}(a+b)^{n-1}=0,a+b=1$$
gives
$$ a=b=\frac12,\lambda=1. $$
Thus $\frac{a^n+b^n}2$ reaches the minimum $\frac{1}{2^n}$ when $a=b=\frac12$ or
$$ \frac{a^n+b^n}2\ge \frac{1}{2^n}. $$
So
$$ \frac{x^n+y^n}2\ge (\frac{x+y}{2})^n. $$
</s>