5B

Differentiating logarithmic functions

The derivative of ln x, the standard form for ln f(x), using log laws to simplify before differentiating, and the product and quotient rules with logarithms.

The logarithm grows very slowly, and its derivative shows exactly how slowly: the gradient of $\ln x$ is $\dfrac1x$, which shrinks as $x$ grows. This one result also fills the gap in integration from Chapter 3, as 5D shows.

Why the derivative is $\dfrac1x$

$y = \ln x$ is the reflection of $y = e^x$ in $y = x$. Reflection swaps rise and run, so gradients become reciprocals. At the point $(x, y)$ on $y = \ln x$, the matching point on $y = e^x$ is $(y, x)$, where the gradient is the height, $x$. So the gradient of $\ln x$ is $\dfrac1x$.

In symbols: if $y = \ln x$ then $x = e^y$, so $\dfrac{dx}{dy} = e^y = x$, and $\dfrac{dy}{dx} = \dfrac1x$.

The gradient of y = ln x

The dashed line is the tangent at x = P.

Try this

Find the value of $P$ for which the tangent passes through the origin. Compare with 4A, where the tangent to $y = e^x$ through the origin touched at $x = 1$.

Standard forms

For $y = \ln f(x)$, the chain rule gives $\dfrac{1}{f(x)} \times f'(x)$:

Derivatives of logarithms
$$\frac{d}{dx}\ln x = \frac1x \qquad \frac{d}{dx}\ln(ax + b) = \frac{a}{ax + b} \qquad \frac{d}{dx}\ln f(x) = \frac{f'(x)}{f(x)}$$

In words: derivative of the inside over the inside.

Example 1●

Differentiate (a) $\ln(3x + 1)$ (b) $\ln(x^2 + 4)$ (c) $\ln 5x$.

(a) $\dfrac{3}{3x + 1}$
Inside 3x + 1 has derivative 3.
(b) $\dfrac{2x}{x^2 + 4}$
Inside x² + 4 has derivative 2x.
(c) $\dfrac{5}{5x} = \dfrac1x$
Inside 5x has derivative 5, and 5/(5x) cancels. Or: ln 5x = ln 5 + ln x, and ln 5 is a constant.

Simplify first with the log laws

Logs turn products into sums, quotients into differences, and powers into multiples. Use them before differentiating and you avoid the product and quotient rules.

Example 2●●

Differentiate (a) $\ln x^3$ (b) $\ln\sqrt{2x + 1}$ (c) $\ln\dfrac{x + 1}{x - 1}$.

(a) $\dfrac{d}{dx}3\ln x = \dfrac3x$
Power law: ln x³ = 3 ln x.
(b) $\dfrac{d}{dx}\tfrac12\ln(2x + 1) = \tfrac12 \times \dfrac{2}{2x + 1} = \dfrac{1}{2x + 1}$
A square root is the power ½, so ln √(2x + 1) = ½ ln(2x + 1).
(c) $\dfrac{d}{dx}\big(\ln(x + 1) - \ln(x - 1)\big) = \dfrac{1}{x + 1} - \dfrac{1}{x - 1}$
Quotient law: the log of a fraction is a difference of logs.
$= \dfrac{(x - 1) - (x + 1)}{x^2 - 1} = \dfrac{-2}{x^2 - 1}$
Combine over the common denominator (x + 1)(x − 1) = x² − 1.

Product and quotient rules

Example 3●●

Differentiate (a) $x\ln x$ (b) $\dfrac{\ln x}{x}$.

(a) $1 \times \ln x + x \times \dfrac1x = \ln x + 1$
u = x, v = ln x, so u′ = 1 and v′ = 1/x.
(b) $\dfrac{x \times \frac1x - \ln x \times 1}{x^2} = \dfrac{1 - \ln x}{x^2}$
u = ln x, v = x, so u′ = 1/x and v′ = 1.

Your turn

Find the stationary point of $y = \dfrac{\ln x}{x}$.

Show the working

$y' = \dfrac{1 - \ln x}{x^2} = 0$ when $\ln x = 1$, so $x = e$. Then $y = \dfrac{\ln e}{e} = \dfrac1e$. The stationary point is $\left(e, \dfrac1e\right)$.

Flashcards
$dfrac{d}{dx}ln x$
$\dfrac1x$
$dfrac{d}{dx}ln f(x)$
$\dfrac{f'(x)}{f(x)}$
Practice
  1. Find the gradient of $y = \ln x$ at $x = 4$.

  2. $\dfrac{d}{dx}\ln(3x + 1) =$

  3. Find the derivative of $\ln(x^2 + 4)$ at $x = 2$.

  4. $\dfrac{d}{dx}\ln 5x =$

  5. Find the derivative of $\ln x^3$ at $x = 2$.

  6. Find the derivative of $x\ln x$ at $x = e$.

  7. Find the derivative of $\ln\dfrac{x + 1}{x - 1}$ at $x = 3$.

  8. Find the $x$-value of the stationary point of $y = \dfrac{\ln x}{x}$, to two decimal places.

  9. Exam style: find the minimum value of $y = \ln(x^2 - 2x + 5)$, to two decimal places.

  10. Exam style: find the derivative of $\ln\sqrt{\dfrac{1 + x}{1 - x}}$ at $x = 0.5$, to two decimal places.

Formula sheet