5F

Logarithmic functions to other bases

Changing log_a x to base e and differentiating logarithmic functions to any base, including with the chain rule.

Decibels and pH use $\log_{10}$, and computer science uses $\log_2$. Calculus only has a clean rule for $\ln x$. As in 4F, the trick is to rewrite the base as $e$ and then use what we already know.

Change to base $e$

From 5A, $\log_a x = \dfrac{\ln x}{\ln a}$. Since $\ln a$ is a constant, $\log_a x$ is just a constant multiple of $\ln x$. Every log curve is a vertical stretch of $y = \ln x$.

Logs to other bases
$$\log_a x = \frac{1}{\ln a}\ln x \qquad\qquad \frac{d}{dx}\log_a x = \frac{1}{x\ln a}$$

The derivative follows straight away: a constant multiple of $\ln x$ has the same constant multiple of $\dfrac1x$ as its derivative.

The gradient of y = log_a x at x = 1

The dashed line is the tangent at (1, 0).

Try this

Slide $a$ until the tangent at $(1, 0)$ has gradient $1$. Which base is it? Then find the base that gives gradient $2$, and check it against the last exam question in the quiz.

Example 1●

Differentiate (a) $y = \log_2 x$ (b) $y = \log_{10} x$, and find each gradient at $x = 1$.

(a) $y' = \dfrac{1}{x\ln 2}$, so the gradient at $x = 1$ is $\dfrac{1}{\ln 2} \approx 1.44$.
Change of base: log₂ x = ln x / ln 2.
(b) $y' = \dfrac{1}{x\ln 10}$, so the gradient at $x = 1$ is $\dfrac{1}{\ln 10} \approx 0.43$.
Same idea with ln 10 ≈ 2.30.

With the chain rule

Pull out the constant $\dfrac{1}{\ln a}$ first. Then it is just "derivative of the inside over the inside", as in 5B.

Example 2●●

Differentiate (a) $y = \log_3 x^2$ (b) $y = \log_2(3x + 1)$.

(a) $y = \dfrac{2\ln x}{\ln 3}$, so $y' = \dfrac{2}{x\ln 3}$.
Power law first: log₃ x² = 2 log₃ x, for x > 0.
(b) $y = \dfrac{\ln(3x + 1)}{\ln 2}$, so $y' = \dfrac{3}{(3x + 1)\ln 2}$.
Inside 3x + 1 has derivative 3.

Your turn

Find the gradient of $y = \log_3(2x - 1)$ at $x = 2$.

Show the working

$y = \dfrac{\ln(2x - 1)}{\ln 3}$, so $y' = \dfrac{2}{(2x - 1)\ln 3}$. At $x = 2$: $\dfrac{2}{3\ln 3} \approx 0.61$.

Flashcards
$log_a x$ in terms of $ln$
$\dfrac{\ln x}{\ln a}$
$dfrac{d}{dx}log_a x$
$\dfrac{1}{x\ln a}$
Practice
  1. $\log_2 x$ equals:

  2. Find the gradient of $y = \log_2 x$ at $x = 1$, to two decimal places.

  3. Find the gradient of $y = \log_{10} x$ at $x = 1$, to two decimal places.

  4. Find the gradient of $y = \log_2 x$ at $x = 2$, to two decimal places.

  5. $\dfrac{d}{dx}\log_3 x^2 =$ (for $x \gt 0$)

  6. Evaluate $\log_5 20$, to two decimal places.

  7. Find the derivative of $\log_2(3x + 1)$ at $x = 1$, to two decimal places.

  8. The gradient of $y = \log_a x$ at $x = 1$ is:

  9. Exam style: the tangent to $y = \log_{10} x$ at $x = 10$ meets the $y$-axis at $y = c$. Find $c$, to two decimal places.

  10. Exam style: the tangent to $y = \log_a x$ at $(1, 0)$ has gradient $2$. Find $a$, to two decimal places.

Formula sheet