Calculus I › Integrals › full formula sheet

∫ sec2x dx = tan x + C
Say it: the integral of secant squared x with respect to x equals tangent x, plus C

The secant-squared integral

The derivative of tan x, run in reverse — and its near-twin sec x·tan x is a different rule entirely.

Notation on this page: sec x = 1/cos x, trig functions take radian arguments, and C is the constant of integration.

Before this lesson: Derivative of tan x

Where it comes from

The problem is the reverse of d/dx [tan x] = sec²x — one of the six trig derivatives. Since differentiating tangent produces sec²x, integrating sec²x must produce tangent.

The tempting near-miss:

Before reading on: d/dx [tan x] = sec2x is a derivative fact you already memorized. Read it backwards — what does it immediately tell you about ∫ sec2x dx? Commit before the reveal.

∫ sec2x dx = sec x · tan x + C  ??the tempting — and wrong — guess

Where does it come from? From a different derivative fact: d/dx [sec x] = sec x·tan x. Students file “sec²” and “sec·tan” in the same mental drawer, and the wrong one slides out. But differentiating the guess does not give sec²x back — and the quotient-rule computation below shows exactly what differentiating tan x does give.

Intuition for the shape: tan x has vertical asymptotes at π/2 + kπ, blowing up to ±∞. Its derivative must blow up there too — and sec²x = 1/cos²x does exactly that, since cos x = 0 at those points. The integrand and the antiderivative share the same asymptotes, which is a strong hint they belong together.

Derivation

We verify F(x) = tan x by differentiating it with the quotient rule. The Pythagorean identity does the final simplification.

F(x)
=
tan x = sin x / cos x
Step 1 — the guess, as a quotient. Writing tan x = sin x/cos x sets up the quotient rule.
F′(x)
=
[cos x·cos x − sin x·(−sin x)] / cos²x
Step 2 — quotient rule. (low·d(high) − high·d(low)) / low²: cos x·cos x − sin x·(−sin x), all over cos²x.
=
(cos²x + sin²x) / cos²x
Step 3 — tidy the numerator. −sin x·(−sin x) = +sin²x. The numerator is cos²x + sin²x.
=
1 / cos²x = sec²x
Step 4 — Pythagoras. cos²x + sin²x = 1, so the fraction is 1/cos²x = sec²x. Hence ∫ sec²x dx = tan x + C. ∎

Why +C is the whole story: any two antiderivatives of sec²x differ by a constant (zero derivative ⇒ constant), so tan x + C captures every one of them — on each interval between asymptotes.

How to use it

Before reading on: Example 4 below looks almost identical to Example 1: sec x·tan x versus sec2x. Before you read it: whose derivative produces a sec x·tan x factor? (Hint: it is not tangent.)

The procedure, every time:

  1. Confirm the integrand is sec²x — secant squared, argument exactly x. Not sec x·tan x (that is a different rule), not sec x alone (that is a harder integral).
  2. Write tan x + C.
  3. Constants factor out: ∫ 3 sec²x dx = 3 tan x + C.
  4. Check by differentiating: d/dx [tan x] should give sec²x back.

The near-twin

Memorize the pair together, because exams love to swap them: ∫ sec²x dx = tan x + C but ∫ sec x·tan x dx = sec x + C. The antiderivative is always the “shorter” function: sec² → tan, sec·tan → sec.

The chain-rule fingerprint

∫ sec²(2x) dx = tan(2x)/2 + C — differentiating tan(2x) gives 2 sec²(2x), so divide by 2.

Common mistake: writing ∫ sec²x dx = sec x·tan x + C. That is the derivative of sec x wearing an integral costume. Ask: “which function differentiates to sec²x?” — tangent, not secant.

Worked examples

Four problems, easiest first. In each one, read every step — the why of each move is the lesson.

Example 1 — the basic move: ∫ sec²x dx

  1. Recognize the pattern. Integrand is sec²x — secant squared, argument exactly x.
  2. Write the answer: tan x + C. (Why? d/dx [tan x] = sec²x — the derivative fact read backwards.)
  3. Check: quotient rule on sin x/cos x gives sec²x. Matches ✓
Your turn: Compute ∫ 2 sec2x dx.

Answer: 2 tan x + C

