Tutorials › Calculus II › Common Errors In Tangent-Secant Integrals

Tangent and Secant Powers · Tutorial 138 of 998

Common Errors In Tangent-Secant Integrals

Learn to spot and correct common tangent-secant integration errors by checking algebra, substitution differentials, and derivatives.

Intermediate 10 min read

What You'll Learn

  • Check whether a proposed substitution matches the differential in the integrand.
  • Use \(\tan^2 x=\sec^2 x-1\) with the correct sign.
  • Apply parity patterns without treating them as inflexible rules.
  • Derive the logarithmic antiderivative of \(\sec x\) and use absolute values correctly.
  • Verify proposed antiderivatives by differentiating them.

Why These Integrals Invite Errors

Integrals involving powers of \(\tan x\) and \(\sec x\) often become manageable after using the identities \(\frac{d}{dx}\tan x=\sec^2 x\), \(\frac{d}{dx}\sec x=\sec x\tan x\), and \(\tan^2 x=\sec^2 x-1\). The difficulty is not merely remembering these facts. A method works only when the factors left in the integrand fit the substitution being used.

For example, if \(u=\tan x\), then \(du=\sec^2 x\,dx\). If \(u=\sec x\), then \(du=\sec x\tan x\,dx\). Replacing a factor of \(dx\) by \(du\) without matching the full differential is a frequent source of incorrect answers. Likewise, a familiar parity pattern is a guide to choosing a method, not permission to skip the algebra.

Working rule: Before integrating, identify the proposed \(u\), write its complete differential, and show exactly how the original integrand becomes an expression in \(u\) times \(du\). After integrating, differentiate the proposed antiderivative and compare it with the original integrand.

Substitution Must Match the Differential

A substitution is useful when the integrand can be expressed as \(F(u)\,du\), where \(u\) is a function of \(x\). The differential is part of the substitution: for \(u=\tan x\), the factor is \(\sec^2 x\,dx\), while for \(u=\sec x\), it is \(\sec x\tan x\,dx\). A missing factor cannot simply be ignored.

Worked Example: Correcting a Mismatched Differential

Consider \(\int \tan^3 x\sec^2 x\,dx\), on an interval where \(\cos x\ne 0\). A faulty solution might set \(u=\sec x\), note that \(du=\sec x\tan x\,dx\), and then incorrectly replace \(\tan x\,dx\) by \(du\). That replacement omits a factor of \(\sec x\), so it is not a valid change of variables.

The straightforward substitution is \(u=\tan x\), for which \(du=\sec^2 x\,dx\). Thus

$$ \int \tan^3 x\sec^2 x\,dx = \int u^3\,du = \frac{u^4}{4}+C = \frac{\tan^4 x}{4}+C. $$

Check by differentiation:

$$ \frac{d}{dx}\left(\frac{\tan^4 x}{4}\right) = \tan^3 x\sec^2 x. $$

The secant substitution can also be made correctly, though it is less direct here. Factor the complete differential \(\sec x\tan x\,dx\):

$$ \tan^3 x\sec^2 x\,dx = \tan^2 x\sec x\,(\sec x\tan x\,dx) = (u^2-1)u\,du, \qquad u=\sec x. $$

Consequently,

$$ \int (u^2-1)u\,du = \frac{u^4}{4}-\frac{u^2}{2}+C = \frac{\sec^4 x}{4}-\frac{\sec^2 x}{2}+C. $$

This second form also checks: its derivative is \(\sec^4 x\tan x-\sec^2 x\tan x =\sec^2 x\tan x(\sec^2 x-1) =\sec^2 x\tan^3 x\). The point is not that \(u=\sec x\) is forbidden. The point is that its full differential must be accounted for.

Use Trigonometric Identities with the Correct Sign

The identity \(\sec^2 x=1+\tan^2 x\) rearranges to \(\tan^2 x=\sec^2 x-1\), not \(\sec^2 x+1\). A sign error here can produce a plausible-looking expression whose derivative differs from the integrand.

Worked Example: Correcting a Sign Error

Evaluate \(\int \tan^2 x\sec^2 x\,dx\). A faulty rewrite uses \(\tan^2 x=\sec^2 x+1\), turning the integral into \(\int(\sec^4 x+\sec^2 x)\,dx\). Using \(u=\tan x\), one has \(\int\sec^4 x\,dx=\int(1+u^2)\,du =\tan x+\tan^3 x/3\), and \(\int\sec^2 x\,dx=\tan x\). The faulty result is therefore \(2\tan x+\tan^3 x/3+C\).

Differentiate that result:

$$ \frac{d}{dx}\left(2\tan x+\frac{\tan^3 x}{3}\right) = 2\sec^2 x+\tan^2 x\sec^2 x. $$

The extra \(2\sec^2 x\) shows that it is not an antiderivative of the given integrand. Use the correct substitution directly: with \(u=\tan x\), \(du=\sec^2 x\,dx\), so

$$ \int \tan^2 x\sec^2 x\,dx = \int u^2\,du = \frac{u^3}{3}+C = \frac{\tan^3 x}{3}+C. $$

The check is \(\frac{d}{dx}(\tan^3 x/3)=\tan^2 x\sec^2 x\), exactly the original integrand.

Parity Is a Guide, Not a Substitute for Checking

For nonnegative integer powers, certain parity patterns suggest convenient ways to expose a derivative factor. An odd power of \(\tan x\) can leave one \(\tan x\) available, while even powers of \(\tan x\) can be rewritten using \(\tan^2 x=\sec^2 x-1\). An odd power of \(\sec x\) can leave a \(\sec x\tan x\,dx\) factor when a tangent factor is also present. The remaining factors must still become an expression in the chosen substitution.

