In short

The derivative of x^n is nx^{n-1} (the power rule). The derivative of e^x is e^x itself. The derivative of \ln x is 1/x. The derivative of any constant is 0. These four results, once proved, let you differentiate every polynomial, every exponential, and every logarithm without going back to the limit definition.

You already know how to compute a derivative from the definition: write down the difference quotient \frac{f(x+h) - f(x)}{h}, simplify, take h \to 0. You used this to show that the derivative of x^2 is 2x, and the derivative of 1/x is -1/x^2.

But nobody wants to expand (x+h)^{17} by hand just to differentiate x^{17}. There must be a pattern.

There is. This article derives the four fundamental derivative formulas — the ones that every other derivative in calculus ultimately rests on. Each proof goes from the limit definition to the final formula, with every step shown. Once you have these, the rules of differentiation will let you combine them to differentiate anything.

The constant rule

Start with the simplest possible function: f(x) = c, where c is a constant. A horizontal line.

f'(x) = \lim_{h \to 0} \frac{f(x+h) - f(x)}{h} = \lim_{h \to 0} \frac{c - c}{h} = \lim_{h \to 0} \frac{0}{h} = \lim_{h \to 0} 0 = 0

Constant rule

If f(x) = c (a constant), then f'(x) = 0.

This says exactly what you would expect: a flat line has zero slope everywhere. The function does not change, so its rate of change is zero. The graph of f(x) = c is a horizontal line, and horizontal lines have slope zero. The derivative simply encodes this geometrically obvious fact.

Worth noting: the constant can be anything — f(x) = 5, f(x) = -\pi, f(x) = \sqrt{2}. The derivative is always zero because the function never moves. This is the base case that every other derivative formula builds on.

The constant function $f(x) = 3$ (solid) and its derivative $f'(x) = 0$ (dashed). The function is a horizontal line — it never changes — so its derivative is zero everywhere.

The power rule

This is the single most-used derivative formula. It handles x^2, x^3, x^{100}, x^{1/2}, x^{-1}, and x^n for any real number n.

The case of positive integers

Start with f(x) = x^n where n is a positive integer. You need to expand (x+h)^n. The binomial theorem gives

(x+h)^n = x^n + nx^{n-1}h + \binom{n}{2}x^{n-2}h^2 + \cdots + h^n

Every term after the first two contains h^2 or higher powers of h. So

f(x+h) - f(x) = nx^{n-1}h + \binom{n}{2}x^{n-2}h^2 + \cdots + h^n

Divide by h:

\frac{f(x+h) - f(x)}{h} = nx^{n-1} + \binom{n}{2}x^{n-2}h + \cdots + h^{n-1}

Every term except the first contains at least one factor of h. As h \to 0, all those terms vanish, leaving

f'(x) = nx^{n-1}

That is the power rule for positive integer exponents, proved in four lines from the binomial theorem.

Check it against the cases you already know. For n = 2: f'(x) = 2x^{2-1} = 2x, which matches the derivative you computed from the definition in the derivative article. For n = 3: f'(x) = 3x^2. The derivative of x^3 is 3x^2 — you can verify by expanding (x+h)^3 = x^3 + 3x^2h + 3xh^2 + h^3, subtracting x^3, dividing by h, and taking the limit, which gives 3x^2 + 3xh + h^2 \to 3x^2. The pattern holds.

An alternative proof using factoring

There is a second proof of the power rule for positive integers that does not use the binomial theorem at all. It uses the algebraic identity

a^n - b^n = (a - b)(a^{n-1} + a^{n-2}b + a^{n-3}b^2 + \cdots + b^{n-1})

Set a = x + h and b = x:

\frac{(x+h)^n - x^n}{h} = \frac{(x+h-x)\left[(x+h)^{n-1} + (x+h)^{n-2}x + \cdots + x^{n-1}\right]}{h}

The factor (x + h - x) simplifies to h, which cancels with the h in the denominator:

= (x+h)^{n-1} + (x+h)^{n-2}x + \cdots + x^{n-1}

This is a sum of n terms. As h \to 0, every (x+h) becomes x, so each term becomes x^{n-1}. The limit is n \cdot x^{n-1}.

This proof is elegant because it avoids the binomial expansion entirely. It works by recognising that a^n - b^n factors, and the factor (a - b) is exactly the h you need to cancel.

Extending to all real exponents

The proof above covers n = 1, 2, 3, \ldots but you also need the rule for negative exponents (like x^{-1} = 1/x), fractional exponents (like x^{1/2} = \sqrt{x}), and irrational exponents (like x^{\pi}). The full proof for arbitrary real n uses logarithmic differentiation, which depends on the derivative of \ln x — derived later in this article. Here is the argument.

Write y = x^n. Take logarithms: \ln y = n \ln x. Differentiate both sides with respect to x:

\frac{1}{y} \cdot \frac{dy}{dx} = \frac{n}{x}

Multiply both sides by y = x^n:

\frac{dy}{dx} = \frac{n \cdot x^n}{x} = nx^{n-1}

The same formula. This argument works for every real n — integer, rational, or irrational — as long as x > 0 (so that \ln x is defined).

Power rule

If f(x) = x^n for any real number n, then

f'(x) = nx^{n-1}

A quick check against the cases you already know:

The solid curves are $x^2$ and $x^3$; the dashed curves are their derivatives $2x$ and $3x^2$. The derivative of $x^3$ is steeper than the derivative of $x^2$ because the cubic grows faster. The pattern $nx^{n-1}$ captures this precisely.

Derivatives of polynomials

Once you have the power rule, every polynomial is immediate. Take f(x) = 3x^4 - 5x^2 + 7x - 2. Each term is a constant times a power of x. Using the fact that the derivative of a sum is the sum of the derivatives (proved in the rules of differentiation):

f'(x) = 3 \cdot 4x^3 - 5 \cdot 2x + 7 \cdot 1 - 0 = 12x^3 - 10x + 7

Every polynomial, no matter how complicated, differentiates in one line.

The power rule also tells you something about degree: differentiation drops the degree of a polynomial by exactly one. A degree-n polynomial has a degree-(n-1) derivative. The second derivative has degree n - 2. After n differentiations, you reach a constant. After n + 1, you reach zero. A polynomial runs out of derivatives — its information is finite, and differentiation slowly extracts it.

The exponential function

The exponential e^x is a different kind of function — it grows multiplicatively, not polynomially. Its derivative is remarkable.

The proof from the definition

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

The key property of the exponential is that e^{x+h} = e^x \cdot e^h. Factor:

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

Since e^x does not involve h, it comes out of the limit:

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

Everything now rests on the limit \lim_{h \to 0} \frac{e^h - 1}{h}. This is a standard limit, and its value is 1. You can verify it numerically: at h = 0.1, \frac{e^{0.1} - 1}{0.1} \approx 1.0517; at h = 0.01, \frac{e^{0.01} - 1}{0.01} \approx 1.00502; at h = 0.001, \frac{e^{0.001} - 1}{0.001} \approx 1.0005. The values are heading steadily toward 1.

In fact, this limit is the defining property of e. The number e \approx 2.71828 is the unique base for which \lim_{h \to 0} \frac{a^h - 1}{h} = 1. Any other base a would give a different constant (namely \ln a), and the derivative of a^x would be a^x \ln a, not just a^x. The number e is special precisely because it makes this constant equal to 1.

So the derivative is

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

Exponential derivative

If f(x) = e^x, then f'(x) = e^x.

More generally, if f(x) = a^x for any positive constant a, then f'(x) = a^x \ln a.

The exponential function is its own derivative. This is one of the most important facts in all of mathematics. It means the rate at which e^x is growing at any point is exactly equal to its current value at that point. A population that grows proportionally to its own size — bacteria doubling, money compounding — follows an exponential curve, and this derivative formula is why.

