I'm trying to find the value of the integral $\int_{-4}^{-2}e^{-x}\,dx$ but I just couldn't solve it.
Actually I found in a List of integrals that $\int e^x\,dx=e^x+C$ so I concluded:
$$ \int e^{-x}\,dx=\int\frac{1}{e^x}\,dx=\ln|e^x|$$
$$\int\limits_{-4}^{-2}e^{-x}\,dx=\left(\ln|e^{-2}|\right)-\left(\ln|e^{-4}|\right)=-2+4=2$$
I know the solution is wrong, but how can I solve this integral or any another integral like this?
$$ \int_{-4}^{-2} e^{-x} dx = \left . \left ( -e^{-x}\right ) \right |_{-4}^{-2} = -e^2+e^4 = e^2 \left ( e^2-1\right ) $$