# What is the integral of sin(x) cos(x)?

It's $\frac{1}{2} {\sin}^{2} \left(x\right) + C$.

The substitution used to solve this integral is simple.

Note that $\cos \left(x\right)$ is the derivative of $\sin \left(x\right)$.

Define the variable $u = \sin \left(x\right)$.
We have $\mathrm{du} = \cos \left(x\right) \mathrm{dx}$.
So, $\mathrm{dx} = \frac{1}{\cos} \left(x\right) \mathrm{du}$.

The integral:

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

Knowing that $\frac{d}{\mathrm{du}} \left[\frac{1}{2} {u}^{2} + C\right] = u$ we have:

$\int u \mathrm{du} = \int \frac{d}{\mathrm{du}} \left[\frac{1}{2} {u}^{2} + C\right] \mathrm{du}$

Using the Fundamental Theorem of Calculus we get:

$\int \frac{d}{\mathrm{du}} \left[\frac{1}{2} {u}^{2} + C\right] \mathrm{du} = \frac{1}{2} {u}^{2} + C = \frac{1}{2} {\sin}^{2} \left(x\right) + C$