# Differentiate y=\ln(e^{-x} + xe^{-x})

1. Jul 29, 2008

### illjazz

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

$$y=\ln(e^{-x} + xe^{-x})$$

2. Relevant equations
- Logarithmic differentiation?

3. The attempt at a solution
Here goes:

$$y=\ln(e^{-x} + xe^{-x})$$

$$y'=\frac{e^{-x} + (x\frac{d}{dx}e^{-x}+e^{-x}\frac{d}{dx}x)}{e^{-x}+xe^{-x}})$$

$$\frac{e^{-x}+xe^{-x}+e^{-x}}{e^{-x}+xe^{-x}}$$

I must be missing something huge here because the book's solution is

$$y'=\frac{-x}{1+x}$$

2. Jul 29, 2008

### illjazz

Ok I looked at this a second time and got a bit further.. I'm still missing the solution though.

$$\frac{e^{-x}+xe^{-x}+e^{-x}}{e^{-x}+xe^{-x}}=\frac{2e^{-x}+xe^{-x}}{e^{-x}+xe^{-x}}$$

$$\frac{\frac{1}{e^{x}}+\frac{x}{e^{x}}+\frac{1}{e^{x}}}{\frac{1}{e^{x}}+\frac{x}{e^{x}}}$$

$$\frac{\frac{2}{e^{x}}+\frac{x}{e^{x}}}{\frac{1}{e^{x}}+\frac{x}{e^{x}}}$$

$$\frac{\frac{2+x}{e^{x}}}{\frac{1+x}{e^{x}}}$$

$$\frac{2+x}{e^{x}}\frac{e^{x}}{1+x}$$

$$\frac{e^{x}(2+x)}{e^{x}(1+x)}$$

$$\frac{2+x}{1+x}$$

?

3. Jul 29, 2008

### rocomath

The derivative of e^x is itself, but you have "e^(-x)" which is not itself.

4. Jul 29, 2008

### moemoney

You should first try simplifying the initial equation (common factoring). You can then use the distributive ln properties to make your work easier.

5. Jul 29, 2008

### illjazz

Oops.. I assumed that if the derivative of e^x is itself, the x stood as a placeholder for, well, pretty much anything, including -x.

So um.. what does e^(-x) come out to be? Ah wait.. just saw it.

If y = e^(-x), then y' = e^(-x)ln(e)

Hmm.. is that correct? This is the rule for differentiating exponential functions. e IS a constant, so it's valid. Right?

6. Jul 29, 2008

### moemoney

y = e^(-x) is then y' = e^(-x) * -1

The reason why you multiply the answer by -1 is that you still have to take the derivative of the exponent. In this case the exponent was -x.

Also you should read my previous post.

Another note you should take into account is that text book answers are always simplified down.

7. Jul 29, 2008

### illjazz

Ok I tried the following:

$$y=\ln(e^{-x}+xe^{-x})$$

$$y'=\ln e^{-x}+\ln(xe^{-x})$$

$$-e^{-x}\ln e+\ln x+\ln e^{-x}$$

$$-e^{-x}+\ln x-e^{-x}\ln e$$

$$-e^{-x}+\ln x-e^{-x}$$

$$-2e^{-x}+\frac{1}{x}$$

$$-2\frac{1}{e^x}+\frac{1}{x}=-\frac{2}{e^x}+\frac{1}{x}$$

But frankly, I don't know if this is correct. I might have not followed proper rules there :/

8. Jul 29, 2008

### rocomath

You misused the Logarithmic property.

$$\ln{ab}=\ln a+\ln b$$

$$\ln{(a+b)}\neq\ln a+\ln b$$

Your first post is more correct than your recent ones. All you have to do is go back to e^(-x) and put a negative in the front.

9. Jul 29, 2008

### illjazz

Got it! Thanks for the tip :)

$$y'=\frac{e^{-x} + (x\frac{d}{dx}e^{-x}+e^{-x}\frac{d}{dx}x)}{e^{-x}+xe^{-x}})$$

$$\frac{-e^{-x}-xe^{-x}+e^{-x}}{e^{-x}+xe^{-x}}$$

$$\frac{e^{-x}(1-1-x)}{e^{-x}+xe^{-x}}$$

$$\frac{e^{-x}(-x)}{e^{-x}(x+1)}$$

$$\frac{-x}{x+1}$$

! :)

10. Sep 16, 2009

### Aniella

Hi, I know this is kind of old, but I came across this same problem in my book - and I don't get how to get from step a to step b - like this:

$$y=\ln(e^{-x} + xe^{-x})$$

$$y'=\frac{e^{-x} + (x\frac{d}{dx}e^{-x}+e^{-x}\frac{d}{dx}x)}{e^{-x}+xe^{-x}})$$

can anyone help? What rules are you using to go from the first one to the second one?
thanks a lot,

Aniella