I apologize for the outage on the site yesterday and today. Lamar University is in Beaumont Texas and Hurricane Laura came through here and caused a brief power outage at Lamar. Things should be up and running at this point and (hopefully) will stay that way, at least until the next hurricane comes through here which seems to happen about once every 10-15 years. Note that I wouldn't be too suprised if there are brief outages over the next couple of days as they work to get everything back up and running properly. I apologize for the inconvienence.

Paul

August 27, 2020

*i.e.*you are probably on a mobile phone). Due to the nature of the mathematics on this site it is best views in landscape mode. If your device is not in landscape mode many of the equations will run off the side of your device (should be able to scroll to see them) and some of the menu items will be cut off due to the narrow screen width.

### Section 1-2 : Integrals Involving Trig Functions

In this section we are going to look at quite a few integrals involving trig functions and some of the techniques we can use to help us evaluate them. Let’s start off with an integral that we should already be able to do.

\[\begin{align*}\int{{\cos x\sin ^5 x\,dx}} & = \int{{{u^5}\,du}}\hspace{0.25in}{\mbox{using the substitution }}u = \sin x\\ & = \frac{1}{6}{\sin ^6}x + c\end{align*}\]This integral is easy to do with a substitution because the presence of the cosine, however, what about the following integral.

This integral no longer has the cosine in it that would allow us to use the substitution that we used above. Therefore, that substitution won’t work and we are going to have to find another way of doing this integral.

Let’s first notice that we could write the integral as follows,

\[\int{{{{\sin }^5}x\,dx}} = \int{{{{\sin }^4}x\,\sin x\,dx}} = \int{{{{\left( {{{\sin }^2}x} \right)}^2}\,\sin x\,dx}}\]Now recall the trig identity,

\[{\cos ^2}x + {\sin ^2}x = 1\hspace{0.25in}\,\, \Rightarrow \hspace{0.25in}\,\,\,{\sin ^2}x = 1 - {\cos ^2}x\]With this identity the integral can be written as,

\[\int{{{{\sin }^5}x\,dx}} = \int{{{{\left( {1 - {{\cos }^2}x} \right)}^2}\,\sin x\,dx}}\]and we can now use the substitution \(u = \cos x\). Doing this gives us,

\[\begin{align*}\int{{{{\sin }^5}x\,dx}} & = - \int{{{{\left( {1 - {u^2}} \right)}^2}\,du}}\\ & = - \int{{1 - 2{u^2} + {u^4}\,du}}\\ & = - \left( {u - \frac{2}{3}{u^3} + \frac{1}{5}{u^5}} \right) + c\\ & = - \cos x + \frac{2}{3}{\cos ^3}x - \frac{1}{5}{\cos ^5}x + c\end{align*}\]So, with a little rewriting on the integrand we were able to reduce this to a fairly simple substitution.

Notice that we were able to do the rewrite that we did in the previous example because the exponent on the sine was odd. In these cases all that we need to do is strip out one of the sines. The exponent on the remaining sines will then be even and we can easily convert the remaining sines to cosines using the identity,

\[\begin{equation}{\cos ^2}x + {\sin ^2}x = 1 \label{eq:eq1} \end{equation}\]If the exponent on the sines had been even this would have been difficult to do. We could strip out a sine, but the remaining sines would then have an odd exponent and while we could convert them to cosines the resulting integral would often be even more difficult than the original integral in most cases.

Let’s take a look at another example.

So, in this case we’ve got both sines and cosines in the problem and in this case the exponent on the sine is even while the exponent on the cosine is odd. So, we can use a similar technique in this integral. This time we’ll strip out a cosine and convert the rest to sines.

