# How do you integrate int x^2*sin(2x) dx from [0,pi/2]?

Apr 12, 2018

The answer is $= {\pi}^{2} / 8 - \frac{1}{2}$

#### Explanation:

First, calculate the indefinite integral by applying the integration by parts $2$ times

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

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

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

The integral is

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

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

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

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

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

Finally,

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

And the definite integral is

$\int {x}^{2} \sin 2 x \mathrm{dx} = {\left[- {x}^{2} / 2 \cos 2 x + \frac{x}{2} \sin 2 x + \frac{1}{4} \cos 2 x\right]}_{0}^{\frac{\pi}{2}}$

$= \left({\pi}^{2} / 8 - \frac{1}{4}\right) - \left(\frac{1}{4}\right)$

$= {\pi}^{2} / 8 - \frac{1}{2}$

$= 0.73$