Calculus 2 • Techniques of Integration

Integrating tan & sec Products — Integrating Products Involving Tangent and Secant

Master the reduction strategies for every combination of tangent and secant powers in a single integral.

A summation symbol with infinity and a smooth series curve.
Inside this lesson 10 sections 5 questions 9 figures

SECTION 1

Historical Context & Motivation

Integrals involving products of tangent and secant functions have occupied mathematicians since the early development of integral calculus in the seventeenth century. The interplay between these trigonometric functions arises naturally in problems of arc length, surface area, and projective geometry, making their integration far more than an academic exercise. Unlike integrals of sine–cosine products, which benefit from straightforward power-reduction and half-angle identities, tangent–secant integrals demand a more nuanced classification of cases based on parity and power. Understanding the historical evolution of these techniques illuminates why the modern "recipe" approach — branching on whether the tangent power is odd, the secant power is even, or neither — became the standard pedagogical framework taught in virtually every Calculus 2 course today.

1668 • James Gregory's Series for tan and sec

James Gregory derived infinite series expansions for arctan and related trigonometric functions, laying the groundwork for systematic manipulation of tangent and secant in calculus.

1697 • Johann Bernoulli's Reduction Formulas

Bernoulli developed reduction formulas for powers of secant, demonstrating how integration by parts could recursively lower the degree of trigonometric integrands.

1742 • Euler's Systematic Trigonometric Identities

Leonhard Euler unified trigonometric identities in his Introductio in analysin infinitorum, providing the identity tan²x = sec²x − 1 as a central tool for transforming integrands.

1800s • Standardization of Techniques

Nineteenth-century textbooks by Lacroix and others codified the case-by-case approach — odd tangent power, even secant power, or neither — that persists in modern curricula.

The central question this lesson addresses is: given an integral of the form ∫ tanmx secnx dx, how do we systematically decide which substitution and identity strategy to apply? The answer hinges on the parity of m and n and the fundamental relationship tan²x = sec²x − 1.

SECTION 2

Core Principles & Definitions

Before diving into specific cases, it is essential to internalize the identities and derivative relationships that make tangent–secant integration tractable. Every strategy in this topic relies on two pillars: the Pythagorean identity linking tangent and secant, and the differential relationships d(tan x) = sec²x dx and d(sec x) = sec x tan x dx. These relationships dictate which factor of the integrand we "peel off" to form du in a u-substitution.

1

Pythagorean Identity

tan²x = sec²x − 1 allows conversion between tangent and secant powers, enabling reduction of one function in favor of the other.
2

Tangent Derivative Pair

d/dx(tan x) = sec²x. When the integrand contains a sec²x factor, setting u = tan x absorbs it into du.
3

Secant Derivative Pair

d/dx(sec x) = sec x tan x. When the integrand contains sec x tan x, setting u = sec x absorbs this product into du.
4

Parity-Based Strategy Selection

The choice of substitution depends on whether the power of tangent is odd (peel off sec x tan x, u = sec x), the power of secant is even (peel off sec²x, u = tan x), or neither.
5

Reduction Formula Fallback

When the tangent power is even and the secant power is odd, neither direct substitution works, requiring integration by parts and reduction formulas for ∫ secⁿx dx.
✦

KEY TAKEAWAY

Think of the integrand tanmx secnx as a machine with two levers: the parity of m and the parity of n. If m is odd, one lever unlocks u = sec x; if n is even, the other lever unlocks u = tan x. When neither lever works (m even, n odd), you have to open the machine's panel and use the reduction-formula circuitry inside — integration by parts applied recursively.

SECTION 3

Visual Explanation — Decision Flowchart

The following flowchart provides a complete decision tree for evaluating ∫ tanmx secnx dx. Begin at the top and follow the branches based on the parity of the tangent and secant exponents. Each terminal node prescribes a specific substitution or technique.

