# How do you integrate int xsin2x by parts from [0,pi]?

Feb 5, 2017

${\int}_{0}^{\pi} x \sin 2 x \mathrm{dx} = - \frac{\pi}{2}$

#### Explanation:

Consider the integral:

${\int}_{0}^{\pi} x \sin 2 x \mathrm{dx}$

Note that:

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

so we can integrate by parts:

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

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

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

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

${\int}_{0}^{\pi} x \sin 2 x \mathrm{dx} = - \frac{\pi}{2}$