Unit 3, lesson 27

Derivatives of Exponential and Logarithmic Functions

Why the natural exponential function is its own derivative, how that gives the derivatives of other exponentials and of logarithms, and on which domains each formula holds.

  • Theory part 53
  • Practice part 54
  • Derivatives of Elementary Functions

A population that grows by a fixed percentage each year grows faster when it is larger. In other words, its rate of change is proportional to its size. Exponential functions are exactly the functions with that property, and one base, the number ee, makes the constant of proportionality equal to 1. Logarithms, as their inverses, then get derivatives that are just as simple.

Key terms

The natural exponential function

Definition The number e≈2.71828e \approx 2.71828 is the unique base a>0a > 0 for which

lim⁡h→0ah−1h=1.\lim_{h \to 0} \frac{a^h - 1}{h} = 1.

For this base, the function exe^x is differentiable at every real xx and

ddxex=ex,\frac{d}{dx} e^x = e^x,

because as h→0h \to 0

ex+h−exh=ex⋅eh−1h→ex⋅1=ex.\frac{e^{x + h} - e^x}{h} = e^x \cdot \frac{e^h - 1}{h} \to e^x \cdot 1 = e^x.

In plain words At every point the slope of y=exy = e^x equals its height. At x=0x = 0 the graph crosses the yy axis with slope exactly 1.

Example The tangent line to y=exy = e^x at x=0x = 0 is y=1+xy = 1 + x. At x=0.1x = 0.1 the line gives 1.11.1, while e0.1≈1.10517e^{0.1} \approx 1.10517. For f(x)=xexf(x) = x e^x the product rule gives f′(x)=ex+xex=(1+x)exf'(x) = e^x + x e^x = (1 + x)e^x.

Exponentials with base a

Definition For a constant a>0a > 0, the exponential with base aa is defined for every real xx by ax=exln⁡aa^x = e^{x \ln a}. The function axa^x is differentiable on R\mathbb{R} and

ddxax=axln⁡a.\frac{d}{dx} a^x = a^x \ln a.

This is the chain rule applied to exln⁡ae^{x \ln a}.

In plain words Every exponential has a slope proportional to its height. The constant is ln⁡a\ln a, which is positive when a>1a > 1, zero when a=1a = 1 and negative when 0<a<10 < a < 1.

Example For f(x)=2xf(x) = 2^x the slope at 33 is f′(3)=23ln⁡2=8ln⁡2≈5.545f'(3) = 2^3 \ln 2 = 8 \ln 2 \approx 5.545. For g(x)=(12)xg(x) = \left(\frac{1}{2}\right)^x the constant is ln⁡12=−ln⁡2\ln \frac{1}{2} = -\ln 2, so

g′(x)=−(12)xln⁡2<0g'(x) = -\left(\frac{1}{2}\right)^x \ln 2 < 0

for every xx, and gg is decreasing.

Natural logarithm

Definition The natural logarithm ln⁡x\ln x is the inverse of exe^x. It is defined for x>0x > 0, with eln⁡x=xe^{\ln x} = x for x>0x > 0 and ln⁡(ex)=x\ln(e^x) = x for all real xx. It is differentiable on (0,∞)(0, \infty) and

ddxln⁡x=1x,x>0.\frac{d}{dx} \ln x = \frac{1}{x}, \qquad x > 0.

Since ln⁡\ln is differentiable (it is the inverse of a function with nonzero derivative), differentiating eln⁡x=xe^{\ln x} = x by the chain rule gives eln⁡x⋅(ln⁡x)′=1e^{\ln x} \cdot (\ln x)' = 1, so (ln⁡x)′=1x(\ln x)' = \frac{1}{x}.

In plain words The logarithm always increases, but more and more slowly. At x=100x = 100 its slope is only 0.010.01.

Example For f(x)=xln⁡xf(x) = x \ln x with x>0x > 0 the product rule gives

f′(x)=ln⁡x+x⋅1x=ln⁡x+1.f'(x) = \ln x + x \cdot \frac{1}{x} = \ln x + 1.

This is zero at ln⁡x=−1\ln x = -1, that is at x=1e≈0.368x = \frac{1}{e} \approx 0.368, where the graph has a horizontal tangent.

Logarithms with other bases

Definition For a constant a>0a > 0 with a≠1a \neq 1, log⁡ax\log_a x is the inverse of axa^x, defined for x>0x > 0. The change of base formula

log⁡ax=ln⁡xln⁡a\log_a x = \frac{\ln x}{\ln a}

shows that it is differentiable on (0,∞)(0, \infty) with

