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.
A Logarithm Rule We Need
If \(u\) is differentiable and \(u(x)\ne 0\), then
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
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.
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:
Check by differentiating the proposed answer:
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,
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\).
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
To check, differentiate and simplify each sign:
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:
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\):
Thus the particular antiderivative is
Check the condition by substitution:
Check the derivative as well. The second term is constant, so
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
Where \(\sin x\ne 0\), both factors are nonzero and are reciprocals. Taking logarithms of absolute values shows that
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:
The derivative is negative cosecant, not cosecant. The correction is to negate the logarithm:
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.
Check Your Understanding
Answer each question using the formulas and differentiation checks developed above.
- Differentiate \(\ln|\sec x+\tan x|\) and show how the quotient simplifies.
- Why is \(\ln|\sec x+\tan x|\) defined wherever \(\cos x\ne 0\)?
- Find an antiderivative of \(4\csc x\) on an interval where \(\sin x\ne 0\), and verify it by differentiation.
- What is the derivative of \(\ln|\csc x+\cot x|\), and how does it determine the sign in the cosecant formula?
- Find the constant \(C\) if \(F'(x)=\sec x\) and \(F(0)=0\) on \((-\frac{\pi}{2},\frac{\pi}{2})\).