# Homework Help: Derivatives, chain rule 2

1. Nov 9, 2013

### physics604

1. The problem statement, all variables and given/known data

Find the derivative of y=xe-kx

2. Relevant equations

Chain rule

3. The attempt at a solution

y = xeu

$\frac{dy}{du}$ = xeu+eu

u = -kx

$\frac{du}{dx}$ = -k

$\frac{dy}{dx}$ = (xe-kx+e-kx)(-k)

= e-kx(x+1)(-k)

= e-kx(-kx-k)

The answer is e-kx(-kx+1). What did I do wrong?

2. Nov 9, 2013

### LCKurtz

There is a subtle error here. The problem is that if $u=-kx$ then $x=-\frac u k$ and you have to include $\frac{dx}{du} = -\frac 1 k$ in your second term. But it's best to avoid this error completely by noting that you have a product and should use the product rule before the chain rule. Try$$\frac d {dx} xe^u = e^u\frac d {dx} x + x \frac d {dx}e^u$$ and use your method on that last term.

3. Nov 9, 2013

### physics604

I'm sorry, but I don't get what you mean.

$\frac{d}{dx}$ xeu = eu$\frac{d}{dx}$x+x$\frac{d}{dx}$eu

is still equal to eu + xeu.

4. Nov 9, 2013

### physics604

Okay, I get it. Thanks!

5. Nov 9, 2013

### LCKurtz

No it isn't. By your own steps in your original post you showed$$\frac d {dx} e^u = -ke^{-kx}$$and if you put that in you get the correct answer.

6. Nov 9, 2013

### physics604

I get it now. Thanks!

7. Nov 9, 2013