AP Calculus AB and BC
Integral of tan^2 x: Answer, Steps, and Domain
The integral of tan^2 x is tan x - x + C. Rewrite tan^2 x as sec^2 x - 1 using the Pythagorean identity, then integrate term by term: the antiderivative of sec^2 x is tan x and the antiderivative of 1 is x. It holds on any interval where tan x is defined.
The rewrite that makes it work
There is no antiderivative rule for a squared tangent, so the first move is always to trade for something you already know how to integrate. Divide the Pythagorean identity by to get , then solve for .
Now the integrand splits into two standard pieces. The antiderivative of is , because , and the antiderivative of the constant is .
Why no substitution is needed
Students often reach for -substitution here, but there is no inner function to peel off. The identity does all the work, which is why is classified as a trig-identity problem rather than a substitution problem.
Checking the answer by differentiating
Every antiderivative claim is checkable in one line. Differentiate and you should land back on the integrand.
The last equality is the same Pythagorean identity read backwards, so the check closes cleanly. If your answer differentiates to with no , you dropped the constant term during integration.
Domain, and what that means for definite integrals
Both and blow up at the odd multiples of , where . The formula is valid only on an interval that avoids those asymptotes, such as .
- A definite integral such as is fine, because the whole interval sits inside one branch. It evaluates to .
- An integral whose limits straddle is improper. Applying the Fundamental Theorem across the asymptote produces a number, but it is meaningless, and on the AP exam it is scored as wrong.
- Since everywhere it is defined, any correct definite integral on a single branch must come out nonnegative. A negative answer is a signal that you crossed an asymptote.
State the interval
Free-response rubrics reward writing the antiderivative with its interval of validity. Answering on costs one extra clause and shows you know where the result lives.
Related integrals that use the same identity
Once the identity is in hand, several neighboring integrals follow the same pattern of converting a squared trig function into something with a known antiderivative.
For of a linear inside function, the identity still applies and the chain rule contributes a reciprocal factor: .
Higher powers such as peel off one factor of , apply the same identity, and then finish with a substitution. That is BC-style trig integration rather than the single-step AB problem above.
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
Why is the answer and not ?
The power rule for antiderivatives applies to powers of the variable, not to powers of a function. Since the derivative of is rather than , you cannot raise the exponent and divide. The identity is the legitimate route.
Where does the identity come from?
Start from and divide every term by . That gives , and subtracting from both sides isolates .
What is ?
Evaluate at the endpoints: , about . The interval lies inside a single branch of the tangent, so the Fundamental Theorem applies.
Is this integral on the AP Calculus AB exam?
Yes. It belongs to Unit 6, Integration and Accumulation of Change, and it is fair game on both AB and BC. AB questions keep it to the one-step identity rewrite, while BC extends the technique to higher powers of tangent and secant.