Functions involving trigonometric functions are useful as they are good at describing periodic behavior. This section describes several techniques for finding antiderivatives of certain combinations of trigonometric functions.

# Subsection6.3.1Integrals of the form $\ds \int \sin^m(x) \cos^n(x) \ dx$

In learning the technique of Substitution, we saw the integral $\int \sin(x) \cos(x) \ dx$ in Example 6.1.6. The integration was not difficult, and one could easily evaluate the indefinite integral by letting $u=\sin(x)$ or by letting $u = \cos(x)\text{.}$ This integral is easy since the power of both sine and cosine is 1.

We generalize this integral and consider integrals of the form $\int \sin^m(x) \cos^n(x) \ dx\text{,}$ where $m,n$ are nonnegative integers. Our strategy for evaluating these integrals is to use the identity $\cos^2(x) +\sin^2(x) =1$ to convert high powers of one trigonometric function into the other, leaving a single sine or cosine term in the integrand. Let's see an example of how this technique works.

##### Example6.3.1Integrating powers of sine and cosine

Evaluate $\ds\int\sin^3(x) \cos(x) \ dx\text{.}$

Solution
We summarize the general technique in the following Key Idea.

##### Key Idea6.3.2Integrals Involving Powers of Sine and Cosine

Consider $\ds \int \sin^m(x) \cos^n(x) \ dx\text{,}$ where $m,n$ are nonnegative integers.

1. If $m$ is odd, then $m=2k+1$ for some integer $k\text{.}$ Rewrite \begin{align*} \sin^m(x) \amp = \sin^{2k+1}(x)\\ \amp = \sin^{2k}(x) \sin(x) \\ \amp = (\sin^2(x) )^k\sin(x) \\ \amp = (1-\cos^2(x) )^k\sin(x) \text{.} \end{align*} Then \begin{align*} \int \sin^m(x) \cos^n(x) \ dx \amp = \int (1-\cos^2(x) )^k\sin(x) \cos^n(x) \ dx\\ \amp = -\int (1-u^2)^ku^n\ du \end{align*} where $u = \cos(x)$ and $du = -\sin(x) \ dx\text{.}$

2. If $n$ is odd, then using substitutions similar to that outlined above (replacing all of the even powers of $cosine$ using a Pythagorean identity) we have: \begin{equation*} \int \sin^m(x) \cos^n(x) \ dx = \int u^m(1-u^2)^k\ du, \end{equation*} where $u = \sin(x)$ and $du = \cos(x) \ dx\text{.}$

3. If both $m$ and $n$ are even, use the power–reducing identities: \begin{equation*} \cos^2(x) = \frac{1+\cos(2x)}{2} \text{ and } \sin^2(x) = \frac{1-\cos(2x)}2 \end{equation*} to reduce the degree of the integrand. Expand the result and apply the principles of this Key Idea again.

We practice applying Key Idea 6.3.2 in the next examples.

##### Example6.3.3Integrating powers of sine and cosine

Evaluate $\ds\int\sin^5(x) \cos^8(x) \ dx\text{.}$

Solution
##### Example6.3.4Integrating powers of sine and cosine

Evaluate $\ds \int\sin^5(x) \cos^9(x) \ dx\text{.}$

Solution

Technology Note: The work we are doing here can be a bit tedious, but the skills developed (problem solving, algebraic manipulation, etc.) are important. Nowadays problems of this sort are often solved using a computer algebra system. The powerful program Mathematica™ integrates $\int \sin^5(x) \cos^9(x) \ dx$ as \begin{equation*} f(x)=-\frac{45 \cos(2 x)}{16384}-\frac{5 \cos(4 x)}{8192}+\frac{19 \cos(6 x)}{49152}+\frac{\cos(8 x)}{4096}-\frac{\cos(10 x)}{81920}-\frac{\cos(12 x)}{24576}-\frac{\cos(14 x)}{114688}, \end{equation*} which clearly has a different form than our answer in Example 6.3.4, which is \begin{equation*} g(x)=\frac16\sin^6(x) -\frac12\sin^8(x) +\frac35\sin^{10}(x) -\frac13\sin^{12}(x) +\frac{1}{14}\sin^{14}(x) . \end{equation*}

Figure 6.3.5 shows a graph of $f$ and $g\text{;}$ they are clearly not equal, but they differ only by a constant. That is $g(x) = f(x) + C$ for some constant $C\text{.}$ So we have two different antiderivatives of the same function, meaning both answers are correct.

##### Example6.3.6Integrating powers of sine and cosine

Evaluate $\ds\int\cos^4(x) \sin^2(x) \ dx\text{.}$

Solution

The process above was a bit long and tedious, but being able to work a problem such as this from start to finish is important.

# Subsection6.3.2Integrals of the form $\ds \int\sin(mx)\sin(nx)\ dx\text{,}$ $\ds\int \cos(mx)\cos(nx)\ dx\text{,}$ and $\ds\int \sin(mx)\cos(nx)\ dx\text{.}$

Functions that contain products of sines and cosines of differing periods are important in many applications including the analysis of sound waves. Integrals of the form \begin{equation*} \int\sin(mx)\sin(nx)\ dx, \int \cos(mx)\cos(nx)\ dx \text{ and } \int \sin(mx)\cos(nx)\ dx \end{equation*} are best approached by first applying the Product to Sum Formulas found in the back cover of this text, namely \begin{align*} \sin(mx)\sin(nx) \amp = \frac12\Big[\cos\big((m-n)x\big)-\cos\big((m+n)x\big)\Big]\\ \cos(mx)\cos(nx) \amp = \frac12\Big[\cos\big((m-n)x\big)+\cos\big((m+n)x\big)\Big]\\ \sin(mx)\cos(nx) \amp = \frac12\Big[\sin\big((m-n)x\big)+\sin\big((m+n)x\big)\Big]\text{.} \end{align*}

