23.7 Derivatives of aˣ and logₐ x

IB Math AA HL: the derivative of a^x for any base a > 0; the derivative of log_a x. Worked examples and practice questions with solutions.

AHL 5.15

This section is for HL students. It builds on 23.6.

In this section you will learn
  • the derivative of \(a^x\) for any base \(a > 0\)
  • the derivative of \(\log_a x\)

Exponential functions with any base

For \(a > 0\), we can write \(a\) as a power of \(\mathrm{e}\): \(\;a = \mathrm{e}^{\ln a}\). So

\[ a^x = \left(\mathrm{e}^{\ln a}\right)^x = \mathrm{e}^{(\ln a)x} . \]

Now \(\ln a\) is just a constant, so by the chain rule

\[ \frac{\mathrm{d}}{\mathrm{d}x}\left(a^x\right) = (\ln a)\,\mathrm{e}^{(\ln a)x} = a^x\ln a . \]

Derivatives of \(a^x\) and \(a^{f(x)}\) (\(a > 0\)) Partly in the HL formula booklet

\[ f(x) = a^x \;\Rightarrow\; f'(x) = a^x(\ln a) \]

In the HL booklet

More generally, by the chain rule,

\[ \frac{\mathrm{d}}{\mathrm{d}x}\left(a^{f(x)}\right) = f'(x)\,a^{f(x)}\ln a . \]

  • \(a\): the base, a positive constant
  • \(f(x)\): a function of \(x\) (the power)
  • \(\ln a\): the natural logarithm of \(a\)

Example 1 Find \(\dfrac{\mathrm{d}y}{\mathrm{d}x}\) when

(a) \(y = 2^{x^2}\)

(b) \(y = 7^{1 - 4x}\).

(a) \(\;\dfrac{\mathrm{d}y}{\mathrm{d}x} = 2x \cdot 2^{x^2}\ln 2\).

(b) \(\;\dfrac{\mathrm{d}y}{\mathrm{d}x} = -4 \cdot 7^{1 - 4x}\ln 7\).

Logarithms with any base

For a logarithm with another base, change the base first: \(\log_a x = \dfrac{\ln x}{\ln a}\) (see 1.4). Since \(\dfrac{1}{\ln a}\) is a constant:

Derivative of \(\log_a x\) In the HL formula booklet

\[ f(x) = \log_a x \;\Rightarrow\; f'(x) = \frac{1}{x\ln a} \]

  • \(a\): the base of the logarithm (\(a > 0\), \(a \neq 1\))
  • \(x\): a positive number (\(x > 0\))

Example 2 Differentiate \(y = \log_2(x^2 + 1)\) with respect to \(x\).

\(y = \dfrac{\ln(x^2 + 1)}{\ln 2}\), so \(\;\dfrac{\mathrm{d}y}{\mathrm{d}x} = \dfrac{1}{\ln 2} \times \dfrac{2x}{x^2 + 1} = \dfrac{2x}{(x^2 + 1)\ln 2}\).

Common errors

✗ Wrong ✓ Right Why
\(\dfrac{\mathrm{d}}{\mathrm{d}x}\left(3^x\right) = x \cdot 3^{x - 1}\) \(3^x\ln 3\) The variable is in the exponent.

Exercises

1 Differentiate \(y = 3^x + \log_3 x\).

\(\dfrac{\mathrm{d}y}{\mathrm{d}x} = 3^x\ln 3 + \dfrac{1}{x\ln 3}\).

2 Let \(f(x) = x \cdot 2^x\). Find \(f'(x)\), and find the exact value of \(x\) for which \(f'(x) = 0\).

Product rule:

\[ f'(x) = 1 \cdot 2^x + x \cdot 2^x\ln 2 = 2^x(1 + x\ln 2) . \]

\(2^x > 0\) for all \(x\), so \(f'(x) = 0\) only when \(1 + x\ln 2 = 0\), i.e. \(x = -\dfrac{1}{\ln 2}\).