\[\begin{align*}\int{{\sin^6 x \cos^3 x\,dx}} & = \int{{\sin^6 x \cos^2 x\,\cos x\,dx}}\\ & = \int{{{{\sin }^6}x\left( {1 - {{\sin }^2}x} \right)\,\cos x\,dx}}\hspace{0.5in}u = \sin x\\ & = \int{{{u^6}\left( {1 - {u^2}} \right)\,du}}\\ & = \int{{{u^6} - {u^8}\,du}}\\ & = \frac{1}{7}{\sin ^7}x - \frac{1}{9}{\sin ^9}x + c\end{align*}\]At this point let’s pause for a second to summarize what we’ve learned so far about integrating powers of sine and cosine.

\[\begin{equation}\int{{\sin^n x \cos^m x\,dx}} \label{eq:eq2} \end{equation}\]In this integral if the exponent on the sines (\(n\)) is odd we can strip out one sine, convert the rest to cosines using \(\eqref{eq:eq1}\) and then use the substitution \(u = \cos x\). Likewise, if the exponent on the cosines (\(m\)) is odd we can strip out one cosine and convert the rest to sines and the use the substitution \(u = \sin x\).

Of course, if both exponents are odd then we can use either method. However, in these cases it’s usually easier to convert the term with the smaller exponent.

The one case we haven’t looked at is what happens if both of the exponents are even? In this case the technique we used in the first couple of examples simply won’t work and in fact there really isn’t any one set method for doing these integrals. Each integral is different and in some cases there will be more than one way to do the integral.

With that being said most, if not all, of integrals involving products of sines and cosines in which both exponents are even can be done using one or more of the following formulas to rewrite the integrand.

\[\begin{align*}{\cos ^2}x & = \frac{1}{2}\left( {1 + \cos \left( {2x} \right)} \right)\\ {\sin ^2}x & = \frac{1}{2}\left( {1 - \cos \left( {2x} \right)} \right)\\ \sin x\cos x & = \frac{1}{2}\sin \left( {2x} \right)\end{align*}\]The first two formulas are the standard half angle formula from a trig class written in a form that will be more convenient for us to use. The last is the standard double angle formula for sine, again with a small rewrite.

Let’s take a look at an example.

As noted above there are often more than one way to do integrals in which both of the exponents are even. This integral is an example of that. There are at least two solution techniques for this problem. We will do both solutions starting with what is probably the longer of the two, but it’s also the one that many people see first.

*Solution 1*

In this solution we will use the two half angle formulas above and just substitute them into the integral.

So, we still have an integral that can’t be completely done, however notice that we have managed to reduce the integral down to just one term causing problems (a cosine with an even power) rather than two terms causing problems.

In fact to eliminate the remaining problem term all that we need to do is reuse the first half angle formula given above.

\[\begin{align*}\int{{\sin ^2 x \cos ^2 x\,dx}} & = \frac{1}{4}\int{{1 - \frac{1}{2}\left( {1 + \cos \left( {4x} \right)} \right)\,dx}}\\ & = \frac{1}{4}\int{{\frac{1}{2} - \frac{1}{2}\cos \left( {4x} \right)\,dx}}\\ & = \frac{1}{4}\left( {\frac{1}{2}x - \frac{1}{8}\sin \left( {4x} \right)} \right) + c\\ & = \frac{1}{8}x - \frac{1}{{32}}\sin \left( {4x} \right) + c\end{align*}\]So, this solution required a total of three trig identities to complete.

*Solution 2*

In this solution we will use the half angle formula to help simplify the integral as follows.

Now, we use the double angle formula for sine to reduce to an integral that we can do.

\[\begin{align*}\int{{\sin ^2 x \cos ^2 x\,dx}} & = \frac{1}{8}\int{{1 - \cos \left( {4x} \right)\,dx}}\\ & = \frac{1}{8}x - \frac{1}{{32}}\sin \left( {4x} \right) + c\end{align*}\]This method required only two trig identities to complete.

Notice that the difference between these two methods is more one of “messiness”. The second method is not appreciably easier (other than needing one less trig identity) it is just not as messy and that will often translate into an “easier” process.

