∫Yoboa Math
Home / Integral of tan²(x)
Integral Reference

Integral of tan²(x)

Step-by-step derivation, definite integral examples, and common variants.

tan²(x) cannot be integrated directly — there is no power rule for trig functions. The Pythagorean identity converts it into sec²(x) − 1, both of which have known antiderivatives.

Result

\[ \int \tan^2(x)\,dx = \tan(x) - x + C \]

Derivation

Apply the Pythagorean identity \(\tan^2(x) = \sec^2(x) - 1\):

\[ \int \tan^2(x)\,dx = \int (\sec^2(x) - 1)\,dx = \tan(x) - x + C \]

Verification: \(\dfrac{d}{dx}[\tan(x) - x] = \sec^2(x) - 1 = \tan^2(x)\) ✓

Definite integral examples

\(\int_0^{\pi/4} \tan^2(x)\,dx\)

\[ \Big[\tan(x) - x\Big]_0^{\pi/4} = \left(1 - \frac{\pi}{4}\right) - 0 = 1 - \frac{\pi}{4} \approx 0.215 \]

\(\int_0^{\pi/4} (1 + \tan^2(x))\,dx\)

\[ \int_0^{\pi/4} \sec^2(x)\,dx = \Big[\tan(x)\Big]_0^{\pi/4} = 1 \]

Note: \(1 + \tan^2 x = \sec^2 x\).

Common variants

IntegralAntiderivativeNotes
\(\int \cot^2(x)\,dx\)\(-\cot(x) - x + C\)Use \(\cot^2 x = \csc^2 x - 1\).
\(\int \tan^3(x)\,dx\)\(\dfrac{\tan^2(x)}{2} + \ln|\cos(x)| + C\)Write tan³x = tan x · tan²x, then use the identity.

Try it in the calculator

Paste any variant below into the step-by-step integral calculator for a full worked solution and graph.

Open in calculator →

Related guides