Decision Flowchart: ∫ tan^m x · sec^n x dxStart: ∫ tanᵐx secⁿx dxIs m odd?YESNOPeel off sec x tan xu = sec x, du = sec x tan x dxConvert tan² → sec² − 1Is n even?YESNOPeel off sec²xu = tan x, du = sec²x dxConvert sec² → tan² + 1m even, n oddConvert tan² → sec² − 1Use IBP / reduction for ∫secⁿx dxAll paths eventually reduce to polynomial-in-u integrals or ∫ sec x dx = ln|sec x + tan x| + C
The flowchart above summarizes the three primary cases. The left branch (m odd) uses u = sec x; the middle branch (n even) uses u = tan x; and the right branch (m even, n odd) requires integration by parts and reduction formulas.

Notice that if both favorable conditions hold simultaneously — m is odd and n is even — either path works, so you may choose whichever feels more natural. The difficult case arises only when m is even and n is odd, which forces us into integration by parts. Keeping this flowchart in mind transforms what initially seems like a bewildering array of integrals into a manageable decision process.

SECTION 4

Mathematical Framework

We now formalize the three cases with their full derivations. In each case, the goal is to express the integrand so that a simple u-substitution converts it to a polynomial integral, or to reduce it via integration by parts.

Case 1: m Is Odd (Tangent Power Odd)

CASE 1 — ODD TANGENT POWER

∫tan2k+1x⋅secnxdx=∫(sec2x−1)k⋅secn−1x⋅secxtanxdx∫ tan²ᵏ⁺¹x · secⁿx dx = ∫ (sec²x − 1)ᵏ · secⁿ⁻¹x · sec x tan x dx

Write m = 2k + 1, peel off one factor of sec x tan x, substitute u = sec x so du = sec x tan x dx, then replace every tan²x with sec²x − 1 = u² − 1. The remaining integrand is a polynomial in u.

Case 2: n Is Even (Secant Power Even)

CASE 2 — EVEN SECANT POWER

∫tanmx⋅sec2lxdx=∫tanmx⋅(1+tan2x)l−1⋅sec2xdx∫ tanᵐx · sec²ˡx dx = ∫ tanᵐx · (1 + tan²x)ˡ⁻¹ · sec²x dx

Write n = 2l, peel off one factor of sec²x, substitute u = tan x so du = sec²x dx, then replace every remaining sec²x with 1 + tan²x = 1 + u². Again, the integrand becomes a polynomial in u.

Case 3: m Even, n Odd — The Hard Case

PYTHAGOREAN CONVERSION

∫tan2kx⋅secnxdx=∫(sec2x−1)k⋅secnxdx∫ tan²ᵏx · secⁿx dx = ∫ (sec²x − 1)ᵏ · secⁿx dx

Replace every tan²x with sec²x − 1, expand, and distribute. Each resulting term is ∫ secʲx dx for various odd powers j. These are evaluated via the reduction formula for secant.

SECANT REDUCTION FORMULA

∫secnxdx=(secn−2xtanx)/(n−1)+(n−2)/(n−1)⋅∫secn−2xdx∫ secⁿx dx = (secⁿ⁻²x tan x)/(n − 1) + (n − 2)/(n − 1) · ∫ secⁿ⁻²x dx

Derived by integration by parts with u = secⁿ⁻²x and dv = sec²x dx. The recursion terminates at ∫ sec x dx = ln|sec x + tan x| + C or ∫ sec³x dx, which has a known closed form.

💡

Essential Reference

The integral ∫ sec³x dx = ½ sec x tan x + ½ ln|sec x + tan x| + C is used so frequently that it is worth memorizing outright. It serves as the base case for most secant reduction problems.

SECTION 5

Detailed Case Analysis with Classification Table

The following table and diagram provide a comprehensive reference for every combination of tangent and secant powers. By classifying each integral before attempting it, you avoid the common trap of trying a substitution that leads nowhere. The table also records the resulting form after substitution, showing that all cases ultimately reduce to polynomial integrals or to the secant reduction formula.

ConditionSubstitutionKey IdentityResult Form
m odd, any nu = sec xtan²x = u² − 1Polynomial in u
n even (≥ 2), any mu = tan xsec²x = 1 + u²Polynomial in u
m even, n oddNo direct subtan²x = sec²x − 1Sum of ∫ secʲx dx
m = 0, n = 1Direct formula—ln|sec x + tan x| + C
m = 1, n = 0u = cos xtan x = sin x / cos x−ln|cos x| + C

