Integration 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}{lll}\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:

\begin{array}{lll}\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\end{array}

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.

Examples

Integrate \cos^2(3x).

Solution:

Recall the double angle formula \cos(2\theta)=2\cos^2(\theta)-1. This can be rewritten as \cos^2(\theta)=\frac{1}{2}\cos(2\theta)+\frac{1}{2}. It follows that \cos^2(3x)=\frac{1}{2}\cos(6x)+\frac{1}{2}. Hence,

\int\cos^2(3x)dx=\int\left(\frac{1}{2}\cos(6x)+\frac{1}{2}\right)dx=\frac{1}{12}\sin(6x)+\frac{1}{2}x+c

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

Solution:

Firstly, expanding the brackets gives:

\begin{array}{lll}\left(\tan(x)+\cos(x)\right)^2&=&\tan^2(x)+2\tan(x)\cos(x)+\cos^2(x)\\&=&\tan^2(x)+2\sin(x)+\frac{1}{2}\cos(2x)+\frac{1}{2}\end{array}

where we transformed terms into those that we can integrate. See Example 1 for more on transforming \cos^2(x). Hence,

\begin{array}{lll}\int_0^\pi\left(\tan(x)+\cos(x)\right)^2&=&\int_0^\pi\left(\tan^2(x)+2\sin(x)+\frac{1}{2}\cos(2x)+\frac{1}{2}\right)dx\\&=&\left[\tan(x)-x-2\cos(x)+\frac{1}{4}\sin(2x)+\frac{1}{2}x\right]_0^\pi\\&=&\left[\tan(x)-2\cos(x)+\frac{1}{4}\sin(2x)-\frac{1}{2}x\right]_0^\pi\\&=&\left(0+2+0-\frac{1}{2}\pi\right)-\left(0-2+0-0\right)\\&=&4-\frac{1}{2}\pi\end{array}

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

Solution:

Using the formula \cos(A)+\cos(B)=2\cos\left(\frac{A+B}{2}\right)\cos\left(\frac{A-B}{2}\right) we can write \cos\left(\frac{A+B}{2}\right)\cos\left(\frac{A-B}{2}\right)=\frac{1}{2}\cos(A)+\frac{1}{2}\cos(B). It follows that we must find A and B such that \frac{A+B}{2}=x and \frac{A-B}{2}=4x or A+B=2x and A-B=8x. So, A=5x and B=-3x. Hence, \cos(x)\cos(4x)=\frac{1}{2}\cos(5x)+\frac{1}{2}\cos(-3x). Note that cos is an even function (see more on odd/even functions) and so \cos(-3x)=\cos(3x). The integral becomes:

\begin{array}{lll}\int \cos(x)\cos(4x)dx&=&\int\left(\frac{1}{2}\cos(5x)+\frac{1}{2}\cos(3x)\right)dx\\&=&\frac{1}{10}\sin(5x)+\frac{1}{6}\sin(3x)+c\end{array}