Integral of sec²x
Updated 6 November 2026 · Checked numerically by the ihateDesmos engine
The integral of sec²x
∫
sec(x)2
dx =tan(x)+C
The integral of sec²x is tan x + C. This is the derivative of tan x read backwards.
y=sec(x)2
in blue and its integral y=tan(x)
(with C = 0) in red. Defined for x ≠ π/2 + nπ.How to integrate sec²x
Method: standard integral.
- 1We know that d/dx tan x = sec²x.
- 2So tan x is an antiderivative of sec²x.
- 3Adding the constant gives tan x + C.
What it means
sec²x is always at least 1, so its integral is always rising, just as the tangent graph does.
The integral from 0 to π/4
Using the antiderivative: F(π/4) − F(0) = 1, which is about 1. A direct numerical integration of sec²x gives 1, which agrees.
Check by differentiating
The derivative of the answer should give back the original function. The last column measures that slope directly from the answer, and it matches.
| x | sec²x | Slope of the answer |
|---|---|---|
| −1 | 3.42552 | 3.42552 |
| −π/4 | 2 | 2 |
| 0 | 1 | 1 |
| π/4 | 2 | 2 |
| 1 | 3.42552 | 3.42552 |
Common mistakes
- Writing sec³x/3. The power rule doesn’t apply to a trig function like this.
Frequently asked questions
What is the integral of sec²x?
The integral of sec²x is tan x + C, for x ≠ π/2 + nπ.
What is the integral of sec²x from 0 to π/4?
1, which is about 1.
What is the integral of sec²(ax)?
tan(ax)/a + C.
Keep going
Integrate any function
Type your own function into the integral calculator for the steps, the answer and a graph.