Generator

A square wave from 5 sine waves

A generator in the analysis library, called 32 times across 9 essays. Below: what it draws at its defaults and at each mode an essay asks for, what it checks while drawing, and everywhere it is used.

fourier is one function. Everything below came out of it during this build, at parameters taken from the essays rather than invented for this page — so a figure here is the same figure a reader meets in an essay, and if the generator changes, this page changes with it.

At its defaults

A square wave from 5 sine waves. The sum of the first 5 harmonics, compared with the square wave it approaches.

show: "weierstrass"

6 cosines, and a curve with no tangent anywhere. Partial sums of a sum of cosines whose amplitudes shrink geometrically and whose frequencies grow faster. Each term adds finer detail; the curve converges and its slopes do not.

show: "zoom"

The same corner, magnified 1,000 times. Four windows on the same curve, each a tenth the width of the last. The curve looks the same at every magnification, which is what having no tangent anywhere amounts to.

show: "spectrum"

The spectrum of the square wave. One bar per harmonic, its height the size of that harmonic's coefficient. The 11 non-zero coefficients fall away like 1 over m to the power 1.00.

show: "progression"

Partial sums of the square wave. Approximations using 1, 3, 7, 21 terms; the corners sharpen but a fixed overshoot remains.

show: "gibbs"

The overshoot that never goes away. Zoomed in on the jump: adding terms narrows the overshoot but does not shrink its height.

What it checks while it draws

Collected by running the family and recording what it asserted, not written here. The count is how many separate times the claim was put to the test while these drawings were made.

Where it is called

Changing this generator changes every figure on this list. That is what makes the list worth publishing rather than keeping in a check script.

Analysis

A curve with a corner at every point

Continuity means a curve can be drawn without lifting the pen. Differentiability means it has a tangent. The first was assumed to nearly imply the second until 1872, when Weierstrass exhibited a curve that is continuous everywhere and has a tangent nowhere — and it is a sum of cosines.

Number

One sum, squared two ways

Add the p-th roots of unity, each taken with a plus or a minus according to whether its index is a square. The walk that results closes on a point at distance √p from the origin — and squaring that one number, evaluated two different ways, is the reciprocity law.

Analysis

A square wave built entirely out of round ones

Add enough sine waves together and flat tops and vertical cliffs appear from nothing. Almost — there is a 9% overshoot that never goes away, and it is not a bug.

Analysis

The corners go first

Fourier was not decomposing waves for the pleasure of it. He was solving the flow of heat, and the whole apparatus exists because each harmonic fades at a rate set by the square of its frequency — which is why a sharp profile smooths instantly and why the flow cannot be run backwards.

Probability

The shape that averaging leaves alone

Adding independent quantities blurs their distributions together, and rescaling restores the width. Almost every shape is changed by that operation. Exactly one is returned unaltered, and that is why sums of unrelated things keep arriving at it.

Analysis

The staircase that is not the diagonal

A staircase can be made to follow a quarter circle as closely as anyone likes. Its length is 2 at every stage and the arc's length is 1.5708, and no amount of refinement closes the gap — which is a fact about length rather than about staircases.

Probability

The walk that becomes a curve

Shrink the steps of a random walk and it disappears. Shrink them while stretching the time in the right proportion — space by the square root of whatever time is divided by — and something is left behind, which is a curve nobody could draw.

Analysis

When the period grows without bound

A repeating signal has a spectrum of separate lines. Stretch the gap between repeats and the lines crowd together while the curve they sit on stays exactly where it is — and at infinite period the lines are gone and the curve is the whole answer.

Analysis

Where the coefficients come from

The recipe for a square wave has a four over pi in front and a one over three on the second term, and the first rung of this ladder used them without saying where they came from. They come from multiplying by one harmonic and taking the area.

The whole library · What the figures prove