Tutorials › Calculus I › Deriving Antiderivatives Of Secant And Cosecant

Antiderivatives and Basic Integrals · Tutorial 1074 of 1495

Deriving Antiderivatives Of Secant And Cosecant

Learn why the antiderivatives of secant and cosecant have logarithmic forms, and how to use and check those forms on their domains.

Beginner 8 min read

What You'll Learn

  • Differentiate logarithms of trigonometric expressions to obtain secant and cosecant antiderivatives.
  • Identify where the formulas are defined and why absolute values appear.
  • Keep the signs in the cosecant formula straight.
  • Use the formulas with coefficients and an initial condition.
  • Verify each result by differentiating it.

Why Do Secant and Cosecant Have Logarithmic Antiderivatives?

For many basic trigonometric functions, the antiderivative resembles another familiar trigonometric function. Secant and cosecant are different: their standard antiderivatives involve logarithms. The reason becomes clear by differentiating suitable logarithmic expressions. In each case, a quotient rule calculation produces a trigonometric identity whose numerator and denominator simplify.

The formulas are valid wherever the original trigonometric function is defined. Since the domains of secant and cosecant are split into intervals, we state the antiderivative formula on any interval contained in the appropriate domain.

Key formulas: On any interval where \(\cos x\ne 0\), an antiderivative of \(\sec x\) is \(\ln|\sec x+\tan x|\). On any interval where \(\sin x\ne 0\), an antiderivative of \(\csc x\) is \(-\ln|\csc x+\cot x|\).

A Logarithm Rule We Need

If \(u\) is differentiable and \(u(x)\ne 0\), then

