In short

The derivative of e^x is e^x — the only function that is its own derivative. The derivative of a^x is a^x \ln a. The derivative of \ln x is 1/x. The derivative of \log_a x is 1/(x \ln a). With the chain rule, these four formulas let you differentiate any exponential or logarithmic expression.

A bank offers 100% annual interest on a deposit of ₹1, compounded n times a year. If n = 1 (annual compounding), you end the year with ₹2. If n = 12 (monthly), you get ₹(1 + 1/12)^{12} \approx ₹2.613. If n = 365 (daily), you get ₹(1 + 1/365)^{365} \approx ₹2.7146. Push n toward infinity — compound every instant — and the amount approaches a very specific number: ₹2.71828...

That number is e. It appears naturally whenever growth is proportional to the current amount. And it has a remarkable property that no other number shares: the function f(x) = e^x grows at a rate exactly equal to its own value. At x = 0 the function equals 1 and grows at rate 1. At x = 3 the function equals e^3 \approx 20.09 and grows at rate e^3 \approx 20.09. The bigger it gets, the faster it grows — and the rate is always exactly the value itself.

That property — \frac{d}{dx}[e^x] = e^x — is the starting point of this article. From it, every other exponential and logarithmic derivative follows.

Why exponential derivatives are different

Before jumping into formulas, notice something about the structure of an exponential function that makes it fundamentally different from everything you have differentiated before.

In a power function like x^3, the base varies and the exponent is fixed. The power rule handles this: \frac{d}{dx}[x^3] = 3x^2. The exponent drops down, the power decreases by one.

In an exponential function like 2^x, the base is fixed and the exponent varies. The power rule does not apply here — there is no "drop the exponent and decrease by one" move that works. Try it: if you naively wrote \frac{d}{dx}[2^x] = x \cdot 2^{x-1}, you would get a formula that treats the base as the variable and the exponent as the constant — exactly backwards.

This structural difference is the reason exponential functions need their own derivative formula, separate from the power rule. The two rules coexist: the power rule handles variable-base-constant-exponent; the exponential rule handles constant-base-variable-exponent. Confusing which is which is the most common error students make.

The derivative of e^x from first principles

You have seen the result stated in the derivatives of basic functions article. Here is the full first-principles proof.

Start from the definition:

\frac{d}{dx}[e^x] = \lim_{h \to 0} \frac{e^{x+h} - e^x}{h}

Factor e^x out of the numerator. Since e^{x+h} = e^x \cdot e^h:

= \lim_{h \to 0} \frac{e^x(e^h - 1)}{h} = e^x \cdot \lim_{h \to 0} \frac{e^h - 1}{h}

The factor e^x does not depend on h, so it slides out of the limit. The entire question reduces to one number:

L = \lim_{h \to 0} \frac{e^h - 1}{h}

This is the fundamental exponential limit. You can verify it numerically:

h \dfrac{e^h - 1}{h}
0.1 1.05171
0.01 1.00502
0.001 1.00050
0.0001 1.00005

The values approach 1. And this is not a coincidence — it is a consequence of how e is defined. The number e is precisely the base for which this limit equals 1. (For any other base a, the corresponding limit \lim_{h \to 0} \frac{a^h - 1}{h} exists but equals \ln a, not 1.)

Since L = 1:

\frac{d}{dx}[e^x] = e^x \cdot 1 = e^x

Derivative of $e^x$

\frac{d}{dx}[e^x] = e^x

The exponential function e^x is its own derivative. No other function (apart from the zero function and scalar multiples Ce^x) has this property.

What does this mean geometrically? At every point on the graph of e^x, the slope of the tangent line equals the height of the curve at that point. At x = 0, the height is 1 and the slope is 1. At x = 1, the height is e \approx 2.718 and the slope is e. At x = -2, the height is e^{-2} \approx 0.135 and the slope is 0.135 — the curve is nearly flat there.

The graph of $e^x$ with tangent lines at $x = 0$ (solid red, slope $1$) and $x = 1$ (dashed, slope $e \approx 2.718$). At each point, the slope equals the function value. No other function has this self-replicating property.

The derivative of a^x (general base)

What if the base is not e but some other positive number a? Take f(x) = a^x where a > 0 and a \neq 1.

The key move is to rewrite a^x in terms of e. Since a = e^{\ln a}:

a^x = \left(e^{\ln a}\right)^x = e^{x \ln a}

Now this is a composition: the outer function is e^u and the inner function is u = x \ln a. Apply the chain rule:

\frac{d}{dx}[a^x] = \frac{d}{dx}\left[e^{x \ln a}\right] = e^{x \ln a} \cdot \frac{d}{dx}[x \ln a] = e^{x \ln a} \cdot \ln a

