I was given the task show that $f(x):= x^2e^{\sin(x)}$ defined on $[-\frac{\pi}{2},\frac{\pi}{2}]$ has three extrema.
I also have to determine of which kind they are (minimum/ maximum).
I plotted the graph of $f$ and this confused me since according to the graph, $f$ has just $2$ extrema for $x \in[-\frac{\pi}{2},\frac{\pi}{2}]$.

Compute $f(\pi/2)$ and $f(- \pi/2)$.
Show that for $x \in [- \pi/2, \pi/2]$ we have $f'(x)=0 \iff x=0.$
Show that for $x \in [- \pi/2, \pi/2]$ we have $f'(x)<0 \iff x=[ - \pi/2,0)$
Show that for $x \in [- \pi/2, \pi/2]$ we have $f'(x)>0 \iff x=(0, \pi/2]$.
The consequences are: $f$ has local extrema exactly for $- \pi/2,0$ and $ \pi/2.$