ddxlog⁡ax=1xln⁡a,x>0.\frac{d}{dx} \log_a x = \frac{1}{x \ln a}, \qquad x > 0.

The base a=1a = 1 is excluded because 1x=11^x = 1 has no inverse, and ln⁡1=0\ln 1 = 0 would sit in the denominator.

In plain words Every logarithm is a constant multiple of ln⁡x\ln x, so its derivative is the same 1x\frac{1}{x} scaled by 1ln⁡a\frac{1}{\ln a}.

Example For log⁡10x\log_{10} x at x=10x = 10 the slope is 110ln⁡10≈0.04343\frac{1}{10 \ln 10} \approx 0.04343.

Logarithm of an absolute value

Definition The function ln⁡∣x∣\ln \lvert x \rvert is defined for every real x≠0x \neq 0, and on that set

ddxln⁡∣x∣=1x.\frac{d}{dx} \ln \lvert x \rvert = \frac{1}{x}.

For x>0x > 0 this is the rule for ln⁡x\ln x. For x<0x < 0 we have ln⁡∣x∣=ln⁡(−x)\ln \lvert x \rvert = \ln(-x), and the chain rule gives

ddxln⁡(−x)=1−x⋅(−1)=1x.\frac{d}{dx} \ln(-x) = \frac{1}{-x} \cdot (-1) = \frac{1}{x}.

In plain words The formula 1x\frac{1}{x} works on both sides of zero once you put absolute value bars inside the logarithm. This is the version you need when xx can be negative.

Example At x=−2x = -2 the graph of y=ln⁡∣x∣y = \ln \lvert x \rvert has slope 1−2=−12\frac{1}{-2} = -\frac{1}{2}. The graph is a mirror image of y=ln⁡xy = \ln x, so a negative slope on the left matches the positive slope 12\frac{1}{2} at x=2x = 2.

Derivative formulas and domains

Definition The basic formulas, each valid exactly on the domain shown, are collected here. Combined with the chain rule, for a differentiable function uu of xx and a constant a>0a > 0, they give

ddxeu=euu′,ddxau=auln⁡a⋅u′,ddxln⁡∣u∣=u′u,\frac{d}{dx} e^{u} = e^{u} u', \qquad \frac{d}{dx} a^{u} = a^{u} \ln a \cdot u', \qquad \frac{d}{dx} \ln \lvert u \rvert = \frac{u'}{u},

where the last formula holds wherever u≠0u \neq 0.

FunctionDerivativeValid for
exe^xexe^xall real xx
axa^x, a>0a > 0axln⁡aa^x \ln aall real xx
ln⁡x\ln x1x\frac{1}{x}x>0x > 0
log⁡ax\log_a x, a>0a > 0, a≠1a \neq 11xln⁡a\frac{1}{x \ln a}x>0x > 0
ln⁡∣x∣\ln \lvert x \rvert1x\frac{1}{x}x≠0x \neq 0

In plain words Use a formula only where both the function and the formula make sense. Simplifying a logarithm can quietly change the domain.

Example The functions f(x)=ln⁡(x2)f(x) = \ln(x^2) and g(x)=2ln⁡xg(x) = 2 \ln x look the same, but ff is defined for all x≠0x \neq 0 and gg only for x>0x > 0. On its domain

f′(x)=2xx2=2x.f'(x) = \frac{2x}{x^2} = \frac{2}{x}.

Similarly the formula

ddxln⁡(x2+1)=2xx2+1\frac{d}{dx} \ln(x^2 + 1) = \frac{2x}{x^2 + 1}

holds for every real xx, since x2+1>0x^2 + 1 > 0 always.

Check yourself

  1. Differentiate f(x)=5xf(x) = 5^x and find f′(0)f'(0).
Show the answer

The derivative is f′(x)=5xln⁡5f'(x) = 5^x \ln 5, so f′(0)=ln⁡5≈1.609f'(0) = \ln 5 \approx 1.609.

  1. Differentiate y=ln⁡(cos⁡x)y = \ln(\cos x) and say where your answer holds.
Show the answer

By the chain rule

y′=−sin⁡xcos⁡x=−tan⁡x.y' = \frac{-\sin x}{\cos x} = -\tan x.

This holds wherever cos⁡x>0\cos x > 0, for example on (−π2,π2)\left(-\frac{\pi}{2}, \frac{\pi}{2}\right), since ln⁡\ln needs a positive input.

  1. Find the slope of y=e3xy = e^{3x} at x=0x = 0.
Show the answer

By the chain rule y′=3e3xy' = 3e^{3x}, so the slope at 00 is 33.

How this lesson connects

It also uses exponentials and logarithms.