In the previous example we saw two different solution methods that gave the same answer. Note that this will not always happen. In fact, more often than not we will get different answers. However, as we discussed in the Integration by Parts section, the two answers will differ by no more than a constant.

In general, when we have products of sines and cosines in which both exponents are even we will need to use a series of half angle and/or double angle formulas to reduce the integral into a form that we can integrate. Also, the larger the exponents the more we’ll need to use these formulas and hence the messier the problem.

Sometimes in the process of reducing integrals in which both exponents are even we will run across products of sine and cosine in which the arguments are different. These will require one of the following formulas to reduce the products to integrals that we can do.

\[\begin{align*}\sin \alpha \cos \beta & = \frac{1}{2}\left[ {\sin \left( {\alpha - \beta } \right) + \sin \left( {\alpha + \beta } \right)} \right]\\ \sin \alpha \sin \beta & = \frac{1}{2}\left[ {\cos \left( {\alpha - \beta } \right) - \cos \left( {\alpha + \beta } \right)} \right]\\ \cos \alpha \cos \beta & = \frac{1}{2}\left[ {\cos \left( {\alpha - \beta } \right) + \cos \left( {\alpha + \beta } \right)} \right]\end{align*}\]Let’s take a look at an example of one of these kinds of integrals.

This integral requires the last formula listed above.

\[\begin{align*}\int{{\cos \left( {15x} \right)\cos \left( {4x} \right)\,dx}} & = \frac{1}{2}\int{{\cos \left( {11x} \right) + \cos \left( {19x} \right)\,dx}}\\ & = \frac{1}{2}\left( {\frac{1}{{11}}\sin \left( {11x} \right) + \frac{1}{{19}}\sin \left( {19x} \right)} \right) + c\end{align*}\]Okay, at this point we’ve covered pretty much all the possible cases involving products of sines and cosines. It’s now time to look at integrals that involve products of secants and tangents.

This time, let’s do a little analysis of the possibilities before we just jump into examples. The general integral will be,

\[\begin{equation}\int{{ \sec^n x \tan^m x\,dx}} \label{eq:eq3} \end{equation}\]The first thing to notice is that we can easily convert even powers of secants to tangents and even powers of tangents to secants by using a formula similar to \(\eqref{eq:eq1}\). In fact, the formula can be derived from \(\eqref{eq:eq1}\) so let’s do that.

\[\begin{align}{\sin ^2}x + {\cos ^2}x & = 1 \nonumber\\ \frac{{{{\sin }^2}x}}{{{{\cos }^2}x}} + \frac{{{{\cos }^2}x}}{{{{\cos }^2}x}} & = \frac{1}{{{{\cos }^2}x}} \nonumber \\ {\tan ^2}x + 1 & = {\sec ^2}x \label{eq:eq4} \end{align}\]Now, we’re going to want to deal with \(\eqref{eq:eq3}\) similarly to how we dealt with \(\eqref{eq:eq2}\). We’ll want to eventually use one of the following substitutions.

\[\begin{align*}u & = \tan x & \hspace{0.5in}du & = {\sec ^2}x\,dx\\ u & = \sec x & \hspace{0.5in}du & = \sec x\tan x\,dx\end{align*}\]So, if we use the substitution \(u = \tan x\) we will need two secants left for the substitution to work. This means that if the exponent on the secant (\(n\)) is even we can strip two out and then convert the remaining secants to tangents using \(\eqref{eq:eq4}\).

Next, if we want to use the substitution \(u = \sec x\) we will need one secant and one tangent left over in order to use the substitution. This means that if the exponent on the tangent (\(m\)) is odd and we have at least one secant in the integrand we can strip out one of the tangents along with one of the secants of course. The tangent will then have an even exponent and so we can use \(\eqref{eq:eq4}\) to convert the rest of the tangents to secants. Note that this method does require that we have at least one secant in the integral as well. If there aren’t any secants then we’ll need to do something different.

