I want to find the local and global minimizers and maximizers of the following two functions.
1) $f(x)=x^2e^{-x^2}$
2) $f(x)=x+ \sin x $
These are my answers.
1) $f(x)=x^2e^{-x^2}$ $f'(x)=e^{-x^2} 2 x(1-x^2)$ Thus the critical points are $x=0,1,-1$ $f''(x)=e^{-x^2}(2-10x^2+4x^4)$
$f''(0)=2>0$. Thus $x=0$ is a strict local minimizer of $f(x)$. As $f''(1)=f''(-1)=-4e^{-1}<0$, $x=1,x=-1$ are strict local maximizers of f(x). As $f(x) -> 0 $ when $x->+\infty$ and $x->-\infty$ , $x=1,x=-1 $are strict global minimizers.
Also since $e^{-x^2}>0$ and thus $f(x)>=0 ; \forall x \in R$ and $f(x)=0$ when $x=0, x=0 $ is a strict global minimizer.
Is this correct?
For 2)
$f(x)=x+ \sin x$ $f'(x)=1+\cos x$ Thus the critical points are $x*=2n\pi \pm \pi$ $f''(x)=-\sin x$. But f''(x*)=0. So are the critical points inflection points? How can I show that they are inflection points?
Also $f(x) - > +\infty $ when $x->+\infty$ and $f(x) -> -\infty $ when $x->-\infty$.
Therefore I conclude that there are no global maximizers and minimizers and there are no local maximizers and minimizers as well. Is this correct?
Parts 1 and 2 are correct as others have already pointed out.
Now, addressing your specific questions in Part 2:
--Are the critical points in Part 2 inflection points? How can I show they are inflection points?
You´ve shown that $x^*=2n\pi+\pi$, $n\in \Bbb Z$, are critical points, as $f'(x^*)=0$. But notice that, as $f'(x)=1+\cos x\ge 0$, $\forall x\in \Bbb R$, the function $f(x)$ is monotone non-decreasing, so the critical points you've found are indeed inflection points.