Analysis

Area is the undoing of slope

Two operations invented for unrelated reasons — measuring a region and measuring a rate — turn out to be inverse. The picture is two panels sharing one axis, and the claim is that the lower curve's steepness is the upper curve's height.

Worth reading first: Adding up rectangles until they stop being rectangles · The slope of a single point.

Two questions, asked for entirely different reasons, by different people, centuries apart.

How much area is under this curve? Archimedes asked it about a parabola and answered by exhaustion. How steeply is this curve rising here? Fermat and Descartes asked it about tangents and answered by taking differences.

There is no reason those should have anything to do with each other. One is about a region and the other is about a point; one is a total and the other is a rate; one is computed by adding up many small things and the other by dividing two small things. And they are inverse operations.

Area is the undoing of slopeAbove, a positive function with the area from 0 to 1.80 shaded. Below, that area plotted against where it stops. The lower curve's slope at 1.80 is 1.129, which is exactly the upper curve's height there.00.511.522.5300.51fthis areaheight 1.12900.511.522.5300.511.522.5where the area stopsarea so farslope 1.129
Fig. 1 Above: a curve with the area under it shaded from the left edge to a marked place. Below: that area, plotted against where it stops. The dashed line is the lower curve’s tangent at the marked place, and its slope is the upper curve’s height there — both numbers computed and printed, and checked against each other before the figure is drawn.

The object that connects them

The connection needs a third thing, and it is the accumulation function: fix a starting point, and for each xx record the area under the curve from the start to xx.

A(x)=axf(t)dtA(x) = \int_a^x f(t)\,dt

This is a function built out of areas. It takes a position and returns a total, and it has a graph, and that graph has a slope. The theorem is about that slope.

A(x)=f(x)A'(x) = f(x)

Read that aloud: the rate at which accumulated area grows, at xx, is the height of the curve at xx. Area’s rate of change is the thing being accumulated.

Area is the undoing of slopeAbove, a positive function with the area from 0 to 2.10 shaded. Below, that area plotted against where it stops. The lower curve's slope at 2.10 is 1.132, which is exactly the upper curve's height there.00.511.522.5300.511.5fthis areaheight 1.13200.511.522.5300.511.522.5where the area stopsarea so farslope 1.132
Fig. 2 The same pair for a straight line. The area grows quadratically, so the lower curve is a parabola, and its slope at each point is exactly the height of the line above it.

Once stated that way it is close to obvious, which is a good sign and a slight embarrassment for a result that took two thousand years to arrive. Extend the shaded region a little further right and the area gained is very nearly a thin rectangle: its width is the extension, its height is the value of ff there. Area gained divided by width extended is the height. That ratio is the definition of a derivative, and the height is f(x)f(x).

The proof is a rectangle

The argument above is the proof, and making it precise takes one more sentence.

Extend by hh. The extra area is exactly A(x+h)A(x)A(x+h) - A(x), and it lies between the smallest and largest values ff takes on the interval [x,x+h][x, x+h] multiplied by hh — because a region under a curve is between the rectangles that just fit under it and just cover it, which is the whole basis of the Riemann sum.

Divide by hh:

min[x,x+h]f    A(x+h)A(x)h    max[x,x+h]f\min_{[x,x+h]} f \;\le\; \frac{A(x+h) - A(x)}{h} \;\le\; \max_{[x,x+h]} f

Now let hh shrink. If ff is continuous at xx, its minimum and maximum over a shrinking interval both close in on f(x)f(x), so the quantity trapped between them has no choice. The difference quotient converges, which means AA is differentiable, and its derivative is f(x)f(x).

Secants closing on the tangent to x²Secant lines through x = 1 and a second point 1.2, 0.8, 0.5, 0.28, 0.12 away, with the slope of each. They approach 2, the derivative there.0.511.522.512345xh = 1.2 slope 3.2000h = 0.8 slope 2.8000h = 0.5 slope 2.5000h = 0.28 slope 2.2800h = 0.12 slope 2.1200
Fig. 3 The difference quotient of a function, closing on its tangent. The theorem’s proof is this construction applied to the accumulation function, where the difference quotient happens to be an average height of ff over a shrinking interval.

The whole content is the squeeze, and the hypothesis that makes the squeeze work is continuity. That is worth remembering, because continuity is exactly the hypothesis that fails in the interesting counterexamples later.

Area is the undoing of slopeAbove, a positive function with the area from 0 to 1.15 shaded. Below, that area plotted against where it stops. The lower curve's slope at 1.15 is 1.713, which is exactly the upper curve's height there.00.511.522.5300.511.52fthis areaheight 1.71300.511.522.530123where the area stopsarea so farslope 1.713
Fig. 4 The same pair for a function that goes up and down. Where the upper curve is high the lower one climbs steeply; where it dips toward zero the lower one flattens. The accumulation is still increasing everywhere here because the curve stays positive — a curve that went negative would make it fall.

The wave case makes one feature legible that the single bump does not. The accumulation function’s shape is a translation of the original’s height: peaks in the upper panel become steep stretches in the lower, and the flat places become plateaus. So the lower curve is a smoothed, integrated, one-derivative-gentler version of the upper — and that is a general fact, not an artefact. Integration makes a function nicer by one degree and differentiation makes it rougher by one, which is why numerical differentiation amplifies noise and numerical integration suppresses it.

