Tutorials › Calculus II › Even Tangent Powers With A Secant-Squared Factor

Tangent and Secant Powers · Tutorial 127 of 998

Even Tangent Powers With A Secant-Squared Factor

When sec² x dx is present, set u = tan x and the integral of tan^{2k} x sec² x becomes a simple power integral in u.

Intermediate 10 min read

What You'll Learn

  • Recognize sec² x dx as the differential of tan x.
  • Rewrite ∫tan^{2k}(x) sec²(x) dx as ∫u^{2k} du.
  • Write the antiderivative tan^{2k+1}(x)/(2k+1) + C.
  • Evaluate definite integrals with exact values of tan x.
  • Verify results with the chain rule.

Spotting the Differential

Integrals such as \(\int\tan^2x\sec^2x\,dx\) look like products of trigonometric functions, but one substitution turns them into elementary power integrals. The key observation is that \(\frac{d}{dx}\tan x=\sec^2x\). Whenever the integrand contains the factor \(\sec^2x\) and everything else is a function of \(\tan x\), the factor \(\sec^2x\,dx\) is exactly \(du\) for \(u=\tan x\).

This tutorial treats the case where the power of tangent is even, \(\tan^{2k}x\), but the method does not depend on parity. The even case is singled out because it contrasts with the next tutorials, where the power of tangent is odd and a different factor of the integrand is reserved.

Result: For \(k\ge0\), \(\displaystyle\int\tan^{2k}x\,\sec^2x\,dx=\frac{\tan^{2k+1}x}{2k+1}+C.\)

Deriving the Formula

Let \(u=\tan x\), so \(du=\sec^2x\,dx\). Then

$$ \int\tan^{2k}x\,\sec^2x\,dx=\int u^{2k}\,du=\frac{u^{2k+1}}{2k+1}+C=\frac{\tan^{2k+1}x}{2k+1}+C. $$

The substitution is valid on any interval where \(\tan x\) is defined, that is, on each interval between consecutive vertical asymptotes \(x=\frac\pi2+n\pi\). A definite integral must not cross an asymptote.

Checking with the Chain Rule

Differentiate \(\frac{\tan^{2k+1}x}{2k+1}\). The outer power rule gives \(\tan^{2k}x\), and the chain rule multiplies by \(\frac{d}{dx}\tan x=\sec^2x\). The result is \(\tan^{2k}x\sec^2x\), the original integrand. This check is quick enough to do mentally for every problem of this type.

Worked Examples

Worked Example: Tangent Squared

Find \(\int\tan^2x\sec^2x\,dx\).

Take \(u=\tan x\) and \(du=\sec^2x\,dx\). The integral is \(\int u^2\,du=\frac{u^3}{3}\), so

$$ \int\tan^2x\sec^2x\,dx=\frac{\tan^3x}{3}+C. $$

No trigonometric identity is needed, because the integrand already contains the differential.

Worked Example: Tangent to the Fourth Power on [0, π/3]

Evaluate \(\int_0^{\pi/3}\tan^4x\sec^2x\,dx\).

The antiderivative is \(\frac{\tan^5x}{5}\). At \(x=\frac\pi3\), \(\tan x=\sqrt3\) and \((\sqrt3)^5=9\sqrt3\). At \(x=0\) the value is \(0\). Hence

$$ \int_0^{\pi/3}\tan^4x\sec^2x\,dx=\frac{9\sqrt3}{5}\approx3.118. $$

Equivalently, the substitution changes the limits to \(u=0\) and \(u=\sqrt3\), and \(\int_0^{\sqrt3}u^4\,du=\frac{(\sqrt3)^5}{5}\).

Worked Example: A Scaled Argument

Find \(\int\tan^2(3x)\sec^2(3x)\,dx\).

Let \(u=\tan3x\). Then \(du=3\sec^2(3x)\,dx\), so \(\sec^2(3x)\,dx=\frac{du}{3}\). The integral becomes \(\frac13\int u^2\,du=\frac{u^3}{9}\):

$$ \int\tan^2(3x)\sec^2(3x)\,dx=\frac{\tan^3(3x)}{9}+C. $$

The extra factor \(\frac13\) from the chain rule combines with \(\frac13\) from the power rule to give \(\frac19\).

Worked Example: A Symmetric Interval

Evaluate \(\int_{-\pi/4}^{\pi/4}\tan^4x\sec^2x\,dx\).

