Lesson 2 of 8 · 15 min

Logarithmic integrals: ln⁡∣x∣\ln|x| and f′(x)f(x)\frac{f'(x)}{f(x)}

Extend ∫1x dx\int \frac{1}{x}\,dx to ln⁡∣x∣+c\ln|x| + c for every x≠0x \neq 0, and recognise integrands whose numerator is the derivative of the denominator.

What you will be able to do

  • Explain why ∫1x dx=ln⁡∣x∣+c\int \frac{1}{x}\,dx = \ln|x| + c holds for negative xx as well as positive xx.
  • Integrate 1ax+b\frac{1}{ax + b} and evaluate definite integrals of 1x\frac{1}{x} over negative intervals.
  • Recognise f′(x)f(x)\frac{f'(x)}{f(x)}, adjust by a constant, and integrate it to ln⁡∣f(x)∣+c\ln|f(x)| + c.

In Methods, ∫1x dx=ln⁡(x)+c\int \frac{1}{x}\,dx = \ln(x) + c came with the condition x>0x > 0. But y=1xy = \frac{1}{x} is defined for negative xx too, and the region under it between x=−3x = -3 and x=−1x = -1 clearly has an area. ln⁡(−3)\ln(-3) is undefined, so the Methods formula cannot find it.

Try differentiating ln⁡(−x)\ln(-x), which is defined when x<0x < 0. By the chain rule,

ddxln⁡(−x)=1−x×(−1)=1x\frac{d}{dx}\ln(-x) = \frac{1}{-x} \times (-1) = \frac{1}{x}

So on the negative side, ln⁡(−x)\ln(-x) is an antiderivative of 1x\frac{1}{x}. On the positive side it is ln⁡(x)\ln(x). One formula covers both: ln⁡∣x∣\ln|x|.

y=ln⁡∣x∣y = \ln|x| (blue) is the mirror image of y=ln⁡(x)y = \ln(x) in the yy-axis. Its gradient is negative on the left, matching 1x<0\frac{1}{x} < 0 there.

Key idea

The reciprocal integral

∫1x dx=ln⁡∣x∣+c,x≠0∫1ax+b dx=1aln⁡∣ax+b∣+c\int \frac{1}{x}\,dx = \ln|x| + c, \quad x \neq 0 \qquad \int \frac{1}{ax + b}\,dx = \frac{1}{a}\ln|ax + b| + c

A definite integral of 1x\frac{1}{x} is fine on any interval that does not contain 00.

Interactive

Area under 1/x on the negative side

The region lies below the xx-axis, so the signed area is negative. Compare it with ln⁡∣−1∣−ln⁡∣−3∣=−ln⁡(3)\ln|-1| - \ln|-3| = -\ln(3).

Determine the exact value of ∫−3−11x dx\int_{-3}^{-1} \frac{1}{x}\,dx.

Reads asYour answer shows here as maths.

The same chain-rule idea works for any function inside the log. If f(x)≠0f(x) \neq 0, then

ddxln⁡∣f(x)∣=f′(x)f(x)\frac{d}{dx}\ln|f(x)| = \frac{f'(x)}{f(x)}

So whenever the numerator is the derivative of the denominator, the integral is a log.

Key idea

The logarithmic pattern

∫f′(x)f(x) dx=ln⁡∣f(x)∣+c,f(x)≠0\int \frac{f'(x)}{f(x)}\,dx = \ln|f(x)| + c, \quad f(x) \neq 0

If the numerator is a constant multiple of f′(x)f'(x), take the constant outside first.

Spot the derivative on top.
Integrandf(x)f(x)f′(x)f'(x)Integral
2xx2+1\frac{2x}{x^2 + 1}x2+1x^2 + 12x2xln⁡(x2+1)+c\ln(x^2 + 1) + c
xx2+5\frac{x}{x^2 + 5}x2+5x^2 + 52x2x12ln⁡(x2+5)+c\frac{1}{2}\ln(x^2 + 5) + c
cos⁡(x)sin⁡(x)\frac{\cos(x)}{\sin(x)}sin⁡(x)\sin(x)cos⁡(x)\cos(x)ln⁡∣sin⁡(x)∣+c\ln|\sin(x)| + c
exex+3\frac{e^x}{e^x + 3}ex+3e^x + 3exe^xln⁡(ex+3)+c\ln(e^x + 3) + c
1xln⁡(x)\frac{1}{x\ln(x)}ln⁡(x)\ln(x)1x\frac{1}{x}ln⁡∣ln⁡(x)∣+c\ln|\ln(x)| + c

The absolute value can be dropped when f(x)f(x) is always positive, as with x2+1x^2 + 1 and ex+3e^x + 3. Keep it otherwise.

Worked example

Integrate tan⁡(x)\tan(x)

  • Simple familiar
  • Technology free

Determine ∫tan⁡(x) dx\int \tan(x)\,dx.

4 steps

Try it yourself first, then check the working one step at a time.

Method

  1. Write the integrand as a fraction.

  2. Check whether the numerator is a constant multiple of the derivative of the denominator.

  3. Take the constant out and write ln⁡∣f(x)∣+c\ln|f(x)| + c.

Watch out for

  • Losing the minus sign: the derivative of cos⁡(x)\cos(x) is −sin⁡(x)-\sin(x).

  • Writing ln⁡∣cos⁡(x)∣\ln|\cos(x)| without the absolute value: cos⁡(x)\cos(x) is negative on part of its domain.

Determine ∫e2xe2x+3 dx\int \frac{e^{2x}}{e^{2x} + 3}\,dx.

Reads asYour answer shows here as maths.

Worked example

Evaluate ∫013x2+2x3+2x+1 dx\int_0^1 \frac{3x^2 + 2}{x^3 + 2x + 1}\,dx

  • Complex familiar
  • Technology free

Evaluate ∫013x2+2x3+2x+1 dx\int_0^1 \frac{3x^2 + 2}{x^3 + 2x + 1}\,dx exactly.

3 steps

Try it yourself first, then check the working one step at a time.

Method

  1. Differentiate the denominator and compare with the numerator.

  2. Integrate to ln⁡∣f(x)∣\ln|f(x)| and substitute the limits.

  3. Check that f(x)≠0f(x) \neq 0 on the interval.

Watch out for

  • Trying partial fractions or long division on a cubic denominator when the log pattern applies directly.

Common mistake

Not every fraction is a log

∫1x2+1 dx\int \frac{1}{x^2 + 1}\,dx is not ln⁡(x2+1)+c\ln(x^2 + 1) + c: the derivative of x2+1x^2 + 1 is 2x2x, and there is no xx on top. That integral is tan⁡−1(x)+c\tan^{-1}(x) + c, which you will meet in Lesson 5. Before writing a log, find f′(x)f'(x) and check that the numerator is a constant multiple of it.

Summary

  • ∫1x dx=ln⁡∣x∣+c\int \frac{1}{x}\,dx = \ln|x| + c for every x≠0x \neq 0, because ddxln⁡(−x)=1x\frac{d}{dx}\ln(-x) = \frac{1}{x} when x<0x < 0.

  • ∫1ax+b dx=1aln⁡∣ax+b∣+c\int \frac{1}{ax + b}\,dx = \frac{1}{a}\ln|ax + b| + c.

  • ∫f′(x)f(x) dx=ln⁡∣f(x)∣+c\int \frac{f'(x)}{f(x)}\,dx = \ln|f(x)| + c: look for the derivative of the denominator on top.

  • Adjust by a constant factor when the numerator is a multiple of f′(x)f'(x).

  • Keep the absolute value unless f(x)f(x) is always positive.

Finished the lesson?

Try the 2 quick checks above and the lesson completes itself, or mark it complete now.

Lesson 2 of 80% read

Save your progress with a free account