Think about what this says geometrically. At x = 0, e^0 = 1, so the slope of the tangent line is 1. At x = 1, e^1 \approx 2.718, so the slope is 2.718 — the curve is already climbing fast. At x = 5, e^5 \approx 148.4, so the slope is 148.4. The bigger the function gets, the steeper it climbs. This is the hallmark of exponential growth: the rate of growth is proportional to the current size, and when the constant of proportionality is 1, you get e^x.

The graph of $e^x$. At every point, the slope equals the height. At $x = 0$ the height is $1$ and the slope is $1$. At $x = 1$ the height is $e \approx 2.7$ and the slope is also $e$. The curve is its own derivative.

Why general exponentials give a^x \ln a

For any base a > 0, write a^x = e^{x \ln a} (since a = e^{\ln a}). The derivative is

\frac{d}{dx} a^x = \frac{d}{dx} e^{x \ln a} = e^{x \ln a} \cdot \ln a = a^x \ln a

using the chain rule (the factor \ln a comes from differentiating the exponent x \ln a with respect to x). When a = e, \ln a = 1, and you recover \frac{d}{dx}e^x = e^x.

The logarithmic function

The natural logarithm \ln x is the inverse of e^x. Its derivative is clean and simple.

The proof from the definition

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

Use the logarithm property \ln(x+h) - \ln x = \ln\!\left(\frac{x+h}{x}\right) = \ln\!\left(1 + \frac{h}{x}\right):

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

Substitute u = h/x, so h = ux and as h \to 0, u \to 0:

= \lim_{u \to 0} \frac{1}{ux} \ln(1 + u) = \frac{1}{x} \lim_{u \to 0} \frac{\ln(1+u)}{u}

The limit \lim_{u \to 0} \frac{\ln(1+u)}{u} is another standard limit, equal to 1. (This is equivalent to the limit used in the exponential proof: if \lim_{h \to 0} \frac{e^h - 1}{h} = 1, set e^h - 1 = u, so h = \ln(1+u) and u \to 0 as h \to 0, giving \lim_{u \to 0} \frac{u}{\ln(1+u)} = 1, hence \lim_{u \to 0} \frac{\ln(1+u)}{u} = 1.)

So

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

Logarithmic derivative

If f(x) = \ln x (for x > 0), then f'(x) = \dfrac{1}{x}.

More generally, if f(x) = \log_a x for any positive base a \neq 1, then f'(x) = \dfrac{1}{x \ln a}.

The derivative of \ln x is 1/x — a power function. This creates a bridge between logarithms and powers that runs through all of calculus. It also tells you something geometric: the slope of \ln x at x = 1 is 1, at x = 2 it is 1/2, at x = 10 it is 1/10. The logarithm flattens out as x grows, and it does so at a rate that is exactly the reciprocal of x.

Notice the contrast with the exponential. The derivative of e^x is e^x — as the function grows, so does its slope. The derivative of \ln x is 1/x — as x grows, the slope shrinks. This matches the graphs: e^x curves sharply upward; \ln x curves gently upward, flattening more and more. The two functions are inverses, and their derivatives reflect each other in a precise way: if y = \ln x, then x = e^y, and \frac{dy}{dx} = 1/x while \frac{dx}{dy} = e^y = x. The product of the two derivatives is 1, which is exactly the relationship between the slopes of inverse functions.

The solid curve is $\ln x$ and the dashed curve is its derivative $1/x$. At $x = 1$, the slope of $\ln x$ is exactly $1$. As $x$ grows, the slope $1/x$ shrinks toward zero — the logarithm flattens. Near $x = 0$, the slope blows up — the logarithm dives steeply downward.