If the exponent on the secant is even and the exponent on the tangent is odd then we can use either case. Again, it will be easier to convert the term with the smallest exponent.

Let’s take a look at a couple of examples.

First note that since the exponent on the secant isn’t even we can’t use the substitution \(u = \tan x\). However, the exponent on the tangent is odd and we’ve got a secant in the integral and so we will be able to use the substitution \(u = \sec x\). This means stripping out a single tangent (along with a secant) and converting the remaining tangents to secants using \(\eqref{eq:eq4}\).

Here’s the work for this integral.

\[\begin{align*}\int{{ \sec^9 x \tan^5 x \,dx}} & = \int{{ \sec^8 x \tan^4 x\,\tan x\sec x\,dx}}\\ & = \int{{{{\sec }^8}x{{\left( {{{\sec }^2}x - 1} \right)}^2}\,\tan x\sec x\,dx}}\hspace{0.5in}u = \sec x\\ & = \int{{{u^8}{{\left( {{u^2} - 1} \right)}^2}\,du}}\\ & = \int{{{u^{12}} - 2{u^{10}} + {u^8}\,du}}\\ & = \frac{1}{{13}}{\sec ^{13}}x - \frac{2}{{11}}{\sec ^{11}}x + \frac{1}{9}{\sec ^9}x + c\end{align*}\]So, in this example the exponent on the tangent is even so the substitution \(u = \sec x\) won’t work. The exponent on the secant is even and so we can use the substitution \(u = \tan x\) for this integral. That means that we need to strip out two secants and convert the rest to tangents. Here is the work for this integral.

\[\begin{align*}\int{{\sec^4 x \tan^6 x\,dx}} & = \int{{\sec^2 x \tan^6 x\,{{\sec }^2}x\,dx}}\\ & = \int{{\left( {{{\tan }^2}x + 1} \right){{\tan }^6}x\,{{\sec }^2}x\,dx}}\hspace{0.5in}u = \tan x\\ & = \int{{\left( {{u^2} + 1} \right){u^6}\,du}}\\ & = \int{{{u^8} + {u^6}\,du}}\\ & = \frac{1}{9}{\tan ^9}x + \frac{1}{7}{\tan ^7}x + c\end{align*}\]Both of the previous examples fit very nicely into the patterns discussed above and so were not all that difficult to work. However, there are a couple of exceptions to the patterns above and in these cases there is no single method that will work for every problem. Each integral will be different and may require different solution methods in order to evaluate the integral.

Let’s first take a look at a couple of integrals that have odd exponents on the tangents, but no secants. In these cases we can’t use the substitution \(u = \sec x\)since it requires there to be at least one secant in the integral.

To do this integral all we need to do is recall the definition of tangent in terms of sine and cosine and then this integral is nothing more than a Calculus I substitution.

\[\begin{align*}\int{{\tan x\,dx}} & = \int{{\frac{{\sin x}}{{\cos x}}\,dx}}\hspace{0.5in}\hspace{0.25in}\,\,\,\,\,u = \cos x\\ & = - \int{{\frac{1}{u}\,du}}\\ & = - \ln \left| {\cos x} \right| + c\hspace{0.5in}r\ln x = \ln {x^r}\\ & = \ln {\left| {\cos x} \right|^{ - 1}} + c\\ & = \ln \left| {\sec x} \right| + c\end{align*}\]Note that for many folks,

\[\int{{\tan x\,dx}} = - \ln \left| {\cos x} \right| + c\]

We went a step or two further with some simplification. The simplification was done solely to eliminate the minus sign that was in front of the logarithm. This does not have to be done in general, but it is always easy to lose minus signs and in this case it was easy to eliminate it without introducing any real complexity to the answer and so we did.

The trick to this one is do the following manipulation of the integrand.