That asymmetry is the practical reason the two operations feel so different despite being inverse. Running a process forwards and backwards is not equally easy when one direction is a smoothing.

There is one function for which the two panels would be identical, and it is the one the exponential essay is about: exe^x accumulates to itself, so its area panel and its height panel are the same picture. That is not a curiosity about a particular function — it is a characterisation. Being its own accumulation is what exe^x is, and every other property of it follows.

The half that gets used

What has been proved is the theorem’s first half: every continuous function has an antiderivative, and one of them is its own accumulation function.

The second half is the computational one, and it follows. If FF is any function whose derivative is ff, then FF and AA differ by a constant, since two functions with the same derivative on an interval differ by a constant. So

abf(t)dt=F(b)F(a)\int_a^b f(t)\,dt = F(b) - F(a)

and the constant cancels. That is the sentence that turned integration from a research problem into a technique: an area is computed by finding any function that differentiates to the integrand and subtracting two of its values.

The reduction is enormous and it is worth stating what was reduced. Before it, an area was a limit of sums, and each new region needed its own ingenious dissection — Archimedes’ parabola took a page. After it, an area is an arithmetic problem in the table of derivatives, run backwards. The same shift happened to arc lengths, volumes, centres of mass, and the work done by a variable force, all of which are integrals wearing different words.

Riemann sums convergingThe same area approximated with 4, 10, 30 rectangles.12301234n = 4 · 5.33012301234n = 10 · 5.88812301234n = 30 · 6.159
Fig. 5 What the theorem replaced. Approximating one area by rectangles at three resolutions, each panel closer than the last — the generator checks that each is at least as close as the one before it. Every area was found this way until an antiderivative could be looked up instead.

What it costs

The reduction is real and it is not free, and where it stops is a practical matter rather than a philosophical one.

Differentiation is mechanical. Every elementary function has an elementary derivative, obtainable by rules that compose without judgement. Integration is not: ex2e^{-x^2}, sin(x)/x\sin(x)/x and 1k2sin2x\sqrt{1-k^2\sin^2 x} have no elementary antiderivative, and this is a theorem — Liouville’s — rather than a confession of ignorance. Risch’s algorithm decides the question, and its answer for these is no.

So the theorem converts an area into a search that frequently fails, and what happens then is that the sums come back. Every numerical integration method in use is a Riemann sum with better bookkeeping: the trapezoid rule averages the left and right rules and gets an error of order h2h^2 instead of hh; Simpson’s rule fits parabolas and gets h4h^4; Gaussian quadrature chooses where to sample rather than sampling evenly and gets a polynomial of degree 2n12n-1 exactly right with nn points.

30 rectangles under a curveA mid-endpoint Riemann sum with 30 rectangles approximating the area under a curve.0.511.522.5301234xysum ≈ 6.299exact = 6.300
Fig. 6 Thirty midpoint rectangles under the same curve. The midpoint rule is already an order better than the left rule for free, because the overshoot on one half of each rectangle cancels the undershoot on the other — a cancellation the picture makes obvious and the formula does not.

The last of those is worth a moment because it inverts the naive picture. The obvious way to improve a Riemann sum is more rectangles. The effective way is better-placed samples, and the improvement from placement dwarfs the improvement from quantity — a fifteen-point Gauss rule beats a million evenly spaced ones on a smooth function. The theorem’s failure to produce an antiderivative sends the problem back to sums, and the sums that come back are not the ones it replaced.

All of that assumes smoothness, and in high dimensions it collapses. A grid of nn points per axis costs ndn^d evaluations, so accuracy that is cheap in one dimension is unreachable in twenty — and twenty is not exotic in finance or statistical physics. What survives there is sampling at random, where the error falls as the square root of the sample count regardless of the dimension, and that is exactly the trade Buffon’s needle makes: a slow rate that does not care how many dimensions it is in beats a fast rate that does.

Where it needs a condition

The theorem as stated needs ff continuous, and each half degrades differently when that is weakened.

If ff has a jump, the accumulation function still exists and is still continuous, but it has a corner at the jump — the left and right difference quotients converge to the two different one-sided values. So AA fails to be differentiable exactly where ff fails to be continuous, and the first half fails at those points and nowhere else. That is a mild failure and the theorem survives it in the Lebesgue setting, where “except on a set of measure zero” is available.

The second half is more fragile than it looks. It needs F=fF' = f everywhere on the interval, and there exist functions that are differentiable everywhere with a derivative that is not Riemann integrable — Volterra’s function is the standard one. For those, FF exists, ff exists, and abf\int_a^b f does not, so the formula has nothing to say. The Riemann integral is simply too small a tool, and repairing this is one of the reasons the Lebesgue integral was built.

