Recognizing the Logarithmic Derivative
An integrand can sometimes be recognized as the derivative of a function divided by that same function. This pattern is useful because the quotient may look complicated, while its antiderivative follows from a short rule. The key is to compare the numerator with the derivative of the denominator—not merely to notice that the denominator is a function of \(x\).
The absolute value matters whenever \(f\) can be negative. The real logarithm \(\ln y\) is defined only for \(y>0\), but \(\ln|f(x)|\) is defined whenever \(f(x)\ne 0\). The interval condition matters as well: the integrand is undefined at any point where \(f(x)=0\).
Why the Logarithm Rule Works
The rule comes from the chain rule and the derivative of the logarithm. If \(f(x)>0\), then differentiating \(\ln(f(x))\) gives \(f'(x)/f(x)\). If \(f(x)<0\), then \(|f(x)|=-f(x)>0\), so differentiating \(\ln|f(x)|=\ln(-f(x))\) gives the same quotient.
Thus, on any interval where \(f\) is differentiable and never zero, \(\ln|f(x)|\) is an antiderivative of \(f'(x)/f(x)\). In integration notation, the rule is
The same reasoning can be expressed using substitution. Set \(u=f(x)\), so \(du=f'(x)\,dx\). The integral becomes \(\int du/u=\ln|u|+C\), and substituting \(f(x)\) back for \(u\) gives the stated rule. This substitution is valid on an interval where \(f(x)\ne0\).
How to Recognize the Form
For an integrand written as a quotient, first call the denominator \(f(x)\). Then differentiate it and compare \(f'(x)\) with the numerator. If the numerator is exactly \(f'(x)\), the rule applies directly. If it is a constant multiple \(k f'(x)\), take that constant outside the logarithm-rule calculation:
This rule requires a match up to a constant factor. A numerator that merely resembles the denominator’s derivative is not enough. Before integrating, also identify where the denominator is zero, since the formula cannot apply at those points.
Write it as \(f(x)\) and determine where \(f(x)=0\).
Calculate \(f'(x)\) and compare it with the numerator.
Use \(\ln|f(x)|+C\), including any constant factor multiplying \(f'(x)\).
Differentiate the proposed antiderivative and confirm that it equals the original integrand.
Worked Examples
Worked Example: A Positive Denominator
Evaluate \(\int \frac{6x}{3x^2+5}\,dx\).
Let \(f(x)=3x^2+5\). Its derivative is \(f'(x)=6x\), exactly the numerator. Also, \(3x^2+5>0\) for every real \(x\), so the rule applies on all of \(\mathbb{R}\).
Equivalently, set \(u=3x^2+5\), so \(du=6x\,dx\). Then
Since the expression inside the logarithm is positive, its absolute value can be omitted. To check, differentiate:
which is the original integrand.
Worked Example: A Definite Integral on an Interval Without Zeros
Evaluate \(\int_1^2 \frac{3x^2-2}{x^3-2x+4}\,dx\).
Set \(f(x)=x^3-2x+4\), so \(f'(x)=3x^2-2\). To use the rule throughout \([1,2]\), check that the denominator does not vanish there. For \(1\le x\le2\), \(f'(x)=3x^2-2\ge1>0\), so \(f\) is increasing on this interval. Its minimum there is \(f(1)=1-2+4=3>0\). Hence \(f\) is positive throughout \([1,2]\), and the integrand is continuous there.
An antiderivative on the interval is \(\ln|x^3-2x+4|\). The Fundamental Theorem of Calculus therefore gives
To check the antiderivative, differentiate it: the chain rule gives \((3x^2-2)/(x^3-2x+4)\). The endpoint values are \(f(2)=8\) and \(f(1)=3\), so the displayed evaluation follows.
Worked Example: A Negative Denominator and the Absolute Value
Find an antiderivative of \(\frac{2x}{x^2-4}\) on the interval \((-2,2)\).
Here \(f(x)=x^2-4\) and \(f'(x)=2x\). For \(-2<x<2\), \(x^2<4\), so \(f(x)<0\) throughout the interval. In particular, \(f\) has no zeros inside this interval, and the logarithmic derivative rule applies:
The final equality uses \(|x^2-4|=4-x^2\) on this interval. Check by differentiation:
The derivative agrees with the integrand throughout \((-2,2)\).
Zeros and Intervals of Validity
The points where \(f(x)=0\) divide the real line into intervals on which \(f\) is either positive or negative. On each such interval, the logarithmic derivative rule applies if \(f\) is differentiable there. The sign cannot change within one interval without \(f\) passing through zero, by the Intermediate Value Theorem.
For example, in the preceding example the denominator vanishes at \(x=-2\) and \(x=2\). The logarithmic antiderivative is valid on each of \((-\infty,-2)\), \((-2,2)\), and \((2,\infty)\), but the integrand is undefined at the two zeros. The constants of integration can be chosen independently on those separate intervals. A single constant is used when giving the antiderivative on one connected interval.
Common Mistakes
A frequent error is to omit the absolute value when the inner function can be negative. On \((-2,2)\), writing \(\ln(x^2-4)\) is invalid as a real-valued expression because \(x^2-4<0\). The correction is \(\ln|x^2-4|\), which is well-defined there and equals \(\ln(4-x^2)\).
Another mistake is to use the rule when the numerator is not the derivative of the denominator, even up to a constant factor. For instance, the derivative of \(x^2+1\) is \(2x\), not \(2x+1\). The incorrect claim
fails a direct check: the derivative of the proposed right-hand side is \(2x/(x^2+1)\), not \((2x+1)/(x^2+1)\). The logarithmic derivative rule does not apply to this integrand as written. Matching the derivative precisely is essential.
Why This Pattern Matters
Recognizing a logarithmic derivative turns a quotient into a direct antiderivative and can also simplify definite-integral evaluation when the denominator stays nonzero on the interval. More broadly, it provides a useful check: whenever a numerator appears beside a denominator, compare it with the denominator’s derivative before choosing an integration method.
The reliable procedure is to identify \(f\), compute \(f'\), check for a match up to a constant, and state an interval that avoids the zeros of \(f\). The absolute value then handles either sign of \(f\), and differentiation verifies the result.
Check Your Understanding
For each question, state the interval conditions that matter as well as the calculation.
- Evaluate \(\int \frac{4x}{2x^2+7}\,dx\), and verify your answer by differentiation.
- On which intervals can the rule be applied to \(\frac{1}{x}\), and what is an antiderivative on each interval?
- Explain why \(\ln|f(x)|\), rather than always \(\ln(f(x))\), is used in the logarithmic derivative rule.
- Does the logarithmic derivative rule apply directly to \(\frac{2x+3}{x^2+3x+5}\)? Compare the numerator with the derivative of the denominator.
- Why does a zero of \(f\) prevent using the rule across an interval containing that point?