# Determine the maximum and minimum value of the function f(x)=-xe^x + 2.I found the derivative, which is f'(x)=-2xe^2x -e^2x. After this, I have no idea what to do.

*print*Print*list*Cite

### 1 Answer

To find the min and max we need to find the first derivative.

`f'(x)=-e^x-xe^x=e^x(-1-x)`

To find the inflection points we solve f'(x)=0, since the exponential function can not be zero, all we have to solve is

-1-x=0 => x=-1

To determine if this is a max or min, we need to find the 2nd derivative.

`f''(x)=-e^x-e^x-xe^x=e^x(-2-x)`

`f''(-1)=e^(-1)(-2+1)=-1/e<0` Hence we are looking at a max.

Let's find its y-coord.

`f(-1)=-(-1)e^(-1)+2=1/e+2`

Thus the max is `(-1,1/e+2)`