Derivatives of Exponentials and Logarithms
Exponentials and logarithms have derivative rules built around one remarkable number: \(e\). Every other base pays a correction fee of \(\ln a\); base \(e\) rides free.
By the end you'll be able to differentiate \(e^x\), \(a^x\), \(\ln x\), and \(\log_a x\), and explain why the base \(e\) is the one base whose exponential is its own derivative.
Predict: for which base a does the exponential curve \(y = a^x\) have tangent slope exactly equal to its height — not just at one point, but at every point? Slide a and watch the slope ÷ height ratio; then check your guess.
Drag the point along the curve (or use the x slider). The dashed tangent shows the slope at that point, and the dotted height segment shows the value \(a^x\). Notice that as you move the point, both numbers change — but their ratio never does. Hover or focus the point for exact readouts.
height a^x = 2.000 · tangent slope = 1.386 · slope ÷ height = 0.693 = ln a
The derivatives of exponential and logarithmic functions are \(\frac{d}{dx}[e^x] = e^x\), \(\frac{d}{dx}[a^x] = a^x \ln a\), \(\frac{d}{dx}[\ln x] = \frac{1}{x}\), and \(\frac{d}{dx}[\log_a x] = \frac{1}{x \ln a}\).
Four rules, one pattern. For exponentials: \(\frac{d}{dx}[e^x] = e^x\) and \(\frac{d}{dx}[a^x] = a^x \ln a\) for any \(a > 0\). For logarithms: \(\frac{d}{dx}[\ln x] = \frac{1}{x}\) and \(\frac{d}{dx}[\log_a x] = \frac{1}{x \ln a}\), each for \(x > 0\). The pattern: base \(e\) gives the clean form, and any other base drags in a constant factor of \(\ln a\) — multiplied on for exponentials, divided off for logs. The number \(e \approx 2.71828\) is defined by this property: it's the unique base whose exponential curve has slope equal to its height at every point, exactly the base where the ratio in the demo above locks onto 1. Setting \(a = e\) in the general rule confirms it: \(\ln e = 1\), so the extra factor disappears.
The ratio you watched in the demo — slope ÷ height \(= \ln a\) — is a growth model's relative growth rate: how fast a quantity grows per unit of itself. A population following \(2^t\) grows at \(\ln 2 \approx 0.693\), about 69% of its current size per time unit, no matter how large it gets. That's why \(e\) dominates applied work: writing growth as \(e^{kt}\) makes the relative rate exactly \(k\), with no correction factor to carry around.
One warning before the examples, because it's the single most common error with these rules: \(\frac{d}{dx}[a^x]\) is not \(x \cdot a^{x-1}\). That move belongs to the power rule you learned earlier, which handles \(x^n\) — a variable base raised to a constant exponent. An exponential is the opposite: constant base, variable exponent. Same symbols, different roles, different rule.
Differentiate \(y = 2^x + \ln x\). Term by term: \(2^x\) is an exponential with base 2, so its derivative is \(2^x \ln 2\) (constant base — exponential rule, not the power rule). \(\ln x\) differentiates to \(\frac{1}{x}\). The sum rule adds them: \(y' = \) \(2^x \ln 2 + \dfrac{1}{x}\).
Differentiate \(y = 4e^x + \log_7 x\). The first term is easy: \(e^x\) is its own derivative, and the constant 4 rides along, giving \(4e^x\). For the second term, recall which base-correction factor a general-base log needs, and where it goes: \(y' = 4e^x + \) ____
Reveal the answer
\(y' = 4e^x + \dfrac{1}{x \ln 7}\). The log rule for a general base puts \(\ln 7\) in the denominator: \(\log_7 x = \ln x / \ln 7\), a constant \(\frac{1}{\ln 7}\) times \(\ln x\), so its derivative is \(\frac{1}{\ln 7} \cdot \frac{1}{x}\). Writing \(\frac{1}{x}\) alone would silently pretend the base were \(e\).
More info — where the ln a factor actually comes from
Any exponential can be rewritten in base \(e\): \(a^x = e^{x \ln a}\), because raising \(e\) to \(x \ln a\) is exactly \(a^x\) by the definition of \(\ln\). Differentiating \(e^{x \ln a}\) multiplies by the derivative of the inner exponent \(x \ln a\) — the constant \(\ln a\) — giving \(e^{x \ln a} \ln a = a^x \ln a\). That inner-times-outer step is the chain rule, which is the very next lesson; for now you can take it on faith and verify it visually with the demo above. The log rules come from the same idea run backwards: logs are inverses of exponentials, so if \(y = \ln x\) then \(e^y = x\), and unwinding that equation forces \(y' = 1/x\). The OpenStax section linked in Dive deeper below walks the full derivation.
Check your understanding
Differentiate \(y = 5^x\).
On the graph of \(f(x) = a^x\) (with \(a > 0\)), the ratio of the tangent slope to the function's height comes out the same at every point \(x\). What is that constant ratio, and for which base does it equal 1?
Differentiate \(y = x^3 + 3^x\).
Differentiate \(y = \log_2 x\).
Recap
- \(\frac{d}{dx}[e^x] = e^x\) — the exponential with base \(e\) is its own derivative.
- \(\frac{d}{dx}[a^x] = a^x \ln a\) for \(a > 0\) — every other base carries a factor of \(\ln a\).
- \(\frac{d}{dx}[\ln x] = \dfrac{1}{x}\) for \(x > 0\).
- \(\frac{d}{dx}[\log_a x] = \dfrac{1}{x \ln a}\) — general-base logs divide by \(\ln a\).
- \(e \approx 2.71828\) is defined as the unique base where slope equals height at every point — slope ÷ height \(= \ln a\), and \(\ln e = 1\).
- \(\frac{d}{dx}[a^x]\) is not \(x \cdot a^{x-1}\) — the power rule needs a variable base and constant exponent, the opposite setup.
Dive deeper
- OpenStax Calculus Volume 1 — 3.9 Derivatives of Exponential and Logarithmic Functions Establish the four exponential and logarithmic derivative formulas
- Paul's Online Notes — Derivatives of Exponential and Logarithm Functions Contrast the exponential rule with the power rule
Sources
- Derivatives of Exponential and Logarithmic Functions