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

Oct 26, 2017

$\int \setminus {x}^{3} {\sin}^{2} x \setminus \mathrm{dx} = \frac{2 {x}^{4} + \left(6 x - 4 {x}^{3}\right) \sin 2 x \left(3 - 6 {x}^{2}\right) \cos 2 x}{16} + C$

#### Explanation:

We seek:

$I = \int \setminus {x}^{3} {\sin}^{2} x \setminus \mathrm{dx}$

In preparation for an application of integration by Parts, we note that using the identity $\cos 2 A \equiv 1 - 2 {\sin}^{2} A$:

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

We can then apply Integration By Parts:

Let $\left\{\begin{matrix}u & = {x}^{3} & \implies \frac{\mathrm{du}}{\mathrm{dx}} & = 3 {x}^{2} \\ \frac{\mathrm{dv}}{\mathrm{dx}} & = {\sin}^{2} x & \implies v & = \frac{1}{2} x - \frac{1}{4} \sin 2 x\end{matrix}\right.$

Then plugging into the IBP formula:

$\int \setminus \left(u\right) \left(\frac{\mathrm{dv}}{\mathrm{dx}}\right) \setminus \mathrm{dx} = \left(u\right) \left(v\right) - \int \setminus \left(v\right) \left(\frac{\mathrm{du}}{\mathrm{dx}}\right) \setminus \mathrm{dx}$

We have:

$\int \setminus {x}^{3} {\sin}^{2} x \setminus \mathrm{dx} = {x}^{3} \left(\frac{1}{2} x - \frac{1}{4} \sin 2 x\right) - \int \setminus \left(\frac{1}{2} x - \frac{1}{4} \sin 2 x\right) 3 {x}^{2} \setminus \mathrm{dx}$
$\therefore I = \frac{1}{2} {x}^{4} - \frac{1}{4} {x}^{3} \sin 2 x - \frac{3}{4} \int \setminus 2 {x}^{3} - {x}^{2} \sin 2 x \setminus \mathrm{dx}$
$\setminus \setminus \setminus \setminus \setminus \setminus \setminus = \frac{1}{2} {x}^{4} - \frac{1}{4} {x}^{3} \sin 2 x - \frac{3}{4} {x}^{4} / 2 + \frac{3}{4} \int \setminus {x}^{2} \sin 2 x \setminus \mathrm{dx}$
$\setminus \setminus \setminus \setminus \setminus \setminus \setminus = \frac{1}{8} {x}^{4} - \frac{1}{4} {x}^{3} \sin 2 x + \frac{3}{4} \int \setminus {x}^{2} \sin 2 x \setminus \mathrm{dx}$ ..... [A]

Now consider the last integral:

${I}_{1} = \int \setminus {x}^{2} \sin 2 x \setminus \mathrm{dx}$

We can again apply integration by parts:

Let $\left\{\begin{matrix}u & = {x}^{2} & \implies \frac{\mathrm{du}}{\mathrm{dx}} & = 2 x \\ \frac{\mathrm{dv}}{\mathrm{dx}} & = \sin 2 x & \implies v & = - \frac{1}{2} \cos 2 x\end{matrix}\right.$

So we have:

${I}_{1} = \left({x}^{2}\right) \left(- \frac{1}{2} \cos 2 x\right) - \int \setminus \left(- \frac{1}{2} \cos 2 x\right) \left(2 x\right) \setminus \mathrm{dx}$
$\setminus \setminus \setminus = - \frac{1}{2} {x}^{2} \cos 2 x + \int \setminus x \cos 2 x \setminus \mathrm{dx}$..... [B]

And, now we have to consider:

${I}_{2} = \int \setminus x \cos 2 x \setminus \mathrm{dx}$

Which again requires an application of Integration By Parts:

Let $\left\{\begin{matrix}u & = x & \implies \frac{\mathrm{du}}{\mathrm{dx}} & = 1 \\ \frac{\mathrm{dv}}{\mathrm{dx}} & = \cos 2 x & \implies v & = \frac{1}{2} \sin 2 x\end{matrix}\right.$

And so:

${I}_{2} = \left(x\right) \left(\frac{1}{2} \sin 2 x\right) - \int \setminus \frac{1}{2} \sin 2 x \setminus \mathrm{dx}$
$\setminus \setminus \setminus = \frac{1}{2} x \sin 2 x + \frac{1}{4} \cos 2 x$..... [C]

Combining the result [B] and [C] with [A] we have:

$I = \frac{1}{8} {x}^{4} - \frac{1}{4} {x}^{3} \sin 2 x + \frac{3}{4} \left\{- \frac{1}{2} {x}^{2} \cos 2 x + \frac{1}{2} x \sin 2 x + \frac{1}{4} \cos 2 x\right\} + C$
$\setminus \setminus = \frac{1}{16} \left(2 {x}^{4} - 4 {x}^{3} \sin 2 x\right) + \frac{3}{16} \left\{- 2 {x}^{2} \cos 2 x + 2 x \sin 2 x + \cos 2 x\right\} + C$
$\setminus \setminus = \frac{2 {x}^{4} - 4 {x}^{3} \sin 2 x - 6 {x}^{2} \cos 2 x + 6 x \sin 2 x + 3 \cos 2 x}{16} + C$
$\setminus \setminus = \frac{2 {x}^{4} + \left(6 x - 4 {x}^{3}\right) \sin 2 x \left(3 - 6 {x}^{2}\right) \cos 2 x}{16} + C$