Tutorials › Calculus II › Tangent-Power Recurrences

Reduction Formulas · Tutorial 95 of 998

Tangent-Power Recurrences

Learn to reduce integrals of powers of tangent step by step, use the appropriate base cases, and check the resulting antiderivatives.

Intermediate 9 min read

What You'll Learn

  • Derive the tangent-power reduction formula from the identity relating tangent and secant.
  • State the conditions under which the recurrence applies and identify its base cases.
  • Reduce higher powers of tangent to lower powers without losing signs.
  • Rewrite an even tangent power as a polynomial in secant powers and integrate it.
  • Check a proposed antiderivative by differentiating it.

Why Reduce Powers of Tangent?

Integrals of powers of tangent can become easier when a high power is related to one two degrees lower. The key identity is \(\tan^2 x=\sec^2 x-1\). It turns part of a tangent power into a factor involving \(\sec^2 x\), whose integral can be handled by the substitution \(u=\tan x\).

This produces a recurrence: instead of integrating \(\tan^n x\) from scratch, reduce the problem to an elementary term and an integral of \(\tan^{n-2}x\). Repeated use eventually reaches one of two simple base cases. The same identity also lets us rewrite even powers of tangent as expressions in powers of secant.

Key idea: For an integer power \(n\ge 2\), write \(\tan^n x=\tan^{n-2}x(\sec^2 x-1)\). The \(\sec^2 x\) term has an elementary antiderivative after the substitution \(u=\tan x\); the remaining term has a lower tangent power.

The Tangent-Power Recurrence

Throughout, \(n\) is an integer. Tangent is defined on any interval that does not contain a point where \(\cos x=0\). The recurrence is applied on such an interval, so the functions involved are continuous and differentiable there.

Reduction formula: For any integer \(n\ge 2\), on an interval where \(\tan x\) is defined,
$$ \int \tan^n x\,dx = \frac{\tan^{n-1}x}{n-1} - \int \tan^{n-2}x\,dx. $$

The formula is an identity between families of antiderivatives: an arbitrary additive constant is included in the final answer. The denominator \(n-1\) is nonzero because the recurrence is used only for \(n\ge 2\).

Why the Recurrence Works

Start with the identity \(\sec^2 x=1+\tan^2 x\), rearranged as \(\tan^2 x=\sec^2 x-1\). Multiplying by \(\tan^{n-2}x\) gives a decomposition of the integrand. Integrate each term; for the first, use \(u=\tan x\), so \(du=\sec^2 x\,dx\).

1
Rewrite the power.
\(\tan^n x=\tan^{n-2}x(\sec^2 x-1)\), so the integrand splits into two terms.
2
Integrate the first term.
With \(u=\tan x\) and \(du=\sec^2 x\,dx\), the integral of \(\tan^{n-2}x\sec^2 x\) becomes the integral of \(u^{n-2}\).
3
Keep the lower-power term.
The other term is \(-\int\tan^{n-2}x\,dx\). Combining the two terms gives the recurrence.

In equations, this reasoning is

$$ \begin{aligned} \int \tan^n x\,dx &=\int \tan^{n-2}x(\sec^2 x-1)\,dx\\ &=\int \tan^{n-2}x\sec^2 x\,dx-\int \tan^{n-2}x\,dx\\ &=\int u^{n-2}\,du-\int \tan^{n-2}x\,dx\\ &=\frac{u^{n-1}}{n-1}-\int \tan^{n-2}x\,dx\\ &=\frac{\tan^{n-1}x}{n-1}-\int \tan^{n-2}x\,dx. \end{aligned} $$

The power drops by two at each application. Therefore, even powers eventually reduce to \(\int 1\,dx\), and odd powers eventually reduce to \(\int\tan x\,dx\). These are the base cases:

$$ \int 1\,dx=x+C, \qquad \int \tan x\,dx=-\ln|\cos x|+C=\ln|\sec x|+C. $$

The logarithmic expression is valid on any interval where \(\cos x\ne 0\). The equality of the two logarithmic forms follows from \(\sec x=1/\cos x\) and \(-\ln|\cos x|=\ln|1/\cos x|\).