The integrand is even, since \(\tan^4x\) and \(\sec^2x\) are both even. The antiderivative \(\frac{\tan^5x}{5}\) is odd, so the definite integral is

$$ \frac{\tan^5(\pi/4)}{5}-\frac{\tan^5(-\pi/4)}{5}=\frac15+\frac15=\frac25. $$

The interval \([-\frac\pi4,\frac\pi4]\) contains no vertical asymptote, so the substitution is legitimate throughout.

A Reliable Procedure

1
Find the differential.
Look for \(\sec^2x\,dx\) in the integrand.
2
Substitute.
Set \(u=\tan x\) and rewrite the remaining factors as powers of \(u\).
3
Integrate the power.
Use \(\int u^n\,du=\frac{u^{n+1}}{n+1}\).
4
Return to x.
Replace \(u\) by \(\tan x\).
5
Check.
Differentiate with the chain rule; the factor \(\sec^2x\) must reappear.

Common Mistakes

A frequent error is to treat \(\int\tan^2x\sec^2x\,dx\) as if the identity \(\tan^2x=\sec^2x-1\) were required. That would work, but it is much longer than the substitution. Another mistake is to forget to divide by the new exponent, writing \(\tan^3x\) instead of \(\frac{\tan^3x}{3}\). A third is to confuse this integral with \(\int\tan^2x\,dx=\tan x-x+C\), which lacks the factor \(\sec^2x\) and therefore needs the identity.

Finally, a definite integral that crosses a vertical asymptote of \(\tan x\), such as \(\int_0^{\pi}\tan^2x\sec^2x\,dx\), cannot be evaluated by simply substituting the endpoints, because the integrand is not defined at \(x=\frac\pi2\). That integral diverges.

Quick Reference

IntegrandAntiderivative
\(\tan^2x\sec^2x\)\(\frac{\tan^3x}{3}\)
\(\tan^4x\sec^2x\)\(\frac{\tan^5x}{5}\)
\(\tan^6x\sec^2x\)\(\frac{\tan^7x}{7}\)
\(\sec^2x\)\(\tan x\)

Interpreting the Result

The integrand \(\tan^{2k}x\sec^2x\) is non-negative, so its antiderivative \(\frac{\tan^{2k+1}x}{2k+1}\) is increasing on each interval of continuity. Near \(x=\frac\pi2\), \(\tan x\) grows without bound and so do the integrals: the area under the curve from \(0\) to \(t\) is \(\frac{\tan^{2k+1}t}{2k+1}\), which tends to infinity as \(t\to\frac\pi2^-\). Higher powers grow even faster in relative terms, but all of them diverge.

Because the substitution turns every such integral into a power integral, it also shows the structure: the family \(\tan^{2k}x\sec^2x\) is the family \(u^{2k}\) in disguise, with \(u=\tan x\) acting as a new coordinate along the interval.

A Numerical Spot Check

Check \(\int_0^{\pi/4}\tan^2x\sec^2x\,dx=\frac13\) with the trapezoid rule on two intervals. The heights at \(0\), \(\frac\pi8\), and \(\frac\pi4\) are \(0\), \(\tan^2\frac\pi8\sec^2\frac\pi8\approx0.1716\cdot1.1716=0.2010\), and \(1\cdot2=2\). The estimate \(\frac{\pi}{8}\bigl(\frac{0+0.2010}{2}+\frac{0.2010+2}{2}\bigr)\approx0.4716\) is above \(\frac13\), as expected for a convex integrand and a coarse rule.

Practice Problems with Answers

Try each problem before reading the answer. Every answer below was checked by differentiation or by numerical integration.

  1. Find an antiderivative of \(\tan^2x\sec^2x\). Hint: set \(u=\tan x\). Answer: \(\frac{\tan^3x}{3}\)
  2. Evaluate \(\int_0^{\pi/4}\tan^2x\sec^2x\,dx\). Hint: \(\tan\frac\pi4=1\). Answer: \(\frac13\)
  3. Evaluate \(\int_0^{\pi/3}\tan^4x\sec^2x\,dx\). Hint: \(\tan\frac\pi3=\sqrt3\). Answer: \(\frac{9\sqrt3}{5}\)
  4. Find an antiderivative of \(\tan^2(3x)\sec^2(3x)\). Hint: include the chain-rule factor \(\frac13\). Answer: \(\frac{\tan^3(3x)}{9}\)
