01 / 21

Integrating
\(\tan\) & \(\sec\) Products

Master the strategies for evaluating integrals of the form \(\int \tan^m x\,\sec^n x\,dx\) by choosing the right substitution and identity.

Calculus 2

Why \(\tan\) and \(\sec\) Products?

Integrals involving products of \(\tan x\) and \(\sec x\) appear constantly in calculus: in trigonometric substitution, in computing arc lengths, and in evaluating surface areas of revolution. They also connect to the integral of \(\sec x\), one of the most famous results in calculus.

Essential Identities You Need

Pythagorean
\(\sec^2 x = 1 + \tan^2 x\)
Derivative of \(\tan\)
\(\dfrac{d}{dx}[\tan x] = \sec^2 x\)
Derivative of \(\sec\)
\(\dfrac{d}{dx}[\sec x] = \sec x\tan x\)

The Two Key Differentials

\(u = \tan x\)
Then \(du = \sec^2 x\,dx\). You need a spare \(\sec^2 x\) factor to peel off. Convert remaining \(\sec^2\) to \(1 + \tan^2\).
\(u = \sec x\)
Then \(du = \sec x\tan x\,dx\). You need a spare \(\sec x\tan x\) factor to peel off. Convert remaining \(\tan^2\) to \(\sec^2 - 1\).

Strategy 1: \(n\) is Even

When the power of \(\sec x\) is even (\(n = 2, 4, 6, \ldots\)), peel off \(\sec^2 x\,dx\) and let \(u = \tan x\).

1
Factor out \(\sec^2 x\,dx\). This becomes \(du\).
2
Convert remaining \(\sec^2 x\) factors using \(\sec^2 x = 1 + \tan^2 x = 1 + u^2\).
3
Express \(\tan^m x\) as \(u^m\). The integrand is now a polynomial in \(u\).
4
Integrate and substitute back \(u = \tan x\).

Strategy 2: \(m\) is Odd

When the power of \(\tan x\) is odd (\(m = 1, 3, 5, \ldots\)), peel off \(\sec x\tan x\,dx\) and let \(u = \sec x\).

1
Factor out \(\sec x\tan x\,dx\). This becomes \(du\).
2
Convert remaining \(\tan^2 x\) factors using \(\tan^2 x = \sec^2 x - 1 = u^2 - 1\).
3
Express remaining \(\sec x\) powers as \(u\) powers.
4
Integrate and substitute back \(u = \sec x\).

Choosing Your Strategy

Condition Substitution Convert with
\(n\) even \(u = \tan x\) \(\sec^2 x = 1 + u^2\)
\(m\) odd \(u = \sec x\) \(\tan^2 x = u^2 - 1\)
Both apply Either works Pick the simpler algebra
\(m\) even, \(n\) odd Reduction formulas or IBP Convert \(\tan^2 x = \sec^2 x - 1\)

Decision Flowchart

\(\int \tan^m x\,\sec^n x\,dx\)
Is \(n\) even?
Yes No
\(u = \tan x\)
Peel off \(\sec^2 x\,dx\)
Is \(m\) odd?
Yes No
\(u = \sec x\)
Peel off \(\sec x\tan x\,dx\)
Reduction / IBP
\(\tan^2 x = \sec^2 x - 1\), repeat

How to Apply the Strategy

1
Identify \(m\) and \(n\) in \(\int \tan^m x\,\sec^n x\,dx\).
2
Check \(n\) first: if even, use \(u = \tan x\).
3
Otherwise check \(m\): if odd, use \(u = \sec x\).
4
Peel off the appropriate differential factor.
5
Convert all remaining trig functions to \(u\) using the Pythagorean identity.
6
Integrate the resulting polynomial in \(u\), then back-substitute.

Example 1: \(\int \tan^3 x\,\sec^4 x\,dx\)

Here \(m = 3\) (odd) and \(n = 4\) (even). Both strategies apply. Since \(n\) is even, let's use \(u = \tan x\), so \(du = \sec^2 x\,dx\).

Example 2: \(\int \tan^5 x\,\sec^3 x\,dx\)

Here \(m = 5\) (odd) and \(n = 3\) (odd). Since \(m\) is odd, let \(u = \sec x\), so \(du = \sec x\tan x\,dx\).

Example 3: \(\int \tan^4 x\,\sec^2 x\,dx\)

Here \(m = 4\) and \(n = 2\) (even). This is the simplest case: \(\sec^2 x\,dx\) is already the differential of \(\tan x\). Let \(u = \tan x\).

When \(n = 2\), you don't even need the identity: the entire integral reduces to a pure power of \(u\).

Special Case: \(\int \sec^n x\,dx\)

When there is no tangent factor (\(m = 0\)) and \(n\) is odd, neither standard substitution works. These require integration by parts or known results.

\(\int \sec x\,dx\)
\(\ln|\sec x + \tan x| + C\)
\(\int \sec^3 x\,dx\)
\(\frac{1}{2}\sec x\tan x + \frac{1}{2}\ln|\sec x + \tan x| + C\)

Special Case: \(\int \tan^m x\,dx\)

When there is no secant factor (\(n = 0\)), use the identity \(\tan^2 x = \sec^2 x - 1\) to reduce the power step by step.

Common Mistakes

✕ Wrong Substitution
Using \(u = \tan x\) when \(n\) is odd and \(m\) is even: you cannot peel off \(\sec^2 x\,dx\) without leftover odd powers of \(\sec x\).
✕ Identity Backwards
Writing \(\tan^2 x = 1 + \sec^2 x\) instead of \(\tan^2 x = \sec^2 x - 1\). The sign and direction matter.
✕ Forgetting to Peel Off
Setting \(u = \sec x\) but not reserving one \(\sec x\tan x\) factor for \(du\). The substitution fails without its differential.

Strategy Summary

Powers Method Key Step
\(n\) even, any \(m\) \(u = \tan x\) Peel \(\sec^2 x\,dx\)
\(m\) odd, any \(n\) \(u = \sec x\) Peel \(\sec x\tan x\,dx\)
\(m\) even, \(n\) odd Reduce + IBP \(\tan^2 x = \sec^2 x - 1\), repeat
\(m\) only (\(n=0\)) Reduction Rewrite \(\tan^2 x = \sec^2 x - 1\)
\(n\) only (\(m=0\)) IBP / Known Use known \(\int\sec^n x\,dx\) results

Question 1 of 5

Which substitution is best for \(\displaystyle\int \tan^2 x\,\sec^4 x\,dx\)?

Question 2 of 5

Evaluate \(\displaystyle\int \tan x\,\sec^3 x\,dx\).

Question 3 of 5

After setting \(u = \tan x\), what does \(\displaystyle\int \tan^2 x\,\sec^6 x\,dx\) become?

Question 4 of 5

What is the correct Pythagorean identity relating \(\tan^2 x\) and \(\sec^2 x\)?

Question 5 of 5

Which integral requires integration by parts or a reduction formula rather than a direct \(u\)-substitution?