# Adding continuously

An integral adds up many thin strips, each a height times a width, and narrows the strips until the total stops changing. Its units are the height's units times the width's.

Written for this edition, not translated from Einstein.

## How do you add up something that varies continuously?

Chance spread along a line is measured per unit length: a density. Where the density is the same all along a stretch, the chance of the stretch is the density times its length. A particle equally likely to be anywhere in a 4 µm stretch has density 0.25 per micrometre, and the chance of finding it in the first 1.5 µm is 0.25 × 1.5 = 0.375.

Where the density changes from place to place, cut the line into narrow strips. Each strip contributes its height times its width, as if the density were flat across it. Add the strips, then cut them narrower and add again. For a smooth curve the totals settle on one value, and that value is the integral:

$$
\int_a^b p(x)\,dx = \lim_{\Delta x \to 0} \sum_i p(x_i)\,\Delta x
$$

The integral of p of x from a to b is the value that the sum of p of x i times delta x settles on as delta x shrinks.

The units multiply. A probability density is a probability per metre, so a strip of it, times a width in metres, is a plain probability. For a density the whole area must be 1, because the particle has to be somewhere. The Brownian paper's §4 writes exactly that for the chances of a jump Δ, ∫φ(Δ) dΔ = 1, and the light-quanta paper's §3 adds entropy over every frequency, S = v∫φ dν.

One more tool recurs in the papers: integration by parts. It is the product rule for derivatives added up over an interval, and it moves a derivative from one factor to the other at the price of an endpoint term:

$$
\int_a^b u\frac{dv}{dx}\,dx = [uv]_a^b - \int_a^b v\frac{du}{dx}\,dx
$$

The integral of u times the derivative of v equals u v at b minus u v at a, minus the integral of v times the derivative of u.

The endpoint term, uv at b minus uv at a, is part of the answer. It disappears only when uv is zero at both ends, as it is for a density that falls to zero far out on both sides.

## Worked example: A rising density, added up in narrower strips

1. A particle's density rises steadily across a 4 µm stretch, from 0 at the left end to 0.5 per micrometre at the right. The whole area is a triangle, ½ × 4 × 0.5 = 1.
2. Four strips 1 µm wide, each taking the height at its left edge: 0 + 0.125 + 0.25 + 0.375 = 0.75.
3. Eight strips 0.5 µm wide: the heights add to 1.75, and times 0.5 that is 0.875.
4. Sixteen strips 0.25 µm wide: 0.9375. The shortfall halves each time the strips do: 0.25, then 0.125, then 0.0625.
5. The totals settle on 1, the area of the triangle. That settled value is the integral.

A flat density gives the same total for every cut, which is why the uniform stretch above needed no strips. A curved one, such as the Brownian bell curve, does, and the integral is the value the totals settle on.

## Where this lesson stops

An integral is a total of height times width over a range, in the units of both. The widths and any endpoint term are part of the calculation, not decoration on the integral sign.

## This lesson builds on

- [Density is not probability](/foundations/distributions/)