$$ \frac{d}{dx}\ln|u(x)|=\frac{u'(x)}{u(x)}. $$

For positive \(u\), this follows from the chain rule applied to \(\ln u\). For negative \(u\), we have \(\ln|u|=\ln(-u)\), so the chain rule gives \(\frac{(-u)'}{-u}=\frac{u'}{u}\) as well. Thus the rule applies wherever \(u\) is nonzero; the absolute value allows the logarithm to be real-valued for either sign.

Deriving the Secant Formula

On an interval where \(\cos x\ne 0\), both \(\sec x\) and \(\tan x\) are defined. Consider the expression \(\ln|\sec x+\tan x|\). The logarithm rule says to differentiate the inside and divide by the inside. Using \((\sec x)'=\sec x\tan x\) and \((\tan x)'=\sec^2 x\), we obtain

$$ \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 final cancellation is valid because \(\sec x+\tan x\ne 0\) wherever \(\cos x\ne 0\). Indeed, if it were zero, multiplication by \(\cos x\) would give \(1+\sin x=0\), which requires \(\sin x=-1\) and therefore \(\cos x=0\), contrary to the interval condition. The logarithm is consequently defined throughout any such interval.

Conclusion: For any interval on which \(\cos x\ne 0\), $$ \int \sec x\,dx=\ln|\sec x+\tan x|+C. $$ Here \(C\) is an arbitrary constant on the interval.

This derivation explains the particular logarithmic expression: its derivative has a numerator that factors as \(\sec x(\tan x+\sec x)\), leaving exactly \(\sec x\) after division.

Worked Example: Integrating a Multiple of Secant

Find an antiderivative of \(5\sec x\) on \((-\frac{\pi}{2},\frac{\pi}{2})\).

On this interval, \(\cos x\ne 0\), so the secant formula applies. A constant multiple of an antiderivative is an antiderivative of the same constant multiple of the function:

$$ \int 5\sec x\,dx =5\ln|\sec x+\tan x|+C. $$

Check by differentiating the proposed answer:

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

The derivative is the original integrand, so the antiderivative is verified.

Deriving the Cosecant Formula

For cosecant, consider \(-\ln|\csc x+\cot x|\). The minus sign is essential. On an interval where \(\sin x\ne 0\), both functions are defined, and their derivatives are \((\csc x)'=-\csc x\cot x\) and \((\cot x)'=-\csc^2 x\). Therefore,

$$ \begin{aligned} \frac{d}{dx}\left[-\ln|\csc x+\cot x|\right] &=-\frac{-\csc x\cot x-\csc^2 x}{\csc x+\cot x}\\ &=\frac{\csc x(\cot x+\csc x)}{\csc x+\cot x}\\ &=\csc x. \end{aligned} $$

The logarithm's argument is nonzero on this domain. If \(\csc x+\cot x=0\), multiplying by \(\sin x\) gives \(1+\cos x=0\), which requires \(\cos x=-1\) and hence \(\sin x=0\). That contradicts the condition \(\sin x\ne 0\).

Conclusion: For any interval on which \(\sin x\ne 0\), $$ \int \csc x\,dx=-\ln|\csc x+\cot x|+C. $$

The negative signs in the derivatives of both \(\csc x\) and \(\cot x\) make the derivative of \(\ln|\csc x+\cot x|\) equal to \(-\csc x\). Placing a minus sign in front of the logarithm therefore gives an antiderivative of positive \(\csc x\).

Worked Example: Integrating a Negative Multiple of Cosecant

Find an antiderivative of \(-2\csc x\) on \((0,\pi)\).

The cosecant formula gives an antiderivative of \(\csc x\). Multiplying that expression by \(-2\) gives

$$ \int -2\csc x\,dx =2\ln|\csc x+\cot x|+C. $$

To check, differentiate and simplify each sign:

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

This matches the original integrand. The interval \((0,\pi)\) contains no zero of \(\sin x\), so the formula is defined throughout it.

Constants and an Initial Condition

On a given interval, two antiderivatives of the same function differ by a constant. An initial value can determine that constant. The following example uses the secant formula and checks both the derivative and the specified value.

Worked Example: Using an Initial Value

Find \(F\) on \((0,\frac{\pi}{2})\) if \(F'(x)=\sec x\) and \(F(\frac{\pi}{4})=0\).

Begin with the general antiderivative:

$$ F(x)=\ln|\sec x+\tan x|+C. $$

At \(x=\frac{\pi}{4}\), the exact values are \(\sec(\frac{\pi}{4})=\sqrt{2}\) and \(\tan(\frac{\pi}{4})=1\). Substitute the condition \(F(\frac{\pi}{4})=0\):

$$ \begin{aligned} 0&=\ln|\sqrt{2}+1|+C\\ C&=-\ln(\sqrt{2}+1). \end{aligned} $$

Thus the particular antiderivative is

$$ F(x)=\ln|\sec x+\tan x|-\ln(\sqrt{2}+1). $$

Check the condition by substitution:

$$ F\left(\frac{\pi}{4}\right) =\ln(\sqrt{2}+1)-\ln(\sqrt{2}+1)=0. $$

Check the derivative as well. The second term is constant, so

$$ F'(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. $$

Both the derivative and initial value agree with the requirements.

An Equivalent Cosecant Form

The cosecant antiderivative is sometimes written using \(\csc x-\cot x\). The identity \(\csc^2 x-\cot^2 x=1\) gives

$$ (\csc x-\cot x)(\csc x+\cot x)=1. $$

Where \(\sin x\ne 0\), both factors are nonzero and are reciprocals. Taking logarithms of absolute values shows that

$$ \ln|\csc x-\cot x|=-\ln|\csc x+\cot x|. $$

Thus \(\ln|\csc x-\cot x|+C\) is another way to write the cosecant antiderivative. The two expressions differ only in their displayed form, not in their derivatives.

Common Sign Pitfall

A frequent mistake is to omit the minus sign and claim that \(\ln|\csc x+\cot x|\) is an antiderivative of \(\csc x\). Differentiating that expression exposes the error:

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

The derivative is negative cosecant, not cosecant. The correction is to negate the logarithm:

$$ \frac{d}{dx}\left[-\ln|\csc x+\cot x|\right]=\csc x. $$

For these formulas, a quick differentiation check is a reliable way to catch a sign error. Also keep the domain condition in view: the secant expression requires \(\cos x\ne 0\), and the cosecant expression requires \(\sin x\ne 0\). The antiderivative statements apply on intervals that stay within those domains.

Summary

The logarithmic antiderivatives arise because differentiating a logarithm divides the derivative of its inside by that inside. For secant, the numerator factors to leave \(\sec x\); for cosecant, the corresponding derivative has the opposite sign, so a leading minus sign is needed.

Takeaway: On any interval where the integrand is defined, $$ \int \sec x\,dx=\ln|\sec x+\tan x|+C, \qquad \int \csc x\,dx=-\ln|\csc x+\cot x|+C. $$ Differentiate the proposed expression to verify the formula and its sign.

Check Your Understanding

Answer each question using the formulas and differentiation checks developed above.

  1. Differentiate \(\ln|\sec x+\tan x|\) and show how the quotient simplifies.
  2. Why is \(\ln|\sec x+\tan x|\) defined wherever \(\cos x\ne 0\)?
  3. Find an antiderivative of \(4\csc x\) on an interval where \(\sin x\ne 0\), and verify it by differentiation.
  4. What is the derivative of \(\ln|\csc x+\cot x|\), and how does it determine the sign in the cosecant formula?
  5. Find the constant \(C\) if \(F'(x)=\sec x\) and \(F(0)=0\) on \((-\frac{\pi}{2},\frac{\pi}{2})\).

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