How to prove $2\le\frac{g(x)}{g(y)}+\frac{g(y)}{g(x)}$ using AM-GM? In this question Prove that, if $g(x)$ is concave, for $S = {x : g(x) > 0}$, $f(x) = 1/g(x)$ is convex over $S$. , in the proof of Math536, 

how to prove $2\le\frac{g(x)}{g(y)}+\frac{g(y)}{g(x)}?$

This is the proof of Math536:
$$\begin{align}
1 &= (a+(1-a))^2 \\
&= a^2 + 2a(1-a) + (1-a)^2 \\
&\le a^2 + a(1-a)\left(\frac{g(x)}{g(y)} + \frac{g(y)}{g(x)}\right) + (1-a)^2 \\
&= (ag(x)+(1-a)g(y)) \left(\frac{a}{g(x)} + \frac{1-a}{g(y)}\right) \\
&\le g(ax+(1-a)y) \left(\frac{a}{g(x)} + \frac{1-a}{g(y)}\right) \\
&= \frac{af(x) + (1-a)f(y)}{f(ax+(1-a)y)}
\end{align}$$
He said we should use the AM-GM inequality which is $\forall a_i\in\mathbb R^+: \frac{a_1+...+a_n}{n}\ge (a_1\dots a_n)^{1/n}.$
I tried to find a similarity with the LHS of the AM-GM inequality:
$$g(x)f(y)+f(x)g(y)\ge\sqrt{g(x)g(y)f(x)f(y)}$$
I honestly don't know how will I get the $2$ in the inequality?
Can someone help me please? 

Don't worry about functions.
For any two $x,y$ then $\frac {g(x)}{g(y)} = k$ will be a positive number, and $\frac {g(y)}{g(x)} = \frac 1k$.
So by AM-GM.  $\frac {k + \frac 1k}2 \ge \sqrt {k*\frac 1k}=1$.
And that's it.
....
In fact this basically is the proof of the AM-GM.
$(k - 1)^2 \ge 0$ so
$k^2 + 1 \ge 2k$ so
$k + \frac 1k \ge 2$.
Or in general:
$(\sqrt a - \sqrt b)^2 \ge 0$ so 
$a + b \ge 2\sqrt{ab}$ so 
$\frac {a+b}2 \ge \sqrt{ab}$. 
