Determine the maximum and minimum value of the function f(x)=-xe^x + 2.

Forget the calculus, sketch a graph.

-10 2.0005

-3 2.14
-2 2.27
-1 2.4 maximum
-0.5 2.3
0 2
1 -.72
2 -12.8
10 -220,263 minimum as x -->oo

derivative
y' = -[ xe^x + e^x]
= -e^x [x+1]
so max or min at x = -1
second derivative
y" = - [e^x(1)+(x+1)e^x]
= -e^x [ x+2 ]
if x = -1
then = -(1/e)(1)
negative so maximum

To determine the maximum and minimum values of a function, we need to find the critical points where the derivative of the function is zero or does not exist.

Let's start by finding the derivative of the function f(x):

f'(x) = (-x)(e^x) + (-1)(e^x) = -e^x(x+1)

To find the critical points, we set the derivative equal to zero and solve for x:

-e^x(x+1) = 0

The two factors, -e^x = 0 and (x+1) = 0, represent two possibilities for critical points.

1. -e^x = 0:
Since e^x is always positive, there are no solutions for -e^x = 0.

2. (x+1) = 0:
Solving for x, we get x = -1.

Now, we have a critical point at x = -1. It's time to determine whether it's a maximum or minimum point.

To do this, we use the second derivative test. Take the second derivative of f(x):

f''(x) = -e^x(x+2)

Evaluate f''(x) at x = -1:

f''(-1) = -e^(-1)(-1+2) = e^(-1)

Since the value of e^(-1) is positive, this means the second derivative is positive at x = -1.

According to the second derivative test:
- If the second derivative is positive, the critical point is a local minimum.
- If the second derivative is negative, the critical point is a local maximum.

Since the second derivative is positive at x = -1, the critical point x = -1 corresponds to a local minimum.

Now, we know that there is a local minimum at x = -1, but we still need to find the maximum value of the function.

To determine if there is an overall maximum or minimum for the function, we need to consider the behavior of the function as x approaches positive or negative infinity.

As x approaches negative infinity, the term -xe^x dominates the function f(x) since e^x becomes very large. Therefore, f(x) approaches negative infinity.

As x approaches positive infinity, the exponential term e^x becomes much larger than x. So, f(x) approaches negative infinity as well.

Therefore, since there is no maximum value for f(x), the minimum value occurs at x = -1. To find the exact value, substitute x = -1 into the original function:

f(-1) = -(-1)e^(-1) + 2 = e^(-1) + 2.

So, the minimum value of the function f(x) = -xe^x + 2 is e^(-1) + 2, which is approximately 2.72+2 = 4.72.