##### Example6.3.7Integrating products of $\sin(mx)$ and $\cos(nx)$

Evaluate $\ds\int\sin(5x)\cos(2x)\ dx\text{.}$

Solution

# Subsection6.3.3Integrals of the form $\ds\int\tan^m(x) \sec^n(x) \ dx\text{.}$

When evaluating integrals of the form $\int \sin^m(x) \cos^n(x) \ dx\text{,}$ the Pythagorean Theorem allowed us to convert even powers of sine into even powers of cosine, and vise–versa. If, for instance, the power of sine was odd, we pulled out one $\sin(x)$ and converted the remaining even power of $\sin(x)$ into a function using powers of $\cos(x)\text{,}$ leading to an easy substitution.

The same basic strategy applies to integrals of the form $\int \tan^m(x) \sec^n(x) \ dx\text{,}$ albeit a bit more nuanced. The following three facts will prove useful:

• $\frac{d}{dx}(\tan(x) ) = \sec^2(x)\text{,}$

• $\frac{d}{dx}(\sec(x) ) = \sec(x) \tan(x)$ , and

• $1+\tan^2(x) = \sec^2(x)$ (the Pythagorean Theorem).

If the integrand can be manipulated to separate a $\sec^2(x)$ term with the remaining secant power even, or if a $\sec(x) \tan(x)$ term can be separated with the remaining $\tan(x)$ power even, the Pythagorean Theorem can be employed, leading to a simple substitution. This strategy is outlined in the following Key Idea.

##### Key Idea6.3.8Integrals Involving Powers of Tangent and Secant

Consider $\ds\int\tan^m(x) \sec^n(x) \ dx\text{,}$ where $m,n$ are nonnegative integers.

1. If $n$ is even, then $n=2k$ for some integer $k\text{.}$ Rewrite $\sec^n(x)$ as \begin{align*} \sec^n(x) \amp = \sec^{2k}(x)\\ \amp = \sec^{2k-2}(x) \sec^2(x)\\ \amp = (1+\tan^2(x) )^{k-1}\sec^2(x)\text{.} \end{align*} Then \begin{align*} \int\tan^m(x) \sec^n(x) \ dx \amp =\int\tan^m(x) (1+\tan^2(x) )^{k-1}\sec^2(x) \ dx\\ \amp =\int u^m(1+u^2)^{k-1}\ du \end{align*} where $u = \tan(x)$ and $du = \sec^2(x) \ dx\text{.}$

2. If $m$ is odd, then $m=2k+1$ for some integer $k\text{.}$ Rewrite $\tan^m(x) \sec^n(x)$ as \begin{align*} \tan^m(x) \sec^n(x) \amp = \tan^{2k+1}(x) \sec^n(x)\\ \amp = \tan^{2k}(x) \sec^{n-1}(x) \sec(x) \tan(x) \\ \amp = (\sec^2(x) -1)^k\sec^{n-1}(x) \sec(x) \tan(x) \text{.} \end{align*} Then \begin{align*} \int\tan^m(x) \sec^n(x) \ dx \amp =\int(\sec^2(x) -1)^k\sec^{n-1}(x) \sec(x) \tan(x) \ dx\\ \amp = \int(u^2-1)^ku^{n-1}\ du \end{align*} where $u = \sec(x)$ and $du = \sec(x) \tan(x) \ dx\text{.}$

3. If $n$ is odd and $m$ is even, then $m=2k$ for some integer $k\text{.}$ Convert $\tan^m(x)$ to $(\sec^2(x) -1)^k\text{.}$ Expand the new integrand and use Integration By Parts, with $dv = \sec^2(x) \ dx\text{.}$

4. If $m$ is even and $n=0\text{,}$ rewrite $\tan^m(x)$ as \begin{align*} \tan^m(x) \amp = \tan^{m-2}(x) \tan^2(x)\\ \amp = \tan^{m-2}(x) (\sec^2(x) -1)\\ \amp = \tan^{m-2}\sec^2(x) -\tan^{m-2}(x) \text{.} \end{align*} So \begin{equation*} \int\tan^m(x) \ dx = \underbrace{\int\tan^{m-2}\sec^2(x) \ dx}_{\text{ apply rule #1 } } - \underbrace{\int\tan^{m-2}(x) \ dx}_{\text{ apply rule #4 again } }. \end{equation*}

The techniques described in Item 1 and Item 2 of Key Idea 6.3.8 are relatively straightforward, but the techniques in Item 3 and Item 4 can be rather tedious. A few examples will help with these methods.

##### Example6.3.9Integrating powers of tangent and secant

Evaluate $\ds\int \tan^2(x) \sec^6(x) \ dx\text{.}$

Solution
##### Example6.3.10Integrating powers of tangent and secant

Evaluate $\ds\int \sec^3(x) \ dx\text{.}$

Solution

We give one more example.

##### Example6.3.11Integrating powers of tangent and secant

Evaluate $\ds\int\tan^6(x) \ dx\text{.}$

Solution

These latter examples were admittedly long, with repeated applications of the same rule. Try to not be overwhelmed by the length of the problem, but rather admire how robust this solution method is. A trigonometric function of a high power can be systematically reduced to trigonometric functions of lower powers until all antiderivatives can be computed.

Section 6.4 introduces an integration technique known as Trigonometric Substitution, a clever combination of Substitution and the Pythagorean Theorem.

# Subsection6.3.4Exercises

Terms and Concepts

In the following exercises, evaluate the indefinite integral.