Worked Example: Reducing an Odd Power

Worked Example: Integrating \(\tan^5 x\)

Reduce the fifth power twice, then use the base case for \(\int\tan x\,dx\).

$$ \begin{aligned} \int \tan^5 x\,dx &=\frac{\tan^4 x}{4}-\int\tan^3 x\,dx\\ &=\frac{\tan^4 x}{4} -\left(\frac{\tan^2 x}{2}-\int\tan x\,dx\right)\\ &=\frac{\tan^4 x}{4}-\frac{\tan^2 x}{2}+\ln|\sec x|+C. \end{aligned} $$

Check by differentiation. Since \(\frac{d}{dx}\tan x=\sec^2 x\) and \(\frac{d}{dx}\ln|\sec x|=\tan x\),

$$ \begin{aligned} \frac{d}{dx}\left( \frac{\tan^4 x}{4}-\frac{\tan^2 x}{2}+\ln|\sec x| \right) &=\tan^3 x\sec^2 x-\tan x\sec^2 x+\tan x\\ &=\tan^3 x\sec^2 x-\tan x(\sec^2 x-1)\\ &=\tan^3 x\sec^2 x-\tan^3 x\\ &=\tan^3 x(\sec^2 x-1)\\ &=\tan^5 x. \end{aligned} $$

The derivative returns the original integrand, so the antiderivative is correct.

Using Secant Powers for an Even Power

For an even exponent, one can also use \(\tan^2 x=\sec^2 x-1\) to rewrite the entire integrand in secant powers. These terms can then be integrated directly or with the secant-power reduction formulas from the earlier material on secant-power recurrences. For the fourth power, only the elementary integrals of \(\sec^2 x\) and \(\sec^4 x\) are needed.

Worked Example: Rewriting \(\tan^4 x\) in Secant Powers

First expand the square, then integrate each term. To handle \(\sec^4 x\), write it as \(\sec^2 x(1+\tan^2 x)\); with \(u=\tan x\), this gives \(\int\sec^4 x\,dx=\tan x+\frac{\tan^3 x}{3}+C\).

$$ \begin{aligned} \int\tan^4 x\,dx &=\int(\sec^2 x-1)^2\,dx\\ &=\int\sec^4 x\,dx-2\int\sec^2 x\,dx+\int 1\,dx\\ &=\left(\tan x+\frac{\tan^3 x}{3}\right)-2\tan x+x+C\\ &=\frac{\tan^3 x}{3}-\tan x+x+C. \end{aligned} $$

For a check, differentiate the final expression:

$$ \begin{aligned} \frac{d}{dx}\left(\frac{\tan^3 x}{3}-\tan x+x\right) &=\tan^2 x\sec^2 x-\sec^2 x+1\\ &=\tan^2 x\sec^2 x-(\sec^2 x-1)\\ &=\tan^2 x\sec^2 x-\tan^2 x\\ &=\tan^2 x(\sec^2 x-1)\\ &=\tan^4 x. \end{aligned} $$

This agrees with the recurrence as well: it gives \(\int\tan^4 x\,dx=\frac{\tan^3 x}{3}-\int\tan^2 x\,dx\), and \(\int\tan^2 x\,dx=\tan x-x+C\).

Worked Example: Evaluating a Definite Integral

Worked Example: Integrating \(\tan^6 x\) from \(0\) to \(\pi/4\)

The interval \([0,\pi/4]\) contains no point where \(\cos x=0\), so the integrand is continuous there. Apply the recurrence twice, using the fourth-power antiderivative from the previous example.

$$ \begin{aligned} \int \tan^6 x\,dx &=\frac{\tan^5 x}{5}-\int\tan^4 x\,dx\\ &=\frac{\tan^5 x}{5}-\frac{\tan^3 x}{3}+\tan x-x+C. \end{aligned} $$

At \(x=\pi/4\), \(\tan(\pi/4)=1\), so the antiderivative has value