And since e^{x \ln a} = a^x:

\frac{d}{dx}[a^x] = a^x \ln a

Derivative of $a^x$

For a > 0, a \neq 1:

\frac{d}{dx}[a^x] = a^x \ln a

The factor \ln a is constant — it measures how "fast" the base a grows compared to e. When a = e, \ln a = 1 and you recover \frac{d}{dx}[e^x] = e^x.

Notice what \ln a is doing. If a > e, then \ln a > 1, and a^x grows faster than e^x — so its derivative picks up an extra scaling factor greater than 1. If 1 < a < e, then 0 < \ln a < 1, and a^x grows slower than e^x — the scaling factor is less than 1. If 0 < a < 1, then \ln a < 0, and a^x is a decaying function — the derivative is negative, confirming that the function decreases.

A concrete check: take a = 10. Then \frac{d}{dx}[10^x] = 10^x \ln 10 \approx 2.3026 \cdot 10^x. At x = 0, 10^x = 1 but the slope is about 2.3 — the curve 10^x rises more steeply than e^x at the origin, because 10 > e.

First-principles derivation (without the chain rule)

You can also derive this directly from the limit definition, which is what the chain rule derivation is doing under the hood:

\frac{d}{dx}[a^x] = \lim_{h \to 0} \frac{a^{x+h} - a^x}{h} = a^x \cdot \lim_{h \to 0} \frac{a^h - 1}{h}

The limit \lim_{h \to 0} \frac{a^h - 1}{h} equals \ln a. (This is proved by substituting a^h = e^{h \ln a} and using the fundamental exponential limit: \frac{e^{h \ln a} - 1}{h} = \ln a \cdot \frac{e^{h \ln a} - 1}{h \ln a}. As h \to 0, the quantity h \ln a \to 0, and \frac{e^t - 1}{t} \to 1 as t \to 0. So the whole expression approaches \ln a \cdot 1 = \ln a.)

The result is the same: \frac{d}{dx}[a^x] = a^x \ln a.

A visual comparison: 2^x, e^x, 3^x and their derivatives

To see the \ln a factor at work, compare three exponential functions and their derivatives side by side:

Function Derivative At x = 0
2^x 2^x \ln 2 \approx 0.693 \cdot 2^x slope \approx 0.693
e^x e^x slope = 1
3^x 3^x \ln 3 \approx 1.099 \cdot 3^x slope \approx 1.099

All three functions pass through (0, 1), but they leave that point with different slopes. The function 2^x starts rising with slope \ln 2 \approx 0.693 — less than 1. The function e^x starts rising with slope exactly 1. The function 3^x starts rising with slope \ln 3 \approx 1.099 — more than 1. The number e \approx 2.718 sits between 2 and 3, and it is the unique base where the slope at x = 0 is exactly 1.

Three exponential curves: $2^x$ (dashed, lighter), $e^x$ (solid, black), and $3^x$ (dashed, grey). All three pass through $(0, 1)$. The curve $e^x$ has slope exactly $1$ at the origin — this is what makes $e$ the natural base for calculus.

The derivative of \ln x

Now turn to the logarithmic side. The natural logarithm \ln x is the inverse of e^x. You can derive its derivative from first principles, or by using the inverse function relationship. Here is the first-principles derivation.

\frac{d}{dx}[\ln x] = \lim_{h \to 0} \frac{\ln(x+h) - \ln x}{h}

Use the logarithm property \ln A - \ln B = \ln(A/B):

= \lim_{h \to 0} \frac{1}{h} \ln\!\left(\frac{x+h}{x}\right) = \lim_{h \to 0} \frac{1}{h} \ln\!\left(1 + \frac{h}{x}\right)

Let t = h/x, so h = tx and as h \to 0, t \to 0:

= \lim_{t \to 0} \frac{1}{tx} \ln(1 + t) = \frac{1}{x} \lim_{t \to 0} \frac{\ln(1 + t)}{t}

The limit \lim_{t \to 0} \frac{\ln(1+t)}{t} is another fundamental limit, and it equals 1. (This follows from the fact that e = \lim_{n \to \infty} (1 + 1/n)^n. Setting t = 1/n and applying logarithms leads directly to the result.)

So:

\frac{d}{dx}[\ln x] = \frac{1}{x} \cdot 1 = \frac{1}{x}

Derivative of $\ln x$

For x > 0:

\frac{d}{dx}[\ln x] = \frac{1}{x}

This is remarkable: the derivative of a transcendental function turns out to be a simple algebraic function. The logarithm grows slowly, and 1/x quantifies exactly how slowly — the rate of growth is inversely proportional to x itself.

