AP Calculus AB and BC
Integral of sec x: Proof, Formula, and Mistakes
The integral of sec x is ln|sec x + tan x| + C. The proof multiplies sec x by (sec x + tan x)/(sec x + tan x), so the numerator becomes exactly the derivative of the denominator, and the substitution u = sec x + tan x turns the problem into the integral of du/u.
How to integrate sec x
There is no rule in Unit 6 that hands you directly. The standard route is a multiplication by 1, chosen so that a substitution appears. Multiply the integrand by .
Now set . Differentiating gives , which is exactly the numerator you just built.
The whole integral collapses to the logarithm pattern.
Why the conjugate works
Nothing mystical is happening: multiplying by 1 is always legal, and this particular 1 is picked so the numerator becomes the derivative of the denominator. That is the pattern , and recognizing it is the real skill Topic 6.9 is testing.
Checking the answer by differentiating
Every antiderivative is verifiable in one line, and on a free-response question that check costs almost nothing. Differentiate with the chain rule, using and .
Factor out of the numerator and the bracket cancels the denominator.
On any interval where is defined, such as , the formula holds. It is also valid on the next branch , where is negative and the absolute value does the work.
Where the integral of sec x fits in AP Calculus
This belongs to Unit 6, Integration and Accumulation of Change, which carries a weighting of 15 to 20 percent on both AB and BC. The move that solves it is Topic 6.9 (Integrating Using Substitution), and recognizing that substitution is the right tool here is Topic 6.14 (Selecting Techniques for Antidifferentiation).
The two derivative facts the proof rests on come from Unit 2, Topic 2.10 (Finding the Derivatives of Tangent, Cotangent, Secant, and/or Cosecant Functions), a unit weighted 10 to 15 percent on AB and 5 to 10 percent on BC.
Not the same as the sec rules you already memorized
and are just Unit 2 derivative rules read backwards. is not one of those; it needs the conjugate trick, which is exactly why it gets memorized as a result in its own right.
Common mistakes with the integral of sec x
- Answering . That is . One power of makes the whole problem different.
- Answering . That is , the product, not the bare secant.
- Writing . Differentiating that gives , not , so the inside the logarithm is not optional.
- Forgetting the inside factor on a composite. , with the out front.
- Integrating straight across . There is an infinite discontinuity there, so something like is improper and diverges; evaluating the antiderivative at the endpoints anyway produces a number that means nothing.
- Dropping the absolute value. Write ; on branches where is negative, is undefined.
Worked examples
Example 1. Evaluate . Use the antiderivative and the endpoint values , , , .
Example 2. Find . Substitute , so and .
Example 3. Evaluate , where and .
Both endpoints stayed on one branch
In each definite integral above, the interval sits inside , so is continuous and the Fundamental Theorem applies. Always check that before substituting endpoints into the antiderivative.
Every answer on this page is machine checked
An automated test differentiates the antiderivative above and confirms it returns the integrand. A wrong sign or a missing factor fails the build, so it cannot reach you.
Frequently asked questions
What is the integral of sec x?
. You can confirm it by differentiating: the chain rule gives , and factoring out of the numerator cancels the denominator, leaving .
Why do you multiply by sec x + tan x?
Because it manufactures a substitution. Multiplying by leaves the integrand unchanged in value, but the new numerator is precisely the derivative of the new denominator. That is the pattern.
Is -ln|sec x - tan x| + C also a correct answer?
Yes, and it is the same function, not merely a shifted one. Since , we get , so its negative logarithm equals exactly. The form is equivalent too.
How is the integral of sec x different from the integral of sec squared x?
They share no method. is a memorized derivative rule reversed, since . The single power, , requires the conjugate multiplication and a substitution.
What is the domain of the antiderivative?
Wherever itself is defined, which excludes . The formula is valid on each interval between consecutive vertical asymptotes, and the constant can differ from one interval to the next. A definite integral whose limits straddle an asymptote is improper.