# How do you integrate int x^2 sin x dx  using integration by parts?

Jan 7, 2016

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

#### Explanation:

Say $u = {x}^{2}$ so $\mathrm{du} = 2 x$, $\mathrm{dv} = \sin \left(x\right)$ so $v = - \cos \left(x\right)$

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

Say $u = x$ so $\mathrm{du} = 1$, $\mathrm{dv} = \cos \left(x\right)$ so $v = \sin \left(x\right)$

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