There is also a satisfying connection to integration hiding here. The fact that \frac{d}{dx}\ln x = \frac{1}{x} means that \ln x is an antiderivative of 1/x. This is the only power x^n where the power rule for integration (\int x^n \, dx = \frac{x^{n+1}}{n+1}) breaks down — because when n = -1, the formula gives \frac{x^0}{0}, which is undefined. The logarithm fills exactly this gap.

The general base

For \log_a x, 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}

When a = e, \ln a = 1, and you recover \frac{d}{dx}\ln x = \frac{1}{x}.

The standard derivatives table

Here are all the basic derivatives collected in one place. Every entry has been derived above.

Function f(x) Derivative f'(x) Domain
c (constant) 0 all x
x^n nx^{n-1} x > 0 for non-integer n
e^x e^x all x
a^x (a > 0) a^x \ln a all x
\ln x 1/x x > 0
\log_a x (a > 0, a \neq 1) 1/(x\ln a) x > 0

These six formulas, combined with the rules of differentiation, are enough to differentiate every function you will meet in school-level calculus.

The three core functions: $x^2$ (black), $e^x$ (red), and $\ln x$ (grey). Each grows at a fundamentally different rate — polynomial, exponential, and logarithmic — and their derivatives reflect this: $2x$ is linear, $e^x$ is exponential (itself), and $1/x$ is a decaying power function.

Computing one from start to finish

Time to apply the formulas. Two examples — one algebraic, one involving exponentials and logarithms.

Example 1: Differentiate $f(x) = 5x^3 - 4\sqrt{x} + 7$

Step 1. Rewrite radicals as fractional powers.

f(x) = 5x^3 - 4x^{1/2} + 7

Why: the power rule applies to x^n for any n, but only if the function is written as a power of x. The square root \sqrt{x} is x^{1/2}.

Step 2. Differentiate the first term.

\frac{d}{dx}(5x^3) = 5 \cdot 3x^{3-1} = 15x^2

Why: the constant factor 5 pulls out, and the power rule gives 3x^2.

Step 3. Differentiate the second term.

\frac{d}{dx}(-4x^{1/2}) = -4 \cdot \frac{1}{2}x^{1/2 - 1} = -2x^{-1/2} = -\frac{2}{\sqrt{x}}

Why: same pattern — the constant -4 pulls out, the power rule drops the exponent by one. The result x^{-1/2} is rewritten as 1/\sqrt{x} for clarity.

Step 4. Differentiate the constant.

\frac{d}{dx}(7) = 0

Why: the derivative of any constant is zero.

Step 5. Combine.

f'(x) = 15x^2 - \frac{2}{\sqrt{x}}

Result: f'(x) = 15x^2 - \dfrac{2}{\sqrt{x}}, valid for x > 0.

The solid curve is $f(x) = 5x^3 - 4\sqrt{x} + 7$, and the dashed curve is its derivative $f'(x) = 15x^2 - 2/\sqrt{x}$. At $x = 1$, the function has value $8$ and the derivative is $15 - 2 = 13$, meaning the slope of the tangent at that point is $13$ — steeply upward, matching the visible steepness of the curve.

At x = 1, the derivative is 15(1) - 2/\sqrt{1} = 13. The curve is climbing steeply there, which the graph confirms. As x grows, the 15x^2 term dominates the derivative, so the slope grows without bound — the cubic term takes over.

Example 2: Differentiate $g(x) = 3e^x + 2\ln x$

Step 1. Differentiate the exponential term.

\frac{d}{dx}(3e^x) = 3e^x

Why: the derivative of e^x is e^x, and the constant 3 factors out.

Step 2. Differentiate the logarithmic term.

\frac{d}{dx}(2\ln x) = \frac{2}{x}

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

Step 3. Combine.

g'(x) = 3e^x + \frac{2}{x}

Why: the derivative of a sum is the sum of the derivatives.

Step 4. Evaluate at a specific point to check. At x = 1:

g(1) = 3e + 2\ln 1 = 3e + 0 = 3e \approx 8.15
g'(1) = 3e + 2 \approx 10.15

