# How do you find the derivative of f(x)=-xe^x + 2?

Mar 12, 2017

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

#### Explanation:

differentiate $x {e}^{x}$ using the $\textcolor{b l u e}{\text{product rule}}$

$\text{Given "y=g(x).h(x)" then}$

• dy/dx=g(x)h'(x)+h(x)g'(x)

$\text{here } g \left(x\right) = x \Rightarrow g ' \left(x\right) = 1$

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

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

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

$\textcolor{w h i t e}{\Rightarrow f ' \left(x\right)} = - {e}^{x} \left(x + 1\right)$