Single-variable Calculus: Derivatives & the Chain Rule · 12 min

What is a derivative?

A curve has a different slope at every point. Finding that slope means cheating with a secant, then taking the cheat to its limit.

0 / 0

Find the slope of this curve at the dot.

No, really. Try.

-0.50.511.522.5312345

You can’t. Not with the rise-over-run trick you learned at twelve: that needs two points, and there’s only one. The curve has a slope at the dot (your eye believes it; the dot is climbing) but the tool you have for measuring slope refuses to apply.

This is the whole problem. The rest of the lesson is one trick for getting around it. The trick starts with cheating.

Push h to zero. Watch what happens.

Same widget, slightly different. Now there are two points: PP on the curve, and a second point QQ a distance hh away. The line through them has a slope you can measure: rise over run, same as ever. Drag hh down.

-0.50.511.522.5312345
secant slope
+3.000
≈ (f(1 + h) − f(1)) / h
= ((2.00)² − 1) / 1.00

Slide hh all the way to 00. The two points land on each other. The line collapses. The slope readout breaks.

That’s the wall. We can’t actually put both points on the same spot; that’s 0/00 / 0, which is undefined and a little rude. But notice what happens just before the wall: the slope readout settles on a number. It’s heading somewhere specific.

We’re going to live in that just before.

Name what you just did

That line you were dragging through two points on a curve: pick a fancy word for it. It’s called a secant line. Its slope, for a function ff at a point xx, looks like:

secant slope  =  f(x+h)    f(x)h.\text{secant slope} \;=\; \frac{f(x + h) \;-\; f(x)}{h}.

That’s just rise over run. The rise is “how much ff changed” between xx and x+hx + h. The run is hh. Nothing new, only a name for the move you’ve been making with your finger.

The trick is what we do with hh next.

Shrink the gap

PP is at (1,1)(1, 1) on y=x2y = x^2. Drag hh down toward zero. The secant line gets shorter and shorter. Its slope settles.

What number does the slope settle on?

That's the derivative.

You just found the slope of y=x2y = x^2 at the single point x=1x = 1. It’s 22. You found it by limiting: watching where the secant slope was heading as hh shrank, without ever letting hh actually land on zero.

The fancy name for “slope of a curve at one point” is the derivative. The trick you used is the definition:

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

Read it left to right: the derivative of ff at xx is what the secant slope approaches as the second point slides into the first. We never actually divide by zero. We watch where things are heading. Limits are the polite name for that move.

Without the slider this time.

You found f(1)=2f'(1) = 2 for f(x)=x2f(x) = x^2 by sliding hh to zero.

If you redid the trick at x=2x = 2, you’d get 44. At x=3x = 3, you’d get 66. There’s a pattern, and you can probably already see it.

What is f(3)f'(3) for f(x)=x2f(x) = x^2? No widget this time, just the pattern.

The derivative is a function.

This is the moment it stops being about one slope at one point and becomes the engine of calculus.

The derivative isn’t a number. It’s a function, a new function f(x)f'(x) that hands you back the slope at any xx you ask. For f(x)=x2f(x) = x^2, the derivative function is f(x)=2xf'(x) = 2x. For f(x)=sin(x)f(x) = \sin(x), the derivative function is something you’re about to discover.

Drag the dot. The coral line is the tangent. The readout shows the slope wherever you are.

-4-224-1.5-1-0.50.511.5
point (1.00, 0.84)
slope +0.54

drag the dot · or tab + arrow keys

What’s the slope doing as you sweep across? Climbing where the sine is climbing, zero at the peaks and troughs, going negative on the way down. The curve the slope traces is cos(x)\cos(x). Sine and cosine hand off to each other through differentiation. This is the kind of identity that makes physicists cry tears of joy. Welcome to the club.

Try the same trick on a cubic

The limit trick does not care which curve you point it at.

For f(x)=x3f(x) = x^3, drag the secant near x=2x = 2 and watch where the slope heads. You do not need the full power rule yet. You are pattern-hunting: x2x^2 turned into 2x2x, so x3x^3 should turn into 3x23x^2.

0.511.522.533.54246810121416
secant slope
+19.000
≈ (f(2 + h) − f(2)) / h
= ((3.00)³ − 8) / 1.00

One you haven't seen.

You found f(x)=2xf'(x) = 2x for x2x^2 by limit-shrinking. For x3x^3, the same pattern-hunting move gives f(x)=3x2f'(x) = 3x^2.

For f(x)=x3f(x) = x^3, what’s the slope at x=2x = 2?

Lesson complete

Nice tinkering.