AP Calculus AB and BC
Integral of tan x sec^2 x: Two Right Answers
The integral of tan x times sec squared x is tan squared x over 2, plus C. Substituting u equals sec x instead gives sec squared x over 2, which looks different but differs only by the constant one half, so both are correct.
Two substitutions, two answers
Taking gives and the integral .
Taking gives and the integral again, but in a different variable.
Why both are right
The Pythagorean identity says , so the two answers differ by exactly , which the constant of integration absorbs.
A useful thing to have seen once
Two antiderivatives of the same function always differ by a constant. That is the Mean Value Theorem corollary underneath every +C, and this integral is the cleanest place it shows up.
Common mistakes
- Assuming one of the two forms must be wrong because it does not match the key.
- Forgetting the in either version.
- Reading as .
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 tan x sec^2 x?
Either or . The two differ by a constant, so both are correct.
How can two different answers both be right?
Because , so the forms differ by , which the absorbs.