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

Jul 3, 2015

$\frac{d}{\mathrm{dx}} \left(\left({x}^{2} + 2 x + 3\right) {e}^{-} x\right) = - {x}^{2} {e}^{-} x - {e}^{-} x$

#### Explanation:

$\frac{d}{\mathrm{dx}} \left(\left({x}^{2} + 2 x + 3\right) {e}^{-} x\right)$
=\underbrace(d/dx(x^2+2x+3))_((1)) * e^-x+(x^2+2x+3) * \underbrace(d/dx(e^-x))_((2)
$\setminus \textcolor{w h i t e}{\ldots \ldots \ldots \ldots \ldots \ldots \ldots \ldots \ldots \ldots \ldots \ldots}$(By the product rule)

Lets calculate $\left(1\right)$ first:
$\frac{d}{\mathrm{dx}} \left({x}^{2} + 2 x + 3\right) = \frac{d}{\mathrm{dx}} \left({x}^{2}\right) + \frac{d}{\mathrm{dx}} \left(2 x\right) + \frac{d}{\mathrm{dx}} \left(3\right) = 2 x + 2 + 0 = 2 x + 2$

Now, let's calculate $\left(2\right)$:
$\frac{d}{\mathrm{dx}} \left({e}^{-} x\right) = \frac{d}{d \left(- x\right)} {e}^{-} x \frac{d}{\mathrm{dx}} \left(- x\right)$
$\setminus \textcolor{w h i t e}{\ldots \ldots \ldots \ldots \ldots \ldots \ldots \ldots \ldots \ldots \ldots \ldots}$(By the chain rule)
$= {e}^{-} x \cdot - 1 = - {e}^{-} x$

Combining the two, we get:
$\left(2 x + 2\right) \cdot {e}^{- x} + \left({x}^{2} + 2 x + 3\right) \cdot \left(- {e}^{- x}\right)$
$= \setminus \cancel{2 x {e}^{-} x} + 2 {e}^{-} x - {x}^{2} {e}^{-} x \setminus \cancel{- 2 x {e}^{-} x} - 3 {e}^{-} x$
$= - {x}^{2} {e}^{-} x - {e}^{-} x$