# How do you integrate sin(x)cos(x)?

Aug 2, 2016

Depending on the route you take, valid results include:

• ${\sin}^{2} \frac{x}{2} + C$
• $- {\cos}^{2} \frac{x}{2} + C$
• $- \frac{1}{4} \cos \left(2 x\right) + C$

#### Explanation:

There are a variety of methods we can take:

Substitution with sine:

Let $u = \sin \left(x\right)$. This implies that $\mathrm{du} = \cos \left(x\right) \mathrm{dx}$.

Thus:

intunderbrace(sin(x))_uoverbrace(cos(x)dx)^(du)=intudu=u^2/2+C=color(blue)(sin^2(x)/2+C

Substitution with cosine:

Let $u = \cos \left(x\right)$, so $\mathrm{du} = - \sin \left(x\right) \mathrm{dx}$.

Therefore:

$\int \sin \left(x\right) \cos \left(x\right) \mathrm{dx} = - \int {\underbrace{\cos \left(x\right)}}_{u} {\overbrace{\left(- \sin \left(x\right)\right) \mathrm{dx}}}^{\mathrm{du}} = - \int u \mathrm{du} = - {u}^{2} / 2 + C$

=color(blue)(-cos^2(x)/2+C

Brief interlude:

You may be wondering, well, why are both of these answers valid?

Note that:

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

However, the $\frac{1}{2}$ is absorbed into $C$ as $C$ represents any constant:

$= - {\cos}^{2} \frac{x}{2} + C$

One more method using simplification:

We will use the identity $\sin \left(2 x\right) = 2 \sin \left(x\right) \cos \left(x\right)$. Thus, $\sin \left(x\right) \cos \left(x\right) = \sin \frac{2 x}{2}$.

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

From here, let $u = 2 x$ so that $\mathrm{du} = 2 \mathrm{dx}$.

=1/4intsinunderbrace((2x))_u overbrace((2)dx)^(du)=1/4intsin(u)du=-1/4cos(u)+C= color(blue)(-1/4cos(2x)+C

You can also show that this is equivalent to the other two answers using the identity $\cos \left(2 x\right) = {\cos}^{2} \left(x\right) - {\sin}^{2} \left(x\right)$.