Real Analysis – Proving the AM-GM Inequality with Lagrange Multipliers

a.m.-g.m.-inequalityinequalitylagrange multiplierreal-analysis

Exercise: Let $x_1,x_2,…,x_n$ be real positive numbers. Prove the arithmetic-geometric mean inequality, $(x_1x_2…x_n)^{1/n}\le (x_1+x_2+…+x_n)/n$.

Hint: Consider the function $f(x_1,x_2,…,x_n)=(x_1+x_2+…+x_n)/n$ subject to the constraint $x_1x_2…x_n=c$ a constant.

My work:

Consider $f(x_1,x_2,…x_n)=(x_1+x_2+…+x_n)/n$ on $S=\{(x_1,x_2,…,x_n) | x_1x_2…x_n=c\}$

$g(x_1,x_2,…,x_n)=x_1x_2…x_n-c=0$

$\nabla f(x_1,x_2,…,x_n)=(1/n,1/n…,1/n)$

$\nabla g(x_1,x_2,…,x_n)=(c/x_1,c/x_2,…c/x_n)$

$\nabla f = \lambda \nabla g$

$1/(n\lambda)=c/x_1=c/x_2=…=c/x_n$

$x_1=x_2=…=x_n=n\lambda c$

At the point $(n\lambda c, n\lambda c,… n\lambda c)$, $f$ on $S$ takes either a maximum or a minimum.

$f(n\lambda c, n\lambda c,…,n\lambda c)=n(n\lambda c)/n=n\lambda c$

$(n\lambda c*n\lambda c*…*n\lambda c)^{1/n}=((n\lambda c)^n)^{1/n}=n\lambda c = f(n\lambda c, n\lambda c,…,n\lambda c)$

This shows the equality case. To prove the inequality, I want to show that at the point $(n\lambda c,n\lambda c,…,n\lambda c)$, $f$ on $S$ takes a maximum minimum. I tried proving that the Hessian is negative positive definite, but I had trouble working with the second derivatives. I've looked up various proofs for the AM-GM inequality. The Lagrange ones didn't make full sense to me, so I thought I would turn to MSE. Any ideas? Thanks!

Best Answer

Note: It is more convenient for the calculations to assume (without loss of generality) that $c=1$.

The Hessian matrix of $f$ is equal to $$\left(\frac{d^2f(x)}{dx_idx_j}\right)_{i,j=1,\ldots n}=\mathbf{0}_{n\times n}$$ and thus positive semidefinite (the zero matrix). For example $$\frac{d^2f(x)}{dx_2dx_1}=\frac{d}{dx_2}\left(\frac{df(x)}{dx_1}\right)=\frac{d}{dx_2}\left(\frac{d}{dx_1}\left(x_1+x_2+\ldots+x_n\right)\frac{1}{n}\right)=\frac{d}{dx_2}\left(\frac{1}{n}\right)=0$$ Note that this is also immediate since $f$ is linear in $x_i$ and thus convex. However a linear function is also concave, which means that the Hessian matrix is also negative semidefinite. Combining the two you get that the Hessian matrix is the zero matrix. So this is not the way to prove that $f$ has a minimum in that point.

Since you know that at the point $x^*:=(n\lambda c,\ldots,n\lambda c)$ the value of $f$ is equal to $$f(x^*)=n\lambda c$$ and that at that point $f$ has either a maximum or a minimum, it is easier to find a point in $S$ that has a greater value, thus proving that $f$ has in $x^*$ a minimum. Firstly, determine that $$\lambda=\frac{c^{\frac{1}{n}-1}}{n}$$ so that in the proposed solution $x_i=c^{\frac{1}{n}}$ and $f\left(c^{\frac{1}{n}},\ldots,c^{\frac{1}{n}}\right)=\frac{nc^{\frac{1}{n}}}{n}=c^{\frac{1}{n}}.$ For $c=1$ you have that $x^*=(1,1,\ldots,1)$ and $f(x^*)=1.$ Now the admissible solution $$(x_1,x_2,\ldots,x_n)=\left(2,\frac{1}{2},1,\ldots,1\right)$$ yields a larger value for $f$, which is equal to $$f\left(2,\frac{1}{2},1,\ldots,1\right)=\frac{2+\frac{1}{2}+n-2}{n}=1+\frac{1}{2n}>1$$ implying that in the point $x^8$ the function $f$ has a minimum as desired.

Related Question