Skip to content
Topos Uranos

The variable in the exponent and logarithmic differentiation

Summary

This lesson differentiates the functions that have the variable in the exponent. All of them reduce to the natural exponential: ax=exln⁡aa^x = e^{x \ln a}, xr=erln⁡xx^r = e^{r \ln x} and (f(x))g(x)=eg(x)ln⁡f(x)\left(f(x)\right)^{g(x)} = e^{g(x) \ln f(x)}, so that the derivative of exe^x, that of the logarithm and the chain rule suffice. One thus obtains the derivatives of the exponential and of the logarithm to any base, of powers with real exponents and of powers whose base and exponent both vary, such as xxx^x or xsin⁡xx^{\sin x}. The derivative of ln⁡∣f(x)∣\ln \abs{f(x)}, which is f′(x)f(x)\frac{f'(x)}{f(x)}, turns products, quotients and powers into sums: this is logarithmic differentiation, which the lesson justifies without assuming what it wants to prove. At the end, the tangent to the logarithm through the origin decides which is larger, πe\pi^e or eπe^\pi, and explains why the outcome depends on the number ee.

Learning objectives

  1. Differentiate the exponential and the logarithm to any base, and their compositions, starting from the equality ax=exln⁡aa^x = e^{x \ln a}.
  2. Differentiate powers with real exponents and powers with variable base and exponent, writing them as exponentials with base ee, on the domain where the base is positive.
  3. Apply logarithmic differentiation to products, quotients and powers, first checking that the function is differentiable and does not vanish at the point.
  4. Compare powers such as πe\pi^e and eπe^\pi with the tangent to the logarithm and the fundamental inequality of the exponential.

The exponential and the logarithm to any base

The lesson on the derivatives of the elementary functions proved that exe^x is its own derivative and that the derivative of ln⁡x\ln x is 1x\frac{1}{x}, and announced that the derivative of axa^x is axln⁡aa^x \ln a. There is no need to repeat the computation with the difference quotient: every positive base is a power of ee. By the definition of the natural logarithm, from the lesson on the logarithm function, eln⁡y=ye^{\ln y} = y for every y>0y > 0; and by the law of the logarithm of a power, from the same lesson, ln⁡(ax)=xln⁡a\ln\left(a^x\right) = x \ln a. With the chain rule, the rest is immediate.

TheoremDerivatives of the exponential and of the logarithm to base a

Let a>0a > 0, with a≠1a \neq 1. The exponential axa^x is differentiable on R\mathbb{R}, the logarithm log⁡ax\log_a x is differentiable on (0,∞)\ioo{0}{\infty}, and the function log⁡a∣x∣\log_a \abs{x} is differentiable on R∖{0}\mathbb{R} \setminus \{0\}:

ddx(ax)=axln⁡a,ddx(log⁡ax)=1xln⁡a(x>0),ddx(log⁡a∣x∣)=1xln⁡a(x≠0)\frac{\mathrm{d}}{\mathrm{d}x}\left(a^x\right) = a^x \ln a, \qquad \frac{\mathrm{d}}{\mathrm{d}x}\left(\log_a x\right) = \frac{1}{x \ln a} \quad (x > 0), \qquad \frac{\mathrm{d}}{\mathrm{d}x}\left(\log_a \abs{x}\right) = \frac{1}{x \ln a} \quad (x \neq 0)

The exponential with base aa is written with the natural exponential and the chain rule is applied; the logarithm to base aa is a constant multiple of the natural logarithm. The figure shows 2x2^x, exe^x and 4x4^x with their tangents at the point (0,1)(0, 1), with slopes ln⁡2\ln 2, 11 and ln⁡4\ln 4, and at the end the tangent to log⁡2x\log_2 x at (1,0)(1, 0), the reflection of that of 2x2^x.

Proof

  1. ax=eln⁡(ax)=exln⁡aa^x = e^{\ln\left(a^x\right)} = \dato{base}{e^{x \ln a}}

    Let xx be a real number. The number axa^x is positive; by the definition of the natural logarithm and the law of the logarithm of a power, from the lesson on the logarithm function:

  2. ddx(exln⁡a)=exln⁡a⋅ln⁡a=axln⁡a\frac{\mathrm{d}}{\mathrm{d}x}\left(e^{x \ln a}\right) = e^{x \ln a} \cdot \ln a = \resaltar{a^x \ln a}

    The inner function xln⁡ax \ln a is linear, with derivative ln⁡a\ln a, and the outer function ete^t is differentiable on all of R\mathbb{R}, by the theorem on the derivative of the natural exponential. By the chain rule, from the lesson on the chain rule:

  3. ddx(log⁡a∣x∣)=1ln⁡a⋅1x=1xln⁡a\frac{\mathrm{d}}{\mathrm{d}x}\left(\log_a \abs{x}\right) = \frac{1}{\ln a} \cdot \frac{1}{x} = \resaltar{\frac{1}{x \ln a}}

    By the change of base theorem, from the lesson on the logarithm function, log⁡ay=ln⁡yln⁡a\log_a y = \frac{\ln y}{\ln a} for every y>0y > 0, with ln⁡a≠0\ln a \neq 0 because a≠1a \neq 1. By the theorem on the derivative of the natural logarithm, which holds for ln⁡x\ln x and for ln⁡∣x∣\ln \abs{x}, and the one on the derivative of a linear combination, from the lesson on differentiation rules:

The derivative of axa^x is proportional to the function, with the constant ln⁡a\ln a, which is positive if a>1a > 1 and negative if 0<a<10 < a < 1; by the injectivity of the logarithm, it equals 11 only if a=ea = e. With a=1a = 1, the function 1x1^x is constant and the formula still holds, because ln⁡1=0\ln 1 = 0. At x=0x = 0, the definition of the derivative gives the limit ah−1h→ln⁡a\frac{a^h - 1}{h} \to \ln a, which is the corollary on the standard limits of the logarithm and of powers, from the lesson on the continuity of the elementary functions: the derivative of axa^x at 00 was already known, and the law ax+h=axaha^{x + h} = a^x a^h carries it over to every point.

CorollaryCompositions with the exponential and the logarithm

Let uu be a function defined on AA, differentiable at a point aa of AA that is an accumulation point of AA, and let b>0b > 0, with b≠1b \neq 1. Then eu(x)e^{u(x)} and bu(x)b^{u(x)} are differentiable at aa. If u(a)≠0u(a) \neq 0, the functions ln⁡∣u(x)∣\ln \abs{u(x)} and log⁡b∣u(x)∣\log_b \abs{u(x)} are differentiable at aa, on their domain; and if u(a)>0u(a) > 0, so is ln⁡u(x)\ln u(x), with the same derivative as ln⁡∣u(x)∣\ln \abs{u(x)}. The derivatives at x=ax = a are:

ddx(eu(x))=eu(x)u′(x),ddx(bu(x))=bu(x)ln⁡b⋅u′(x)\frac{\mathrm{d}}{\mathrm{d}x}\left(e^{u(x)}\right) = e^{u(x)} u'(x), \qquad \frac{\mathrm{d}}{\mathrm{d}x}\left(b^{u(x)}\right) = b^{u(x)} \ln b \cdot u'(x)
ddx(ln⁡∣u(x)∣)=u′(x)u(x),ddx(log⁡b∣u(x)∣)=u′(x)u(x)ln⁡b\frac{\mathrm{d}}{\mathrm{d}x}\left(\ln \abs{u(x)}\right) = \frac{u'(x)}{u(x)}, \qquad \frac{\mathrm{d}}{\mathrm{d}x}\left(\log_b \abs{u(x)}\right) = \frac{u'(x)}{u(x) \ln b}

The first two are the chain rule; the last two, its version on the domain of the composition, because the logarithm is not defined at 00.

Proof

  1. ddx(eu(x))=eu(x)u′(x),ddx(bu(x))=bu(x)ln⁡b⋅u′(x)\frac{\mathrm{d}}{\mathrm{d}x}\left(e^{u(x)}\right) = e^{u(x)} u'(x), \qquad \frac{\mathrm{d}}{\mathrm{d}x}\left(b^{u(x)}\right) = \resaltar{b^{u(x)} \ln b \cdot u'(x)}

    The outer functions ete^t and btb^t are differentiable on all of R\mathbb{R}, which contains the values of uu; the chain rule gives the first two derivatives, at x=ax = a.

  2. ddx(ln⁡∣u(x)∣)=1u(x)⋅u′(x)=u′(x)u(x)\frac{\mathrm{d}}{\mathrm{d}x}\left(\ln \abs{u(x)}\right) = \frac{1}{u(x)} \cdot u'(x) = \resaltar{\frac{u'(x)}{u(x)}}

    The function ln⁡∣t∣\ln \abs{t} is defined on B=R∖{0}B = \mathbb{R} \setminus \{0\}, which contains the interval with center u(a)u(a) and radius r=∣u(a)∣r = \abs{u(a)}, and it is differentiable at u(a)u(a), with derivative 1u(a)\frac{1}{u(a)}. By the corollary on the chain rule on the domain of the composition, aa is an accumulation point of the domain of ln⁡∣u(x)∣\ln \abs{u(x)}, and the derivative at x=ax = a is:

  3. ddx(log⁡b∣u(x)∣)=1ln⁡b⋅u′(x)u(x)=u′(x)u(x)ln⁡b\frac{\mathrm{d}}{\mathrm{d}x}\left(\log_b \abs{u(x)}\right) = \frac{1}{\ln b} \cdot \frac{u'(x)}{u(x)} = \resaltar{\frac{u'(x)}{u(x) \ln b}}

    If u(a)>0u(a) > 0, the same corollary, with B=(0,∞)B = \ioo{0}{\infty} and r=u(a)r = u(a), gives the derivative of ln⁡u(x)\ln u(x), which is the same. For the base bb, one divides by the constant ln⁡b\ln b, by the change of base.

Thus, the derivative of 2sin⁡x2^{\sin x} is 2sin⁡xln⁡2⋅cos⁡x2^{\sin x} \ln 2 \cdot \cos x, and that of ln⁡(x2+1)\ln\left(x^2 + 1\right) is 2xx2+1\frac{2x}{x^2 + 1} on all of R\mathbb{R}. The lesson on the chain rule differentiated ln⁡(cos⁡x)\ln(\cos x) on its domain, where cos⁡x>0\cos x > 0, and obtained −tan⁡x-\tan x; the absolute value extends the result: ln⁡∣cos⁡x∣\ln \abs{\cos x} is defined where cos⁡x≠0\cos x \neq 0, and its derivative is −tan⁡x-\tan x on that whole set, which is the domain of the tangent function.