Answer
$$
f(x)=x+e^{-3 x} ; \quad\quad[-1,3]
$$
The critical number in the given interval is: $\frac{1}{3} \ln (3)$.
The absolute maximum, $19.08553$ occurs when $x=-1 $ and the absolute minimum, $ 0.69953 $ occurs when $x=\frac{1}{3} \ln (3).$
Work Step by Step
$$
f(x)=x+e^{-3 x} ; \quad\quad[-1,3]
$$
First look for critical numbers in the interval $(-1,3)$.
find the points where the derivative is $0$
$$
\begin{aligned}
f^{\prime}(x) &=(1)+(-3)e^{-3 x} \\
&=1-3e^{-3 x}
\end{aligned}
$$
Solve the equation $f^{\prime}(x)=0 $ to get
$$
\begin{aligned}
f^{\prime}(x)& =1-3e^{-3 x}=0\\
\Rightarrow\quad\quad\quad\quad\quad\\
& -3e^{-3 x}=-1\\
\Rightarrow\quad\quad\quad\quad\quad\\
& e^{-3 x}=\frac{-1}{-3}\\
\Rightarrow\quad\quad\quad\quad\quad\\
& -3 x =\ln (\frac{1}{3})\\
\Rightarrow\quad\quad\quad\quad\quad\\
& x =\frac{1}{-3}\ln (\frac{1}{3})\\
& =\frac{1}{-3}\ln (3^{-1})\\
& =\frac{1}{-3} (-1)\ln (3)\\
& =\frac{1}{3} \ln (3)\\
& \approx 0.36620
\end{aligned}
$$
So, the critical number in the given interval is: $\frac{1}{3} \ln (3)$.
Now, evaluate the function at the critical numbers and the endpoints:
$$
\begin{aligned}
\text{when } x=-1: \\
f(-1) &=(-1)+e^{-3 (-1)} \\
&=-1+e^3 \\
&\approx 19.08553
\end{aligned}
$$
$$
\begin{aligned}
\text{when } x=\frac{1}{3} \ln (3) : \\
f(\frac{1}{3} \ln (3)) &=(\frac{1}{3} \ln (3))+e^{-3 (\frac{1}{3} \ln (3))} \\
&=\frac{1}{3}\ln \left(3\right)+\frac{1}{3}\quad \\
&\approx 0.69953
\end{aligned}
$$
and
$$
\begin{aligned}
\text{when } x=3 : \\
f(3) &=(3)+e^{-3 (3)} \\
&=3+\frac{1}{e^9} \\
&\approx 3.00012
\end{aligned}
$$
We conclude that, the absolute maximum, $19.08553$ occurs when $x=-1 $ and the absolute minimum, $ 0.69953 $ occurs when $x=\frac{1}{3} \ln (3).$