An alternative derivation using inverse functions

There is a cleaner route if you already know the derivative of e^x. Let y = \ln x, so e^y = x. Differentiate both sides with respect to x:

\frac{d}{dx}[e^y] = \frac{d}{dx}[x]

By the chain rule on the left side: e^y \cdot \frac{dy}{dx} = 1. Solve for \frac{dy}{dx}:

\frac{dy}{dx} = \frac{1}{e^y} = \frac{1}{x}

Same result, three lines instead of six. This inverse-function method is a standard technique you will use again for inverse trigonometric functions.

What the derivative 1/x is really saying

The formula \frac{d}{dx}[\ln x] = 1/x encodes a specific geometric fact. At x = 1, the slope of \ln x is 1/1 = 1. At x = 10, the slope is 1/10 = 0.1. At x = 100, the slope is 0.01. The logarithm keeps rising, but it rises more and more slowly — and the rate at which it rises is inversely proportional to how far along the x-axis you are.

This matches what you know about logarithmic growth. Going from x = 1 to x = 10 adds \ln 10 \approx 2.3 to the function value. Going from x = 10 to x = 100 — a span ten times wider — adds the same amount, \ln 10 \approx 2.3. Every additional factor of 10 in x produces the same additive increase in \ln x. That is the definition of slow growth, and the formula 1/x captures it precisely.

The curve $y = \ln x$ with tangent lines at $x = 1$ (solid red, slope $1$) and $x = 3$ (dashed, slope $1/3$). The tangent flattens as $x$ increases — exactly what $1/x$ says. At $x = 1$, the curve rises steeply; by $x = 3$, the slope has dropped to $1/3$.

The derivative of \log_a x (general base)

For a logarithm with base a \neq 1, use the change-of-base formula: \log_a x = \frac{\ln x}{\ln a}.

Since \ln a is a constant:

\frac{d}{dx}[\log_a x] = \frac{1}{\ln a} \cdot \frac{d}{dx}[\ln x] = \frac{1}{\ln a} \cdot \frac{1}{x} = \frac{1}{x \ln a}

Derivative of $\log_a x$

For a > 0, a \neq 1, and x > 0:

\frac{d}{dx}[\log_a x] = \frac{1}{x \ln a}

When a = e, \ln a = 1 and this reduces to \frac{d}{dx}[\ln x] = \frac{1}{x}. When a = 10, the derivative is \frac{1}{x \ln 10} \approx \frac{1}{2.3026\, x} — slightly smaller than 1/x because \log_{10} grows slightly slower than \ln.

Putting them all together: a reference table

Function Derivative Domain
e^x e^x all \mathbb{R}
a^x (a > 0, a \neq 1) a^x \ln a all \mathbb{R}
\ln x 1/x x > 0
\log_a x (a > 0, a \neq 1) 1/(x \ln a) x > 0

These four formulas, combined with the chain rule, handle every exponential and logarithmic derivative you will ever meet.

Chain rule applications

The raw formulas above apply only when the argument is plain x. In practice, the argument is almost always something more complicated — e^{3x}, \ln(x^2 + 1), 2^{\sin x}. The chain rule handles all of these.

The pattern is always the same: derivative of the outer function, evaluated at the inner function, multiplied by the derivative of the inner function.

Here are the chain rule versions of the four formulas:

\frac{d}{dx}\left[e^{u}\right] = e^{u} \cdot \frac{du}{dx}
\frac{d}{dx}\left[a^{u}\right] = a^{u} \ln a \cdot \frac{du}{dx}
\frac{d}{dx}\left[\ln u\right] = \frac{1}{u} \cdot \frac{du}{dx}
\frac{d}{dx}\left[\log_a u\right] = \frac{1}{u \ln a} \cdot \frac{du}{dx}

where u is any differentiable function of x.

Here are several applications, each broken down so you can see the chain rule firing:

\boldsymbol{e^{3x}}: Outer function: e^u, derivative e^u. Inner function: u = 3x, derivative 3. Result: e^{3x} \cdot 3 = 3e^{3x}.

\boldsymbol{\ln(x^2 + 1)}: Outer: \ln u, derivative 1/u. Inner: u = x^2 + 1, derivative 2x. Result: \frac{1}{x^2+1} \cdot 2x = \frac{2x}{x^2+1}.

\boldsymbol{2^{\sin x}}: Outer: a^u with a = 2, derivative 2^u \ln 2. Inner: u = \sin x, derivative \cos x. Result: 2^{\sin x} \cdot \ln 2 \cdot \cos x.

