How does this prove AM-GM? Here is an extract from A less than B. The author claims to imply the AM-GM inequality with this reasoning, but I can't see how. So far the author has covered AM-GM, convexity, the smoothing principle and Jensen's inequality.
"Theorem 4: Let $f$ be a twice-differentiable function on an open interval $I$. Then $f$ is convex on $I$ if and only if $f''(x)\ge 0$ for all $ x \in I$.
For example, the AM-GM inequality can be proved by noting that $f(x)=\log(x)$ is concave; its first derivative is $1/x$ and its second $-1/x^2$. In fact, one immediately deduces a weighted AM-GM inequality..."
I understand the theorem, but not at all how it applies to AM-GM. Any enlightenment would be much appreciated!
 A: Well, by concavity, suppose that $(x_1,\dotso,x_n)$ are positive real numbers and notice that it is essential to consider something like $\log(x_i)$ for any $i\in\{1,\dotso,n\}$. Moreover let $(w_q,\dotso,w_n)$ be your family of weights, i.e. $$\sum_{i=1}^nw_i=1.$$ Then use the fact that the logarithm is concave to write 

$$\log\left(w_1x_1+\dotso+w_nx_n\right)\geq w_1\log(x_1)+\dotso+w_n\log(x_n).\tag{1}$$ 

Now apply $\exp$, which is increasing on $\mathbb R$, to both sides of $(1)$. It follows

$$w_1x_1+\dotso+w_nx_n\geq x_1^{w_1}\cdot\dotso\cdot x_n^{w_n},$$

which is the weighted AM-GM. 
Hope this is clear. Cheers
A: Since $f(x) = \log(x)$ is concave, we have:
$$
\frac{1}{n}\log x_1 + \cdots + \frac{1}{n}\log x_n \le \log\left(\frac{1}{n} x_1 + \cdots + \frac{1}{n} x_n\right)
$$
Hence:
$$
\log\left(x_1 \cdots x_n \right)^{1/n} \le \log\left(\frac{x_1 + \cdots + x_n}{n}\right)
$$
And since $f(x) = \log(x)$ is a monotonically increasing function, we conclude:
$$
\left(x_1 \cdots x_n \right)^{1/n} \le \frac{x_1 + \cdots + x_n}{n}
$$
A: Notice that $\ln{x}$ is defined only for $x>0$, which means that its second-order derivative is always negative, which means the function is concave. 
Let $f(x)=-\ln{x}$. We know that $f$ is convex. Thus, writing the Jensen's inequality for $f$ with the weights $t_{i}=\frac{1}{n}$ ($i=1,2,...,n$), we get:
$$-\ln\left(\frac{x_{1}+x_{2}+...+x_{n}}{n}\right)\leq\frac{1}{n}\sum^{n}_{i=1}(-\ln{x_{i}})=-\ln\sqrt[n]{x_{1}x_{2}\cdot...\cdot x_{n}}$$
now, since we know that $\ln$ is monotonic, we get:
$$\frac{x_{1}+x_{2}+...+x_{n}}{n}\geq\sqrt[n]{x_{1}x_{2}\cdot...\cdot x_{n}}.$$
