# $HM-GM-AM$ inequality using Lagrange multipliers

I am interested in proving the $HM-GM-AM$ inequality using Lagrange multipliers.

The statement is:

Let $x_1,\dots,x_n$ be some positive real numbers. Prove: $$\frac{n}{\frac{1}{x_1}+\cdots+\frac{1}{x_1}}\leq \sqrt[n]{x_1\cdots x_n}\leq\frac{x_1+\cdots+x_n}{n}$$

I managed to prove the second inequality using the function $f(x)=x_1\cdots x_n$ and the constraint $x_1+\dots+x_n=1$. But I couldn't do the first one using this method. Can someone give a hint or a reference for it?

• If you replace $\frac1{x_i}$ with $y_i$ and invert both sides, the HM-GM inequality is equivalent to GM-AM. maybe this helps you – supinf Jul 3 '17 at 14:22

The first inequality it's just the second after substitution $\frac{1}{x_i}\rightarrow x_i$.

We'll prove the second inequality.

Let $\prod\limits_{i=1}^nx_i=1$.

Thus, we need to prove that $$\sum_{i=1}^nx_i\geq n.$$ Now, let $$f(x_1,...,x_n,\lambda)=\sum_{i=1}^nx_i-n+\lambda\left(\prod_{i=1}^nx_i-1\right).$$

Thus, $$\frac{\partial f}{\partial x_i}=1+\lambda\prod_{k\neq i}^nx_k=0,$$ which gives $x_i+\lambda=0$ for all $i$, which says $x_i=x_j$ for all $i$ and $j$.

Thus, $(1,1,...,1)$ is a critical point and we have no another critical points.

Now, it's obvious that it can not be a maximum point.

In another hand $$\{(x_1,x_2,...,x_n,\lambda)|x_i\geq0\}$$ is compact and $f$ is a continuous function.

Thus, $f$ gets on this compact a minimal value and we are done because the case $x_i=0$ is trivial.

As several others have pointed out, the first inequality can be proved using the second one. Here's a proof of the second inequality without Lagrange-multipliers (just in case you're also interested in that):

First take logs of both sides. This is possible because all $x_i$ are positive. You get the equivalent expression: $$\frac{1}{n}\sum_{i=1}^n \log x_i \leq \log\left(\frac{1}{n}\sum_{i=1}^n x_i\right).$$

By Jensen's inequality, that statement is true because $\log$ is a concave function. So the second inequality holds.