\[\begin{align*}\int{{{{\tan }^3}x\,dx}} & = \int{{\tan x \tan^2 x\,dx}}\\ & = \int{{\tan x\left( {{{\sec }^2}x - 1} \right)\,dx}}\\ & = \int{{\tan x \sec^2 x\,dx}} - \int{{\tan x\,dx}}\end{align*}\]We can now use the substitution \(u = \tan x\) on the first integral and the results from the previous example on the second integral.

The integral is then,

\[\int{{{{\tan }^3}x\,dx}} = \frac{1}{2}{\tan ^2}x - \ln \left| {\sec x} \right| + c\]Note that all odd powers of tangent (with the exception of the first power) can be integrated using the same method we used in the previous example. For instance,

\[\int{{{{\tan }^5}x\,dx}} = \int{{{{\tan }^3}x\left( {{{\sec }^2}x - 1} \right)\,dx}} = \int{{\tan^3 x \sec^2 x\,dx}} - \int{{{{\tan }^3}x\,dx}}\]So, a quick substitution (\(u = \tan x\)) will give us the first integral and the second integral will always be the previous odd power.

Now let’s take a look at a couple of examples in which the exponent on the secant is odd and the exponent on the tangent is even. In these cases the substitutions used above won’t work.

It should also be noted that both of the following two integrals are integrals that we’ll be seeing on occasion in later sections of this chapter and in later chapters. Because of this it wouldn’t be a bad idea to make a note of these results so you’ll have them ready when you need them later.

This one isn’t too bad once you see what you’ve got to do. By itself the integral can’t be done. However, if we manipulate the integrand as follows we can do it.

\[\begin{align*}\int{{\sec x\,dx}} & = \int{{\frac{{\sec x\left( {\sec x + \tan x} \right)}}{{\sec x + \tan x}}\,dx}}\\ & = \int{{\frac{{{{\sec }^2}x + \tan x\sec x}}{{\sec x + \tan x}}\,dx}}\end{align*}\]In this form we can do the integral using the substitution \(u = \sec x + \tan x\). Doing this gives,

\[\int{{\sec x\,dx}} = \ln \left| {\sec x + \tan x} \right| + c\]The idea used in the above example is a nice idea to keep in mind. Multiplying the numerator and denominator of a term by the same term above can, on occasion, put the integral into a form that can be integrated. Note that this method won’t always work and even when it does it won’t always be clear what you need to multiply the numerator and denominator by. However, when it does work and you can figure out what term you need it can greatly simplify the integral.

Here’s the next example.

This one is different from any of the other integrals that we’ve done in this section. The first step to doing this integral is to perform integration by parts using the following choices for \(u\) and \(dv\).

\[\begin{align*}u & = \sec x &\hspace{0.5in}dv & = {\sec ^2}x\,dx\\ du & = \sec x\tan x\,dx & \hspace{0.5in}v & = \tan x\end{align*}\]Note that using integration by parts on this problem is not an obvious choice, but it does work very nicely here. After doing integration by parts we have,

\[\int{{{{\sec }^3}x\,dx}} = \sec x\tan x - \int{{\sec x \tan^2 x\,dx}}\]Now the new integral also has an odd exponent on the secant and an even exponent on the tangent and so the previous examples of products of secants and tangents still won’t do us any good.

To do this integral we’ll first write the tangents in the integral in terms of secants. Again, this is not necessarily an obvious choice but it’s what we need to do in this case.

\[\begin{align*}\int{{{{\sec }^3}x\,dx}} & = \sec x\tan x - \int{{\sec x\left( {{{\sec }^2}x - 1} \right)\,dx}}\\ & = \sec x\tan x - \int{{{{\sec }^3}x\,dx}} + \int{{\sec x\,dx}}\end{align*}\]Now, we can use the results from the previous example to do the second integral and notice that the first integral is exactly the integral we’re being asked to evaluate with a minus sign in front. So, add it to both sides to get,