And the whole apparatus presumes a function of one variable on an interval. In more dimensions the theorem splits into a family — Green’s, Stokes’, the divergence theorem — all of them versions of the integral of a derivative over a region is determined by the boundary, and the one-dimensional case is the version where the boundary is two points and the integral over it is a subtraction. That reading, which makes F(b)F(a)F(b) - F(a) an integral over a zero-dimensional boundary, is the one that generalises; it is also the one nobody meets first.

The mean value theorem underneath it

There is a result doing quiet work in the argument above and it deserves naming, because it is the hypothesis that “two functions with the same derivative differ by a constant” rests on.

The mean value theorem: a function continuous on a closed interval and differentiable inside it attains, somewhere inside, a slope equal to the average slope across the whole interval. Drawn, it is the statement that the chord joining the endpoints is parallel to the tangent somewhere between them.

A point with two slopesSecants to |x| at zero, taken from each side. Every one from the right has slope 1 and every one from the left has slope −1, at every distance, so the quotients never settle.-2-1.5-1-0.50.511.52-0.50.511.52xslope 1 from the rightslope −1 from the left
Fig. 7 The case where the hypothesis is dropped. At a corner the secants from the two sides converge to different slopes, so there is no tangent at all — and a function with a corner in the middle of an interval can miss every average slope the endpoints ask for.

From it: if F=0F' = 0 everywhere on an interval, then between any two points the average slope is a genuine slope somewhere, which is zero, so the two values are equal — so FF is constant. Apply that to the difference of two antiderivatives and the constant appears.

That is a longer chain than it looks, and every link needs the interval to be connected. On a domain in two pieces the constants can differ on each piece, and the familiar +C+C becomes a constant per component. This is not pedantry: it is why dx/x\int dx/x is lnx+C\ln|x| + C only on each side of zero separately, and why treating it as one formula across the origin produces wrong answers that look right.

Where it fails to be surprising, and where it should

There is a version of the theorem’s story that is told too smoothly, and it is worth correcting because the correction is the interesting part.

The smooth version: Newton and Leibniz noticed that area and slope are inverse, and calculus followed. What actually happened is that the inverse relationship was known in special cases well before either of them. Fermat had it for powers. Torricelli and Barrow — Newton’s teacher — both had geometric versions; Barrow’s Lectiones Geometricae of 1670 contains a statement close to the theorem, proved geometrically and stated without the notation that would have made it usable.

What Newton and Leibniz added was not the observation. It was the algorithm: a notation in which the relationship could be applied without geometric insight, by symbol manipulation, to functions nobody had drawn. Leibniz’s \int and dd are designed so that the theorem is almost a typographical fact, and that design is why his notation won.

The moral generalises past calculus. A result becomes powerful when it is expressed in a form that can be used without re-deriving it, and the gap between knowing a thing and being able to use it mechanically is often the whole of the progress. It is the same gap as the one between the Pythagorean relation being known in Babylon and being proved in Greece — except here the direction runs the other way, with the insight arriving first and the machinery second.

What the picture cannot show

The two panels show one function, one starting point and one marked place. The theorem is a statement about every continuous function, every starting point and every place, and no pair of panels can do more than illustrate a case. What the generator does instead is check the derivative numerically at three separate places for each function it draws, which is evidence and not proof.

The tangent line in the lower panel is drawn from the slope f(x)f(x), so a reader comparing it against the curve is checking a drawing against the claim it was drawn from — the figure cannot independently corroborate the theorem, and it would be dishonest to imply otherwise. What it can and does do is compute the lower curve’s slope by differencing the accumulated areas and refuse to render if that measured slope disagrees with the upper curve’s height.

The failure cases are entirely absent. A jump in ff, and the corner it puts in AA, would be a good figure and is not drawn here; the Volterra function cannot be drawn at all, since its pathology is dense and invisible at every scale — the same difficulty as a function that is 1 on the rationals.

The ladder from here

Rungs on this anchor above this one: integration by substitution and by parts, both of which are differentiation rules run backwards. Improper integrals, and what convergence means when the region is unbounded. The comparison between the integral and the sum it approximates, which is the integral test. Arc length, and the surprise that a curve’s length is an integral of something that is not the curve. The Lebesgue integral, and what it repairs. Green’s theorem, where the boundary becomes a curve. And differential forms, where all of these become one statement.

The theorem is a change of subject

The last thing worth saying is about what kind of result this is.

Most theorems on this site say that a thing is true: the angle does not move, the walk comes home, the solids stop at five. This one says that two subjects are the same subject. Before it, integration and differentiation were two research areas with separate literatures, separate techniques and separate practitioners. After it, one of them is the other read backwards, and every result in either is a result in both.

That kind of theorem is rarer and more valuable than a hard fact, and it is recognisable by what happens to the surrounding work: not that a problem is solved, but that half the problems stop being distinct. The same thing happens when a sine wave turns out to be a circle seen from the side and when Pascal’s triangle turns out to be a fractal — two descriptions collapse into one, and the collapse is worth more than either description was.

What links here

Computed from the collection, not written here: the essays that point at this one.

Shares its objects with

Essays that name at least two of the same things, and that neither author linked.

Named objects

A dashed tag is an object no other essay names yet.

AccumulationAntiderivativeAreaContinuityDerivativeFundamental theoremLimitMean value theoremRiemann sum