Proving the AM-GM inequality for 2 numbers $\sqrt{xy}\le\frac{x+y}2$

I am having trouble with this problem from my latest homework.

Prove the arithmetic-geometric mean inequality. That is, for two positive real numbers $x,y$, we have $$\sqrt{xy}≤ \frac{x+y}{2} .$$ Furthermore, equality occurs if and only if $x = y$.

Any and all help would be appreciated.

-
One way is the following. Let $\sqrt{x} = a$ and $\sqrt{y} = b$. Substitute for $x$ and $y$ in terms of $a$ and $b$. Collect all the terms together on the right side, and factor. Do you recognize a familiar inequality? – Srivatsan Sep 15 '11 at 19:51

Since $x$ and $y$ are positive, we can write them as $x=u^2$, $y=v^2$. Then

$$(u-v)^2 \geq 0 \Rightarrow u^2 + v^2 \geq 2uv$$

which is precisely it.

-

Note that $$\frac{x+y}{2}-\sqrt{xy}=\frac{(\sqrt{x}-\sqrt{y})^2}{2}.$$

-

$$0\le ({\sqrt x}-{\sqrt y})^{2}$$ $$0\le x-2{\sqrt {xy}}+y$$ $$2{\sqrt {xy}}\le x+y$$ $${\sqrt {xy}}\le {x+y\over2}$$

-
That's Bruno's answer. – lhf Mar 9 at 1:38

$\phantom{Proof without words.........}$

-
Picture from math.stackexchange.com/a/922035/589. – lhf Mar 9 at 0:40

I am surprised no one has given the following very straightforward algebraic argument: \begin{align} 0\leq(x-y)^2&\Longleftrightarrow 0\leq x^2-2xy+y^2\tag{expand}\\[0.5em] &\Longleftrightarrow 4xy\leq x^2+2xy+y^2\tag{add $4xy$ to both sides}\\[0.5em] &\Longleftrightarrow xy\leq\left(\frac{x+y}{2}\right)^2\tag{div. sides by 4 & factor}\\[0.5em] &\Longleftrightarrow \sqrt{xy}\leq\frac{x+y}{2}.\tag{since $x,y\in\mathbb{R}^+$} \end{align} In regards to equality, notice that $\sqrt{xy}\leq\frac{x+y}{2}\leftrightarrow 2\sqrt{xy}\leq x+y$, and it becomes clear that equality holds if and only if $x=y$. $\blacksquare$

-