The answer
The derivation, step by step
- Multiply by a clever form of 1.
∫ sec x dx = ∫ sec x · (sec x + tan x)/(sec x + tan x) dx = ∫ (sec²x + sec x tan x)/(sec x + tan x) dx
- Notice the numerator is the derivative of the denominator. Let u = sec x + tan x. Since d/dx sec x = sec x tan x and d/dx tan x = sec²x, du = (sec x tan x + sec²x) dx.
- Substitute. The integral becomes ∫ du / u = ln|u| + C.
- Substitute back: ln|sec x + tan x| + C.
Check by differentiating: d/dx ln|sec x + tan x| = (sec x tan x + sec²x)/(sec x + tan x) = sec x (tan x + sec x)/(sec x + tan x) = sec x. ✓
Example: a definite integral
Related integrals
| Integral | Result |
|---|---|
| ∫ sec x dx | ln|sec x + tan x| + C |
| ∫ csc x dx | ln|csc x − cot x| + C |
| ∫ tan x dx | ln|sec x| + C |
| ∫ cot x dx | ln|sin x| + C |
| ∫ sec²x dx | tan x + C |
| ∫ sec x tan x dx | sec x + C |
| ∫ sec³x dx | (1/2) sec x tan x + (1/2) ln|sec x + tan x| + C |
| ∫ csc³x dx | −(1/2) csc x cot x + (1/2) ln|csc x − cot x| + C |
The integral of csc x
The same trick works: multiply by (csc x − cot x)/(csc x − cot x). With u = csc x − cot x, du = (−csc x cot x + csc²x) dx, which is exactly the new numerator, so ∫ csc x dx = ln|csc x − cot x| + C. You may also see it written as −ln|csc x + cot x| + C. The two forms are equal, because (csc x − cot x)(csc x + cot x) = csc²x − cot²x = 1.
The integral of sec³x
sec³x needs integration by parts with u = sec x and dv = sec²x dx. After rewriting tan²x as sec²x − 1, the original integral appears on both sides; solving for it gives
Higher powers follow the reduction formula:
Where it shows up
The integral of sec x appears whenever a substitution leaves sec θ, as in trig substitution with x = a tan θ: ∫ dx/√(1 + x²) becomes ∫ sec θ dθ. Check any of these with the integral calculator, or confirm by differentiating with the derivative calculator.
Sources: Paul's Online Notes: Integrals Involving Trig Functions; OpenStax Calculus Volume 2, Table of Integrals.
Every worked example on this page was checked with Calcist's own engine and an independent reference.