salt.town

Calculus, learned by moving things.

Calculus is two ideas: how fast something is changing right now, and how much it adds up to over time. Drag, slide and watch both appear, then see why they are the same idea run backwards.

Lesson 1

Limits: sneaking up on a number

Some functions have a hole. f(x) = (x² − 1) / (x − 1) can't be computed at x = 1: you'd divide by zero. But we can ask a different question: what does f get close to as x gets close to 1?

Slide right to bring both points closer to x = 1 from the left and the right.
The idea. The limit is the value f is heading toward, even if f never gets there. Here, both sides close in on 2, so we write lim x→1 f(x) = 2.
Why does the graph look like a straight line with a hole?
Lesson 2

The slope at a single point

Slope is rise over run: you need two points. So how can a curve have a slope at one point? Take a second point a distance h away, draw the line through both (a secant), and let h shrink toward zero. The secant turns into the tangent.

Shrink h and watch the secant's slope settle on one number. You can also drag on the graph to move the point.
The idea. The slope at a point is a limit: f′(x) = lim h→0 [f(x+h) − f(x)] / h. It's the rate of change right now, like a speedometer reading rather than an average speed.
For f(x) = x², what is the slope at x = 3?
Lesson 3

The derivative is a whole new function

Do the slope trick at every x and write down each answer. Those answers form a new graph: the derivative f′. Sweep the point across and watch f′ get drawn, one slope at a time.

Where f climbs, f′ is above zero. Where f is flat at a peak or valley, f′ crosses zero.
The idea. f′(x) tells you how steep f is at x. Positive means going up, negative means going down, zero means a flat spot: often the top of a hill or bottom of a valley. That's why derivatives find maximums and minimums.
At the very top of a smooth hill, what is the derivative?
Lesson 4

Area: adding up infinitely many thin pieces

The second big question: how much area sits under a curve? Curved shapes are hard, but rectangles are easy. Fill the region with n rectangles and add them up (a Riemann sum). More, thinner rectangles fit better.

Push n up and the error shrinks toward zero. Middle heights usually win.
The idea. The exact area is the limit of these sums as the rectangles get infinitely thin. We call it the integral: ∫ₐᵇ f(x) dx. The ∫ is a stretched S, for "sum".
For an increasing function, the left-edge sum is…
Lesson 5

The big link: area and slope undo each other

Let A(x) be the area under f from 0 up to x. Move x to the right and A grows. How fast does it grow? Add a sliver of width dx and you add about f(x) · dx of area. So the rate A grows at is exactly the height f(x).

Top: the area being collected. Bottom: A(x), the running total. Compare the slope of A to the height of f; they match.
The Fundamental Theorem of Calculus. A′(x) = f(x). The slope of the area function is the original function. Integrating and differentiating are inverse operations, so to find an area you only need a function whose derivative is f.
Using the theorem: what's the area under f(x) = 2x from 0 to 3?