Optimization of $f\left(x\right)=x^{2}\sin x^{3}$ 
Let $$f\left(x\right)=x^{2}\sin x^{3}$$
  
  
*
  
*Set of critical points consists of isolated points.
  
*Set of critical points is compact
  
*$f(x)$ attains local extremum at any critical point
  
*$f(x)$ attains maximum at 2 points from the set of its critical points.

$$f'(x)=2x\sin x^{3}+3x^{4}\cos x^{3}=0\Rightarrow\tan x^{3}=-1.5x^{3}$$
Geometrically, we have periodic function and a line, i.e. they intersect infinite number of times. That's why (1) is true and (2) is false.
How do I check (3) and (4)? I could check 2nd order conditions but it's hard (for me) to figure out the roots of $\tan x^{3}=-1.5x^{3}$ explicitly (besides 0).
 A: First,
\begin{eqnarray*}
f(x) &=&x^{2}\sin (x^{3}) \\
f^{\prime }(x) &=&2x\sin \left( x^{3}\right) +3x^{4}\cos \left( x^{3}\right) 
\\
f^{\prime \prime }(x) &=&\left( 2-9x^{6}\right) \sin \left( x^{3}\right)
+18x^{3}\cos \left( x^{3}\right) 
\end{eqnarray*}
Therefore
\begin{equation*}
-6xf^{\prime }(x)+x^{2}f^{\prime \prime }(x)+f(x)(9x^{6}+10)=0.\ (Capital\
identity)
\end{equation*}


*f(x) attains local extremum at any critical point. Indeed, if $x_{\ast }$
is a critical point, then 
\begin{equation*}
f^{\prime }(x_{\ast })=0\Longleftrightarrow x_{\ast }=0\text{ or }%
f(x_{\ast })=x_{\ast }^{2}\sin \left( x_{\ast }^{3}\right) =-\frac{3}{2}%
x_{\ast }^{5}\cos \left( x_{\ast }^{3}\right) 
\end{equation*}
and then
\begin{equation*}
x_{\ast }^{2}f^{\prime \prime }(x_{\ast })=-f(x_{\ast })(9x_{\ast
}^{6}+10).\ \ \ (A)
\end{equation*}
Assume that $x_{\ast }\neq 0.$ To prove that $f(x_{\ast })\neq 0,$ it
suffices to remember that 
\begin{equation*}
\sin ^{2}\left( x_{\ast }^{3}\right) +\cos ^{2}\left( x_{\ast }^{3}\right) =1
\end{equation*}
if $f(x_{\ast })=0$ then $\sin ^{2}(x_{\ast }^{3})=0$ and then $-\frac{3}{2}%
x_{\ast }^{5}\cos \left( x_{\ast }^{3}\right) =0$ which implies that $\cos
^{2}\left( x_{\ast }^{3}\right) =0,$ therefore $\sin ^{2}\left( x_{\ast
}^{3}\right) +\cos ^{2}\left( x_{\ast }^{3}\right) =0+0=0$ which is
impossible. 


Now, we know that $f(x_{\ast })\neq 0,$ it follows from that (A) that $%
f^{\prime \prime }(x_{\ast })\neq 0$ which is enough to prove that $f$
attains a local extremum at $x_{\ast }.$
Now, for $x=0.$ At this point $f$ do not attains an extremum even if $x=0$
is one of its critical point. Proof. Note that $f$ is an odd function and is
positive for $x>0$ and small and $f(x)<0$ for $x<0$ small. QED.


*$f(x)$ attains maximum at $2$ points from the set of its critical points.
I am sorry to tell you that this not true. In fact, there are infinitely
many maximums and infinitely many minimums. You can draw its plot in wolfram to
be convinced. 


EDIT. Recall that if $f^{\prime }(x_{\ast })=0$ and $f^{\prime \prime }(x_{\ast
})>0,$ then $f$ attains a minimum at $x_{\ast }$ and 
if $f^{\prime }(x_{\ast })=0$ and $f^{\prime \prime }(x_{\ast })<0,$ then $f$
attains a maximum at $x_{\ast }.$
