7.2 Integrals Containing Trigonometric Functions

OBJECTIVES

When you finish this section, you should be able to:

  1. Find integrals of the form \(\int \hbox{sin}^{n}x {dx}\) or \(\int \hbox{cos} ^{ n} x\,{dx}\), \(n \ge\) 2 an integer (p. 480)
  2. Find integrals of the form \(\int \hbox{sin}^{m} x \hbox{cos}^{n} x {dx}\) (p. 483)
  3. Find integrals of the form \(\int {tan}^{m}x {sec}^{n}x {dx}\) or \(\int {cot}^{m} x {csc}^{n}x {dx}\) (p. 483)
  4. Find integrals of the form \(\int \hbox{sin}{(ax)} \hbox{sin}{(bx)}{dx}\), \(\int \hbox{sin}{(ax)} \hbox{cos}{(bx)}{dx}\), or \(\int \hbox{cos}{(ax)} \hbox{cos}{(bx)} {dx}\) (p. 485)

In this section, we develop techniques to find certain trigonometric integrals. When studying these techniques, concentrate on the strategies used in the examples rather than trying to memorize the results.

1 Find Integrals of the form \(\int \sin ^{n}x\,dx\) or \(\int \cos ^{n}x\,dx\), \(n \ge 2\) an Integer

Although we could use integration by parts to obtain reduction formulas for integrals of the form \(\int \sin ^{n}x\,dx\) or \(\int \cos ^{n}x\,dx\), \(n \ge 2\) an integer, these integrals also can be found using other, often easier, techniques. We consider two cases:

