Dear friends,

while working on some computations, I figured out that my arguments supply a proof for

the arithmetic and geometric mean inequality by using calculus. I wanted to share here.

Assertion. For all $\displaystyle x,y\geq0$ show that $\displaystyle \dfrac{x+y}{2}\geq\sqrt{xy}$ with equality if and only if $\displaystyle x=y$.

Proof. The case $\displaystyle xy=0$ is trivial.

Let $\displaystyle x,y>0$ and define

$\displaystyle f(x,y):=\dfrac{x+y}{2}-\sqrt{xy}$.

We shall prove that for all $\displaystyle x,y>0$, $\displaystyle f(x,y)\geq0$ with equality if and only if $\displaystyle x=y$.

In this case, we may find $\displaystyle \lambda>0$ such that $\displaystyle y=\lambda x$ (in particular, $\displaystyle \lambda:=y/x$), which yields

$\displaystyle f(x,\lambda x)=g(\lambda)x$, where $\displaystyle g(\lambda):=\dfrac{\lambda+1}{2}-\sqrt{\lambda}$ for $\displaystyle \lambda>0$.

As $\displaystyle x>0$, we have to show that for all $\displaystyle \lambda>0$, $\displaystyle g(\lambda)\geq0$ with equality if and only if $\displaystyle \lambda=1$.

We can compute that

$\displaystyle g^{\prime}(\lambda)=\dfrac{1}{2}\bigg(1-\dfrac{1}{\sqrt{\lambda}}\bigg)$ and $\displaystyle g^{\prime\prime}(\lambda)=\dfrac{1}{4\sqrt{\lambda ^{3}}}>0$ for all $\displaystyle \lambda>0$.

The function $\displaystyle g$ is therefore convex and this shows that $\displaystyle g(1)=0$ is the global minimum value

since $\displaystyle g^{\prime}(1)=0$. Finally, for all $\displaystyle \lambda>0$, $\displaystyle g(\lambda)\geq g(1)=0$ with equality if and only if $\displaystyle \lambda=1$. $\displaystyle \rule{0.2cm}{0.2cm}$