# How do you differentiate f(x)=(1-xe^x)/(x+e^x)?

Dec 17, 2016

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

#### Explanation:

This is a problem that is using the quotient rule
the formula for this that you have to remember is:
$\frac{{u}^{'} v - u {v}^{'}}{v} ^ 2$

The first things that you have to do is determining the derivatives of each of the functions that you have.

$u = 1 - x {e}^{x} \to {u}^{'} = {e}^{x} + x {e}^{x}$ (remembering that you have to do the product rule in the process ${u}^{'} v + u {v}^{'}$ and that the derivative of a constant = 0)
$v = x + {e}^{x} \to {v}^{'} = 1 + {e}^{x}$

Then you can now just plug all of your u and v and their derivatives in their proper spot and you got your answer:

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

Usually on exams or tests, they will not ask you not to simplify but if you do need to simplify, factor the ${e}^{x}$ on the top side. And remember when simplifying, never do anything to the bottom