The Logarithmic Rule in Integration

One pattern unlocks the logarithmic rule: a function in the denominator with its own derivative on top. Then the integral of f'(x)/f(x) is ln|f(x)| + C. This covers the n = -1 case the power rule cannot reach, and the absolute-value bars let a single formula work on both branches of the curve.

--

The logarithmic rule is one of the most useful rules in integration, and the hardest part of it is recognising when it applies. There is one pattern to look for: a function in the denominator with its own derivative sitting in the numerator.

Definition The logarithmic rule
 \int \frac{f'(x)}{f(x)}\,dx = \ln|f(x)| + C

Whatever sits in the denominator goes straight inside the logarithm, wrapped in absolute value bars, and the constant  C is added as always. Nothing is expanded, substituted or simplified first.

See a function and its derivative stacked like that, and reach for  \ln immediately.

Note What ln means

 \ln is not a different kind of logarithm. It is the ordinary logarithm with the base fixed at the number  e , and the shorter name simply saves writing the base every time.

 \log_{10} x — base  10
 \log_{2} x — base  2
 \log_{e} x = \ln x — base  e

Why  e in particular deserves its own notation is a question for another lesson. Here it is enough to read  \ln as "the exponent that turns  e into this number".

Example Spotting the pattern three times

In each case, name the denominator, differentiate it, and check that the result is what is sitting on top.

 \displaystyle\int \frac{2x}{x^{2}}\,dx — the denominator is  x^{2} , its derivative is  2x :
 \ln|x^{2}| + C
 \displaystyle\int \frac{3x^{2}}{x^{3} + 3}\,dx — the derivative of  x^{3} + 3 is  3x^{2} + 0 :
 \ln|x^{3} + 3| + C
 \displaystyle\int \frac{\cos x}{\sin x}\,dx — the derivative of  \sin x is  \cos x :
 \ln|\sin x| + C

The constant  3 in the second example differentiates to zero, which is why it leaves no trace in the numerator. Keeping the bars costs nothing even when the denominator can never be negative, as with  x^{2} .

Note The gap the power rule leaves behind

The power rule adds one to the exponent and divides by the new exponent. For  n = -1 it breaks:

 \displaystyle\int x^{-1}\,dx = \dfrac{x^{-1+1}}{-1+1} = \dfrac{x^{0}}{0}

Division by zero, so the rule simply does not reach this case. But  x^{-1} is  \dfrac{1}{x} , and that is the logarithmic pattern in its simplest form: the denominator is  x , and its derivative is  1 .

 \displaystyle\int \frac{1}{x}\,dx = \ln|x| + C

The one exponent the power rule cannot handle is exactly the one the logarithmic rule was waiting for.

Note Why the absolute value bars are there

A logarithm is undefined for negative inputs. Yet  \dfrac{1}{x} exists on the left of the axis too, and there is a perfectly real region between that branch and the  x -axis.

1 2 −1 −2 x y
The bars strip the sign off before the logarithm sees it, so  \ln\lvert -3 \rvert is just  \ln 3 . That is what lets the rule cover both branches with one formula.

On the left the region sits below the axis, which would make it negative, but it is also traversed leaving-wards. Two negatives meet and the result comes out positive, matching what the bars give.

Summary
  1. The trigger is a function in the denominator and its derivative in the numerator.
  2.  \displaystyle\int \frac{f'(x)}{f(x)}\,dx = \ln|f(x)| + C .
  3. The denominator goes inside the logarithm unchanged.
  4.  \ln is the logarithm with base  e , nothing more.
  5.  \displaystyle\int \frac{1}{x}\,dx = \ln|x| + C fills the  n = -1 gap the power rule cannot reach.
  6. The absolute value bars let one formula cover both branches of the curve.