Derivatives, properly explained

A derivative measures how fast one quantity changes when another changes. That sentence is short enough to memorise and unhelpful enough to leave most students no better off than they were before reading it.

What it really means is this: if you have a function $f(x)$ and you nudge $x$ by a tiny amount, the function value changes by some amount too. The derivative tells you the ratio of those two changes, in the limit where the nudge gets arbitrarily small. If $f(x)$ is the position of a car at time $x$, the derivative is its speed at that instant. If $f(x)$ is the amount of revenue at price $x$, the derivative is how many extra dollars you make per dollar increase in price. The applications change; the object does not.

This guide goes through where the derivative comes from (the limit definition), the four shortcut rules that mean you almost never have to use the limit definition again (power, product, quotient, chain), and how to recognise which rule to apply on a problem without trial and error. There is also a step-by-step calculator partway through; the goal is for you to be able to check your hand-work against it, not to replace the hand-work.

What the derivative is, geometrically

Pick any function with a smooth graph and any point on it. Draw a straight line through that point and another nearby point on the curve — this is called a secant line. The slope of the secant line is the average rate of change between the two points. Now slide the second point closer to the first. The secant line tilts; its slope changes; and as the two points become arbitrarily close, the secant line approaches a single limiting line. That limiting line is the tangent line, and its slope is the derivative of the function at that point.

P tangent at P secant lines
As the second point slides toward $P$, the secant lines tilt toward a single limiting line — the tangent. Its slope is $f'(P)$.

Written as a formula, the slope of the secant line between $(x, f(x))$ and $(x + h, f(x + h))$ is

$$\text{slope} \;=\; \frac{f(x + h) - f(x)}{h},$$

and the derivative is what that ratio approaches as $h \to 0$:

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

This is called the limit definition or, in older textbooks, the first principles definition. It is the only definition; everything else in this article is a shortcut for evaluating it without doing the limit by hand each time.

Computing a derivative from first principles, once

It is worth doing this exactly once so you see the rules below are not arbitrary. Let’s find $f'(x)$ for $f(x) = x^2$.

$$f'(x) = \lim_{h \to 0} \frac{(x + h)^2 - x^2}{h}.$$

Expand the numerator: $(x + h)^2 = x^2 + 2xh + h^2$. So

$$f'(x) = \lim_{h \to 0} \frac{x^2 + 2xh + h^2 - x^2}{h} = \lim_{h \to 0} \frac{2xh + h^2}{h} = \lim_{h \to 0} (2x + h).$$

As $h$ goes to zero the answer is $2x$. So the derivative of $x^2$ is $2x$. That is the special case $n = 2$ of the rule below.

The four rules you actually use

The power rule

For any real number $n$,

$$\frac{d}{dx} x^n \;=\; n x^{n-1}.$$

This covers the bulk of what you do at school level. Some examples:

The power rule combines linearly with the next two facts, which together let you differentiate any polynomial in one line:

For example, the derivative of $3x^4 - 7x + 2$ is $12x^3 - 7$.

The product rule

For two functions $u(x)$ and $v(x)$,

$$\frac{d}{dx}\bigl(u v\bigr) \;=\; u' v + u v'.$$

Important: the derivative of a product is not the product of the derivatives. This is the single most common rookie mistake in calculus. $\frac{d}{dx}(x \cdot x) = 2x$, but $(\frac{d}{dx} x)(\frac{d}{dx} x) = 1 \cdot 1 = 1$. The two answers are not equal because the product rule has the cross terms that the wrong shortcut throws away.

Example: differentiate $x^2 \sin x$. Take $u = x^2$ and $v = \sin x$. Then $u' = 2x$ and $v' = \cos x$, so

$$\frac{d}{dx}(x^2 \sin x) \;=\; 2x \sin x + x^2 \cos x.$$

The quotient rule

$$\frac{d}{dx}\!\left(\frac{u}{v}\right) \;=\; \frac{u' v - u v'}{v^2}.$$

The structure mirrors the product rule, with two changes: the sign in the middle becomes a minus, and the whole thing is divided by $v^2$. The minus sign matters and is in a specific place: it goes after $u'v$, not before. Many students remember it as “low d-high minus high d-low, square the bottom and away we go.” Whatever helps.

