Tutorials › AP Calculus › Integrals of Secant-Squared and Cosecant-Squared

Antiderivatives and Substitution · Tutorial 488 of 999

Integrals of Secant-Squared and Cosecant-Squared

Use the tangent and cotangent derivative rules to find and verify antiderivatives of secant-squared and cosecant-squared expressions.

Intermediate 8 min read

What You'll Learn

  • Connect the derivative of tangent to the antiderivative of secant-squared.
  • Connect the derivative of cotangent to the antiderivative of cosecant-squared.
  • Find antiderivatives when the trigonometric function has a linear argument.
  • Account for the constant factor produced by the chain rule.
  • Check an antiderivative by differentiating it and identify common sign and factor errors.

From Trigonometric Derivatives to Antiderivatives

The derivative rules for tangent and cotangent immediately provide two useful antiderivative rules. The key is to recognize both the trigonometric expression and, when its argument is not simply \(x\), the constant factor contributed by the chain rule.

These rules apply on intervals where the expressions are defined. In particular, \(\sec^2 x\) is undefined when \(\cos x=0\), and \(\csc^2 x\) is undefined when \(\sin x=0\). An antiderivative must be considered on an interval that does not cross one of those undefined points.

Definition: An antiderivative of a function \(f\) on an interval is a function \(F\) whose derivative equals \(f\) at every point of that interval. The indefinite integral \(\int f(x)\,dx\) denotes the family of antiderivatives, which differ by an arbitrary constant \(C\).

The Basic Antiderivative Rules

The derivative of tangent is \(\sec^2 x\), and the derivative of cotangent is \(-\csc^2 x\). Reversing these derivative rules gives the corresponding antiderivatives:

$$ \int \sec^2 x\,dx=\tan x+C $$
$$ \int \csc^2 x\,dx=-\cot x+C $$

The negative sign in the second formula is essential. Since \(\frac{d}{dx}(\cot x)=-\csc^2 x\), the antiderivative of positive \(\csc^2 x\) is \(-\cot x\), not \(\cot x\).

Theorem: On any interval where the integrand is defined, \(\tan x+C\) is an antiderivative of \(\sec^2 x\), and \(-\cot x+C\) is an antiderivative of \(\csc^2 x\). Here \(C\) is an arbitrary constant.

Worked Example: Integrating Secant-Squared of \(x\)

Find \(\int \sec^2 x\,dx\), then verify the result.

The derivative rule \(\frac{d}{dx}(\tan x)=\sec^2 x\) matches the integrand directly. Therefore,

$$ \int \sec^2 x\,dx=\tan x+C. $$

To check, differentiate the proposed antiderivative:

$$ \frac{d}{dx}\bigl(\tan x+C\bigr) =\sec^2 x+0 =\sec^2 x. $$

The derivative is the original integrand, so the result is correct on any interval where \(\cos x\ne 0\).

Why Linear Arguments Require a Factor

Suppose the argument is \(kx+b\), where \(k\) and \(b\) are constants. Differentiating \(\tan(kx+b)\) produces not just \(\sec^2(kx+b)\), but also the derivative \(k\) of the inner expression. That factor must be accounted for in the antiderivative.

$$ \frac{d}{dx}\tan(kx+b) =\sec^2(kx+b)\cdot k =k\sec^2(kx+b). $$

When \(k\ne 0\), multiplying \(\tan(kx+b)\) by \(1/k\) cancels that extra factor. The same reasoning applies to cotangent, with its negative derivative.

Theorem: Let \(k\ne 0\) and let \(b\) be a constant. On any interval where the integrand is defined,
$$ \int \sec^2(kx+b)\,dx =\frac{1}{k}\tan(kx+b)+C $$
$$ \int \csc^2(kx+b)\,dx =-\frac{1}{k}\cot(kx+b)+C. $$

For the secant-squared formula, the interval must satisfy \(\cos(kx+b)\ne 0\). For the cosecant-squared formula, it must satisfy \(\sin(kx+b)\ne 0\). The constant \(C\) can be chosen independently on each interval of definition.

Deriving and Verifying the Rules

The formulas follow from the chain rule and the derivatives of tangent and cotangent. Those derivative identities can also be seen from the quotient rule. Where \(\cos x\ne 0\), tangent is \(\sin x/\cos x\), so:

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

Where \(\sin x\ne 0\), cotangent is \(\cos x/\sin x\), and the quotient rule gives:

$$ \frac{d}{dx}\cot x = \frac{(-\sin x)\sin x-\cos x\cos x}{\sin^2 x} = -\frac{\sin^2 x+\cos^2 x}{\sin^2 x} = -\frac{1}{\sin^2 x} = -\csc^2 x. $$

Now differentiate each proposed antiderivative for a linear argument. For secant-squared:

$$ \frac{d}{dx}\left(\frac{1}{k}\tan(kx+b)\right) = \frac{1}{k}\sec^2(kx+b)\cdot k = \sec^2(kx+b). $$

For cosecant-squared:

$$ \frac{d}{dx}\left(-\frac{1}{k}\cot(kx+b)\right) = -\frac{1}{k}\left(-\csc^2(kx+b)\cdot k\right) = \csc^2(kx+b). $$

