Why This Substitution Fits
When an integral contains both tangent and secant, a useful first question is whether the integrand contains the derivative of one of those functions as a factor. Since the derivative of \(\sec x\) is \(\sec x\tan x\), an integral with a tangent factor and a positive power of secant is a natural place to try \(u=\sec x\).
For the particular family considered here, the remaining secant power becomes a simple power of \(u\). The identity \(\tan^2 x=\sec^2 x-1\) also gives a polynomial expression in \(u\). That expression is useful for understanding the algebra, even though the direct substitution is usually shorter.
The Substitution and Its Conditions
Set \(u=\sec x\). Differentiating gives \(du=\sec x\tan x\,dx\). The integrand can be arranged to display exactly this differential:
Therefore, replacing \(\sec x\) by \(u\) and \(\sec x\tan x\,dx\) by \(du\) turns the integral into a power integral. The power rule applies because \(2k\ne -1\); indeed, \(k\ge 0\), so \(2k+1\) is positive.
The substitution is valid locally on any interval where \(\sec x\) is defined. The resulting antiderivative is also valid on each such interval. One should not treat an interval containing a point where \(\cos x=0\) as a single domain for this formula: the original integrand is undefined there.
Why the Substitution Works
The key is not merely that \(u\) equals secant; it is that the integrand contains the full differential of secant. In the expression \(\sec^{2k+1}x\tan x\,dx\), one secant factor pairs with \(\tan x\,dx\) to make \(du\). Exactly \(2k\) secant factors remain, and these become \(u^{2k}\).
\(d(\sec x)=\sec x\tan x\,dx\), so preserve one secant together with the tangent and \(dx\).
\(\sec^{2k+1}x\tan x\,dx=\sec^{2k}x(\sec x\tan x\,dx)\).
The expression becomes \(\int u^{2k}\,du\), which has antiderivative \(u^{2k+1}/(2k+1)\).
Substitute \(u=\sec x\), then differentiate the proposed answer to recover the original integrand.
This reasoning also proves the general formula: differentiating its right-hand side gives
The derivative agrees with the integrand wherever \(\cos x\ne0\). Thus the formula is verified, not merely suggested by the substitution.
Where the Polynomial Expansion Appears
The identity \(\sec^2x=1+\tan^2x\) gives another way to see the expression that appears after substituting. Write the integrand as \(\sec^{2k}x(\sec x\tan x\,dx)\), then express the remaining even power as \((1+\tan^2x)^k\). With \(u=\sec x\), the identity \(\tan^2x=\sec^2x-1\) changes that factor into \((1+(u^2-1))^k\).
If expanded by the binomial theorem before simplifying, this is the polynomial
The polynomial equals \(u^{2k}\), because the sum is the binomial expansion of \((1+(u^2-1))^k\). In this problem the terms simplify to one power; the expansion is not a different integration method. It makes clear how the tangent-square identity translates the remaining secant power into a polynomial in the substitution variable.
Worked Examples
Worked Example: One Secant Factor
Evaluate \(\int \tan x\,\sec x\,dx\). Here \(k=0\), so the integrand already matches the differential of secant:
Thus
To check, differentiate the answer:
which is the original integrand. The result holds on any interval where \(\cos x\ne0\).
Worked Example: Three Secant Factors
Evaluate \(\int \tan x\,\sec^3x\,dx\). Factor the integrand so that the derivative of secant is visible:
Let \(u=\sec x\), so \(du=\sec x\tan x\,dx\). Then
The polynomial viewpoint gives the same integrand in the substitution variable: \(\sec^2x=1+\tan^2x\), and \(\tan^2x=u^2-1\), so \(1+\tan^2x=1+(u^2-1)=u^2\). Finally, check by differentiation:
Worked Example: Five Secant Factors and a Full Expansion
Evaluate \(\int \tan x\,\sec^5x\,dx\). Taking \(u=\sec x\), we have \(du=\sec x\tan x\,dx\), so the remaining factor is \(\sec^4x=u^4\). Directly,
Now obtain the same power through the identity and its polynomial expansion. The leftover factor is
Under \(u=\sec x\), \(\tan^2x=u^2-1\), so this becomes
The full integral is therefore \(\int u^4\,du=u^5/5+C\), as before. Differentiate the proposed answer to check it:
Both the direct substitution and the expanded polynomial lead to the same verified antiderivative.
Worked Example: A Definite Integral
Evaluate \(\int_0^{\pi/4}\tan x\,\sec^3x\,dx\). The interval contains no point where \(\cos x=0\), so the substitution and endpoint evaluation are valid throughout. An antiderivative from the previous example is \(\sec^3x/3\). Therefore,
Since \(\sec(\pi/4)=\sqrt{2}\) and \(\sec 0=1\), the value is
This also checks by differentiating the antiderivative \(\sec^3x/3\), whose derivative is \(\tan x\sec^3x\), the given integrand.
A Common Mistake: Losing the Secant in the Differential
A frequent error is to use \(du=\tan x\,dx\) after setting \(u=\sec x\). That differential is incorrect: differentiating \(\sec x\) produces an extra factor of \(\sec x\). For example, a wrong calculation for the three-factor case might be
The proposed answer fails the derivative check:
The correction is to use the actual differential, \(du=\sec x\tan x\,dx\), and take one secant factor out of \(\sec^3x\):
This gives \(\sec^3x/3+C\), whose derivative is exactly the original integrand. Whenever a substitution is chosen, write its differential explicitly before replacing any part of the integrand.
Summary and Use
For every nonnegative integer \(k\), the integral of one tangent factor times \(\sec^{2k+1}x\) reduces to a power integral after \(u=\sec x\). The factor \(\sec x\tan x\,dx\) supplies \(du\); the remaining \(\sec^{2k}x\) becomes \(u^{2k}\). The identity \(\tan^2x=\sec^2x-1\) gives the equivalent polynomial \((1+(u^2-1))^k\), which simplifies to the same power.
The practical checks are simple: preserve the full factor \(\sec x\tan x\,dx\) when making the substitution, and differentiate the final expression to confirm that every power of secant matches.
Check Your Understanding
Use the substitution \(u=\sec x\), and verify each proposed antiderivative by differentiation.
- Evaluate \(\int \tan x\,\sec^7x\,dx\).
- For \(k=3\), what power of \(u\) remains after extracting \(du\) from \(\tan x\sec^{2k+1}x\,dx\)?
- Rewrite \((1+\tan^2x)^3\) in terms of \(u=\sec x\), using \(\tan^2x=u^2-1\), and simplify.
- Why is \(du=\sec x\tan x\,dx\), rather than \(du=\tan x\,dx\), when \(u=\sec x\)?
- On what part of the real line is the original integrand defined?