(AI3) Trigonometric Integrals (Powers of Secant and Tangent)#

In this lesson we are going to see how to calculate integrals of the form:

\[ \int \tan^m x \sec^n x \, dx \]

Videos#

Substitution Rule#

Our main strategy is going to be a \(u\)-substitution with either \(u=\sec x\) or \(u=\tan x\). Which one we choose, ultimately comes down to the differentials.

secant
\[\begin{split}u&=\sec x\\ du&=\sec x\tan x \, dx\end{split}\]
tangent
\[\begin{split}u&=\tan x\\ du&=\sec^2 x \, dx\end{split}\]

In order to make the differentials match with what’s actually in our integral, we start with the function we’re integrating and factor off either a \(\left(\sec x \tan x\right)\) term or a \(\left(\sec^2 x\right)\) term and put it next to the \(dx\).

In order to convert between powers of \(\sec x\) and powers of \(\tan x\) we use the following identity:

Trigonometric Identity

\[\sec^2 \theta = 1+\tan^2 \theta\]

Example 1#

Integrate the following:

\[ \int \tan^6 x \sec^4 x \, dx \]
Solution (Click to see the steps.)

Separate: We start by separating off a \(\left(\sec^2 x \right)\) term to get:

\[\int \tan^6 x \sec^4 x \, dx = \int \tan^6 x \sec^2 x \cdot \left(\sec^2 x \right)\, dx\]

Convert: Since we factored off a \(\left(\sec^2 x \right)\) term, this means we need to convert all remaining trig functions into powers of \(\tan x\).

\[\begin{split}&= \int \tan^6 x \sec^2 x \cdot \left(\sec^2 x \right)\, dx\\ &= \int \tan^6 x \left(1+\tan^2 x\right) \cdot \left(\sec^2 x \right)\, dx\\\end{split}\]

This is where we use the trig identity: \(\sec^2 \theta = 1+\tan^2 \theta\)

Choose u: Now we’re ready for a \(u\)-substitution. Since we factored off a \(\left(\sec^2 x \right)\) term, we choose:

\[ u=\tan x\]

and then we calculate \(du\) to get:

\[ du = \sec^2 x \, dx\]

And then substituting our \(u\) and \(du\) into the integral gives us:

\[\begin{split}&= \int \tan^6 x \left(1+\tan^2 x\right) \cdot \left(\sec^2 x \right)\, dx\\ &= \int u^6 \left(1+u^2\right) \, du\\\end{split}\]

Finish It! And finally we finish the integration. First multiply everything out so that we have only power functions to integrate.

\[\begin{split}&= \int u^6 \left(1+u^2\right) \, du\\ &= \int \left(u^6+u^8\right) \, du\\ &= \tfrac{1}{7}u^{7}+\tfrac{1}{9}u^9+C\\\end{split}\]

And then convert back to \(x\) to get our answer:

\[\begin{split}&= \tfrac{1}{7}\tan^{7}x+\tfrac{1}{9}\tan^9x+C\\\end{split}\]

(Don’t forget \(+C\) for indefinite integrals!)


Example 2#

Integrate the following:

\[ \int \tan^5 x \sec^7 x \, dx \]
Solution (Click to see the steps.)

Separate: We start by separating off a \(\left(\sec x \tan x \right)\) term to get:

\[\int \tan^5 x \sec^7 x \, dx = \int \tan^4 x \sec^6 x \cdot \left(\sec x \tan x \right)\, dx\]

Convert: Since we factored off a \(\left(\sec x \tan x \right)\) term, this means we need to convert all remaining trig functions into powers of \(\sec x\).

\[\begin{split}&= \int \tan^4 x \cdot \sec^6 x \cdot \left(\sec x \tan x \right)\, dx\\ &= \int \tan^2 x \cdot \tan^2 x \cdot \sec^6 x \cdot \left(\sec x \tan x \right)\, dx\\ &= \int \left(\sec^2 x-1\right)\left(\sec^2 x-1\right) \sec^6 x \cdot \left(\sec x \tan x \right)\, dx\\\end{split}\]

This is where we use the trig identity: \(\sec^2 \theta = 1+\tan^2 \theta\)

Choose u: Now we’re ready for a \(u\)-substitution. Since we factored off a \(\left(\sec x \tan x \right)\) term, we choose:

