# Calc2.46

Find the absolute minimum and maximum on $[-1,5]$ of the function $f(x)=(1-x)e^{x}$.

It is known that the only place an absolute minimum or maximum can occur on an interval is at one of the endpoints of the interval or at a critical point inside the interval. A critical point is a point where the function is defined and its derivative is either 0 or undefined. So start by finding the derivative.

$f'(x)=-e^{x}+(1-x)e^{x}=-xe^{x}\,$

This derivative is defined everywhere so the only possible critical numbers will be where the derivative is equal to 0.

$-xe^{x}=0$ can only be true if $x=0$ or $e^{x}=0$ but $e^{x}$ is always positive so it is never equal to $0$. Thus the only critical point comes when $x=0$. As stated before, the absolute max and min can only occur at an endpoint or at a critical number. So our only choices for $x$ here are $-1$, $0$, or $5$. If these are our only choices, our easiest plan is to just plug in the three values and see which gives the highest value and which gives the lowest value.

$f(-1)={\frac {2}{e}}\,<1$

$f(0)=1\,$

$f(5)=-4e^{5}\,$

Thus, the absolute minimum comes at the point $(5,-4e^{5})$ and the absolute maximum comes at the point $(0,1)$.