AP Calculus AB and BC

Integral of tan^3 x: Split the Power

The integral of tan cubed x is tan squared x over 2, plus the natural log of the absolute value of cos x, plus C. Splitting tan cubed into tan squared times tan and using the identity tan squared equals secant squared minus 1 reduces it to two standard integrals.

tan3xdx=tan2x2+lncosx+C\int \tan^{3} x\,dx = \frac{\tan^{2}x}{2} + \ln\left|\cos x\right| + C

Peel one factor, then use the identity

tan3x=tanx(sec2x1)=tanxsec2xtanx\tan^{3}x = \tan x\left(\sec^{2}x - 1\right) = \tan x\sec^{2}x - \tan x

The first piece is the udu\int u\,du pattern with u=tanxu = \tan x, giving tan2x2\frac{\tan^{2}x}{2}. The second is the standard tangent integral, giving lncosx\ln\left|\cos x\right| once the minus sign is applied.

The reduction generalises

Every odd power of tangent reduces the same way: peel off one factor, convert the rest with the identity, and repeat. The even powers reduce to sec2x1\sec^{2}x - 1 directly and never need the tangent integral.

Common mistakes

  • Sign errors on the second piece. tanxdx=lncosx\int \tan x\,dx = -\ln\left|\cos x\right|, and here it is subtracted, so it lands as +lncosx+\ln\left|\cos x\right|.
  • Dropping the absolute value inside the logarithm.

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^3 x?

It is tan2x2+lncosx+C\frac{\tan^{2}x}{2} + \ln\left|\cos x\right| + C.

What is the general strategy for odd powers of tangent?

Peel off one factor of tanx\tan x and rewrite the rest using tan2x=sec2x1\tan^{2}x = \sec^{2}x - 1.