\[ u=\sec x\]

and then we calculate \(du\) to get:

\[ du = \sec x \tan x \, dx\]

And then substituting our \(u\) and \(du\) into the integral gives us:

\[\begin{split}&= \int \left(\sec^2 x-1\right)\left(\sec^2 x-1\right) \sec^6 x \cdot \left(\sec x \tan x \right)\, dx\\ &= \int \left(u^2-1\right)\left(u^2-1\right) u^6 \, du\\\end{split}\]

Finish It! And finally we finish the integration. First multiply everything out so that we have power functions to integrate.

\[\begin{split}&= \int \left(u^2-1\right)\left(u^2-1\right) u^6 \, du\\ &= \int \left(u^4-2u^2+1\right) u^6 \, du\\ &= \int \left(u^{10}-2u^8+u^6\right) \, du\\ &= \tfrac{1}{11}u^{11}-\tfrac{2}{9}u^9+\tfrac{1}{7}u^7+C\\\end{split}\]

And then finally we convert back to \(x\) to get our answer:

\[\begin{split}&= \tfrac{1}{11}\sec^{11}x-\tfrac{2}{9}\sec^9x+\tfrac{1}{7}\sec^7x+C\\\end{split}\]

(Don’t forget \(+C\) for indefinite integrals!)

Get Creative#

Unfortunately, the substitution strategy used in the first two examples doesn’t always work. If this happens we have a few more things to try:

  1. Use Trig Identities: Keep trying to use our main identity \(\sec^2 \theta = 1 + \tan^2\theta\), you might still get something useful.

  2. Convert to sine and cosine: We have techniques for integrating powers of \(\sin x\) and \(\cos x\) which might be helpful.

  3. Integration by parts: This can be a helpful way to move exponents between trig functions. Maybe try making the \(dv\) term either \(\sec^2 x\) or \(\sec x \tan x\).

A lot of times, success with the above methods comes down to also knowing:

Helpful Antiderivatives

\[\begin{split}\int \tan x \, dx & = \ln \left|\sec x \right| +C\\ \int \sec x \, dx & = \ln \left|\sec x +\tan x \right| +C\\\end{split}\]

Example 3#

Integrate the following:

\[ \int \tan^3 x \, dx \]
Solution 1 (Trig identities)

Separate: We are still going to try using our trig identity: \(\sec^2 x = 1 + \tan^2x\). Since this has a \(\tan^2 x\) term, let’s start by breaking our function up:

\[\int \tan^3 x \, dx = \int \tan x \tan^2 x\, dx\]

Trig Identity: Now we can apply the trig identity \(\sec^2 x = 1 + \tan^2x\) to get:

\[\begin{split}\int \tan x \tan^2 x\, dx &= \int \tan x \left(\sec^2 x -1\right) \, dx \\ &= \int \left(\tan x \cdot \sec^2 x -\tan x\right) \, dx \\\end{split}\]

And we also multiply everything out.

Now it comes down to 2 integrals:

Finish It! And finally we put it all together and get:

\[\begin{split}&= \int \left(\tan x \cdot \sec^2 x -\tan x\right) \, dx \\ &= \int \tan x \cdot \sec^2 x \, dx -\int \tan x \, dx \\ &= \tfrac{1}{2}\tan^2 x -\ln \left|\sec x \right| +C \\\end{split}\]

(Don’t forget \(+C\) for indefinite integrals!)

Solution 2 (Convert to sine and cosine)

Convert: We are going to start by converting everything into sine and cosine terms:

\[\int \tan^3 x \, dx = \int \dfrac{\sin^3 x}{\cos^3 x}\, dx\]

Powers of Sine: Since we have an odd power of sine in the numerator, we can separate off one \(\sin x\) and put it next to the \(dx\)

\[\int \dfrac{\sin^3 x}{\cos^3 x}\, dx = \int \dfrac{\sin^2 x}{\cos^3 x}\cdot \sin x\, dx \]

Putting a \(\sin x\) next to \(dx\) tells us we are going to use the opposite function \(\cos x\) as our \(u\)-sub. So let’s convert everything else remaining in our integral to cosine:

\[= \int \dfrac{1-\cos^2 x}{\cos^3 x}\cdot \sin x\, dx \]