Classification of ∫ tanᵐx secⁿx dx by exponent parity

Exponent Parity Grid: Strategy Selectionm = tangent power (rows), n = secant power (columns)m \ nn evenn oddm oddm evenEITHER WORKS ✓u = sec x OR u = tan xBoth paths yield polynomial integrals.Choose whichever is simpler.u = sec x ✓Peel off sec x tan x for duConvert tan² → sec² − 1 = u² − 1Polynomial in u results.u = tan x ✓Peel off sec²x for duConvert sec² → 1 + tan² = 1 + u²Polynomial in u results.HARD CASE ⚠No direct u-sub availableConvert all tan² → sec² − 1Use IBP / reduction for ∫secⁿx dxGreen = easy | Cyan/Amber = one clear path | Pink = requires reduction formula
The 2×2 parity grid above classifies all ∫ tanmx secnx dx integrals. The top-left cell (m odd, n even) is the easiest since either substitution works. The bottom-right cell (m even, n odd) is the hardest and requires reduction formulas.

A useful mnemonic emerges from the grid: if you can peel off sec x tan x (m odd) or sec²x (n even) and still have a manageable integrand, do so. The identity tan²x = sec²x − 1 then converts everything into a single trig function, which becomes u. The "hard case" in the bottom-right requires a fundamentally different approach — converting all tangent powers to secant, expanding, and then repeatedly applying the reduction formula for odd powers of secant.

SECTION 6

Worked Example

Let us work through a representative integral from Case 1 (odd tangent power) in complete detail, followed by a brief sketch of a Case 2 integral.

Evaluate ∫ tan³x sec⁴x dx

  1. 1

    Step 1 — Classify the Integral

    Here m = 3 (odd) and n = 4 (even). Since m is odd, we can use u = sec x. Since n is also even, u = tan x would also work. We choose u = sec x for demonstration.
    Case 1 applies: u = sec x
  2. 2

    Step 2 — Peel Off sec x tan x

    Rewrite the integrand by factoring out one copy of sec x tan x: ∫ tan³x sec⁴x dx = ∫ tan²x · sec³x · (sec x tan x) dx. Now set u = sec x, so du = sec x tan x dx.
    ∫ tan²x · sec³x · (sec x tan x dx) = ∫ tan²x · u³ du
  3. 3

    Step 3 — Convert tan²x Using the Pythagorean Identity

    Replace tan²x = sec²x − 1 = u² − 1. The integral becomes ∫ (u² − 1) · u³ du = ∫ (u⁵ − u³) du.
    ∫ (u⁵ − u³) du — a simple polynomial integral
  4. 4

    Step 4 — Integrate the Polynomial

    Apply the power rule: ∫ u⁵ du − ∫ u³ du = u⁶/6 − u⁴/4 + C.
    u⁶/6 − u⁴/4 + C
  5. 5

    Step 5 — Back-Substitute u = sec x

    Replace u with sec x to express the answer in terms of the original variable.
    ∫ tan³x sec⁴x dx = sec⁶x/6 − sec⁴x/4 + C
💡

Verification Tip

You can verify the answer by differentiating: d/dx[sec⁶x/6 − sec⁴x/4] = sec⁵x · sec x tan x − sec³x · sec x tan x = sec⁶x tan x − sec⁴x tan x = sec⁴x tan x(sec²x − 1) = sec⁴x tan x · tan²x = tan³x sec⁴x. ✓

Quick Sketch: Case 2 — ∫ tan⁴x sec⁴x dx

Here m = 4 (even) and n = 4 (even). Since n is even, use u = tan x: peel off sec²x for du, and convert the remaining sec²x factor using sec²x = 1 + tan²x = 1 + u². The integral becomes ∫ u⁴(1 + u²) du = ∫ (u⁴ + u⁶) du = u⁵/5 + u⁷/7 + C = tan⁵x/5 + tan⁷x/7 + C.