$$ \frac{1}{5}-\frac{1}{3}+1-\frac{\pi}{4} = \frac{3-5+15}{15}-\frac{\pi}{4} = \frac{13}{15}-\frac{\pi}{4}. $$

At \(x=0\), \(\tan 0=0\), so its value is \(0\). Therefore,

$$ \int_0^{\pi/4}\tan^6 x\,dx = \frac{13}{15}-\frac{\pi}{4}. $$

As a check on the antiderivative used, differentiate it:

$$ \begin{aligned} \frac{d}{dx}\left( \frac{\tan^5 x}{5}-\frac{\tan^3 x}{3}+\tan x-x \right) &=\tan^4 x\sec^2 x-\tan^2 x\sec^2 x+\sec^2 x-1\\ &=\sec^2 x(\tan^4 x-\tan^2 x+1)-1. \end{aligned} $$

Using \(\sec^2 x=1+\tan^2 x\), set \(t=\tan^2 x\). The last expression becomes \((1+t)(t^2-t+1)-1=t^3\), because \((1+t)(t^2-t+1)=t^3+1\). Thus the derivative is \(t^3=\tan^6 x\), as required.

A Common Sign Error

The sign in the recurrence comes directly from \(\tan^2 x=\sec^2 x-1\). Replacing the minus sign with a plus sign changes the integrand and produces a wrong result. For example, the incorrect identity \(\tan^2 x=\sec^2 x+1\) would give the false antiderivative \(\tan x+x\) for \(\tan^2 x\).

$$ \frac{d}{dx}(\tan x+x)=\sec^2 x+1 =\tan^2 x+2\ne \tan^2 x. $$

The correction is to keep the minus sign: \(\tan^2 x=\sec^2 x-1\), so \(\int\tan^2 x\,dx=\tan x-x+C\). Differentiating gives \(\sec^2 x-1=\tan^2 x\). A quick derivative check catches the sign error immediately.

Using the Recurrence Reliably

Each application lowers the exponent by two and adds a term whose power is one less than the current exponent. Continue until the exponent is zero or one, then use the corresponding base case. Keep the subtraction signs visible at every step; repeated subtraction is a common source of mistakes.

For even powers, the recurrence is often the quickest route to a result. Rewriting with \(\tan^2 x=\sec^2 x-1\) is another useful route when it produces manageable secant powers. In either approach, check the domain before integrating: an interval used for an antiderivative or a definite integral must avoid the poles of tangent.

Takeaway: For \(n\ge2\), reduce \(\int\tan^n x\,dx\) to \(\frac{\tan^{n-1}x}{n-1}-\int\tan^{n-2}x\,dx\). Keep reducing until reaching \(\int1\,dx\) or \(\int\tan x\,dx\), and verify the finished expression by differentiation.

Check Your Understanding

Use the recurrence and the stated domain conditions to answer these questions.

  1. State the tangent-power reduction formula and the condition on the integer exponent \(n\).
  2. What substitution evaluates the term \(\int\tan^{n-2}x\sec^2 x\,dx\), and what does that integral become?
  3. Which base case is reached after repeatedly reducing \(\int\tan^7 x\,dx\)?
  4. Rewrite \(\tan^6 x\) as a polynomial in powers of \(\sec x\), without integrating.
  5. Why must an interval for these antiderivatives avoid points where \(\cos x=0\)?

Test yourself: Calculus II final exam practice

Ready to check what you know? Work a full-length practice final, then open the complete worked solutions.

Want all 1,114 practice problems?

This tutorial covers one topic. Calc Pass covers the full Calculus AB & BC curriculum (the core of Calculus I and II): full review, every practice question, and step-by-step solutions to each one.

QR code to download the Calc Pass app

Get the Calc Pass App

Scan to download and practice on the go, with instant scoring.

Calc Pass Volume 1: 1,114 Practice Questions book cover

Vol. 1: 1,114 Questions

The complete practice question bank, organized by AB & BC topic.

View on Amazon
Calc Pass Volume 2: Solutions Manual book cover

Vol. 2: Solutions Manual

Fully worked solutions to every question in Volume 1.

View on Amazon