Tutorials › Calculus I › Substitution With Tangent And Secant Patterns

Substitution and Reversing the Chain Rule · Tutorial 1131 of 1495

Substitution With Tangent And Secant Patterns

Use the reverse chain rule to integrate composite tangent and secant patterns, with careful attention to constant multipliers and intervals that avoid undefined values.

Intermediate 9 min read

What You'll Learn

  • Match the derivative factors for tangent and secant compositions.
  • Integrate patterns involving tangent, secant squared, and secant times tangent.
  • Account for constant multiples of the inner derivative.
  • State the domain restrictions caused by trigonometric poles.
  • Check each proposed antiderivative by differentiation.

Recognizing the Pattern

A trigonometric function inside another expression can make an integral look more complicated than it is. When the derivative of the inner function is also present, the reverse chain rule can turn the integral into a familiar basic antiderivative.

For tangent and secant, the most useful derivative identities are

$$ \frac{d}{du}\tan u=\sec^2 u, \qquad \frac{d}{du}\sec u=\sec u\tan u. $$

These identities suggest two direct patterns: a secant-squared factor pairs with the derivative of the inner function to produce a tangent, while a secant-times-tangent factor pairs with it to produce a secant. A third pattern comes from the derivative of the logarithm of the absolute value of cosine.

Definition: A function \(F\) is an antiderivative of \(f\) on an interval \(I\) if \(F\) is differentiable on \(I\) and \(F'(x)=f(x)\) for every \(x\in I\). An indefinite integral gives a family of antiderivatives, written with an arbitrary constant \(C\).

The Three Basic Composite Patterns

Let \(g\) be differentiable on an interval, and suppose the expressions below are defined there. The following formulas apply whenever the displayed factor \(g'(x)\) is present:

$$ \int \sec^2(g(x))\,g'(x)\,dx = \tan(g(x))+C, $$
$$ \int \sec(g(x))\tan(g(x))\,g'(x)\,dx = \sec(g(x))+C, $$
$$ \int \tan(g(x))\,g'(x)\,dx = -\ln|\cos(g(x))|+C. $$

The third formula is also commonly written as \(\ln|\sec(g(x))|+C\), since \(|\sec u|=1/|\cos u|\) wherever cosine is nonzero. The absolute value is important: the logarithm in a real-valued antiderivative must have a positive argument.

Each formula is valid on an interval where its integrand and proposed antiderivative are defined. In particular, \(\tan(g(x))\) and \(\sec(g(x))\) require \(\cos(g(x))\ne 0\). If the expression is undefined at some points, apply the formula separately on intervals that do not cross those points.

Why the Formulas Work

The formulas follow by differentiating the proposed antiderivatives. This gives a direct justification and shows exactly why the inner derivative must appear.

1
Differentiate the tangent expression.
By the chain rule, the derivative of \(\tan(g(x))\) is \(\sec^2(g(x))g'(x)\). This is precisely the first integrand.
2
Differentiate the secant expression.
The derivative of \(\sec(g(x))\) is \(\sec(g(x))\tan(g(x))g'(x)\), which gives the second pattern.
3
Differentiate the logarithmic expression.
Where \(\cos(g(x))\ne 0\), the derivative of \(-\ln|\cos(g(x))|\) is \(\tan(g(x))g'(x)\), giving the third pattern.

For the logarithmic step in detail, the derivative of \(\ln|v(x)|\), where \(v(x)\ne 0\), is \(v'(x)/v(x)\). Set \(v(x)=\cos(g(x))\). Then

$$ \frac{d}{dx}\bigl[-\ln|\cos(g(x))|\bigr] = -\frac{-\sin(g(x))g'(x)}{\cos(g(x))} = \tan(g(x))g'(x). $$

This calculation also explains the domain restriction: the logarithm is defined only when \(\cos(g(x))\ne 0\), exactly the condition needed for the tangent expression to be defined.

Matching Constant Factors

The derivative factor does not need to appear with coefficient exactly one. If \(g'(x)\) is a constant multiple of the factor in the integral, adjust the answer by the reciprocal of that constant. More generally, if the integrand contains \(A g'(x)\) times a trigonometric pattern, then the corresponding antiderivative is multiplied by \(A\).

For example, if the coefficient of a secant-squared pattern is \(k\) and \(g'(x)=m\), with \(m\ne 0\), then the integrand \(k\sec^2(g(x))\) can be written as \((k/m)\sec^2(g(x))g'(x)\). The resulting antiderivative is \((k/m)\tan(g(x))+C\). The same constant adjustment works for the secant-times-tangent and tangent patterns.

Worked Example: A Secant-Squared Composition

Evaluate \(\int 6\sec^2(3x-1)\,dx\). The inner function is \(g(x)=3x-1\), so \(g'(x)=3\). The integrand coefficient \(6\) is twice this derivative:

$$ 6\sec^2(3x-1) = 2\sec^2(3x-1)\cdot 3. $$

Apply the secant-squared pattern, keeping the factor \(2\):

$$ \int 6\sec^2(3x-1)\,dx = 2\tan(3x-1)+C. $$

This formula holds on any interval where \(\cos(3x-1)\ne 0\). Check by differentiating:

$$ \frac{d}{dx}\bigl[2\tan(3x-1)+C\bigr] = 2\sec^2(3x-1)\cdot 3 = 6\sec^2(3x-1). $$

The derivative reproduces the original integrand.

Worked Example: A Secant-Tangent Composition

Evaluate \(\int 4\sec(2x+\pi/6)\tan(2x+\pi/6)\,dx\). Let \(g(x)=2x+\pi/6\), so \(g'(x)=2\). Rewrite the coefficient using this derivative:

$$ 4\sec(g(x))\tan(g(x)) = 2\sec(g(x))\tan(g(x))g'(x). $$

The secant-times-tangent pattern therefore gives

$$ \int 4\sec(2x+\pi/6)\tan(2x+\pi/6)\,dx = 2\sec(2x+\pi/6)+C. $$

The expression is defined on intervals where \(\cos(2x+\pi/6)\ne 0\). To check, differentiate the answer:

$$ \frac{d}{dx}\bigl[2\sec(2x+\pi/6)+C\bigr] = 2\sec(2x+\pi/6)\tan(2x+\pi/6)\cdot 2 = 4\sec(2x+\pi/6)\tan(2x+\pi/6). $$

This is the original integrand.

Worked Example: A Tangent Composition

Evaluate \(\int \frac{3}{2}\tan(3x-2)\,dx\). The inner function is \(g(x)=3x-2\), and \(g'(x)=3\). Thus \(\frac{3}{2}\tan(g(x))\) is one half of \(\tan(g(x))g'(x)\):

$$ \frac{3}{2}\tan(3x-2) = \frac{1}{2}\tan(3x-2)\cdot 3. $$

Using the tangent pattern gives

$$ \int \frac{3}{2}\tan(3x-2)\,dx = -\frac{1}{2}\ln|\cos(3x-2)|+C. $$

This antiderivative is valid on intervals where \(\cos(3x-2)\ne 0\). Its derivative is

$$ \frac{d}{dx}\left[-\frac{1}{2}\ln|\cos(3x-2)|+C\right] = -\frac{1}{2}\bigl[-\tan(3x-2)\cdot 3\bigr] = \frac{3}{2}\tan(3x-2). $$

The result matches the integrand, including its coefficient.

Combining Patterns and Respecting Domains

An integrand can contain more than one recognizable term. If each term matches a standard pattern, integrate the terms separately and keep track of where all of them are defined. For a sum of terms, the domain of the combined formula must avoid every point where any term is undefined.

Worked Example: Two Patterns in One Integral

Evaluate \(\int [4\sec^2(2x)+3\sec(3x)\tan(3x)]\,dx\). The first term has inner function \(2x\), whose derivative is \(2\), so its coefficient \(4\) gives a factor of \(2\) in the answer. The second has inner function \(3x\), whose derivative is \(3\), so its coefficient already matches:

$$ \int 4\sec^2(2x)\,dx=2\tan(2x), \qquad \int 3\sec(3x)\tan(3x)\,dx=\sec(3x). $$

Adding the antiderivatives gives

$$ \int [4\sec^2(2x)+3\sec(3x)\tan(3x)]\,dx = 2\tan(2x)+\sec(3x)+C. $$

This expression is valid on intervals where both \(\cos(2x)\ne 0\) and \(\cos(3x)\ne 0\). Differentiate to check both terms:

$$ \frac{d}{dx}\bigl[2\tan(2x)+\sec(3x)+C\bigr] = 2\sec^2(2x)\cdot 2 + \sec(3x)\tan(3x)\cdot 3 = 4\sec^2(2x)+3\sec(3x)\tan(3x). $$

The derivative is exactly the original integrand.

A Common Mistake: Losing the Inner Derivative

A frequent error is to recognize the outer function but forget that differentiating a composition produces an inner derivative factor. For instance, the calculation

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

is incorrect. Differentiating the proposed answer gives

$$ \frac{d}{dx}\tan(3x-1)=3\sec^2(3x-1), $$

which is three times the integrand. The correction is to compensate for the inner derivative:

$$ \int \sec^2(3x-1)\,dx = \frac{1}{3}\tan(3x-1)+C, $$

because differentiating this corrected expression gives \(\frac{1}{3}\cdot 3\sec^2(3x-1)=\sec^2(3x-1)\). Always check the proposed result by differentiation; this reveals a missing factor immediately.

When These Patterns Apply

These formulas apply directly when the integrand contains the derivative of its inner function, up to a constant factor. For example, \(\sec^2(g(x))g'(x)\) fits the first pattern. If the inner derivative is absent and is not a constant multiple of the remaining factors, these formulas alone do not evaluate the integral.

Do not ignore domain restrictions when writing an antiderivative. Tangent and secant are undefined where cosine is zero, so a formula involving them describes antiderivatives on intervals that avoid those points. Likewise, the logarithmic tangent antiderivative requires \(\cos(g(x))\ne 0\). Constants of integration may differ from one such interval to another.

The practical value of recognizing these patterns is that a complicated-looking composition can often be integrated by matching only two features: the outer trigonometric pattern and the derivative of the inner function. A final differentiation check confirms both the functional form and every constant factor.

Check Your Understanding

For each integral, identify the inner function, account for its derivative, and state any relevant domain restriction.

  1. Evaluate \(\int 8\sec^2(4x+1)\,dx\).
  2. Evaluate \(\int 5\sec(5x)\tan(5x)\,dx\).
  3. Evaluate \(\int 2\tan(2x+\pi/3)\,dx\).
  4. On what points is \(\tan(7x-1)\) undefined?
  5. Why is \(\tan(3x)+C\) not an antiderivative of \(\sec^2(3x)\)?

Test yourself: Calculus I 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