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

Nov 3, 2015

$\int {\sin}^{2} \left(x\right) \mathrm{dx} = \frac{x}{2} - \sin \frac{2 x}{4} + c$,
where $c$ is the constant of integration.

#### Explanation:

$\int {\sin}^{2} \left(x\right) \mathrm{dx} = \int \frac{d}{\mathrm{dx}} \left(x\right) {\sin}^{2} \left(x\right) \mathrm{dx}$

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

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

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

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

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

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

$= x {\sin}^{2} \left(x\right) + \frac{1}{2} x \cos \left(2 x\right) - \sin \frac{2 x}{4} + c$,
where $c$ is the constant of integration.

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

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