What if adding things up and finding a slope were secretly the same operation?
That sounds like a stretch. Summing infinitely many tiny slices to get an area feels nothing like measuring how steep a curve is at one point. One is a total. The other is instantaneous.
But they're two sides of the same coin, and that fact has a name: the Fundamental Theorem of Calculus. It's the reason a computer, or a first year student, can find the exact area under a curve in one line, instead of grinding through an infinite sum by hand. Let's rebuild it from the ground up.
What does "accumulation" even mean?
Think about your car's dashboard. The speedometer tells you your speed right now, this instant. The odometer tells you total distance traveled, accumulated mile after mile since the trip started.
Those two numbers feel unrelated. One's a snapshot, the other's a running total. But they're locked together. Your odometer's reading, at any moment, is just the area under your speedometer's graph up to that point. Drive at a steady 60 mph for one hour and your speed graph is a flat line at 60, and the area under it, a rectangle, is 60 miles. Exactly what the odometer shows.
Speed up, slow down, it doesn't matter. The distance you've covered is always the area under the speed curve so far. That's what an integral is: a running total of area.
How do we add up infinitely many slices?
Here's the naive approach. Chop the region under a curve into thin rectangles, add up their areas, and hope it's close enough.
Slide n up. The rectangles stay jagged individually, but their total area homes in on the true area underneath the curve.
With just a handful of rectangles, the approximation is rough, some overshoot the curve, some undershoot. But watch what happens as climbs. The rectangles get thinner, hug the curve tighter, and the total area converges on one specific number.
We call that number the definite integral, written:
It just means "the limit of the rectangle sum, as the rectangles get infinitely thin, from to ." In principle, that's how you compute any area. In practice, nobody wants to sum infinite rectangles by hand. We need a shortcut.
What if the upper limit could slide?
Here's the move that unlocks everything. Instead of fixing both endpoints of our area, let's fix the left one and let the right one move. Call it .
We get a new function, let's call it , the running total of area from some fixed starting point up to . As slides right, only grows, since we're stacking on more area (assuming the curve stays positive).
Drag the dot along the axis. The shaded area up top is exactly the height of the dot on the curve below, at every instant.
Drag the point. The shaded region on top is quite literally the height of the dot on the curve below. That bottom curve, , is an accumulation function, one running total for every possible stopping point. We write it as:
Notice we swapped in as the variable being integrated, since is now busy being the upper limit. That's just bookkeeping, don't let it distract you.
Here's the reveal: what's the slope of A(x)?
Now for the interesting part. is a curve like any other, so it has a slope at every point. What is that slope, exactly?
Think about nudging forward by a tiny amount. grows by roughly a thin sliver of area, a rectangle of width "tiny" and height . Divide that sliver's area by its width, tiny gets canceled, and you're left with just .
...and that's the whole theorem. The slope of the accumulation function, at any point, is just the value of the original function at that point.
Drag the point along A(x). Its tangent slope is measured straight from the area curve, no cheating, and it still matches f(t).
Drag along the curve. The tangent slope shown is measured purely from itself, no shortcuts, just rise over run on the area curve. And it lands on anyway, every time. We write this as:
This is FTC Part 1. Accumulating area and taking a derivative are inverse operations. Integrate, then differentiate, and you're back where you started.
So how do we actually compute an integral, then?
Here's where it pays off. If is some function whose derivative is , then any function with that same property, any antiderivative of , differs from by at most a constant. Call one such antiderivative .
That means the area between and , which is , is also just , because the constant cancels out in the subtraction. No rectangles required. Find one function whose slope matches , plug in the two endpoints, subtract.
This is FTC Part 2, and it's the version you'll actually use. Instead of summing infinite slices, you look up an antiderivative and evaluate it twice.
Watching the whole loop close
Let's put it together and watch both sides of that equation agree, not just at the finish line, but the entire way there.
Hit play. The shaded region grows from a to b, and the two readouts below track each other the whole way, not just at the finish.
Hit play. As sweeps from to the far end, the shaded area keeps growing, and the running Riemann sum keeps pace with at every instant along the way. They're not approximately equal at the end. They're the same quantity, computed two different ways, the whole time.
That's the payoff. An infinite sum, a slope, and a plain subtraction all describing the exact same number.
The short version
Area accumulated under a curve, up to a point , defines a new function . The slope of that new function, at any point, is just the height of the original curve there. That's the Fundamental Theorem's first half: integrating and differentiating undo each other.
Its second half is the practical punchline: because any antiderivative of differs from by only a constant, you can compute an exact area with two evaluations of and one subtraction, , instead of summing infinitely many rectangles.
Your odometer and speedometer were doing calculus on your dashboard the whole time.
All visualizations are interactive React components running entirely in your browser. The area function is computed numerically from the original curve, not from a hardcoded formula, so the slope-matches-f(x) result you see is measured, not asserted. No libraries beyond React.