Introduction
Products of powers of tangent and secant often become manageable when one factor matches the derivative of another. The key is to inspect the exponents before choosing a substitution: an even secant power can supply a secant-squared factor, while an odd tangent power can supply a secant–tangent factor.
These pairings are useful because the remaining powers can then be rewritten using the identity connecting tangent and secant. The result is often an integral of a polynomial after substitution. The exponent pattern is a guide to a method, not a guarantee that every tangent–secant product has the same easy form.
The Derivatives and Identity to Look For
On any interval where \(\cos x\ne 0\), tangent and secant are defined and satisfy
The last identity also gives \(\tan^2 x=\sec^2 x-1\). These derivative and identity pairs suggest two standard patterns for integrating \(\tan^m x\sec^n x\), where \(m,n\) are nonnegative integers.
The first pattern applies when \(n\) is a positive even integer: keep one factor \(\sec^2 x\,dx\), then rewrite the remaining secant powers using \(\sec^2 x=1+\tan^2 x\). The second applies when \(m\) is odd and \(n\ge 1\): keep \(\sec x\tan x\,dx\), then rewrite the remaining even power of tangent using \(\tan^2 x=\sec^2 x-1\).
Why the Pairing Works
The method is an application of the substitution rule, which follows from the chain rule. If \(u=g(x)\), then \(du=g'(x)\,dx\). Thus, when a factor of an integrand is exactly \(g'(x)\,dx\), the integral can be rewritten in terms of \(u\), provided the rest of the integrand is also expressed in terms of \(u\).
For example, if \(n\) is positive and even, write \(n=2k\), where \(k\ge1\). Then
Set \(u=\tan x\), so \(du=\sec^2 x\,dx\). Each remaining \(\sec^2 x\) becomes \(1+u^2\), giving
This is a polynomial integral for nonnegative integer \(m\) and \(k\), and can be evaluated by expanding or integrating the powers directly.
For the second pattern, write \(m=2j+1\), where \(j\ge0\), and keep one \(\tan x\) and one \(\sec x\):
Set \(u=\sec x\), so \(du=\sec x\tan x\,dx\). Since \(\tan^2 x=u^2-1\), this becomes
For the stated integer exponents and \(n\ge1\), this too is a polynomial integral. In both derivations, the substitution is valid on intervals where the original trigonometric functions are defined; differentiating the resulting expression verifies the antiderivative on those intervals.
Choose the Pair Before Rewriting
A useful first step is to inspect the exponents, then decide which derivative factor the integrand can supply. Only after identifying the factor should you rewrite the remaining powers. This avoids changing the integrand into a form that no longer displays the useful derivative.
If it is positive and even, reserve a factor of \(\sec^2 x\,dx\) and consider \(u=\tan x\).
If it is odd and there is at least one secant factor, reserve \(\sec x\tan x\,dx\) and consider \(u=\sec x\).
Use \(\sec^2 x=1+\tan^2 x\) for the tangent substitution, or \(\tan^2 x=\sec^2 x-1\) for the secant substitution.
Express the result in \(x\), then differentiate it to see whether it reproduces the original integrand.
If neither indicated pairing is available—for instance, when the tangent exponent is even and the secant exponent is odd—do not pretend that a missing derivative factor is present. That exponent pattern calls for a different strategy.
Worked Examples
Worked Example: An Even Secant Power
Evaluate \(\int \tan^3 x\sec^4 x\,dx\). The secant exponent is even, so reserve one \(\sec^2 x\,dx\) factor and use \(u=\tan x\).
First split the secant power and rewrite the leftover factor:
Set \(u=\tan x\), so \(du=\sec^2 x\,dx\). The integral becomes
Check by differentiation:
The derivative equals the original integrand.
Worked Example: An Odd Tangent Power
Evaluate \(\int \tan^5 x\sec^3 x\,dx\). The secant exponent is odd, but the tangent exponent is odd and there is a secant factor. Keep \(\sec x\tan x\,dx\) and use \(u=\sec x\).
Separate the paired factor:
Now set \(u=\sec x\), so \(du=\sec x\tan x\,dx\). The remaining factors become \(\tan^4 x=(u^2-1)^2\) and \(\sec^2 x=u^2\). Therefore
To check, differentiate the expression in \(u\) first and then apply the chain rule:
Here, \(\sec^2 x-1=\tan^2 x\), so the check recovers the given product exactly.
Worked Example: The Secant–Tangent Pairing with an Odd Secant Power
Evaluate \(\int \tan^3 x\sec^5 x\,dx\). The tangent exponent is odd, so the secant–tangent pairing is available. The secant exponent is also odd, so the even-secant pairing is not available. Use \(u=\sec x\).
Keep \(\sec x\tan x\,dx\). The leftover factors are \(\tan^2 x\sec^4 x\):
Differentiate to check:
Again, the derivative matches the original integrand.
A Common Identity Mistake
When substituting \(u=\sec x\), the identity needed to replace even powers of tangent is \(\tan^2 x=u^2-1\), not \(1-u^2\). Reversing the subtraction changes the integral and produces an incorrect result.
For example, in the second worked example, a mistaken rewrite would give \(\int u^2(1-u^2)^2\,du\). Since \((1-u^2)^2=(u^2-1)^2\), this particular squared expression happens to be unchanged; that accidental agreement can hide the error. Instead, consider the unsquared factor from the third example: \(\tan^2 x\) must become \(u^2-1\). At a point where \(\sec x=2\), the identity gives \(\tan^2 x=4-1=3\); the reversed expression gives \(1-4=-3\), which cannot equal a square.
The reliable correction is to derive the substitution identity directly from \(\sec^2 x=1+\tan^2 x\): rearranging gives \(\tan^2 x=\sec^2 x-1\), so after \(u=\sec x\), \(\tan^2 x=u^2-1\). Check the final answer by differentiation rather than relying only on a plausible-looking expansion.
When the Pairing Is Not Present
The two patterns above are selection tools for particular exponent combinations; they are not a universal recipe. In \(\tan^m x\sec^n x\), a positive even \(n\) supplies \(\sec^2 x\,dx\), and an odd \(m\), together with \(n\ge1\), supplies \(\sec x\tan x\,dx\). If neither condition holds, neither of these direct pairings is available as stated. Do not insert an extra factor without also accounting for it elsewhere.
When both patterns are available, compare the rewrites and choose the one that leaves the simpler integral. In the examples above, even secant powers favored \(u=\tan x\), while odd tangent powers with odd secant powers favored \(u=\sec x\). In each case, the decisive question was whether the leftover factors could be expressed cleanly in terms of the substitution variable.
Check Your Understanding
For each question, identify the useful pairing before carrying out any algebra.
- For \(\int \tan^2 x\sec^4 x\,dx\), which substitution is suggested by the secant exponent, and what factor is kept with \(dx\)?
- Rewrite \(\tan^6 x\) in terms of \(u=\sec x\).
- For \(\int \tan^3 x\sec^5 x\,dx\), write the paired factor and the remaining factors before substituting.
- Why does an even secant exponent allow a factor \(\sec^2 x\,dx\) to be reserved?
- For a product with even tangent exponent and odd secant exponent, are either of the two standard pairings above directly available? Explain.