\[2\int{{{{\sec }^3}x\,dx}} = \sec x\tan x + \ln \left| {\sec x + \tan x} \right|\]Finally divide by two and we’re done.

\[\int{{{{\sec }^3}x\,dx}} = \frac{1}{2}\left( {\sec x\tan x + \ln \left| {\sec x + \tan x} \right|} \right) + c\]Again, note that we’ve again used the idea of integrating the right side until the original integral shows up and then moving this to the left side and dividing by its coefficient to complete the evaluation. We first saw this in the Integration by Parts section and noted at the time that this was a nice technique to remember. Here is another example of this technique.

Now that we’ve looked at products of secants and tangents let’s also acknowledge that because we can relate cosecants and cotangents by

\[1 + {\cot ^2}x = {\csc ^2}x\]all of the work that we did for products of secants and tangents will also work for products of cosecants and cotangents. We’ll leave it to you to verify that.

There is one final topic to be discussed in this section before moving on.

To this point we’ve looked only at products of sines and cosines and products of secants and tangents. However, the methods used to do these integrals can also be used on some quotients involving sines and cosines and quotients involving secants and tangents (and hence quotients involving cosecants and cotangents).

Let’s take a quick look at an example of this.

If this were a product of sines and cosines we would know what to do. We would strip out a sine (since the exponent on the sine is odd) and convert the rest of the sines to cosines. The same idea will work in this case. We’ll strip out a sine from the numerator and convert the rest to cosines as follows,

\[\begin{align*}\int{{\frac{{{{\sin }^7}x}}{{{{\cos }^4}x}}\,dx}} & = \int{{\frac{{{{\sin }^6}x}}{{{{\cos }^4}x}}\,\sin x\,dx}}\\ & = \int{{\frac{{{{\left( {{{\sin }^2}x} \right)}^3}}}{{{{\cos }^4}x}}\,\sin x\,dx}}\\ & = \int{{\frac{{{{\left( {1 - {{\cos }^2}x} \right)}^3}}}{{{{\cos }^4}x}}\,\sin x\,dx}}\end{align*}\]At this point all we need to do is use the substitution \(u = \cos x\)and we’re done.

\[\begin{align*}\int{{\frac{{{{\sin }^7}x}}{{{{\cos }^4}x}}\,dx}} & = - \int{{\frac{{{{\left( {1 - {u^2}} \right)}^3}}}{{{u^4}}}\,du}}\\ & = - \int{{{u^{ - 4}} - 3{u^{ - 2}} + 3 - {u^2}\,du}}\\ & = - \left( { - \frac{1}{3}\frac{1}{{{u^3}}} + 3\frac{1}{u} + 3u - \frac{1}{3}{u^3}} \right) + c\\ & = \frac{1}{{3{{\cos }^3}x}} - \frac{3}{{\cos x}} - 3\cos x + \frac{1}{3}{\cos ^3}x + c\end{align*}\]So, under the right circumstances, we can use the ideas developed to help us deal with products of trig functions to deal with quotients of trig functions. The natural question then, is just what are the right circumstances?

First notice that if the quotient had been reversed as in this integral,

\[\int{{\frac{{{{\cos }^4}x}}{{{{\sin }^7}x}}\,dx}}\]we wouldn’t have been able to strip out a sine.

\[\int{{\frac{{{{\cos }^4}x}}{{{{\sin }^7}x}}\,dx}} = \int{{\frac{{{{\cos }^4}x}}{{{{\sin }^6}x}}\,\,\frac{1}{{\sin x}}\,\,dx}}\]In this case the “stripped out” sine remains in the denominator and it won’t do us any good for the substitution \(u = \cos x\)since this substitution requires a sine in the numerator of the quotient. Also note that, while we could convert the sines to cosines, the resulting integral would still be a fairly difficult integral.

So, we can use the methods we applied to products of trig functions to quotients of trig functions provided the term that needs parts stripped out in is the numerator of the quotient.