Takeaway: If \(\sec^2x\,dx\) is present and the rest is a power of \(\tan x\), let \(u=\tan x\). The result is \(\frac{\tan^{n+1}x}{n+1}\) for the power \(\tan^nx\), and the check is one application of the chain rule.

Extending the Idea: Even Powers of Secant

The same substitution handles integrands that do not visibly contain \(\tan x\). Consider \(\int\sec^4x\,dx\). Reserve one factor \(\sec^2x\,dx=du\) and rewrite the other using the identity \(\sec^2x=1+\tan^2x\). Then

$$ \int\sec^4x\,dx=\int(1+u^2)\,du=u+\frac{u^3}{3}+C=\tan x+\frac{\tan^3x}{3}+C. $$

In the same way, \(\int\tan^2x\sec^4x\,dx=\int u^2(1+u^2)\,du=\frac{\tan^3x}{3}+\frac{\tan^5x}{5}+C\). In both cases the integrand is a polynomial in \(u\) after the substitution, so the integral reduces to power rule. The definite integral \(\int_0^{\pi/4}\sec^4x\,dx\) equals \(1+\frac13=\frac43\), because \(\tan\frac\pi4=1\).

Why the Substitution Works Without Identities Here

In the main examples no trigonometric identity was needed. This is the signature of the \(\tan x\) and \(\sec^2x\) pairing: the differential is already present, so the substitution is immediate. Identities enter only when the integrand has a different shape, such as an even power of secant alone. A useful habit is to scan the integrand for the differential first and reach for identities only when that scan fails.

Domain and Branch Considerations

The function \(\tan x\) has period \(\pi\) and vertical asymptotes at odd multiples of \(\frac\pi2\). An antiderivative like \(\frac{\tan^3x}{3}\) is therefore defined and differentiable on each interval \((-\frac\pi2+n\pi,\frac\pi2+n\pi)\) separately, and the constant \(C\) may differ on different intervals. For a definite integral, check that the endpoints lie in the same interval of continuity before applying the Fundamental Theorem of Calculus.

Choosing Between Substitution and Identities

For \(\int\tan^2x\sec^2x\,dx\) there is a longer route: expand \(\tan^2x=\sec^2x-1\) and integrate \(\sec^4x-\sec^2x\). That route works but requires the secant fourth-power integral, which is itself a substitution problem. Comparing the two routes shows why the direct substitution is preferred: it uses one idea, and the answer \(\frac{\tan^3x}{3}\) can be checked in a single step. Both routes give the same function up to a constant, since \(\tan x+\frac{\tan^3x}{3}-\tan x=\frac{\tan^3x}{3}\).

Where This Fits in the Course

This tutorial belongs to the module “Tangent and Secant Powers”. The tutorial just before it is “Derivative Identities Behind Tangent And Secant Integrals,” and the one that follows is “Odd Tangent Powers Paired With Secant Factors.” It is the simplest case of the substitution strategies that the rest of the module builds on, and the habit of scanning for the differential first will serve you in every trigonometric integral that follows.

Check Your Understanding

Use the method and examples above to answer these questions.

  1. Why is \(\sec^2x\,dx\) equal to \(du\) when \(u=\tan x\)?
  2. Find \(\int\tan^6x\sec^2x\,dx\).
  3. Evaluate \(\int_0^{\pi/4}\tan^2x\sec^2x\,dx\).
  4. Why can the definite integral \(\int_0^{\pi}\tan^2x\sec^2x\,dx\) not be evaluated directly?
  5. Differentiate \(\frac{\tan^3x}{3}\) and show the result is the integrand.

Test yourself: Calculus II final exam practice

Ready to check what you know? Work a full-length practice final, then open the complete worked solutions.

Want all 1,114 practice problems?

This tutorial covers one topic. Calc Pass covers the full Calculus AB & BC curriculum (the core of Calculus I and II): full review, every practice question, and step-by-step solutions to each one.

QR code to download the Calc Pass app

Get the Calc Pass App

Scan to download and practice on the go, with instant scoring.

Calc Pass Volume 1: 1,114 Practice Questions book cover

Vol. 1: 1,114 Questions

The complete practice question bank, organized by AB & BC topic.

View on Amazon
Calc Pass Volume 2: Solutions Manual book cover

Vol. 2: Solutions Manual

Fully worked solutions to every question in Volume 1.

View on Amazon