TITLE: Question about using AGM inequality to minimize a function
QUESTION [7 upvotes]: I am being asked to minimize the following function using the AGM inequality:
$$y = 5x + \frac{4}{x} + 9, \text{ where } x > 0.$$
To do this, I used the AGM inequality to show that 
$$\frac{y}{3} = \frac{5x + 4/x + 9}{3} \ge \left( 5x \cdot \frac{4}{x} \cdot 9\right)^{1/3} = 180^{1/3},$$
and so $y \ge 3 \cdot 180^{1/3} \approx 16.9386$. However, this is not the correct answer. Instead, you can use the AGM inequality to show that 
$$\frac{5x + 4/x}{2} \ge \sqrt{5x \cdot 4/x} = \sqrt{20},$$
which means $5x + 4/x \ge 2 \sqrt{20}$. It follows that $y = 5x + 4/x + 9 \ge 9 + 2 \sqrt{20} \approx 17.9443$.
My question is, what is wrong with my original method? I can't see my mistake.

REPLY [5 votes]: In the first application of the AM-GM inequality, recall that equality is attained when all the AM-GM terms are equal. However, it is not possible for all of $5x, \frac 4x$ and $9$ to be equal for any $x$, since the first two being equal makes them both equal to $\sqrt{20} \neq 9$ after multiplication.
It follows that the AM-GM you applied gives a bound, but not the best one. Why? Because if equality is never attained, then the bound obtained can be improved, right?
The second method, on the other hand, is correct because in that case you are applying AM-GM keeping in mind that for some $x$ the equality is attained. That would of course be at $x = \sqrt{\frac 45}$ where $\frac 4x = 5x$. So the bound there, has to be the best, simply because AM-GM itself gives a value of $x$ for which the function gives that value.
The $9$ does not need to be factored into the AM-GM : it is a constant, so if you are finding the maximum it just comes along as an addend. In maximization, remember that constants, whether added or multiplied with the whole expression, can be taken out.