Each derivative reproduces its integrand. This verifies both formulas and explains why the coefficient is \(1/k\) and why the cosecant-squared antiderivative has a negative sign.

Worked Example: A Secant-Squared Function with a Linear Argument

Find \(\int \sec^2(5x-1)\,dx\), then verify the result.

The inner expression is \(5x-1\), whose derivative is \(5\). Thus \(k=5\) and \(b=-1\), so the coefficient in front of the tangent is \(1/5\):

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

Differentiate to check, applying the chain rule to the tangent:

$$ \frac{d}{dx}\left(\frac{1}{5}\tan(5x-1)+C\right) = \frac{1}{5}\sec^2(5x-1)\cdot 5 = \sec^2(5x-1). $$

The factors \(1/5\) and \(5\) cancel, leaving exactly the given integrand. The formula applies on intervals where \(\cos(5x-1)\ne 0\).

Worked Example: A Cosecant-Squared Function with a Linear Argument

Find \(\int \csc^2(3x+\frac{\pi}{6})\,dx\), then verify the result.

The inner expression \(3x+\frac{\pi}{6}\) has derivative \(3\). Apply the cosecant-squared rule, including its negative sign:

$$ \int \csc^2\left(3x+\frac{\pi}{6}\right)\,dx = -\frac{1}{3}\cot\left(3x+\frac{\pi}{6}\right)+C. $$

Differentiate the proposed answer:

$$ \begin{aligned} \frac{d}{dx}\left[-\frac{1}{3}\cot\left(3x+\frac{\pi}{6}\right)+C\right] &= -\frac{1}{3}\left[-\csc^2\left(3x+\frac{\pi}{6}\right)\cdot 3\right]\\ &= \csc^2\left(3x+\frac{\pi}{6}\right). \end{aligned} $$

The derivative matches the integrand. The formula is valid on intervals where \(\sin(3x+\frac{\pi}{6})\ne 0\).

Constant Factors Outside the Trigonometric Function

An integrand may include a constant multiplier as well as a linear argument. In that case, keep the outside multiplier and the argument’s derivative visible. The result can then be checked by differentiating it.

Worked Example: Combining an Outside Factor with a Linear Argument

Find \(\int 4\csc^2(2x)\,dx\), then verify the result.

The derivative of the inner expression \(2x\) is \(2\). The cosecant-squared rule contributes a factor of \(-1/2\), and the integrand already has an outside factor of \(4\):

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

Check by differentiation:

$$ \begin{aligned} \frac{d}{dx}\bigl(-2\cot(2x)+C\bigr) &=-2\left(-\csc^2(2x)\cdot 2\right)\\ &=4\csc^2(2x). \end{aligned} $$

The result differentiates to the original integrand, including its outside factor of \(4\). It is valid wherever \(\sin(2x)\ne 0\).

When the Argument Has No Variable Part

The linear-argument formulas above require \(k\ne 0\), because they divide by \(k\). If \(k=0\), the argument \(kx+b\) is simply the constant \(b\). Provided the trigonometric expression is defined, the integrand is a constant function:

$$ \int \sec^2(b)\,dx=\sec^2(b)x+C \qquad\text{if }\cos b\ne 0, $$
$$ \int \csc^2(b)\,dx=\csc^2(b)x+C \qquad\text{if }\sin b\ne 0. $$

These follow because the derivative of a constant multiple of \(x\) is that constant. If the relevant denominator is zero, the integrand is undefined and these expressions do not apply.

Common Errors and Why the Rules Matter

A frequent error is to forget the factor from differentiating the argument. For example, an incorrect attempt is:

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

Differentiate the proposed answer:

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

which is three times the integrand, not the integrand itself. The correction is to include the reciprocal factor:

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

Another error is to omit the negative sign for cosecant-squared. Since differentiating \(\cot x\) gives \(-\csc^2 x\), writing \(\cot x+C\) as an antiderivative of \(\csc^2 x\) has the wrong sign. Checking by differentiation catches both kinds of error quickly.

These antiderivatives are useful because they connect familiar trigonometric derivatives to integration patterns. Recognizing the pattern, tracking the derivative of the argument, and verifying the answer by differentiation provide a reliable method without relying on guesswork.

Check Your Understanding

For each integral, state any relevant restriction on where the integrand is defined, and check your proposed answer by differentiation.

  1. Find \(\int \sec^2 x\,dx\).
  2. Find \(\int \csc^2(4x)\,dx\).
  3. Find \(\int 6\sec^2(3x+2)\,dx\).
  4. Explain why the antiderivative of \(\csc^2(kx+b)\), for \(k\ne 0\), has a negative sign.
  5. For \(k=0\), what is an antiderivative of \(\sec^2(kx+b)\), provided the expression is defined?

Test yourself: AP Calculus practice exams

Ready to check what you know? Work an AP-style practice exam, then open the full solutions.

Want all 1,114 practice problems?

This tutorial covers one topic. Calc Pass covers all of AP Calculus AB & BC: 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