Why These Derivatives Matter
In trigonometric integrals, the usefulness of a substitution often depends on whether part of the integrand is the derivative of another part. Tangent and secant are especially helpful because their derivatives can be written using tangent and secant themselves. Once these identities are established, they provide a reliable way to spot natural substitutions in integrals involving their powers.
This tutorial derives the two identities and explains how to recognize the corresponding substitution patterns. The goal is not to classify every tangent-secant integral, but to understand why the substitutions work and how to verify the results.
Definitions and Domains
The tangent and secant functions are defined by
Both functions are defined only where \(\cos x\ne 0\). Their excluded points are \(x=\frac{\pi}{2}+k\pi\), where \(k\) is an integer. On any open interval that avoids those points, tangent and secant are differentiable, so their derivative identities apply throughout that interval.
This domain condition matters for integration. An antiderivative involving \(\tan x\) or \(\sec x\) is understood on an interval where those expressions are defined. If an interval crosses an excluded point, the integral must be considered separately on its domain intervals.
Deriving the Tangent Derivative
Write tangent as a quotient and apply the quotient rule. The quotient rule states that \(\left(\frac{u}{v}\right)'=\frac{u'v-uv'}{v^2}\), provided \(v\ne 0\). Here \(u=\sin x\) and \(v=\cos x\), so \(u'=\cos x\) and \(v'=-\sin x\). Therefore,
The penultimate equality uses the Pythagorean identity \(\sin^2 x+\cos^2 x=1\); the last uses the definition of secant. Thus the tangent derivative is positive wherever it is defined. This also provides a useful sign check: a proposed formula for the derivative of tangent should not have a negative sign.
Deriving the Secant Derivative
Write secant as the reciprocal of cosine. The derivative of a reciprocal, \((1/v)'=-v'/v^2\), applies where \(v\ne 0\). With \(v=\cos x\), it gives
The two factors in the last expression have different roles: \(\sec x\) comes from one factor of \(1/\cos x\), while \(\tan x\) is \(\sin x/\cos x\). This factorization is the reason a product of secant and tangent can signal a substitution using secant.
How the Identities Guide Substitution
The substitution rule for antiderivatives is the chain rule used in reverse. If \(u=g(x)\), then \(du=g'(x)\,dx\). A factor of \(g'(x)\) in an integrand can therefore be absorbed into \(du\), leaving an integral expressed in \(u\). For tangent and secant, the identities show which differential factors to look for:
- If an expression is a function of \(\tan x\) and the integrand includes \(\sec^2 x\,dx\), try \(u=\tan x\), since \(du=\sec^2 x\,dx\).
- If an expression is a function of \(\sec x\) and the integrand includes \(\sec x\tan x\,dx\), try \(u=\sec x\), since \(du=\sec x\tan x\,dx\).
These are recognition patterns, not automatic guarantees that a particular integral becomes easy. The remaining expression must also be expressible in terms of the chosen \(u\). If the integrand contains a composite expression such as \(\tan(3x+1)\), the chain rule contributes an additional factor of \(3\), which must be accounted for.
Look for a tangent or secant expression whose derivative may appear as another factor.
Include the chain-rule factor if its argument is not just \(x\).
Check whether the differential factor is present, perhaps up to a constant multiple.
Integrate in the new variable, then differentiate the proposed antiderivative to confirm it.
Worked Applications
Worked Example: A Tangent Expression with a Linear Argument
Evaluate \(\int \sec^2(2x+1)\,dx\). The tangent derivative identity suggests that the integrand is the derivative of a tangent expression, with a chain-rule factor to handle.
Set \(u=2x+1\). Then \(\frac{du}{dx}=2\), so \(du=2\,dx\) and \(dx=\frac{1}{2}\,du\). Substitution gives
Check by differentiating the result:
The derivative matches the integrand. The factor \(\frac{1}{2}\) in the antiderivative is necessary to compensate for the inner derivative \(2\).
Worked Example: A Secant-Tangent Product with a Linear Argument
Evaluate \(\int \sec(3x)\tan(3x)\,dx\). The secant identity gives the derivative of \(\sec(3x)\) after applying the chain rule.
Let \(u=3x\), so \(du=3\,dx\) and \(dx=\frac{1}{3}\,du\). Then
To check, differentiate:
The check confirms both the product in the derivative identity and the required factor from the inner argument.
Worked Example: Rewriting a Factor Before Substitution
Evaluate \(\int \frac{\tan x\,\sec^2 x}{1+\tan^2 x}\,dx\). The factor \(\sec^2 x\,dx\) suggests \(u=\tan x\). After substitution, the denominator also becomes an expression in \(u\).
Set \(u=\tan x\), so \(du=\sec^2 x\,dx\). The integral becomes
For the integration step, let \(w=1+u^2\). Then \(dw=2u\,du\), so \(u\,du=\frac{1}{2}dw\), and \(\int \frac{u}{1+u^2}\,du=\frac{1}{2}\int \frac{1}{w}\,dw=\frac{1}{2}\ln|w|+C\). Since \(1+u^2>0\) for real \(u\), the absolute value can be omitted.
Check by differentiation. On any interval where \(\tan x\) is defined, \(1+\tan^2 x=\sec^2 x>0\):
This equals the original integrand. The substitution works because the differentiated inner expression contributes the matching \(\sec^2 x\) factor.
A Common Mistake: Losing the Chain-Rule Factor
A frequent error is to treat the derivative of \(\tan(2x+1)\) as though its argument were simply \(x\). The incorrect calculation is
This omits the derivative of \(2x+1\). The chain rule gives the correct calculation:
Consequently, \(\tan(2x+1)\) alone is not an antiderivative of \(\sec^2(2x+1)\); its derivative is twice the integrand. Multiplying by \(\frac{1}{2}\) corrects the result. Differentiating an answer is a direct way to detect this kind of error.
Another useful sign check comes from the secant identity. Because \(\frac{d}{dx}\sec x=\sec x\tan x\), a negative sign inserted into this derivative would also produce an incorrect substitution and antiderivative. Derive the identity from \(\sec x=1/\cos x\) rather than relying on memory when the sign is uncertain.
What to Take Forward
The derivative identities connect the form of an integrand to the substitution that may simplify it. A squared-secant differential factor points toward tangent; a secant-tangent differential factor points toward secant. When the trigonometric expression has an inner function, its derivative must be included as well.
The key test is not simply whether tangent or secant appears. Ask whether the integrand contains the derivative of the proposed substitution, and whether everything that remains can be rewritten in the new variable. Finally, differentiate the proposed antiderivative on its domain to verify that it reproduces the integrand.
Check Your Understanding
Use the derivative identities and the chain rule to answer these questions. Keep track of the domain wherever tangent or secant appears.
- Derive \(\frac{d}{dx}\tan x=\sec^2 x\) using the quotient rule and the sine-cosine Pythagorean identity.
- What substitution is suggested by an integrand containing a function of \(\tan x\) multiplied by \(\sec^2 x\,dx\)?
- Evaluate \(\int \sec^2(4x)\,dx\), showing how the inner derivative affects the answer.
- Differentiate \(\frac{1}{2}\sec(2x)\) and state the resulting integrand.
- Why must tangent-secant antiderivatives be interpreted on intervals that avoid points where \(\cos x=0\)?