SECTION 7

Strengths, Limitations & Comparisons with sin–cos Integrals

Students often wonder how tangent–secant integration compares to the more familiar sine–cosine product integrals. While both families rely on Pythagorean identities and parity arguments, there are important structural differences that affect strategy selection and difficulty.

Featuresin–cos Productstan–sec Products
Key identitysin²x + cos²x = 1tan²x + 1 = sec²x
Easy case triggerEither power is oddm odd OR n even
Hard caseBoth even — use half-anglem even, n odd — reduction formula
Hard-case difficultyTedious but mechanicalRequires IBP and recursion
Base integral∫ dx = x + C∫ sec x dx = ln|sec x + tan x| + C
Substitution targetsu = sin x or u = cos xu = tan x or u = sec x

Structural comparison of the two major families of trigonometric product integrals

✦

KEY TAKEAWAY

The sin–cos and tan–sec families are like two assembly lines in the same factory: they share the same Pythagorean-identity toolset, but the tan–sec line has a harder "reject pile" (m even, n odd). When both lines fail — for example, with products involving cotangent and cosecant — the analogous strategies apply with cot²x + 1 = csc²x, completing the trifecta of Pythagorean-based integration techniques.

SECTION 8

Connection to Advanced Theory & Applications

Integrals involving tangent and secant are far from mere textbook exercises — they arise naturally in several important applied and theoretical contexts. The integral ∫ sec x dx, for instance, is the Mercator projection formula that maps latitude to vertical distance on a conformal chart, a cornerstone of cartography and navigation. Integrals of sec³x and higher odd powers appear in computing arc lengths of parabolas and other conic sections, as well as in the evaluation of certain Fourier transforms and scattering amplitudes.

This LessonAdvanced Extension
∫ sec x dx = ln|sec x + tan x| + CMercator map projection; inverse Gudermannian function gd⁻¹(φ)
∫ sec³x dx (reduction formula)Arc length of parabola y = x²; catenary problems in engineering
Secant reduction formula for ∫ secⁿx dxWallis-type products; beta/gamma function identities
u = sec x substitutionTrigonometric substitution (x = a sec θ) for ∫ √(x² − a²) forms

How tangent–secant integrals connect to broader mathematics and applications

Looking ahead, the substitution strategies developed here dovetail directly with trigonometric substitution — a Calculus 2 technique where expressions like √(x² − a²) are handled by setting x = a sec θ. After this substitution, the resulting integrand is precisely a product of tangent and secant powers. Thus, mastering the present topic is not just valuable in isolation; it is a prerequisite for one of the most powerful integration techniques in the calculus toolkit.

SECTION 9

Practice Problems

Question 1: CONCEPTUAL

Explain why, when evaluating ∫ tan⁵x sec³x dx, the substitution u = sec x is preferable to u = tan x. What property of the exponents makes this choice work?
Show answer
The tangent power m = 5 is odd. This means we can factor out one copy of sec x tan x from the integrand, which becomes du when u = sec x. The remaining tan⁴x = (sec²x − 1)² = (u² − 1)² is expressible entirely in terms of u. If we tried u = tan x instead, we would need to peel off sec²x for du, but that would leave sec x in the integrand — an odd power of secant that cannot be written purely in terms of tan x. The odd parity of m is therefore the deciding factor: it guarantees that after peeling off sec x tan x, every remaining tangent factor pairs up into tan²x, which converts to u² − 1.

Question 2: BASIC CALCULATION

Evaluate ∫ tan x sec³x dx.
Show answer
Here m = 1 (odd) and n = 3. Set u = sec x, so du = sec x tan x dx. The integral becomes ∫ sec²x · (sec x tan x dx) = ∫ u² du = u³/3 + C = sec³x/3 + C. Alternatively, note that the integrand is sec²x · (sec x tan x), which is the derivative of sec³x/3 by the chain rule. This is the simplest application of the odd-tangent-power strategy.

Question 3: INTERMEDIATE