Example: differentiate $\dfrac{x^2 + 1}{x - 1}$. With $u = x^2 + 1$ and $v = x - 1$, we get $u' = 2x$ and $v' = 1$, so

$$\frac{d}{dx}\!\left(\frac{x^2 + 1}{x - 1}\right) = \frac{2x(x - 1) - (x^2 + 1)(1)}{(x - 1)^2} = \frac{x^2 - 2x - 1}{(x - 1)^2}.$$

The chain rule

This is the rule for composite functions — functions of functions. If $y = f(g(x))$, then

$$\frac{dy}{dx} \;=\; f'\bigl(g(x)\bigr) \cdot g'(x).$$

The image I find most useful: differentiate the outer function first, leaving the inner function alone, then multiply by the derivative of the inner function. Two examples:

$\dfrac{d}{dx}\sin(x^2)$: outer is $\sin$, inner is $x^2$. So we get $\cos(x^2) \cdot 2x = 2x \cos(x^2)$.

$\dfrac{d}{dx}(3x + 1)^7$: outer is “something to the seventh,” inner is $3x + 1$. We get $7(3x + 1)^6 \cdot 3 = 21(3x + 1)^6$.

The chain rule is the rule that students forget rather than misapply. They differentiate the outer function, get the right answer for that step, and then move on without multiplying by the derivative of the inner. If the inner function is just $x$, that derivative is $1$ and nothing changes; that is why students get away with skipping it for so long, until the day they meet $\sin(2x)$ on a test.

The trig, exponential and log derivatives worth memorising

Six derivatives recur often enough that you should know them by sight:

The mistakes I see most often

1. “Derivative of a product is the product of the derivatives.”

It is not. Use the product rule. The wrong shortcut gives the right answer only by coincidence, and never on a problem set by someone who is testing whether you understand it.

2. Forgetting the chain rule on a composite

Whenever you see a function inside a function — $\sin(2x)$, $(x^2 + 1)^3$, $e^{-x^2}$ — the chain rule is in play. Ask yourself “what is the inner function?” before you write anything down. If the inner function is just $x$, you are safe; otherwise you need to multiply by its derivative.

3. Sign errors on $\cos$

$\dfrac{d}{dx} \sin x = \cos x$, but $\dfrac{d}{dx} \cos x = -\sin x$. The minus sign is the most-dropped character in introductory calculus. If you get a strange answer to a trig problem, check this first.

4. Treating $\ln(x^2)$ as $\ln(x) \cdot \ln(x)$

$\ln(x^2)$ equals $2 \ln(x)$, which is twice as big as $\ln(x) \cdot \ln(x)$ in general. The derivative of $\ln(x^2)$ is therefore $2/x$, not what you get if you mis-expand the log.

5. Confusing $\frac{d}{dx}$ with evaluation

$\frac{d}{dx} x^3 = 3x^2$ is a function. $f'(2) = 12$ is a number. Notation sometimes blurs this: when a problem asks for “the slope of the tangent at $x = 2$,” it wants the number, not the function. Differentiate first, then plug in.

Higher derivatives, and what they mean

You can differentiate the derivative. The result is called the second derivative and is written $f''(x)$ or $\frac{d^2 y}{dx^2}$. Geometrically, $f''$ measures how fast the slope of $f$ is changing, which is what “curvature” means in everyday language. Where $f'' > 0$ the graph is concave up (like a cup); where $f'' < 0$ it is concave down (like a frown). Points where $f''$ changes sign are called points of inflection.

In physics, if $f(t)$ is position then $f'(t)$ is velocity and $f''(t)$ is acceleration. The chain of meaning is the same: each derivative tells you how fast the previous one is changing.

How this fits into a calculus course

Once you can differentiate competently, the next two topics build directly on top: finding maxima and minima (set $f'(x) = 0$ and check the sign of $f''$ around it), and the chain rule in implicit differentiation for curves like $x^2 + y^2 = 1$. Past that, the inverse operation — integration — reuses every rule on this page in reverse, which is why students who are shaky on derivatives struggle even more with integrals. Spending an extra hour now on the chain rule pays you back twice.

References and further reading