Why the interval matters
Some arc-length integrals that look complicated at first become straightforward after using a trigonometric identity. The important detail is that an identity such as \(1+\tan^2 x=\sec^2 x\) simplifies the expression under the square root, but taking the square root gives an absolute value: \(\sqrt{\sec^2 x}=|\sec x|\). The interval determines the sign and therefore the correct integrand.
This distinction is especially useful for logarithmic trigonometric graphs. For example, differentiating \(y=\ln(\cos x)\) gives \(-\tan x\), so the arc-length integrand involves \(\sqrt{1+\tan^2 x}\). On intervals where \(\cos x>0\), this is simply \(\sec x\). We will also see what changes when the corresponding cosine is negative.
The graph arc-length formula
If \(y=f(x)\) has a continuous derivative on a closed interval \([a,b]\), its graph length on that interval is given by the arc-length formula
For a trigonometric graph, the central task is to simplify the radical correctly. The identities \(1+\tan^2 x=\sec^2 x\) and \(1+\cot^2 x=\csc^2 x\) are particularly useful. Because the square root is nonnegative, however, these identities do not permit us to drop absolute-value signs without checking the interval.
Why the radical simplifies
Consider \(y=\ln(\cos x)\) on an interval where \(\cos x>0\). This condition makes the logarithm defined and ensures that \(\sec x>0\). By the chain rule,
Substituting this derivative in the arc-length formula and applying the tangent identity gives
The final equality uses the interval condition: \(\cos x>0\) implies \(\sec x>0\). Thus the length reduces to the integral of \(\sec x\). This is the key simplification: differentiation produces a tangent, and the identity turns the radical into a basic trigonometric function.
For \(y=\ln(\sin x)\), the same reasoning uses \(\sin x>0\). Its derivative is \(\cot x\), and \(\sqrt{1+\cot^2 x}=|\csc x|=\csc x\) on such an interval.
Antiderivatives used in the length calculations
Two standard antiderivatives are useful here:
These formulas can be checked by differentiation. For the first, the derivative of \(\sec x+\tan x\) is \(\sec x\tan x+\sec^2 x=\sec x(\tan x+\sec x)\). Dividing by \(\sec x+\tan x\), as required by the derivative of the logarithm, gives \(\sec x\). For the second, the derivative of \(\csc x-\cot x\) is \(-\csc x\cot x+\csc^2 x=\csc x(\csc x-\cot x)\); dividing by \(\csc x-\cot x\) gives \(\csc x\). Absolute values in the logarithms allow the antiderivatives to be written where the expressions inside are nonzero.
Worked lengths for logarithmic graphs
Worked Example: The graph of \(y=\ln(\cos x)\) on \([0,\pi/3]\)
Throughout this interval, \(\cos x\geq 1/2>0\), so the function is defined and \(\sec x>0\). First differentiate:
The arc-length integrand simplifies as follows:
Therefore,
At \(x=\pi/3\), \(\sec(\pi/3)=2\) and \(\tan(\pi/3)=\sqrt{3}\). At \(x=0\), \(\sec 0=1\) and \(\tan 0=0\). Hence
This is positive because \(2+\sqrt{3}>1\). As a check, differentiating \(\ln|\sec x+\tan x|\) gives \(\sec x\), the simplified integrand. The endpoint values used above are also both positive inside the logarithm.
Worked Example: The graph of \(y=\ln(\sin x)\) on \([\pi/4,\pi/2]\)
Since \(\sin x>0\) throughout this interval, \(y=\ln(\sin x)\) is defined. Its derivative is
Because \(\csc x>0\) on the interval,
Thus the length is
At \(x=\pi/2\), \(\csc x=1\) and \(\cot x=0\), so \(\csc x-\cot x=1\). At \(x=\pi/4\), \(\csc x=\sqrt{2}\) and \(\cot x=1\), so \(\csc x-\cot x=\sqrt{2}-1\). Therefore,
The last equality follows because \((\sqrt{2}-1)(\sqrt{2}+1)=1\). The result is positive since \(\sqrt{2}+1>1\). Differentiating the antiderivative gives \(\csc x\), confirming the integrand.
When the cosine is negative
The identity still applies when \(\cos x<0\), but the absolute value cannot then be removed as if \(\sec x\) were positive. To have a real logarithmic graph on such an interval, consider \(y=\ln|\cos x|\), which is defined wherever \(\cos x\ne 0\). Its derivative is again \(-\tan x\). On an interval where \(\cos x<0\), \(\sec x<0\), so \(|\sec x|=-\sec x\). The length integrand is therefore \(-\sec x\), which is positive.
Worked Example: The graph of \(y=\ln|\cos x|\) on \([2\pi/3,5\pi/6]\)
Cosine is negative throughout this interval and is never zero, so the graph is defined there. Differentiation gives
Using the identity and the sign of \(\sec x\), the length integrand is
Consequently,
At \(2\pi/3\), \(\sec x=-2\) and \(\tan x=-\sqrt{3}\), so \(|\sec x+\tan x|=2+\sqrt{3}\). At \(5\pi/6\), \(\sec x=-2/\sqrt{3}\) and \(\tan x=-1/\sqrt{3}\), so \(|\sec x+\tan x|=\sqrt{3}\). Therefore,
The ratio is greater than \(1\), so the length is positive. Differentiating \(-\ln|\sec x+\tan x|\) gives \(-\sec x\), the positive integrand on this interval.
A common sign error
A frequent mistake is to replace \(\sqrt{\sec^2 x}\) by \(\sec x\) without checking the interval. For example, on \([2\pi/3,5\pi/6]\), secant is negative. An incorrect calculation would be
This cannot be correct: a square root is nonnegative, while \(\sec x<0\) on the stated interval. The correct calculation retains the absolute value, then uses the sign information:
Check the domain as well as the sign. The graph \(y=\ln(\cos x)\) is real only where \(\cos x>0\); for an interval where cosine is negative, use \(\ln|\cos x|\) instead. Neither logarithmic graph is defined at points where \(\cos x=0\).
A reliable calculation sequence
For a logarithm, verify that its argument is positive, or that the absolute-value expression is nonzero, throughout the interval.
Substitute the derivative into \(\sqrt{1+(y')^2}\).
Keep the absolute value produced by the square root until the interval tells you whether it can be removed.
Use an antiderivative, substitute both endpoints, and check that the resulting length is nonnegative.
Why the simplification is useful
Without the identity, the length formula for \(y=\ln(\cos x)\) appears to require integrating \(\sqrt{1+\tan^2 x}\), and the corresponding formula for \(y=\ln(\sin x)\) appears to require integrating \(\sqrt{1+\cot^2 x}\). Recognizing these as \(|\sec x|\) and \(|\csc x|\) turns the problem into an elementary integral. The interval-sign check is not a technical afterthought: it is what identifies the correct positive length integrand.
These examples also show why exact endpoints can be valuable. Standard trigonometric values make the endpoint substitutions explicit, while the antiderivative check confirms the integral used. The method is specific: it applies when differentiation and a trigonometric identity simplify the arc-length radical and the resulting integral can be evaluated. It does not imply that every trigonometric graph has an elementary exact length.
Check Your Understanding
For each question, keep track of the interval when simplifying the square root.
- For \(y=\ln(\cos x)\) on \([-\pi/4,\pi/4]\), what is the simplified length integrand, and why may the absolute value be removed?
- For \(y=\ln(\sin x)\) on \([0,\pi/3]\), is the graph defined throughout the closed interval? Explain.
- On an interval where \(\cos x<0\), simplify \(\sqrt{1+\tan^2 x}\) using the sign of \(\sec x\).
- Differentiate \(\ln|\sec x+\tan x|\) and state the integrand it produces wherever the expression is defined.
- Why is \(\sqrt{\sec^2 x}=\sec x\) not a valid simplification on every interval?