Here we use our standard trig identity: \(\sin^2\theta +\cos^2\theta =1\)

Substitution: Now we can do our \(u\)-substitution:

\[\begin{split}u&=\cos x\\ du&=-\sin x \, dx \longrightarrow (-1)du=\sin x \, dx\\\end{split}\]

And plugging all of this into our integral gives us:

\[\begin{split}&= \int \dfrac{1-\cos^2 x}{\cos^3 x}\cdot \sin x\, dx\\ & = \int \dfrac{1-u^2}{u^3}\cdot (-1)\, du \\ & = \int \dfrac{u^2-1}{u^3}\, du \\\end{split}\]

Finish It! And finally if we do the division we can finish the integration:

\[\begin{split}& = \int \dfrac{u^2-1}{u^3}\, du \\ & = \int \tfrac{1}{u}-\tfrac{1}{u^3}\, du \\ &= \ln\left|u\right|+\tfrac{1}{2}u^{-2} +C \\\end{split}\]

And converting back to our original variable:

\[\begin{split}&= \ln\left|\cos x\right|+\tfrac{1}{2}\cos^{-2} x +C \\\end{split}\]

(Don’t forget \(+C\) for indefinite integrals!)

Example 4#

Integrate the following:

\[ \int \sec^3 x \, dx \]
Solution (Using Integration By Parts and Trig Identities)

Separate: We start by separating off a \(\left(\sec^2 x \right)\) term to get:

\[\int \sec^3 x \, dx = \int \sec x \cdot \sec^2 x \, dx\]

Now we can choose \(u\) and \(dv\):

u
\[\begin{split}u&= \sec x\\ du&=\sec x \tan x \, dx\end{split}\]
dv
\[\begin{split}dv&= \sec^2 x\, dx\\ v&=\tan x \end{split}\]

The reason why we factored off a \(\sec^2 x \) term and chose that for \(dv\) is because it is easy to integrate (its one of our elementary antiderivatives).

Applying the integration by parts formula gives us:

\[= \sec x \tan x-\int \sec x \tan^2 x \, dx\]

Trig Identity: The resulting integral from the integration by parts is still tricky, so we try using a trig identity:

\[\begin{split}&= \sec x \tan x-\int \sec x \tan^2 x \, dx\\ &= \sec x \tan x-\int \sec x \left(\sec^2 x-1\right) \, dx\\ &= \sec x \tan x-\int \sec^3 x -\sec x \, dx\end{split}\]

And now it seems like we might be back where we started, so let’s formally state what we have so far:

\[\int \sec^3 x \, dx = \sec x \tan x-\int \sec^3 x \, dx +\int \sec x \, dx\]

Unknown Integral: If we look at this resulting equation we see that our unknown integral shows up on both sides.

\[\int \sec^3 x \, dx = \sec x \tan x-\int \sec^3 x \, dx +\int \sec x \, dx\]

So let’s actually solve for it! And to help picture some of the algebra we’ll rename our unknown integral:

\[Y = \int \sec^3 x \, dx \]

Giving us the (shortened) equation:

\[Y= \sec x \tan x- Y +\int \sec x \, dx\]

Now we just need to solve for \(Y\). Add \(Y\) to both sides to get:

\[2Y= \sec x \tan x +\int \sec x \, dx\]

And then divide both sides by \(2\):

\[Y= \tfrac{1}{2}\sec x \tan x + \tfrac{1}{2}\int \sec x \, dx\]

And there we go!

\[\int \sec^3 x \, dx = \tfrac{1}{2}\sec x \tan x + \tfrac{1}{2}\int \sec x \, dx\]

Finish It! And finally we can finish the remaining integral with the use of some helpful antiderivatives:

\[\begin{split}\int \sec^3 x \, dx &= \tfrac{1}{2}\sec x \tan x + \tfrac{1}{2}\int \sec x \, dx \\ &= \tfrac{1}{2}\sec x \tan x + \tfrac{1}{2}\ln \left|\sec x +\tan x \right| +C \\\end{split}\]

(Don’t forget \(+C\) for indefinite integrals!)

Helpful Antiderivatives

\[\begin{split}\int \tan x \, dx & = \ln \left|\sec x \right| +C\\ \int \sec x \, dx & = \ln \left|\sec x +\tan x \right| +C\\\end{split}\]