find the first and second derivative of:

f(x) = (x+2)/e^x

I get to:

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

I'm stuck at that

I think the quotient rule gets bogged down here. Use the product rule with a negative exponent:

y = (x+2)e-x

y' = e-x - (x+2)e-x
= -(x+1)e-x

y'' = -e-x + (x+1)e-x
= xe-x

However, using your quotient rule, factor out the ex top and bottom:

ex(1 - (x+2))/e2x
= -(x+1)/ex

Do it again, and you wind up where I did.

Tnx for the quick answer, but I still have a question:

why is it - in y' = e^-x (-) (x+2)e^-x
instead of a + ?

and how do you get (x+1)?

oh I get it now, tnx!

To find the first derivative of the function f(x) = (x+2)/e^x, you correctly recognized that you need to use the quotient rule. However, there seems to be a small mistake in the calculation. Let's go through the steps together.

Using the quotient rule, you start by finding the derivatives of the numerator and denominator separately. Let's denote the numerator as g(x) = (x+2) and the denominator as h(x) = e^x.

1. Derivative of the numerator, g'(x):
Since the numerator is a linear function, g'(x) is simply the coefficient of x, which is 1.

g'(x) = 1

2. Derivative of the denominator, h'(x):
The derivative of e^x is itself.

h'(x) = e^x

Now, applying the quotient rule, you can find the derivative of f(x):

f'(x) = (h(x) * g'(x) - g(x) * h'(x)) / (h(x))^2

Substituting the values we calculated earlier:

f'(x) = (e^x * 1 - (x+2) * e^x) / (e^x)^2

Simplifying the expression:

f'(x) = (e^x - e^x * (x+2)) / e^(2x)
= (e^x - e^x * x - 2 * e^x) / e^(2x)
= e^x * (1 - x - 2) / e^(2x)
= (e^x * (1 - x - 2)) / e^(2x)
= (e^x * (-x - 1)) / e^(2x)
= (-x - 1) / e^x

So, the first derivative of f(x) = (x+2)/e^x is f'(x) = (-x - 1) / e^x.

To find the second derivative, you can differentiate f'(x) with respect to x using the quotient rule or by simplifying the expression further.