11.5 Integration of trigonometric functions
11.5.1 Integral of $\cos^{2}(x)$
Example 11.5.1
Find the value of
Solution: We can’t integrate $\cos^{2}(x)$ directly, so we need to rewrite it first. Of the trigonometric identities, the one which looks most useful is the doubleangle formula ^{3}^{3} 3 i.e. $\cos(2x)=\cos^{2}(x)\sin^{2}(x)\implies\cos(2x)=2\cos^{2}(x)1\implies\cos^{2% }(x)=\frac{\cos(2x)+1}{2}$). After rearranging this (see the footnote for details), we can the write that
$\displaystyle\int\cos^{2}(x)dx$  $\displaystyle=\int\frac{\cos(2x)+1}{2}\hskip 2.0ptdx$  (11.13)  
$\displaystyle=\frac{1}{2}\int\cos(2x)+1\hskip 2.0ptdx$  (11.14)  
$\displaystyle=\frac{1}{2}\left[\frac{1}{2}\sin(2x)+x\right]+c$  (11.15)  
$\displaystyle=\frac{1}{4}\sin(x)+\frac{1}{2}x$  (11.16) 
11.5.2 Integral of $\frac{\sin(x)}{\cos(x)+\cos^{3}(x)}$
Example 11.5.2
Find the value of^{4}^{4} 4 This question came from https://madasmaths.com
Solution: We substitute $u=\sin(x)$. If this seems like a strange thing to do, there are a bunch of good reasons:

•
We know that the derivative of $\cos(x)$ is $\sin(x)$, so we can replace $\sin(x)$ by $\frac{du}{dx}$, which we then integrate w.r.t $x$, so the overall integral is integrated w.r.t $u$.

•
As we can replace $\cos(x)$ with $u$ and $\cos(x)$ with $u^{3}$, this simplifies the expression considerably.
Proceeding,
$\displaystyle\int\frac{\sin(x)}{\cos(x)+\cos^{3}(x)}dx$  $\displaystyle=\int\frac{\frac{du}{dx}}{u+u^{3}}dx$  
$\displaystyle=\int\frac{1}{u+u^{3}}du$  
$\displaystyle=\int\frac{1}{u(1+u^{2})}du$ 
Which we can split into partial fractions:
$\displaystyle\frac{1}{u(1+u^{2})}=\frac{A}{u}+\frac{Bu+C}{1+u^{2}}$  
$\displaystyle\implies 1=A(1+u^{2})+(Bu+C)u$  
$\displaystyle\implies 0=A+Au^{2}+Bu^{2}+Cu1$  
$\displaystyle\implies 0=(A+B)u^{2}+Cu+(A1)$ 
From where we can come up with some simultaneous equations
From this we can deduce that $A=1$, $B=1$ and $C=0$. Overall, then, we have
$\displaystyle\int\frac{1}{u}\frac{u}{1+u^{2}}du$  $\displaystyle=\int\frac{u}{1+u^{2}}\frac{1}{u}du$  
$\displaystyle=\frac{1}{2}\ln(1+u^{2})\ln(u)+c$  
$\displaystyle=\ln\left(\frac{\sqrt{1+u^{2}}}{u}\right)+c$  
$\displaystyle=\ln\left(\sqrt{\frac{1+u^{2}}{u^{2}}}\right)+c$  
$\displaystyle=\frac{1}{2}\ln\left(\frac{1+u^{2}}{u^{2}}\right)+c$ 
Note that another way to do the last four steps is
$\displaystyle\frac{1}{2}\ln(1+u^{2})\ln(u)$  $\displaystyle=\frac{1}{2}\left[\ln(1+u^{2})2\ln(u)\right]$  
$\displaystyle=\frac{1}{2}\left[\ln\left(\frac{1+u^{2}}{u^{2}}\right)\right]$ 
which is possibly nicer.
11.5.3 Integral of $\frac{1\cos(x)}{1+\cos(x)}$
Example 11.5.3
Find the value of
Solution: Anything which looks like $1+\cos(x)$ can be turned into $1\cos^{2}(x)$ which is also known^{5}^{5} 5 By the Pythagorean identity. as $\sin^{2}(x)$. This is by multiplying by $1\cos(x)$ (because $(x+y)(xy)=x^{2}y^{2}$, also known as the difference of two squares). We can proceed by multiplying by one.
$\displaystyle\int\frac{1\cos(x)}{1+\cos(x)}dx$  $\displaystyle=\int\frac{1\cos(x)}{1+\cos(x)}\cdot\frac{1\cos(x)}{1\cos(x)}dx$  
$\displaystyle=\int\frac{12\cos(x)+\cos^{2}(x)}{\sin^{2}(x)}dx$  
$\displaystyle=\int\csc^{2}(x)2\cot(x)\csc(x)+\cot^{2}(x)dx$ 
Note that while a lot of these integrals are in the formula sheet ^{6}^{6} 6 At least, in the OCR A formula booklet, it is given that $\frac{d}{dx}\left[\cot(x)\right]=\csc^{2}(x)$ and $\frac{d}{dx}\left[\csc(x)\right]=\csc(x)\cot(x)$ some of them are not (i.e. we have no idea what the integral of $\cot^{2}(x)$ is at present). To get around this, we can use the Pythagorean identity to reduce this problem (the answer to which we don’t know) to a problem which we do know the answer to! Take $\cos^{2}(x)+\sin^{2}(x)=1$, divide through by $\sin^{2}(x)$ and obtain that $\cot^{2}(x)+1=\csc^{2}(x)\implies\cot^{2}(x)=\csc^{2}(x)1$.
Then,
$\displaystyle\int\csc^{2}(x)2\cot(x)\csc(x)+\cot^{2}(x)dx$  $\displaystyle=\int 2\csc^{2}(x)2\cot(x)\csc(x)1$  
$\displaystyle=2\cot^{2}(x)+2\csc(x)x+c$ 
11.5.4 Integral of $\sqrt{1\cos(x)}$
Example 11.5.4
Find the value of
Solution: As it is, we can’t integrate this, therefore the only possible option is to rewrite it somehow, into a form we can integrate.
A way to think about this which isn’t particularly elegant, but is usually quite effective, is to think about all the possible identities which could work, and try each one.
e.g. thinking about identities which involve $\cos(x)$, we have ^{7}^{7} 7 These are discussed in the trigonometry section of this document.