Factor the 2: 2·∫ sec2x dx = 2 tan x + C. Check: d/dx [2 tan x] = 2 sec2x. ✓

Example 2 — definite: ∫0π/4 sec²x dx

  1. Antiderivative: tan x.
  2. Evaluate: tan(π/4) − tan 0 = 1 − 0 = 1.
  3. Sanity check: on [0, π/4], sec²x runs from 1 to 2, so the area should be between 1·(π/4) ≈ 0.79 and 2·(π/4) ≈ 1.57. The answer 1 sits inside. ✓
Common mistake: writing tan(π/4) = π/4. But tan(π/4) = 1 — the 45° angle has equal opposite and adjacent sides.
Your turn: Compute ∫0π/3 sec2x dx.

Answer: √3 ≈ 1.732

Antiderivative tan x: tan(π/3) − tan 0 = √3 − 0 = √3. Sanity: on [0, π/3], sec2x runs 1→4, so the area sits between 1·(π/3) ≈ 1.05 and 4·(π/3) ≈ 4.19. 1.732 fits. ✓

Example 3 — term by term: ∫ (sec²x + x) dx

  1. Split: ∫sec²x dx + ∫x dx.
  2. First piece: tan x. Second piece (power rule): x²/2.
  3. Combine: tan x + x²/2 + C.
  4. Check: d/dx gives sec²x + x. Matches ✓
Your turn: Compute ∫ (sec2x + x2) dx.

Answer: tan x + x3/3 + C

Split: sec2x integrates to tan x; power rule on x2 gives x3/3. One +C. Check: d/dx gives sec2x + x2. ✓

Example 4 — the near-twin: ∫ sec x·tan x dx

  1. Notice this is NOT sec²x. The integrand is the product sec x·tan x — the derivative of sec x, not of tan x.
  2. Verify the guess sec x: d/dx [sec x] = sec x·tan x. Matches ✓
  3. Answer: sec x + C.
Common mistake: answering tan x + C here — grabbing the sec² rule for a sec·tan integrand. Read the integrand twice: squared, or product?
Your turn: Compute ∫ 3 sec x·tan x dx.

Answer: 3 sec x + C

This is the near-twin, not sec2x: d/dx [sec x] = sec x·tan x, so 3·∫ sec x·tan x dx = 3 sec x + C. Check: d/dx [3 sec x] = 3 sec x·tan x. ✓

Memorization tips

  • Say it aloud: “sec-squared to tan.” Three syllables, in order.
  • Learn the pair: sec² → tan, but sec·tan → sec. The antiderivative is always the “shorter” function — quiz yourself by covering one column.
  • Anchor: ∫0π/4 sec²x dx = 1. One clean definite integral.
  • The asymptote test: tan x blows up at π/2, and so does sec²x. If your antiderivative does not share the integrand’s blow-ups, something is off.
  • Read twice: before writing, check — squared, or product? That one glance defeats the near-twin trap.

Final challenge

Five mixed questions — the near-twin, a √3 answer, and the derivative direction. Score 5/5 and sec²x is yours.

← Back to the Calculus I formula sheet

How to learn a formula here

  1. Read each section in order — every section ends with a short quiz. Take it before moving on; the questions test exactly what you just read.
  2. Work the examples with the answers covered, then uncover one step at a time and compare.
  3. Finish with the final challenge — five mixed questions including the classic traps.
  4. Retake what you miss — every quiz reshuffles each attempt, and every answer explains itself.

Frequently asked questions

What is the integral of sec²x?

∫ sec²x dx = tan x + C, because d/dx [tan x] = sec²x. It is the derivative of tangent, run in reverse.

Why is the antiderivative tan x and not sec x·tan x?

Because d/dx [sec x] = sec x·tan x — that’s the derivative of secant, a different fact. Differentiating tan x gives sec²x, so tan x is the antiderivative.

What is ∫0π/4 sec²x dx?

[tan x]0π/4 = tan(π/4) − tan 0 = 1 − 0 = 1.

What is ∫ sec x·tan x dx?

sec x + C — a close neighbor, not the same rule. d/dx [sec x] = sec x·tan x, so secant (not tangent) is its antiderivative.

How do I remember ∫ sec²x dx = tan x?

Pair it with the derivative you already know: d/dx [tan x] = sec²x. The integral is just that fact read backwards.

More from the codex