How do you determine the maximum and minimum value of the function #f(x)=-xe^x + 2#?