•
$\cos^{2}(x)+\sin^{2}(x)\equiv 1$, which doesn’t help here because there’s no $\cos^{2}(x)$ anywhere.

•
$\cos(a+b)\equiv\cos(a)\cos(b)\sin(a)\sin(b)$  also no help

•
$\cos(2x)\equiv\left[\cos(x)\right]^{2}\left[\sin(x)\right]^{2}$, and its two other forms (rearranging using the first bullet point), $\cos(2x)\equiv 12\left[\sin(x)\right]^{2}$ and $\cos(2x)\equiv 2\left[\cos(x)\right]^{2}1$.
The last identity looks quite useful, because we have a $\cos(2x)$, and a $1$, and we can rewrite it in the form
The $1\cos(2x)$ looks quite a lot, but not exactly, like our integral, but we can fix that by simply replacing ^{8}^{8} 8 This is fine, because when we derived the doubleangle formula from the addition formula we set $a=x$ and $b=x$ in the equation $\cos(a+b)\equiv\cos(a)\cos(b)\sin(a)\sin(b)$, but we could have just as well have set $a=\frac{x}{2}$ and $b=\frac{x}{2}$, which would give $\cos(x)\equiv\left[\cos\left(\frac{x}{2}\right)\right]^{2}\left[\sin\left(% \frac{x}{2}\right)\right]^{2}$ which we can then rearrange to give the result we need. $x$ with $\frac{x}{2}$, giving
Applying this to our integral, we have
$\displaystyle\int\sqrt{1\cos(x)}dx$  $\displaystyle=\int\sqrt{2\left[\sin\left(\frac{x}{2}\right)\right]^{2}}dx$  (11.20)  
$\displaystyle=\int\sqrt{2}\sin\left(\frac{x}{2}\right)dx$  (11.21) 
The last part we can do by inspection (as the derivative of $\cos(x)$ is equal to $\sin(x)$, by the chain rule, the derivative of $\cos\left(\frac{x}{2}\right)$ is equal to $\frac{1}{2}\cos(\frac{x}{2})$, and therefore the integral of $\sin\left(\frac{x}{2}\right)$ with respect to $x$ is just $2\cos\left(\frac{x}{2}\right)$).
Therefore, we have
$\displaystyle\int\sqrt{1\cos(x)}dx$  $\displaystyle=\sqrt{2}\int\sin\left(\frac{x}{2}\right)dx$  (11.22)  
$\displaystyle=2\sqrt{2}\cos\left(\frac{x}{2}\right)+c$  (11.23) 