Why the Exponents Guide the Substitution
Mixed powers of tangent and secant are easiest to integrate when the integrand contains a factor that matches the derivative of one of those functions. The two identities to look for are \(\frac{d}{dx}\tan x=\sec^2 x\) and \(\frac{d}{dx}\sec x=\sec x\tan x\). Exponent parity tells us whether such a factor can be separated while the remaining powers are rewritten using \(\sec^2 x=1+\tan^2 x\).
Here we consider integrals of \(\tan^m x\sec^n x\), with \(m,n\) nonnegative integers. The aim is to choose an efficient direct substitution, not to claim that every such integral has an elementary antiderivative through one of these two patterns.
The Two Patterns at a Glance
| Exponent pattern | Useful factor | Substitution |
|---|---|---|
| \(n\) positive and even | \(\sec^2 x\,dx\) | \(u=\tan x\) |
| \(m\) odd and \(n\) positive | \(\sec x\tan x\,dx\) | \(u=\sec x\) |
| \(m\) odd and \(n=0\) | \(\tan x\,dx\), with \(d(\sec x)=\sec x\tan x\,dx\) | \(u=\sec x\), including a factor \(1/u\) |
| \(n\) odd and \(m\) even | Neither standard factor is available by this parity test | Neither direct pattern applies as stated |
| \(n=0\) and \(m\) even | No secant-squared or odd tangent factor is saved | Neither direct pattern applies as stated |
The rows can overlap: if \(n\) is positive and even and \(m\) is odd, either substitution can be arranged. In that case, tangent substitution is often the more direct choice. The table identifies useful patterns; it does not say that the listed cases are the only possible ways to approach the integral.
Why the Substitutions Work
The transformations follow from separating the derivative factor and converting the remaining powers with the identity \(\sec^2 x=1+\tan^2 x\). For tangent substitution, suppose \(n=2s\) with \(s\geq 1\), and set \(u=\tan x\). Then \(du=\sec^2 x\,dx\), while each remaining pair of secant factors becomes \(1+\tan^2 x\). Thus
For secant substitution, suppose \(m=2r+1\) and \(n\geq1\). Set \(u=\sec x\), so \(du=\sec x\tan x\,dx\). The remaining tangent power is even, and \(\tan^2 x=\sec^2 x-1\). Therefore
These are ordinary substitution steps: the separated factor is exactly the differential of the chosen variable, and the other factors are rewritten in terms of that variable. The substitutions are applied on intervals where the original integrand is defined and the change of variable is valid. Any proposed result can also be checked by differentiating it on such an interval.
Worked Example: Even Secant Exponent
Worked Example: Even Secant Exponent
Evaluate \(\int \tan^3 x\sec^4 x\,dx\). The secant exponent \(4\) is positive and even, so save a factor of \(\sec^2 x\,dx\) and use \(u=\tan x\).
To check, differentiate the result:
The derivative is the original integrand, so the antiderivative is verified.
Worked Example: Odd Tangent and Positive Secant Powers
Worked Example: Odd Tangent and Positive Secant Powers
Evaluate \(\int \tan^3 x\sec^3 x\,dx\). The tangent exponent is odd, and there is at least one secant factor, so separate \(\sec x\tan x\,dx\) and use \(u=\sec x\).
Differentiate to check:
Since \(\sec^2 x-1=\tan^2 x\), this derivative matches the integrand.
Worked Example: Odd Tangent Power with No Secant Factor
Worked Example: Odd Tangent Power with No Secant Factor
The secant-substitution pattern also has a version when \(n=0\), although there is no secant factor to save at first. Evaluate \(\int \tan^3 x\,dx\). Write \(\tan^3 x=\tan^2 x\tan x\), set \(u=\sec x\), and use \(du=\sec x\tan x\,dx\). Because the original expression has \(\tan x\,dx\), write \(\tan x\,dx=du/u\).
On intervals where the original integrand is defined, \(\sec x\neq0\), so the logarithm is defined. To verify the answer, differentiate:
This case shows why the table treats \(n=0\) separately: the substitution still works for odd \(m\), but the transformed integral includes a factor \(1/u\).
When the Patterns Overlap
If \(m\) is odd and \(n\) is positive and even, both derivative factors can be made available. For example, in \(\int \tan^5 x\sec^2 x\,dx\), tangent substitution immediately gives \(\int u^5\,du\), because \(\sec^2 x\,dx=du\). The result is \(\tan^6 x/6+C\).
Secant substitution is also possible: separate \(\sec x\tan x\,dx\), leaving \(\tan^4 x\sec x\). In terms of \(u=\sec x\), this becomes \((u^2-1)^2u\,du\), whose integral is \((u^2-1)^3/6+C\). Since \(u^2-1=\tan^2 x\), this is again \(\tan^6 x/6+C\). The tangent choice is shorter here because its saved factor leaves no additional secant power to convert.
Cases Not Settled by the Parity Test
When \(n\) is odd and \(m\) is even, there is no secant-squared factor to save, and there is no odd tangent power that supplies a \(\sec x\tan x\) factor. For instance, in \(\int \tan^2 x\sec^3 x\,dx\), neither direct pattern above applies as stated. That observation is a classification, not a claim that the integral is impossible to evaluate: other identities or techniques may be useful.
Similarly, when \(n=0\) and \(m\) is even, the integrand has neither a positive even secant power nor an odd tangent power. The case \(m=n=0\) is simply \(\int 1\,dx=x+C\); other cases may require a different rewriting. The useful decision is not to force a substitution just because the integral contains tangent or secant.
A Common Substitution Error
A frequent error in secant substitution is to replace \(\tan^2 x\) by \(\sec^2 x\). The correct identity is \(\tan^2 x=\sec^2 x-1\); omitting the \(-1\) changes the integral.
For example, in the worked integral \(\int \tan^3 x\sec^3 x\,dx\), the incorrect replacement would give \(\int u^4\,du=u^5/5\). But differentiating that proposed answer gives \(\sec^5 x\tan x\), which is not \(\tan^3 x\sec^3 x\). Keeping the \(-1\) gives \(\int (u^2-1)u^2\,du=u^5/5-u^3/3\), and its derivative matches the original integrand.
Check Your Understanding
For each question, identify the useful factor or explain why neither direct pattern applies. Then check any proposed antiderivative by differentiation.
- Which substitution is indicated for \(\int \tan^2 x\sec^6 x\,dx\), and what factor is saved?
- For \(\int \tan^5 x\sec^3 x\,dx\), what expression in \(u\) results from \(u=\sec x\)?
- Why does \(u=\sec x\) applied to \(\int \tan^3 x\,dx\) introduce a factor \(1/u\)?
- Do the two standard parity patterns apply directly to \(\int \tan^4 x\sec^3 x\,dx\)? Explain.
- Differentiate \(\tan^6 x/6\) and identify the integrand it produces.