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

Mar 20, 2018

The answer is $= \frac{1}{6} {x}^{3} - {x}^{2} / 4 \sin 2 x - \frac{x}{4} \cos 2 x - \frac{1}{8} \sin 2 x + C$

#### Explanation:

Reminder

$\cos 2 x = 1 - 2 {\sin}^{2} x$

${\sin}^{2} x = \frac{1}{2} \left(1 - \cos 2 x\right)$

Integration by parts

$\int u v ' = u v - \int u ' v$

The integral is

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

$= \frac{1}{2} \int {x}^{2} - \frac{1}{2} \int {x}^{2} \cos 2 x \mathrm{dx}$

$= \frac{1}{6} {x}^{3} - \frac{1}{2} \int {x}^{2} \cos 2 x \mathrm{dx}$

Perform the second integral by parts

$u = {x}^{2}$, $\implies$, $u ' = 2 x$

$v ' = \cos 2 x$, $\implies$, $v = \frac{1}{2} \sin 2 x$

So,

$\int {x}^{2} \cos 2 x \mathrm{dx} = {x}^{2} / 2 \sin 2 x - \int x \sin 2 x \mathrm{dx}$

Calculate the third intehral by parts

$u = x$, $\implies$, $u ' = 1$

$v ' = \sin 2 x$, $\implies$, $v = - \frac{1}{2} \cos 2 x$

So,

$\int x \sin 2 x \mathrm{dx} = - \frac{x}{2} \cos 2 x + \frac{1}{2} \int \cos 2 x \mathrm{dx}$

$= - \frac{x}{2} \cos 2 x + \frac{1}{4} \sin 2 x$

Putting it all together

$I = \frac{1}{6} {x}^{3} - {x}^{2} / 4 \sin 2 x - \frac{x}{4} \cos 2 x - \frac{1}{8} \sin 2 x + C$