Skip to content
ihateDesmos

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.

−1.0−0.50.51.0−550
Open in calculator
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.

  1. 1
    We know that d/dx tan x = sec²x.
  2. 2
    So tan x is an antiderivative of sec²x.
  3. 3
    Adding 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.

−1−0.50.51−6−4−22468

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.

Checking the integral
xsec²xSlope of the answer
−13.425523.42552
−π/422
011
π/422
13.425523.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.

Open the integral calculator