# How do you differentiate f(x) = (e^x-x)/(2-e^x) using the quotient rule?

Nov 3, 2016

$f ' \left(x\right) = \frac{3 {e}^{x} - x {e}^{x} - 2}{2 - {e}^{x}} ^ 2$

#### Explanation:

differentiate using the $\textcolor{b l u e}{\text{quotient rule}}$

$\text{If" f(x)=(g(x))/(h(x))" then}$

$\textcolor{red}{\overline{\underline{| \textcolor{w h i t e}{\frac{2}{2}} \textcolor{b l a c k}{f ' \left(x\right) = \frac{h \left(x\right) g ' \left(x\right) - g \left(x\right) h ' x}{h \left(x\right)} ^ 2} \textcolor{w h i t e}{\frac{2}{2}} |}}}$

here $g \left(x\right) = {e}^{x} - x \Rightarrow g ' \left(x\right) = {e}^{x} - 1$

and $h \left(x\right) = 2 - {e}^{x} \Rightarrow h ' \left(x\right) = - {e}^{x}$

$\Rightarrow f ' \left(x\right) = \frac{\left(2 - {e}^{x}\right) \left({e}^{x} - 1\right) - \left({e}^{x} - x\right) \left(- {e}^{x}\right)}{2 - {e}^{x}} ^ 2$

distribute the numerator and collect like terms.

$\Rightarrow f ' \left(x\right) = \frac{2 {e}^{x} - 2 - {e}^{2 x} + {e}^{x} - \left(- {e}^{2 x} + x {e}^{x}\right)}{2 - {e}^{x}} ^ 2$

$= \frac{3 {e}^{x} - x {e}^{x} - 2}{2 - {e}^{x}} ^ 2$