Proof that $f(x)=\frac{(\sin x)^3}{x}$ gets maximum in $(0,\infty)$. I have this problem, and I got stuck in my proof
Prove $f(x)=\dfrac{(\sin x)^3}{x}$ gets maximum in $(0,\infty)$.
My Proof
$$(1)\lim_{x \to 0+} \frac{(\sin x)^3}{x}= 0$$
$$(2)\lim_{x \to \infty} \frac{(\sin x)^3}{x}= 0$$
$f(\frac{\pi}{2})=\frac{1^3}{\pi/2}=\frac{2}{\pi}$
From $(1)$ for $\epsilon=\frac{2}{\pi}>0$, there exists $\delta>0$ so for any $x$ such that $0<|x|<\delta$, it is $|f(x)|<\frac{2}{\pi}$
From $(2)$ for $\epsilon=\frac{2}{\pi}>0$ there exists $N>0$ such that, for any $x>N$, it is $|f(x)|<\frac{2}{\pi}$
So for $0<x<\delta$ the interval assume $x<N$, I could conclude that $[x,N]$ is continuous, and bounded, so from Weierstrass there is maximum in the interval $[x,N]$.
The problem is that I think my proof is not good for all interval $(0,\infty)$ only for $[x,N]$
I don't know how to approach for intervals $(0,x]$ and $[N,\infty)$, since I cannot use Weierstrass on it.
Any help will be appreciated.
 A: You have almost proved that $f(x)$ attains a maximum on $(0,\infty)$. 
Since the limit of $f(x)$ as $x$ approaches $0$ from the right is $0$, there is a $\delta$ such that $|f(x)|\lt 1/10$ if $0\lt x\lt \delta$. Similarly, there is a $B$ such that $|f(x)|\lt 1/10$ if $x\gt B$. Our function attains a maximum in the interval $[\delta,B]$. Since $f(\pi/2)\gt \frac{1}{10}$, this is a maximum on $(0,\infty)$.
Remark: The question could be thought to assert that the maximum is reached at $\frac{\pi}{2}$. The derivative of our function is not $0$ at $\frac{\pi}{2}$, so the maximum is reached elsewhere. We end up solving $3x\cos x-\sin x=0$. We want the root which is a bit below $\frac{\pi}{2}$. The equation can be solved numerically. There is no reason to think the solution is "nice." 
A: Here's a neat trick:
There is a continuous function $g$ on the interval $[0, \infty]$ such that $g(x) = f(x)$ for all $x \in (0, \infty)$.
$g$ is more convenient to analyze, because $[0,\infty]$ is compact.
A: Consider the function
$$
g(x)=
\begin{cases}
0 & \text{if $x=0$} \\[2ex]
\dfrac{\sin^3(\tan x)}{\tan x} & \text{if $0<x<\pi/2$} \\[2ex]
0 & \text{if $x=\pi/2$}
\end{cases}
$$
This function is continuous on $[0,\pi/2]$; its maximum value is positive (because $g(\pi/4)=\sin^3 1>0$, so $g$ assumes positive values) and is the same as the maximum value of $f$.
The idea is of “contracting” the interval $(0,\infty)$ to a “finite” interval.
A: Let $g(x)=f(x)$ if $x>0$ and $g(x)=0$ if $x=0$. 
Now check this out...  $g(x) \leq 1/x$ for every $x$ since $sin^3(x) \leq 1$ for every $x$. 
So if $x \gt \pi/2 => g(x) \leq 1/x \lt 2/\pi=g(\pi/2).$ Now use Weierstrass to find maximum in $[0,\pi/2]$ since $g$ is continuous there.