A common mistake is to memorize a parity rule and then claim that the substitution has worked before checking the leftover factors. For instance, with \(u=\tan x\), the differential is \(\sec^2 x\,dx\); any remaining secant factor must still be expressed correctly in terms of \(u\). With \(u=\sec x\), the differential is \(\sec x\tan x\,dx\); a remaining tangent factor is not automatically a polynomial in \(u\).

Worked Example: Using the Matching Parity Pattern

Consider \(\int \tan^3 x\sec^3 x\,dx\). Both powers are odd, so the factor \(\sec x\tan x\,dx\) is available. Let \(u=\sec x\), so \(du=\sec x\tan x\,dx\). The remaining factors are \(\tan^2 x\sec^2 x\), and \(\tan^2 x=u^2-1\), \(\sec^2 x=u^2\). Therefore,

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

To check, differentiate:

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

This recovers the integrand. The parity observation helped identify a useful factor, but the substitution was justified by rewriting every remaining factor in \(u\).

Logarithmic Antiderivatives Need Domain Care

A logarithm often appears when the integrand has the form \(g'(x)/g(x)\). For real-valued antiderivatives, the relevant formula on an interval where \(g(x)\ne 0\) is \(\int g'(x)/g(x)\,dx=\ln|g(x)|+C\). The absolute value matters when \(g\) can be negative. The formula follows from \(\frac{d}{dx}\ln|g(x)|=g'(x)/g(x)\) wherever \(g(x)\ne0\).

In particular, \(\sec x\) has the antiderivative \(\ln|\sec x+\tan x|\). Here is the derivation, including why the logarithm is defined on each interval where \(\cos x\ne0\).

1
Multiply by a useful form of one.
Since \((\sec x+\tan x)(\sec x-\tan x)=\sec^2 x-\tan^2 x=1\), the quantity \(\sec x+\tan x\) is nonzero wherever \(\sec x\) and \(\tan x\) are defined. Thus this multiplication is valid.
2
Recognize a logarithmic derivative.
The derivative of \(\sec x+\tan x\) is \(\sec x\tan x+\sec^2 x\), which is the numerator produced by the multiplication.
3
Integrate and retain the absolute value.
The resulting quotient is \(g'(x)/g(x)\) for \(g(x)=\sec x+\tan x\), so its antiderivative is \(\ln|g(x)|+C\).
$$ \begin{aligned} \int \sec x\,dx &=\int \frac{\sec x(\sec x+\tan x)}{\sec x+\tan x}\,dx\\ &=\int \frac{\sec^2 x+\sec x\tan x}{\sec x+\tan x}\,dx\\ &=\ln|\sec x+\tan x|+C. \end{aligned} $$

Worked Example: Correcting a Logarithmic Antiderivative

A proposed antiderivative for \(\int\sec x\,dx\) is sometimes written as \(\ln(\sec x+\tan x)\), without absolute values. On intervals where \(\sec x+\tan x<0\), that expression is not real-valued, so it cannot serve as a real antiderivative there. The corrected result is \(\ln|\sec x+\tan x|+C\), on any interval where \(\cos x\ne0\).

Check the corrected expression. Since \(\sec x+\tan x\ne0\) on such an interval,

$$ \begin{aligned} \frac{d}{dx}\ln|\sec x+\tan x| &=\frac{\sec x\tan x+\sec^2 x}{\sec x+\tan x}\\ &=\frac{\sec x(\tan x+\sec x)}{\sec x+\tan x}\\ &=\sec x. \end{aligned} $$

The check establishes both the derivative and the reason the logarithm applies. Dropping the absolute value may happen to work on intervals where the argument is positive, but it does not give a real-valued formula on every interval of definition.

A Reliable Error-Checking Routine

When an answer to a tangent-secant integral looks plausible, test the steps that are most likely to hide an error. In particular, confirm the trigonometric identity, the full differential, and the derivative of the final expression. The following routine is short enough to use while solving:

  1. State the substitution. Write \(u=\tan x\) or \(u=\sec x\), as appropriate.
  2. Write its differential. Use \(du=\sec^2 x\,dx\) or \(du=\sec x\tan x\,dx\).
  3. Rewrite every leftover factor. Use \(\tan^2 x=\sec^2 x-1\) or \(\sec^2 x=1+\tan^2 x\), with the correct sign.
  4. Check the domain. Work on intervals where the original integrand is defined, and use absolute values in real logarithmic antiderivatives when needed.
  5. Differentiate the final answer. Simplify until it matches the original integrand exactly.

Differentiation is an especially effective check because an indefinite integral claims that the proposed expression has a particular derivative. A mismatch is decisive: the expression is not an antiderivative, regardless of how familiar the intermediate steps looked.

Takeaway: A parity pattern can suggest a substitution, but only a correctly matched differential and valid algebra establish it. Differentiating the final expression is the simplest final test.

Check Your Understanding

For each question, identify the step that needs checking before accepting the result.

  1. For \(u=\sec x\), what complete factor must appear with \(dx\) to produce \(du\)?
  2. Rewrite \(\tan^2 x\) in terms of \(\sec^2 x\). What sign is required?
  3. Why does the substitution \(u=\tan x\) fit \(\int \tan^3 x\sec^2 x\,dx\) directly?
  4. What is the real-valued antiderivative of \(\sec x\) on an interval where \(\cos x\ne0\), and why is the absolute value used?
  5. What calculation can confirm that a proposed antiderivative is correct?

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