\boldsymbol{e^{-x^2}} (the Gaussian): Outer: e^u. Inner: u = -x^2, derivative -2x. Result: e^{-x^2} \cdot (-2x) = -2xe^{-x^2}. This function — the bell curve — appears everywhere in statistics. Its derivative vanishes at x = 0, confirming that the peak of the bell is at the origin.

\boldsymbol{\ln(\sin x)} for 0 < x < \pi: Outer: \ln u. Inner: u = \sin x, derivative \cos x. Result: \frac{\cos x}{\sin x} = \cot x.

This last example is worth noting: the derivative of \ln(\sin x) is \cot x. Similarly, the derivative of \ln(\cos x) is -\tan x. These results connect logarithmic and trigonometric derivatives in a way that will appear repeatedly in integration.

The Gaussian $y = e^{-x^2}$ (black) and its derivative $y' = -2xe^{-x^2}$ (dashed red). The derivative is zero at $x = 0$ (the peak), negative for $x > 0$ (the curve descends), and positive for $x < 0$ (the curve ascends). The derivative curve itself has a bell-like shape, but antisymmetric.

Computing one from start to finish

Example 1: Differentiate $f(x) = e^{x^2 - 3x}$

Step 1. Identify the structure. This is e^u where u = x^2 - 3x. The outer function is the exponential; the inner function is a quadratic.

Why: recognising the composition lets you apply the chain rule — derivative of the outer times derivative of the inner.

Step 2. Differentiate the outer function, keeping the inner function in place.

\frac{d}{du}[e^u] = e^u \quad \Longrightarrow \quad e^{x^2 - 3x}

Why: the derivative of e^u is e^u — this is the formula you just proved. You leave u = x^2 - 3x in the exponent, unevaluated.

Step 3. Differentiate the inner function.

\frac{du}{dx} = \frac{d}{dx}[x^2 - 3x] = 2x - 3

Why: by the power rule and the scalar multiple rule.

Step 4. Multiply.

f'(x) = e^{x^2 - 3x} \cdot (2x - 3)

Why: the chain rule says \frac{d}{dx}[e^u] = e^u \cdot \frac{du}{dx}. This is the product of the two pieces you computed in Steps 2 and 3.

Result: f'(x) = (2x - 3)\,e^{x^2 - 3x}.

The curve $y = e^{x^2 - 3x}$ (black) with the tangent line at $x = 1.5$ (red). At $x = 1.5$, the exponent is $2.25 - 4.5 = -2.25$, so the function value is $e^{-2.25} \approx 0.105$. The derivative there is $(2(1.5) - 3) \cdot e^{-2.25} = 0$, so the tangent is horizontal — confirming that $x = 1.5$ is the minimum of the curve.

The tangent line at x = 1.5 is perfectly flat. That makes sense: f'(1.5) = (2(1.5) - 3) \cdot e^{-2.25} = 0 \cdot e^{-2.25} = 0. Since the exponential factor e^{x^2 - 3x} is always positive, the sign of f'(x) depends entirely on (2x - 3). For x < 1.5, the derivative is negative (the curve falls); for x > 1.5, the derivative is positive (the curve rises). The picture matches the formula exactly.

Example 2: Differentiate $g(x) = \ln\!\left(\frac{x^2}{x + 1}\right)$ for $x > 0$

Step 1. Simplify first. Using logarithm properties:

g(x) = \ln(x^2) - \ln(x + 1) = 2\ln x - \ln(x + 1)

Why: \ln(A/B) = \ln A - \ln B and \ln(x^2) = 2\ln x. Simplifying before differentiating almost always makes the algebra cleaner.

Step 2. Differentiate the first term.

\frac{d}{dx}[2\ln x] = \frac{2}{x}

Why: the derivative of \ln x is 1/x, and the constant factor 2 comes out.

Step 3. Differentiate the second term using the chain rule.

\frac{d}{dx}[\ln(x+1)] = \frac{1}{x+1} \cdot 1 = \frac{1}{x+1}

Why: the outer function is \ln u with derivative 1/u, and the inner function u = x + 1 has derivative 1.

Step 4. Combine.

g'(x) = \frac{2}{x} - \frac{1}{x+1} = \frac{2(x+1) - x}{x(x+1)} = \frac{x + 2}{x(x + 1)}

Why: combine over the common denominator x(x+1) to get a single fraction. The numerator simplifies to 2x + 2 - x = x + 2.

Result: g'(x) = \dfrac{x + 2}{x(x+1)}.

The curve $y = \ln(x^2/(x+1))$ (black) with the tangent at $x = 1$ (red). At $x = 1$, $g(1) = \ln(1/2) = -\ln 2 \approx -0.693$ and $g'(1) = 3/2 = 1.5$. The tangent has a noticeable upward slope, matching the positive derivative.

