Lesson 6 of 8 · 18 min

Differentiating logarithms

Discover that the derivative of ln⁡(x)\ln(x) is 1x\frac{1}{x}, use ddxln⁡(f(x))=f′(x)f(x)\frac{d}{dx}\ln(f(x)) = \frac{f'(x)}{f(x)}, and simplify with the log laws before differentiating.

What you will be able to do

  • Use ddxln⁡(x)=1x\frac{d}{dx}\ln(x) = \frac{1}{x}, and explain where it comes from.
  • Differentiate ln⁡(f(x))\ln(f(x)) as f′(x)f(x)\frac{f'(x)}{f(x)}, including ln⁡(ax+b)\ln(ax + b) and logarithms of polynomials.
  • Use the log laws to simplify a logarithm before differentiating it.

The graph of y=ln⁡(x)y = \ln(x) is steep near the yy-axis and flattens as xx grows. Before reaching for a rule, measure some gradients and look for the pattern.

Interactive

The gradient function of ln(x)

Read the gradient at x=12x = \frac{1}{2}, 11, 22 and 44. The traced gradient function is a curve you know from Unit 2.

The gradients are 2 at x=12x = \frac{1}{2}, 1 at x=1x = 1, 12\frac{1}{2} at x=2x = 2 and 14\frac{1}{4} at x=4x = 4. Each is the reciprocal of xx.

Key idea

The derivative of ln(x)

ddx(ln⁡(x))=1x,x>0\frac{d}{dx}\left(\ln(x)\right) = \frac{1}{x}, \qquad x > 0
Why the derivative is 1/x

For x>0x > 0, eln⁡(x)=xe^{\ln(x)} = x. Differentiate both sides with respect to xx. On the left, the rule for ef(x)e^{f(x)} with f(x)=ln⁡(x)f(x) = \ln(x) gives

ddx(ln⁡(x))×eln⁡(x)=1.\frac{d}{dx}\left(\ln(x)\right) \times e^{\ln(x)} = 1.

Since eln⁡(x)=xe^{\ln(x)} = x, this says x×ddx(ln⁡(x))=1x \times \frac{d}{dx}\left(\ln(x)\right) = 1, so ddx(ln⁡(x))=1x\frac{d}{dx}\left(\ln(x)\right) = \frac{1}{x}.

There is a picture behind this too. Reflecting a graph in y=xy = x swaps rise and run, so a tangent of gradient mm on y=exy = e^x at (a,ea)(a, e^a) becomes a tangent of gradient 1m\frac{1}{m} on y=ln⁡(x)y = \ln(x) at (ea,a)(e^a, a). On y=exy = e^x, m=eam = e^a, which is the xx-coordinate of the reflected point. So the gradient of ln⁡(x)\ln(x) at xx is 1x\frac{1}{x}.

Determine the gradient of the tangent to y=3ln⁡(x)y = 3\ln(x) at x=4x = 4.

For a logarithm of a function, use the chain rule with y=ln⁡(u)y = \ln(u) and u=f(x)u = f(x): dydu=1u\frac{dy}{du} = \frac{1}{u} and dudx=f′(x)\frac{du}{dx} = f'(x), so

dydx=1u×f′(x)=f′(x)f(x).\frac{dy}{dx} = \frac{1}{u} \times f'(x) = \frac{f'(x)}{f(x)}.

Key idea

The derivative of ln of a function

ddx(ln⁡(f(x)))=f′(x)f(x),f(x)>0\frac{d}{dx}\left(\ln(f(x))\right) = \frac{f'(x)}{f(x)}, \qquad f(x) > 0

The derivative of the inside goes on top; the inside itself goes underneath. For a linear inside, ddxln⁡(ax+b)=aax+b\frac{d}{dx}\ln(ax + b) = \frac{a}{ax + b}.

Worked example

Differentiate three logarithmic functions

  • Simple familiar
  • Technology free

Differentiate with respect to xx:

(a) y=ln⁡(3x2+5)y = \ln\left(3x^2 + 5\right) \qquad (b) y=4ln⁡(2x−1)y = 4\ln(2x - 1), x>12x > \frac{1}{2} \qquad (c) y=ln⁡(7x)y = \ln(7x), x>0x > 0

3 steps

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

Method

  1. Identify the inside, f(x)f(x).

  2. Write f′(x)f(x)\frac{f'(x)}{f(x)} and multiply by any constant in front.

  3. Simplify.

Watch out for

  • Writing 13x2+5\frac{1}{3x^2 + 5} for (a): the derivative of the inside belongs on top.

  • Writing 7x\frac{7}{x} for (c): the 7 cancels.

Differentiate y=ln⁡(x2−4x+5)y = \ln\left(x^2 - 4x + 5\right).

fracdydx =
Reads asYour answer shows here as maths.

What is ddx(ln⁡(5x))\frac{d}{dx}\left(\ln(5x)\right)?

Choose one answer

The log laws can turn a hard derivative into an easy one. Before you differentiate the logarithm of a product, a quotient, a power or a root, split it:

ln⁡(x32x+1)=3ln⁡(x)−ln⁡(2x+1).\ln\left(\frac{x^3}{2x + 1}\right) = 3\ln(x) - \ln(2x + 1).

Each term is now a one-step derivative. This only works for products, quotients and powers inside the logarithm, never sums.

Worked example

Use log laws, then differentiate ln⁡(x32x+1)\ln\left(\frac{x^3}{2x + 1}\right)

  • Complex familiar
  • Technology free

Let y=ln⁡(x32x+1)y = \ln\left(\frac{x^3}{2x + 1}\right), x>0x > 0. Find dydx\frac{dy}{dx} and write it as a single fraction.

3 steps

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

Method

  1. Split the logarithm of a product, quotient or power with the log laws.

  2. Differentiate each term with f′(x)f(x)\frac{f'(x)}{f(x)}.

  3. Combine over a common denominator if asked.

Watch out for

  • Splitting ln⁡(2x+1)\ln(2x + 1) into ln⁡(2x)+ln⁡(1)\ln(2x) + \ln(1): the log of a sum does not split.

  • Sign error when combining: 3(2x+1)−2x3(2x + 1) - 2x, not 3(2x+1)+2x3(2x + 1) + 2x.

Differentiate y=ln⁡(4x+1)y = \ln\left(\sqrt{4x + 1}\right).

fracdydx =
Reads asYour answer shows here as maths.

Common mistake

Missing the top

ddxln⁡(x2+1)\frac{d}{dx}\ln\left(x^2 + 1\right) is 2xx2+1\frac{2x}{x^2 + 1}, not 1x2+1\frac{1}{x^2 + 1}. Writing 1inside\frac{1}{\text{inside}} is only right when the inside is xx itself.

Exam tip

Domain and simplest form

State the domain where it matters: ddxln⁡(2x−1)=22x−1\frac{d}{dx}\ln(2x - 1) = \frac{2}{2x - 1} only for x>12x > \frac{1}{2}, where the original function exists. When you split a logarithm with log laws, you can recombine the answer over a common denominator if a question asks for a single fraction.

Summary

  • ddx(ln⁡(x))=1x\frac{d}{dx}\left(\ln(x)\right) = \frac{1}{x} for x>0x > 0.

  • ddx(ln⁡(f(x)))=f′(x)f(x)\frac{d}{dx}\left(\ln(f(x))\right) = \frac{f'(x)}{f(x)}: the derivative of the inside over the inside.

  • ddxln⁡(ax+b)=aax+b\frac{d}{dx}\ln(ax + b) = \frac{a}{ax + b}, and ddxln⁡(kx)=1x\frac{d}{dx}\ln(kx) = \frac{1}{x} for any constant k>0k > 0.

  • Use log laws to split products, quotients, powers and roots before differentiating.

  • The rule follows from differentiating eln⁡(x)=xe^{\ln(x)} = x, or from reflecting tangents of y=exy = e^x in y=xy = x.

Finished the lesson?

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

Lesson 6 of 80% read

Save your progress with a free account