Local minimum of $f(x) = 4x + \frac{9\pi^2}{x} + \sin x$ What's the minimum value of the function
$$f(x) = 4x + \frac{9\pi^2}{x} + \sin x$$
for $0 < x < +\infty$? The answer should be $12\pi - 1$, but I get stuck with the expression involving both $\cos x$ and $x^2$ in the derivative. Taking the derivative, we have:
$$f'(x) = 4 - \frac{9\pi^2}{x^2} + \cos x.$$
In order to find the local extrema of the function, we set $f'(x) = 0$. Therefore,
\begin{align}
4 - \frac{9\pi^2}{x^2} + \cos x &= 0 \\
4x^2 - 9\pi^2 + x^2 \cos x &= 0 \\
x^2 (4 + \cos x) &= 9\pi^2.
\end{align}
However, I'm not sure what to do from here or if, indeed, I'm doing it right at all. Any help would be appreciated.
 A: By AM-GM, $4x + \dfrac{9\pi^2}{x} \ge 2\sqrt{4x \cdot \dfrac{9\pi^2}{x}} = 12\pi$, with equality iff $4x = \dfrac{9\pi^2}{x}$, i.e. $x = \dfrac{3\pi}{2}$. 
Also, $\sin x \ge -1$, with equality iff $x = \dfrac{3\pi}{2} + 2\pi k$ for some integer $k$. 
Therefore, $f(x) = 4x + \dfrac{9\pi^2}{x} + \sin x \ge 12\pi - 1$ with equality iff $x = \dfrac{3\pi}{2}$. 
Note: This solution does use the fact that the domain is $x > 0$, as stated in the question. 
A: Important fact: the minimum of the function is NOT the same as where $f'(x) = 0$. The latter is a local minimum - a point that it is minimal compared to it's local points, but taking as a simple example the function $f(x) = x^3$ on $[-1,1]$ the function is minimised at $-1$ despite this not being a turning point.
Despite this, in your example the local minimum happens to also be the global minimum. To solve the equation $x^2(4 + \cos(x ))= 9\pi^2$, the simplest way is to spot that $x = \frac{3\pi}{2}$ is a solution.  As far as I'm aware, this kind of equation is not normally soluble by standard non-numerical methods, but the logic behind the guess is that if $\cos(x) = 0$, we're left with the equation $4x^2 = 9\pi^2$, and the solution to this gives $\cos(x) = 0$.
A: Let's try breaking the equation into two parts; I'll explain below.
So we have $\displaystyle f'(x)= \underbrace{4-\frac{9\pi^2}{x^2}}_{0}+\underbrace{\cos x}_{0}=0$. Note the underbraces; I set the terms equal to $0$ (so we can have $0+0=0$):
$$4-\frac{9\pi^2}{x^2}=0 \text{ and } \cos x =0$$
From $\displaystyle4-\frac{9\pi^2}{x^2}=0$, we can algebraically solve it and get $\displaystyle x=\pm\frac{3\pi}{2}$. Also, $\displaystyle \cos \left( \pm\frac{3\pi}{2} \right)=0$.
Putting it altogether, at $\displaystyle x=\pm\frac{3\pi}{2}$,
$$\left( 4-\frac{9\pi^2}{x^2} \right)+(\cos x)=0+0=0$$
which verifies. 
(This isn't the best way to solve it, but it's a lot like trying to solve $x+\sin x = 0$. You can't solve it analytically, but we can easily guess $x=0$ is the solution because $0+\sin 0 = 0+0=0$.)
Back to your problem. If we have $\displaystyle x=\pm\frac{3\pi}{2}$, well we can drop the negative value and just have $\displaystyle x=\frac{3\pi}{2}$. Why? Well the domain stated in your problem, $0 < x < \infty$, allows only positive real numbers.
Now you can plug in $\displaystyle \frac{3\pi}{2}$ into your $f(x)$. You will get $f\left( \frac{3\pi}{2} \right)=12\pi - 1$ as your answer.
A: If I may interfer in the discussion, the first derivative being $$f'(x) = 4 - \frac{9\pi^2}{x^2} + \cos x$$ you find the minimum for $x=\frac{3\pi}{2}$ just because, for this specific value, the cosine is zero. I can bet that the problem was set with this in mind.
But, let us change slightly your function to $$f(x) = 4x + \frac{8\pi^2}{x} + \sin x$$ Now, $$f'(x) = 4 - \frac{8\pi^2}{x^2} + \cos x$$ and the problem becomes quite different and you cannot solve anymore $f'(x)=0$ using elementary methods. Instead numerical methods should be used and Newton is probably the simplest root-finder for the solution of non linear equation. Starting from a "reasonable" guess $x_0$, Newton updates are given by $$x_{n+1}=x_n-\frac{f'(x_n)}{f''(x_n)}$$ So, in the case of the modified problem, using $x_0=\frac{3\pi}{2}\simeq 4.71239$, the successive iterates will be $4.53525$, $4.54083$, $4.54084$ which is the solution of $f'(x)=0$ for six significant figures.