Suppose we want to find \(\int \sin ^{n}x~dx\) when \(n \ge 3\) is an odd integer. We begin by writing the integral in the form \[\bbox[5px, border:1px solid black, #F9F7ED]{\int \sin^{n}x~dx = \int \sin^{n-1}x \sin x~dx} \]

Since \(n\) is odd, \((n-1)\) is even and we can use the identity \(\sin ^{2}x=1-\cos ^{2}x\).

Then the substitution \(u=\cos x\), \(du=-\sin x~dx\), leads to an integral involving integer powers of \(u\).

481

Finding the Integral \(\int \sin^{5}x\,dx\)

Find \(\int \sin ^{5}x\,dx\).

NEED TO REVIEW?

The method of substitution is discussed in Section 5.6, pp. 387-393.

Solution Since the exponent 5 is odd, we write \(\int \sin ^{5}x\,dx=\int \sin ^{4}x \sin x\,dx\), and use the identity \(\sin ^{2}x=1-\cos ^{2}x\). \[ \begin{eqnarray*} \int \sin ^{5}x\,dx&=&\int \sin ^{4}x\sin x\,dx=\int (\sin ^{2}x) ^{2}\sin x\,dx=\int (1-\cos ^{2}x)^{2}\sin x\,dx\\[4pt] &=&\int (1-2\cos ^{2}x+\cos ^{4}x)\sin x\,dx \end{eqnarray*} \]

Now we use the substitution \(u=\cos x\). Then \(du=-\sin x\,dx\), and \[ \begin{eqnarray*} \int \sin ^{5}x\,dx&=&-\int (1-2u^{2}+u^{4})~du=-u+\dfrac{2}{3}u^{3}-\dfrac{1}{5}u^{5}+C\\[3pt] &=&-\cos x+\dfrac{2}{3}\cos ^{3}x-\dfrac{1}{5}\cos ^{5}x+C \end{eqnarray*} \]

A similar technique is used to find \(\int \cos ^{n}x\,dx,\) when \(n \geq 3\) is an odd integer. In this case, we write \[\bbox[5px, border:1px solid black, #F9F7ED]{ \int \cos ^{n}x\,dx=\int \cos ^{n-1}x\cos x\,dx } \]

and use the trigonometric identity \(\cos ^{2}x=1-\sin ^{2}x.\) Then we use the substitution \(u=\sin x\). For example, \[ \begin{eqnarray*} \int \cos ^{3}x~dx &=&\int \cos ^{2}x\,\cos x\,dx=\int ( 1-\sin ^{2}x) \cos x\,dx\\ &\underset{\underset{\underset{\color{#0066A7}{\hbox{\(du=\cos x\, dx\)}}}{\color{#0066A7}{\hbox{\(u=\sin x\)}}}}{\color{#0066A7}{\uparrow }}} {=}&\int (1-u^{2})~ du=u-\dfrac{u^{3}}{3}+C=\sin x- \dfrac{\sin ^{3}x}{3}+C\\ \end{eqnarray*} \]

NOW WORK

Problem 3.

To find \(\int \sin ^{n}x\,dx\) or \(\int \cos ^{n}x\,dx\) when \(n \geq 2\) is an even integer, the preceding strategy does not work. (Try it for yourself.) Instead, we use one of the identities below: \[\bbox[5px, border:1px solid black, #F9F7ED]{ \sin ^{2}x=\dfrac{1-\cos (2x) }{2}\qquad \cos ^{2}x=\dfrac{1+\cos (2x)} {2}} \]

to obtain a simpler integrand.

NEED TO REVIEW?

Trigonometric identities are discussed in Appendix A.4, pp. A-32 to A-35.

Finding the Integral \(\int \sin ^{2}x\,dx\)

Find \(\int \sin ^{2}x\,dx\).

Solution Since the exponent of \(\sin x\) is an even integer, we use the identity \[ \sin ^{2}x=\dfrac{1-\cos (2x) }{2} \]

Then \[ \begin{eqnarray*} \int \sin ^{2}x\,dx&=&\dfrac{1}{2}\int \,[ 1-\cos (2x) ] \,dx =\dfrac{1}{2}\int\, dx-\dfrac{1}{2}\int \cos (2x) \,dx \\[4pt] &=& \dfrac{1}{2} x + C_1 - \dfrac{1}{2} \int \cos u \dfrac{du}{2} \qquad {\color{#0066A7}{\hbox{\(u=2x, du=2\, dx\).}}} \\[4pt] &=& \dfrac{1}{2} x + C_1 - \dfrac{1}{4} \sin (2x) + C_2 \end{eqnarray*} \]

482

Since \(C_1\) and \(C_2\) are constants, we write the solution as \[ \int \sin^2 x \, dx =\dfrac{1}{2}x -\dfrac{1}{4} \sin (2x) +C \]

where \(C=C_1+C_2\).

NOTE

Usually we will just add the constant of integration at the end of the integration to avoid letting \(C=C_1+C_2\).

NOW WORK

Problem 5.

Finding the Average Value of a Function

Find the average value \(\bar{y}\) of the function \(f( x) =\cos ^{4}x\) over the closed interval \([0,\pi]\).

NEED TO REVIEW?

The average value of a function is discussed in Section 5.4, pp. 373-374.

Solution The average value \(\bar{y}\) of a function \(f\) over \([a,b]\) is \(\bar{y}=\dfrac{1}{b-a}\int_{a}^{b}f(x)\,dx.\)

For \(f( x) =\cos ^{4}x\) on \([0,\pi]\), we have

Now

To find \(\int_{0}^{\pi }\cos ^{2}(2x)\, dx,\) we use the identity \( \cos ^{2}\theta =\dfrac{1+\cos (2\theta )}{2}\) again to write \(\cos ^{2}(2x) =\dfrac{1+\cos (4x) }{2}\). Then \[ \begin{eqnarray*} \int_{0}^{\pi }\cos ^{2}(2x) \,dx &=&\int_{0}^{\pi }\dfrac{ 1+\cos (4x) }{2}\,dx=\dfrac{1}{2}\left[ \int_{0}^{\pi }dx+\int_{0}^{\pi }\cos ( 4x) \,dx\right]\\[7pt] &=& \dfrac{1}{2}\left[ \pi +\int_{0}^{4\pi }\cos u\,\dfrac{du}{4}\right] \qquad {\color{#0066A7}{\hbox{\(u=4x\); \(du=4\,dx\)}}} \end{eqnarray*} \]

So, from (1), \[ \bar{y}=\dfrac{1}{4\pi }\left[ \pi +0+\dfrac{\pi }{2}\right] =\dfrac{3}{8} \]

Figure 2

If \(f\) is nonnegative on an interval \([ a,b]\), the average value of \(f\) over the interval \([ a,b]\) represents the height of a rectangle with width \(b-a\) whose area equals the area under the graph of \(f\) from \(a\) to \(b.\) Figure 2 shows the graph of \(f\) from Example 3 and the rectangle of height \(\bar{y}=\dfrac{3}{8}\) and base \(\pi\) whose area is equal to the area under the graph of \(f\).

NOW WORK

Problem 57.

2 Find Integrals of the Form \(\int\sin ^{m}x\,\cos ^{n}x\,dx\)

483

Integrals of the form \(\int \sin ^{m}x\,\cos ^{n}x\,dx\) are found using variations of previous techniques. We discuss two cases:

Finding the Integral \(\int \sin ^{5}x\,\sqrt{\cos x}\,dx\)

Find \(\int \sin ^{5} x \sqrt{\cos x} dx = \int \sin^{5}x\,\cos ^{1/2}x\,dx\).

Solution The exponent of \(\sin x\) is \(5,\) a positive, odd integer. We factor \(\sin x\) from \(\sin ^{5}x\) and write \begin{align*} \int \sin ^{5} x\cos ^{1/2} x\,dx &= \int \sin ^{4} x\,\cos ^{1/2} x\sin x\,dx=\int(\sin ^{2}x) ^{2}\,\cos ^{1/2} x\sin x\,dx\\[4pt] &=\int ( 1-\cos ^{2}x) ^{2}\cos ^{1/2} x\sin xdx \end{align*}

Now we use the substitution \(u=\cos x.\) \[ \begin{eqnarray*} \int \sin ^{5}x\,\cos ^{1/2}x\,dx &=&\int (1-\cos ^{2}x) ^{2}\,\cos ^{1/2}x\,\sin x\,dx \nonumber \\ &\underset{\underset{\underset{\color{#0066A7}{\hbox{\(du=-\sin x~dx\)}}}{\color{#0066A7}{\hbox{\(u=\cos x\)}}}}{\color{#0066A7}{\uparrow }}}{=}&\int (1-u^{2})^{2}u^{1/2}(-du) \nonumber \\ &=&-\int (u^{1/2}-2u^{5/2}+u^{9/2})\,du=-\dfrac{2}{3}u^{3/2}+\dfrac{4}{7}u^{7/2}-\dfrac{2}{11}u^{11/2}+C \nonumber \\ &=&u^{3/2}\left[ -\dfrac{2}{3}+\dfrac{4}{7}u^{2}-\dfrac{2}{11}u^{4}\right] +C \nonumber \\ &\underset{\underset{\color{#0066A7}{\hbox{\(u=\cos x\)}}}{\color{#0066A7}{\uparrow }}}{=}&(\cos x) ^{3/2}\left[ -\dfrac{2}{3}+\dfrac{4}{7}\cos ^{2}x-\dfrac{2}{11}\cos ^{4}x\right] +C \end{eqnarray*} \]

NOW WORK

Problem 11.

If \(m\) and \(n\) are both positive even integers in \(\int \sin ^{m}x\,\cos ^{n}x\,dx\), we use the trigonometric identity \(\sin ^{2}x+\cos ^{2}x=1\) to obtain a sum of integrals, each integral involving only even powers of either \(\sin x\) or \(\cos x\). For example, \[ \begin{equation*} \int \sin ^{2}x\cos ^{4}x\,dx=\int (1-\cos ^{2}x)\cos ^{4}x\,dx=\int \cos ^{4}x\,dx-\int \cos ^{6}x\,dx \end{equation*} \]

The two integrals on the right are now of the form \(\int \cos ^{n}x\,dx\), \(n\) a positive even integer, and we can integrate them using the techniques discussed in Examples 2 and 3.

3 Find Integrals of the Form \(\int \tan^{m}x\ \sec^{n}x~dx\) or \(\int \cot^{m}x csc^ {n}x~dx\)

We consider three cases involving integrals of the form \(\int \tan ^{m}x\,\sec ^{n}x\,dx\):

484

The idea is to express the integrand so that we can use either the substitution \(u=\tan x\) and \(du=\sec ^{2}x\,dx\) or the substitution \(u=\sec x\) and \(du=\sec x \tan x\,dx\), while leaving an even power of one of the functions. Then we use a Pythagorean identity to express the integrand in terms of only one trigonometric function.

Finding the Integral \(\int \tan ^{3}x\,\sec ^{4}x\,dx\)

Find \(\int \tan ^{3} x\sec ^{4} x\,dx\).

Solution Here, \(\tan x\) is raised to the odd power \(3.\) We factor \(\tan x\) from \(\tan ^{3}x\) and use the identity \(\tan ^{2} x=\sec^{2}x-1.\) \[ \begin{eqnarray*} \begin{array}{@rcl@l} \int \tan ^{3}x\sec ^{4}x\,dx &=& \int \tan ^{2}x\,\tan x\,\sec ^{4}x\,dx & {\color{#0066A7}{\hbox{Factor tan \(x\) from \(\tan^{3} x\).}}}\\[6pt] &=& \int (\sec ^{2}x-1) \tan x\sec ^{4}x\,dx & {\color{#0066A7}{\hbox{\(\tan^{2} x = \sec^{2} x - 1\)}}}\\[6pt] &=& \int ( \sec ^{2}x-1) \sec^{3}x\sec x\tan x\,dx & {\color{#0066A7}{\hbox{Factor sec \(x\) from \(\sec^{4} x\).}}}\\[6pt] &=& \int (u^{2}-1) u^{3}du & {\color{#0066A7}{\hbox{Substitute \(u=\sec x\);}}}\\[-4pt] &&& {\color{#0066A7}{\hbox{\(du = \sec x\) \(\tan x\,dx\).}}}\\[6pt] &=& \int (u^{5}-u^{3}) \,du =\dfrac{u^{6}}{6}-\dfrac{u^{4}}{4}+C \underset{\underset{\color{#0066A7}{\hbox{\(u=\sec x\)}}}{\color{#0066A7}{\uparrow}}}{=} \dfrac{\sec ^{6}x}{6}-\dfrac{\sec ^{4}x}{4}+C &\\[-13pt] \end{array} \end{eqnarray*} \]

NOW WORK

Problem 19.

Finding the Integral \(\int \tan ^{2}x\,\sec ^{4}x\,dx\)

Find \(\int \tan ^{2}x\sec ^{4}x\,dx.\)

Solution Here, \(\sec x\) is raised to a positive even power. We factor \(\sec ^{2}x\) from \(\sec ^{4}x\) and use the identity \(\sec ^{2}x=1+\tan ^{2}x.\) Then \[ \begin{eqnarray*} \begin{array}{rcl@l} \int \tan ^{2}x\sec ^{4}x\,dx &=&\int \tan ^{2}x\sec ^{2}x\cdot \sec ^{2}x\,dx & {\color{#0066A7}{\hbox{Factor \(\sec^2 x\) from \(\sec^4 x\).}}} \\[5pt] &=&\int \tan ^{2}x(1+\tan ^{2}x)\sec ^{2}x\,dx & {\color{#0066A7}{\hbox{\(\sec ^{2}{x=1+}\tan ^{2}{x}\)}}} \nonumber \\[5pt] &=&\int u^{2}(1+u^{2})\,du & {\color{#0066A7}{\hbox{Substitute \(u=\tan x\);}}} \nonumber \\[0pt] &&&{\color{#0066A7}{\hbox{\(du=\sec ^{2} x\,dx\).}}}\nonumber \\[5pt] &=&\int (u^{2}+u^{4})\,du = \dfrac{u^{3}}{3}+\frac{u^{5}}{5}+C \underset{\underset{\color{#0066A7}{\hbox{\(u=\tan x\)}}}{\color{#0066A7}{\uparrow}}}{=}\dfrac{\tan ^{3}x}{3}+\dfrac{\tan ^{5}x}{5}+C\\[-8pt] \end{array} \end{eqnarray*} \]

NOW WORK

Problem 21.

When the tangent function is raised to a positive even integer \(m\) and the secant function is raised to a positive odd integer \(n,\) the approach is slightly different. Rather than factoring, we begin by using the identity \(\tan ^{2}x=\sec ^{2}x-1.\)

485

Finding the Integral \(\int \tan ^{2}x\,\sec x\,dx\).

Find \(\int \tan ^{2}x\sec x\,dx\).

Solution Here, tan \(x\) is raised to an even power and sec \(x\) to an odd power. We use the identity \(\tan ^{2}x=\sec ^{2}x-1\) to write \[ \begin{eqnarray*} \int \tan ^{2}x\sec x\,dx &=&\int (\sec ^{2}x-1)\sec x\,dx=\int ( \sec ^{3}x-\sec x)~dx\nonumber\\[4pt] &=&\int \sec ^{3}x\,dx-\int \sec x\,dx\tag{2} \end{eqnarray*} \]

Next we integrate \(\int \sec ^{3}x\,dx\) by parts. Choose \[ \begin{array}{rcl@{\qquad}c@{\qquad}rcl} u &=&\sec x &\hbox{and}& dv &=&\sec ^{2}x\,dx \\[3pt] du &=&\sec x\tan x\,dx &\hbox{}& v &=&\int \sec ^{2}x\,dx=\tan x \end{array} \]

Then \[ \begin{array}{@rcl@{\quad}l} \int \sec ^{3}x\,dx &=&\sec x\,\tan x-\int \tan ^{2}x\,\sec x\,dx & {\color{#0066A7}{\int udv = uv-\int vdu}}\\ &=&\sec x\,\tan x-\int ( \sec ^{2}x-1) \,\sec x\,dx & {\color{#0066A7}{\hbox{\(\tan ^{2}{x=}\sec ^{2}{x-1}\)}}} \\ &=&\sec x\,\tan x-\int \sec ^{3}x\,dx+\int \sec x\,dx & {\color{#0066A7}{\hbox{Write the integral as the}}} \\ &&& {\color{#0066A7}{\hbox{sum of two integrals.}}} \\ 2\int \sec ^{3}x\,dx &=&\sec x\,\tan x+\int \sec x\,dx & {\color{#0066A7}{\hbox{Add \(\int \sec ^{3}x~dx\) to both sides.}}} \\ \int \sec ^{3}x\,dx &=&\dfrac{1}{2}[ \sec x\,\tan x+\ln \vert \sec x+\tan x\vert ] & {\color{#0066A7}{\hbox{Solve for \(\int \sec ^{3}x~dx\);} }}\\ &&&{\color{#0066A7}{\hbox{\(\int \sec x~dx=\ln \left\vert \sec {x+}\tan {x}\right\vert\).}}} \end{array} \]

Now we substitute this result in (2). \[ \begin{eqnarray*} \int \tan ^{2}x\sec x\,dx &=&\int \sec ^{3}x\,dx-\int \sec x\,dx\\[4pt] &=& \dfrac{1}{2}\left[ \sec x\,\tan x+\ln \vert \sec x+\tan x\vert \right] -\ln \vert \sec x+\tan x\vert +C \nonumber \\[4pt] &=&\dfrac{1}{2}\left[ \sec x\tan x-\ln \,\vert \sec x+\tan x\vert \right] +C \end{eqnarray*} \]

NOTE

Substituting \(n = 3\) into the reduction formula for \(\int \sec ^{n} x\,dx\) (derived in Example 8 of Section 7.1) could also have been used to find \(\int \sec ^{3} x\,dx.\)

NOW WORK

Problem 23.

To find integrals of the form \(\int \cot ^{m}x\csc ^{n}x\,dx\), we use the same strategies, but with the identity \(\csc ^{2}x=1+\cot ^{2}x.\)

4 Find Integrals of the Form \(\int \sin (ax)\) \(\sin (bx) \,dx\), \(\int \sin (ax) \cos (bx) \,dx\), or \(\int \cos (ax) \cos (bx) \,dx\)

Trigonometric integrals of the form \[ \begin{equation*} {\int \sin (ax) \sin (bx) \,dx\qquad \int \sin (ax) \cos (bx) \,dx\qquad \int \cos (ax) \cos (bx) \,dx} \end{equation*} \]

are integrated using the product-to-sum identities:

  • \(2\sin A\sin B=\cos (A-B)-\cos (A+B)\)
  • \(2\sin A\cos B=\sin (A+B)+\sin (A-B)\)
  • \(2\cos A\cos B=\cos (A-B)+\cos (A+B)\)

These identities transform the integrand into a sum of sines and/or cosines.

486

Finding the Integral \(\int \sin (3x) \sin (2x) \,dx\)

Find \(\int \sin (3x) \sin (2x) \,dx\).

Solution We use the product-to-sum identity \(2\sin A\sin B=\cos(A-B)-\cos (A+B).\)

Then \[ \begin{eqnarray*} 2\sin (3x) \sin (2x) &=&\cos (3x-2x) -\cos (3x+2x) \\[4pt] \sin (3x) \sin (2x) &=&\dfrac{1}{2}[ \cos x-\cos (5x) ] \end{eqnarray*} \]

Then \[ \begin{eqnarray*} \int \sin (3x) \sin (2x) \,dx&=&\dfrac{1}{2}\int [\cos x-\cos (5x) ] \,dx=\dfrac{1}{2}\int \cos x~dx-\dfrac{1}{2}\int \cos (5x) \,dx\\[5pt] &&\underset{\underset{\underset{\color{#0066A7}{\hbox{\(du=5~dx\)}}}{\color{#0066A7}{\hbox{\(u=5x\)}}}}{\color{#0066A7}{\uparrow }}}{=} \dfrac{1}{2}\sin x-\dfrac{1}{2}\int \cos u\,\dfrac{du}{5}=\dfrac{1}{2}\sin x-\dfrac{1}{10}\sin (5x) +C \end{eqnarray*} \]

NOW WORK

Problem 27.