# Integration with Trigonometric Identities

## Using Double Angle Formulae

In order to integrate $\sin^2(x)$, for example, it might be tempting to use the basic trigonometric identity $\sin^2(x)+\cos^2(x)=1$ as this identity is more familiar. However, integrating $1-\cos^2(x)$ is more complicated than integrating $\sin^2(x)$ itself. Instead, we can use a double angle identity to integrate $\sin^2(x)$. Recall the double angle formulae:

$\sin(2x)=2\sin(x)\cos(x)$ and $\cos(2x)=\cos^2(x)-\sin^2(x)=2\cos^2(x)-1=1-2\sin^2(x)$.

The final identity for $\cos(2x)$ can be rearranged to get an expression for $\sin^2(x)$. That is, $\sin^2(x)=\frac{1}{2}-\frac{1}{2}\cos(2x)$. This is easy to integrate and so:

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

A similar process can be applied to integrate $\cos^2(x)$. We can also integrate when the argument is different – see Example 1. To integrate $\tan^2(x)$, we use a reciprocal trigonometric identity. See below.

## Using Reciprocal Trigonometric Identities

We can use the double angle formulae to integrate $\sin^2(x)$ and $\cos^2(x)$. However,  for integrating $\tan^2(x)$ we may use a reciprocal trigonometric identity. Recall that $1+\tan^2(x)=\sec^2(x)$. Hence,

$\int\tan^2(x)dx=\int\left(\sec^2(x)-1\right)dx=\tan(x)-x+c$

using the formula booklet to integrate $\sec^2(x)$. See Example 2.

## Using Compound Angle Formulae

It is important to remember, as well as the above, that a question may ask you to integrate a trigonometric function which, at first, looks hugely unfamiliar. For example, how could we integrate $\sin(3x)\cos(2x)$? It might be tempting to try integration by parts since it is a product. However, the formula booklet provides compound angle identities that will prove useful in integrating this kind of function:

$\begin{array}{l}\sin(A)+\sin(B)&=&2\sin\frac{A+B}{2}\cos\frac{A-B}{2}\\\sin(A)-\sin(B)&=&2\cos\frac{A+B}{2}\sin\frac{A-B}{2}\\\cos(A)+\cos(B)&=&2\cos\frac{A+B}{2}\cos\frac{A-B}{2}\\\cos(A)-\cos(B)&=&-2\sin\frac{A+B}{2}\sin\frac{A-B}{2}\end{array}$.

The first formula will help us to integrate $\sin(3x)\cos(2x)$. We rewrite the formula as $\sin\left(\frac{A+B}{2}\right)\cos\left(\frac{A-B}{2}\right)=\frac{1}{2}\sin(A)+\frac{1}{2}\sin(B)$. The individual terms on the right of this will be much easier to integrate than the product on the left. Hence, we must find $A$ and $B$ such that $\frac{A+B}{2}=3x$ and $\frac{A-B}{2}=2x$. It follows that $A+B=6x$ and $A-B=4x$. Hence, $A=5x$ and $B=x$. The integral becomes:

$\int\sin(3x)\cos(2x)dx=\int\left(\frac{1}{2}\sin(5x)+\frac{1}{2}\sin(x)\right)dx=-\frac{1}{10}\cos(5x)-\frac{1}{2}\cos(x)+c$.

Note that $A$ or $B$ could be negative and we would have to use the odd/even properties of sin/cos – see Example 3. It is possible to integrate $\sin(3x)\cos(2x)$ using integration by parts but it is much simpler to use the method above. See Integration by Parts Example 3.

## Integrating with Trigonometric Identities

Integrate $\cos^2(3x)$.

Find the exact value of $\int_0^\pi \left(\tan(x)+\cos(x)\right)^2dx$.

Find $\int \cos(x)\cos(4x)dx$.