At x = 1, the derivative is (1 + 2)/(1 \cdot 2) = 3/2. Since the numerator x + 2 is always positive for x > 0, and the denominator x(x+1) is also always positive for x > 0, the derivative is positive everywhere on the domain. The function is always increasing — which makes sense from the graph, where the curve rises steadily from -\infty as x \to 0^+.

Common confusions

Going deeper

If you came here to learn the four derivative formulas and how to apply them with the chain rule, you have it — you can stop here. The rest of this article is for readers who want to see the deeper connections and the formal proofs of the fundamental limits.

Why e is the natural base

Every derivation above ultimately rested on one limit: \lim_{h \to 0} \frac{e^h - 1}{h} = 1. This limit is what makes e the "natural" base for exponentials.

For any base a, the corresponding limit is \lim_{h \to 0} \frac{a^h - 1}{h} = \ln a. So the derivative of a^x always picks up a factor of \ln a. The base e is the unique choice that makes this factor equal to 1 — which is why e^x is the only exponential function that is its own derivative.

This also explains why \ln is the "natural" logarithm. The derivative of \log_a x is \frac{1}{x \ln a}, and the only base that gives the clean formula 1/x is a = e. The number e is not special because of any mystical property — it is special because it makes the calculus of exponentials and logarithms as simple as possible.

Proof that \lim_{t \to 0} \frac{\ln(1+t)}{t} = 1

Let f(x) = \ln x. Then

f'(1) = \lim_{t \to 0} \frac{f(1 + t) - f(1)}{t} = \lim_{t \to 0} \frac{\ln(1+t) - \ln 1}{t} = \lim_{t \to 0} \frac{\ln(1+t)}{t}

But you already know f'(x) = 1/x (by any of the derivations above), so f'(1) = 1/1 = 1. Therefore \lim_{t \to 0} \frac{\ln(1+t)}{t} = 1.

This is a clean example of a technique that appears often: using a known derivative to evaluate a limit, rather than the other way around.

The chain rule and exponential growth models

In applications — population growth, radioactive decay, compound interest — you rarely see plain e^x. Instead you see e^{kx} where k is a constant that encodes the growth or decay rate. The derivative is ke^{kx} (by the chain rule), which means the function y = Ce^{kx} satisfies the differential equation \frac{dy}{dx} = ky. In words: the rate of change is proportional to the current value, with proportionality constant k.

When k > 0, the function grows exponentially. When k < 0, it decays. This single differential equation y' = ky models an extraordinary range of real-world phenomena: bacterial growth (k > 0), radioactive half-life (k < 0), Newton's law of cooling (k < 0), and continuous compound interest (k = r, the interest rate). The derivative formula \frac{d}{dx}[e^{kx}] = ke^{kx} is the mathematical engine behind all of these.

The derivative of \ln|x|

You proved that \frac{d}{dx}[\ln x] = 1/x for x > 0. What about negative x? The function \ln x is not defined for x < 0, but \ln|x| is. For x < 0, |x| = -x, so by the chain rule:

\frac{d}{dx}[\ln|x|] = \frac{d}{dx}[\ln(-x)] = \frac{1}{-x} \cdot (-1) = \frac{1}{x}

The derivative is still 1/x. So on the full domain x \neq 0:

\frac{d}{dx}[\ln|x|] = \frac{1}{x}

This extended result is important in integration, where you will learn that \int \frac{1}{x}\,dx = \ln|x| + C — the absolute value is essential because 1/x is defined for both positive and negative x, and the antiderivative must be too.

Connecting the two fundamental limits

The two fundamental limits in this article — \lim_{h \to 0} \frac{e^h - 1}{h} = 1 and \lim_{t \to 0} \frac{\ln(1+t)}{t} = 1 — are not independent. Each implies the other.

Start from \lim_{h \to 0} \frac{e^h - 1}{h} = 1. Let t = e^h - 1, so h = \ln(1+t) and t \to 0 as h \to 0. Then \frac{e^h - 1}{h} = \frac{t}{\ln(1+t)}, and the limit says \lim_{t \to 0} \frac{t}{\ln(1+t)} = 1, which is the same as \lim_{t \to 0} \frac{\ln(1+t)}{t} = 1.

The two limits are reciprocals of each other under a change of variable. This reflects the fact that e^x and \ln x are inverse functions — they are two sides of the same coin, and so are their fundamental limits.

Where this leads next

You now have the derivative formulas for all four types of exponential and logarithmic functions, and you know how to combine them with the chain rule. The most direct continuations: