# How do you integrate int x^2 e^(-x) dx  using integration by parts?

Jan 9, 2016

$I = - {e}^{- x} \left({x}^{2} + 2 x + 2\right) + c$

#### Explanation:

$I = \int {x}^{2} {e}^{- x} \mathrm{dx}$

Say $u = {x}^{2}$ so $\mathrm{du} = 2 x$ and $\mathrm{dv} = {e}^{- x}$ so $v = - {e}^{- x}$

$I = - {x}^{2} {e}^{- x} + 2 \int x {e}^{- x} \mathrm{dx}$

Say $u = x$ so $\mathrm{du} = 1$ and $\mathrm{dv} = {e}^{- x}$ so $v = - {e}^{- x}$

$I = - {x}^{2} {e}^{- x} + 2 \left(- x {e}^{- x} + \int {e}^{- x} \mathrm{dx}\right)$
$I = - {x}^{2} {e}^{- x} - 2 x {e}^{- x} + 2 \int {e}^{- x} \mathrm{dx}$
$I = - {x}^{2} {e}^{- x} - 2 x {e}^{- x} - 2 {e}^{- x} + c$
$I = - {e}^{- x} \left({x}^{2} + 2 x + 2\right) + c$