# How do you differentiate y=(1+x^2)e^x ?

May 19, 2016

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

#### Explanation:

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

This is of the form:
$f \left(x\right) = g \left(x\right) h \left(x\right)$

Where,
$g \left(x\right) = 1 + {x}^{2}$ and $h \left(x\right) = {e}^{x}$

Apply the product rule to find the derivatives:
$f \left(x\right) = g \left(x\right) h \left(x\right)$

$\implies f ' \left(x\right) = g ' \left(x\right) h \left(x\right) + g \left(x\right) h ' \left(x\right)$

Let's work out the derivatives of the functions, separately:

$g \left(x\right) = 1 + {x}^{2}$

$g ' \left(x\right) = 2 x$

$h \left(x\right) = {e}^{x}$

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

Plug in these values in $f ' \left(x\right)$

$f ' \left(x\right) = g ' \left(x\right) h \left(x\right) + g \left(x\right) h ' \left(x\right)$

$= 2 x \times {e}^{x} + \left(1 + {x}^{2}\right) \times {e}^{x}$

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