Answer
$g(x)$ has the absolute maximum value of $1$ at $x=0$ and the absolute minimum value of $e^{-4}$ at $x=-2$.
Work Step by Step
$$g(x)=e^{-x^2}\hspace{1cm}-2\le x\le1$$
1) Find the critical points of $g(x)$
Find $g'(x)$: $$g'(x)=e^{-x^2}(-x^2)'$$ $$g'(x)=-2xe^{-x^2}$$
Since $e^{-x^2}\gt0$ for all $x\in R$, we have $g(x)=0$ when $x=0$. There are no values of $x$ where $g(x)$ is undefined.
So $x=0$ is the critical point of $g(x)$. And since $0\in[-2,1]$, we need to consider it here.
2) Evaluate $g(x)$ at the critical points and endpoints:
- For $x=-2$: $$g(x)=e^{-(-2)^2}=e^{-4}$$
- For $x=0$: $$g(x)=e^{-0^2}=e^0=1$$
- For $x=1$: $$g(x)=e^{-(1^2)}=e^{-1}$$
From the values of $g(x)$ above, we conclude that $g(x)$ has the absolute maximum value of $1$ at $x=0$ and the absolute minimum value of $e^{-4}$ at $x=-2$.