Previously, we learned that \[\int\sin x\ dx=-\cos x+C\quad\int\cos x\ dx=\sin x+C.\] In this section, we will investigate the integrals of other trigonometric functions.
What is \(\int\sec^{2}x\ dx\)?
Because \((\tan x)’=\sec^{2}x\), we have
\[\bbox[#F2F2F2,5px,border:2px solid black]{\int\sec^{2}x\ dx=\tan x+C.}\] Similarly \[\bbox[#F2F2F2,5px,border:2px solid black]{\int\csc^{2}x\ dx=-\cot x+C.}\]
It is worth repeating an important integral that we evaluated previously:
Example 1
Find \[\int\tan x\ dx.\]
Solution 1
Because \(\tan x=\sin x/\cos x\) and \((\cos x)’=-\sin x\), let \(u=\cos x\). Then \[du=-\sin x\ dx,\] and \[\begin{aligned} \int\tan x\ dx & =\int\frac{\sin x}{\cos x}dx\\ & =\int\frac{-du}{u}\\ & =-\ln|u|+C\\ & =-\ln|\cos x|+C.\end{aligned}\] Recall that \(\ln A^{B}=B\ln A\). So \[\begin{aligned} -\ln|\cos x|+C & =\ln\left(|\cos x|^{-1}\right)+C\\ & =\ln|\sec x|+C.&& {\small(\sec x=\frac{1}{\cos x})}\end{aligned}\] Therefore, the result can also be written as \[\int\tan x\ dx=\ln|\sec x|+C.\]
\[\bbox[#F2F2F2,5px,border:2px solid black]{\int\tan x\ dx=\ln|\sec x|+C=-\ln|\cos x|+C.}\]
Example 2
Find \[\int\cot x\ dx.\]
Solution 2
Because \(\cot x=\cos x/\sin x\), if we let \(u=\sin x\), then \[du=\cos x\ dx\] and \[\begin{aligned} \int\cot x\ dx & =\int\frac{\cos x}{\sin x}dx\\ & =\int\frac{du}{u}\\ & =\ln|u|+C\\ & =\ln|\sin x|+C.\end{aligned}\]
\[\bbox[#F2F2F2,5px,border:2px solid black]{\int\cot x\ dx=\ln|\sin x|+C.}\]
Example 3
Find \[\int\sec x\tan x\ dx.\]
Solution 3
Because \[\frac{d}{dx}\sec x=\sec x\tan x\] we already know that the result of this integral is \(\sec x+C\). However, even if we did not know the result, we could use the integration by substitution to derive the result: \[\begin{aligned} \int\sec x\tan x\ dx & =\int\frac{1}{\cos x}\frac{\sin x}{\cos x}dx\\ & =\int\frac{\sin x}{\cos^{2}x}dx\end{aligned}\] Let \(u=\cos x\), then \[du=-\sin x\ dx.\] So \[\begin{aligned} \int\frac{\sin x}{\cos^{2}x}dx & =\int-\frac{du}{u^{2}}\\ & =-\int u^{-2}du\\ & =-(-u^{-1})+C\\ & =\frac{1}{u}+C\\ & =\frac{1}{\cos x}+C && \small{(u=\cos x)}\\ & =\sec x+C\end{aligned}\]
Example 4
Find \({\displaystyle \int e^{x}\sec(e^{x})\tan(e^{x})\ dx}\).
Solution 4
Let \(u=e^{x}\). Then \[du=e^{x}\ dx\] and \[\begin{aligned} \int\sec(\underbrace{e^{x}}_{u})\tan(\underbrace{e^{x}}_{u})\underbrace{e^{x}dx}_{du} & =\int\sec u\tan u\ du\\ & =\sec u+C\\ & =\sec e^{x}+C.\end{aligned}\]
Example 5
Find \({\displaystyle \int}\sec x\ dx\).
Solution 5
There are different ways to evaluate this integral; each involves a trick. The easiest way is to multiply and divide the integrand by \(\sec x+\tan x\): \[\begin{aligned} \int\sec x\ dx & =\int\sec x\frac{\sec x+\tan x}{\sec x+\tan x}dx\\ & =\int\frac{\sec^{2}x+\sec x\tan x}{\sec x+\tan x}dx.\end{aligned}\] Let \(u=\sec x+\tan x\). Then \[du=\left(\sec x\tan x+\sec^{2}x\right)dx.\] So \[\begin{aligned} \int\frac{\sec^{2}x+\sec x\tan x}{\sec x+\tan x}dx & =\int\frac{du}{u}\\ & =\ln|u|+C\\ & =\ln|\sec x+\tan x|+C.\end{aligned}\]
\[\bbox[#F2F2F2,5px,border:2px solid black]{\int\sec x\ dx=\ln|\sec x+\tan x|+C.}\]
Example 6
Find \({\displaystyle \int\sin^{2}x\ dx}\).
Solution 6
Because \(\sin^{2}x=(1-\cos2x)/2\), we have \[\begin{aligned} \int\sin^{2}x\ dx & =\frac{1}{2}\int(1-\cos2x)dx\\ & =\frac{1}{2}x-\frac{1}{4}\sin2x+C.\end{aligned}\] To find the integral of \(\cos2x\), we let \(u=2x\).
Example 7
Find \({\displaystyle \int\cos^{2}x\ dx}\).
Solution 7
Because \(\cos^{2}x=(1+\cos2x)/2\), we have \[\begin{aligned} \int\cos^{2}x\ dx & =\frac{1}{2}\int(1+\cos2x)dx\\ & =\frac{1}{2}x+\frac{1}{4}\sin2x+C.\end{aligned}\]
In many applied problems such as mechanical vibrations and electromagnetic waves, we encounter the following trigonometric integrals \[\int\sin ax\cos bx\ dx,\quad\int\sin ax\sin bx\ dx,\quad\int\cos ax\cos bx.\] To evaluate these integrals, we use the following product-to-sum identities (also see here)
\[\bbox[#F2F2F2,5px,border:2px solid black]{\sin ax\ \cos bx=\frac{1}{2}\left[\sin\,(a-b)x+\sin\,(a+b)x\right]}\]
\[\bbox[#F2F2F2,5px,border:2px solid black]{\sin ax\ \sin bx=\frac{1}{2}\left[\cos\,(a-b)x-\cos\,(a+b)x\right]}\]
\[\bbox[#F2F2F2,5px,border:2px solid black]{\cos ax\ \cos bx=\frac{1}{2}\left[\cos\,(a-b)x+\cos\,(a+b)x\right]}\]
Example 8
Find \({\displaystyle \int\sin3x\,\cos5x\,dx}\).
Solution 8
\[\begin{aligned} \int\sin3x\,\cos5x\,dx & =\frac{1}{2}\int\left[\sin(-2x)+\sin8x\right]dx\\ & =\frac{1}{2}\int\left[\sin8x-\sin2x\right]\ dx\\ & =\frac{1}{2}\left(-\frac{1}{8}\cos8x+\frac{1}{2}\cos2x\right)+C\\ & =\frac{1}{4}\cos2x-\frac{1}{16}\cos8x+C.\end{aligned}\]
Finding \({\displaystyle \int\sin^{m}x\cos^{n}dx}\) when either \(m\) or \(n\) is a positive odd integer.
When \(\sin x\) has the odd exponent, we first reduce the integral to the form \[\int(\text{terms involving only }\cos x)\sin xdx,\] and when \(\cos x\) has the odd exponent, we reduce the integral to the form \[\int(\text{terms involving only }\sin x)\cos xdx.\] Then we can perform the integration by means of \[\int u^{n}du=\frac{u^{n+1}}{n+1}+C.\] The following examples will illustrate how to use this.
Example 9
Find \({\displaystyle \int\sin^{2}x\cos^{5}x\,dx}\)
Solution 9
Here the exponent of \(\cos x\) is odd. Thus \[\begin{aligned} {\displaystyle \int\sin^{2}x\cos^{5}xdx} & =\int\sin^{2}x\cos^{4}x\cos xdx\\ & =\int\sin^{2}x\,(1-\sin^{2}x)^{2}\cos xdx\\ & =\int(\sin^{2}x-2\sin^{4}x+\sin^{6}x)\cos xdx\\ & =\int\sin^{2}x\cos xdx-2\int\sin^{4}x\cos xdx+\int\sin^{6}x\cos xdx\end{aligned}\] Now let \(\sin x=u\Rightarrow\cos xdx=du\). Thus \[\int\sin^{2}x\cos^{5}xdx=\frac{\sin^{3}x}{3}-2\frac{\sin^{5}x}{5}+\frac{\sin^{7}x}{7}+C.\]
Example 10
Find \({\displaystyle \int\cos^{3}xdx}\)
Solution 10
\[\begin{aligned} \int\cos^{3}xdx & =\int\cos^{2}x\cos xdx\\ & =\int(1-\sin^{2}x)\cos xdx\\ & =\int\cos xdx-\int\sin^{2}x\cos xdx\\ & =\sin x-\frac{\sin^{2}x}{3}+C.\end{aligned}\]
Example 11
Find \({\displaystyle \int\frac{\cos^{5}x}{\sqrt{\sin x}}dx}\).
Solution 11
Here \(m=-1/2\) and \(n=5\). We separate a factor of \(\cos x\) from \(\cos^{5}x\) and express the remaining factor \(\cos^{4}x\) in terms of \(\sin x\), That is, \[\begin{aligned} \int\frac{\cos^{5}x}{\sqrt{\sin x}}dx & =\int\frac{\cos^{4}x}{\sqrt{\sin x}}\cos x\ dx\\ & =\int\frac{(1-\sin^{2}x)^{2}}{\sqrt{\sin x}}\cos x\ dx.\end{aligned}\] Now let \(u=\sin x\). Then \(du=\cos x\ dx\) and \[\begin{aligned} \int\frac{(1-\sin^{2}x)^{2}}{\sqrt{\sin x}}\cos x\ dx & =\int\frac{(1-u^{2})^{2}}{\sqrt{u}}du\\ & =\int\frac{1-2u^{2}+u^{4}}{\sqrt{u}}du\\ & =\int\left(u^{-1/2}-2u^{3/2}+u^{7/2}\right)du\\ & =2u^{1/2}-\frac{4}{5}u^{5/2}+\frac{2}{9}u^{9/2}+C\\ & =2\sqrt{\sin x}-\frac{4}{5}\sqrt{\sin^{5}x}+\frac{2}{9}\sqrt{\sin^{9}x}+C.\end{aligned}\]