Evaluate ∫ tan²x sec⁴x dx.
Show answer
Here m = 2 (even) and n = 4 (even), so use u = tan x with du = sec²x dx. Peel off sec²x and convert the remaining sec²x = 1 + tan²x = 1 + u². The integral becomes ∫ tan²x · sec²x · sec²x dx = ∫ u²(1 + u²) du = ∫ (u² + u⁴) du = u³/3 + u⁵/5 + C = tan³x/3 + tan⁵x/5 + C. This is a clean Case 2 application where the even secant power allows a direct substitution.

Question 4: APPLIED

The arc length of the parabola y = x² from x = 0 to x = 1 is L = ∫₀¹ √(1 + 4x²) dx. Using the trigonometric substitution x = (1/2)tan θ, show that this arc length integral reduces to an integral involving sec³θ, and then evaluate it.
Show answer
Let x = (1/2)tan θ, so dx = (1/2)sec²θ dθ and 1 + 4x² = 1 + tan²θ = sec²θ. The limits change: x = 0 → θ = 0 and x = 1 → θ = arctan 2. The integral becomes L = ∫₀^(arctan 2) sec θ · (1/2)sec²θ dθ = (1/2)∫₀^(arctan 2) sec³θ dθ. Using the known result ∫ sec³θ dθ = (1/2)sec θ tan θ + (1/2)ln|sec θ + tan θ| + C and evaluating at the limits (sec(arctan 2) = √5, tan(arctan 2) = 2), we get L = (1/2)[(1/2)(√5)(2) + (1/2)ln(√5 + 2)] − 0 = (1/2)[√5 + (1/2)ln(√5 + 2)] = √5/2 + (1/4)ln(√5 + 2) ≈ 1.4789. This illustrates how secant-power integrals arise naturally in arc-length computations.

Question 5: CRITICAL THINKING

Derive the reduction formula ∫ secⁿx dx = (secⁿ⁻²x tan x)/(n − 1) + (n − 2)/(n − 1) · ∫ secⁿ⁻²x dx by integration by parts. Clearly state your choices of u and dv, and explain where the Pythagorean identity enters the derivation.
Show answer
Set u = secⁿ⁻²x and dv = sec²x dx. Then du = (n − 2)secⁿ⁻³x · sec x tan x dx = (n − 2)secⁿ⁻²x tan x dx, and v = tan x. By integration by parts: ∫ secⁿx dx = secⁿ⁻²x tan x − (n − 2)∫ secⁿ⁻²x tan²x dx. Now apply the Pythagorean identity tan²x = sec²x − 1 to the remaining integral: ∫ secⁿ⁻²x tan²x dx = ∫ secⁿ⁻²x(sec²x − 1) dx = ∫ secⁿx dx − ∫ secⁿ⁻²x dx. Substituting back: ∫ secⁿx dx = secⁿ⁻²x tan x − (n − 2)[∫ secⁿx dx − ∫ secⁿ⁻²x dx]. Collecting ∫ secⁿx dx terms on the left: (1 + n − 2)∫ secⁿx dx = secⁿ⁻²x tan x + (n − 2)∫ secⁿ⁻²x dx. Dividing both sides by (n − 1) yields the formula. The Pythagorean identity is the critical step that converts tan²x back into secant, creating the recursive structure.

SUMMARY

Lesson Summary

Summary

Integrals of the form ∫ tanmx secnx dx are classified by the parity of the tangent power m and the parity of the secant power n. When m is odd, peel off sec x tan x and substitute u = sec x, converting remaining tan² factors via tan²x = sec²x − 1. When n is even, peel off sec²x and substitute u = tan x, converting remaining sec² factors via sec²x = 1 + tan²x. Both paths yield simple polynomial integrals in u.

The challenging case — m even and n odd — requires converting all tangent powers to secant using tan²x = sec²x − 1, then applying the secant reduction formula recursively until reaching ∫ sec x dx = ln|sec x + tan x| + C or the closed form of ∫ sec³x dx. These techniques connect forward to trigonometric substitution, where integrands involving √(x² − a²) transform into tangent–secant products after setting x = a sec θ.

Varsity Tutors • Calculus 2 • Integrating tan & sec Products