Why: plugging in a specific value gives a concrete check. The slope at x = 1 is about 10.15, which should match what the graph shows.

Result: g'(x) = 3e^x + \dfrac{2}{x}, valid for x > 0.

The solid curve is $g(x) = 3e^x + 2\ln x$, and the dashed curve is its derivative $g'(x) = 3e^x + 2/x$. The derivative is always positive for $x > 0$ — the function is always increasing. Near $x = 0$, the $2/x$ term dominates the derivative (it blows up), matching the steep rise of the logarithm near zero.

Notice that the derivative 3e^x + 2/x is always positive for x > 0: the exponential term is always positive, and 2/x is positive for positive x. This means g is strictly increasing on its entire domain — it never turns around. The graph confirms this: the solid curve climbs upward for all x > 0.

Common confusions

Going deeper

If you came here to learn the basic derivative formulas and their proofs, you have them — you can stop here. What follows is for readers who want a closer look at the standard limit that drives the exponential proof, and a unifying perspective on why e is the natural base.

The limit \lim_{h \to 0} \frac{e^h - 1}{h} = 1 — why it is true

This limit is not something you prove from scratch using algebra; it is intimately tied to how e is defined.

One standard definition of e is

e = \lim_{n \to \infty} \left(1 + \frac{1}{n}\right)^n

From this, you can show that e^x = \lim_{n \to \infty} \left(1 + \frac{x}{n}\right)^n. Setting x = h and expanding for small h (using the binomial approximation for large n):

e^h \approx 1 + h + \frac{h^2}{2} + \cdots

This is the Taylor expansion of e^h. Subtracting 1 and dividing by h:

\frac{e^h - 1}{h} \approx 1 + \frac{h}{2} + \cdots

As h \to 0, the right side approaches 1. The higher-order terms vanish because each contains at least one factor of h.

The deeper point: e is defined so that this limit equals 1. Other bases give other constants. The number e is natural not because of some cosmic preference, but because it is the base that makes differentiation of exponentials as clean as possible — no extra constant in front.

The derivative of |x| using the power rule?

A subtle question: you know |x| = \sqrt{x^2} = (x^2)^{1/2}. Can you differentiate this using the power rule and the chain rule?

\frac{d}{dx}|x| = \frac{d}{dx}(x^2)^{1/2} = \frac{1}{2}(x^2)^{-1/2} \cdot 2x = \frac{x}{\sqrt{x^2}} = \frac{x}{|x|}

For x > 0, this is 1. For x < 0, this is -1. At x = 0, the expression x/|x| is undefined — the derivative does not exist, exactly as expected. The chain rule does not create a derivative where none exists; it correctly signals the failure.

This result \frac{d}{dx}|x| = \frac{x}{|x|} is sometimes written as \text{sgn}(x) (the sign function). It is +1 on the right, -1 on the left, and undefined at the origin — a concise encoding of the corner.

Why e is special — the characterisation theorem

The exponential function e^x is the unique function that satisfies f'(x) = f(x) and f(0) = 1. No other function does this. Here is why.

Suppose f'(x) = f(x) and f(0) = 1. Consider g(x) = f(x) \cdot e^{-x}. By the product rule:

g'(x) = f'(x) \cdot e^{-x} + f(x) \cdot (-e^{-x}) = f(x) e^{-x} - f(x) e^{-x} = 0

So g'(x) = 0 everywhere, which means g is a constant. Since g(0) = f(0) \cdot e^0 = 1 \cdot 1 = 1, the constant is 1. So f(x) \cdot e^{-x} = 1, giving f(x) = e^x.

This characterisation is one of the reasons e^x is central to all of analysis. The differential equation f' = f is the simplest non-trivial differential equation, and its unique solution (with initial condition f(0) = 1) is e^x. Every more complex differential equation builds on this.

Where this leads next

You now have the derivatives of the basic building blocks. The next step is to learn how to differentiate combinations of these functions — sums, products, quotients, and compositions.