About Logistic Map
One line of maths that goes from dull to wild as you turn a single knob:
next x = r × x × (1 − x)
Think of x as a population, as a fraction of the most the place can hold (0 = none, 1 = full), and r as how fast it breeds. Each step is one generation: the population grows by r, but the closer it gets to full, the more it is held back by the (1 − x).
Turn r with the knob, the arrows or by typing in the amber readout, or pick a preset. The three charts follow at once. Pen A and pen B are two starting populations; the buttons under them put B a hair above A. RECORD runs the pens across the paper again so you can watch the two lines track and then part. On the bifurcation diagram, click to set r, or drag a box to zoom in; BACK and FULL step out again. The strip printer beside the chart has two pages: CHAOS.PY and FEIGENBAUM; click a row of the Feigenbaum table to jump into that stretch of the cascade.
WHERE IT STARTS
The chaos.py script this app grew from is the first example in John Zelle's textbook Python Programming: An Introduction to Computer Science: type a number between 0 and 1 and it prints ten steps of x = 3.9 × x × (1 − x). Type 0.25, then 0.26, and the two lists soon have nothing in common. This page opens exactly there, and the printout beside the chart is that program's output for both pens, rounded to ten decimal places (the digits of B that differ from A are in bold). Behind the rounding, the page's sums match Python's to the last digit.
THE STORY
Pierre-François Verhulst wrote down the logistic equation in 1838 as a smooth model of a population that levels off. Turned into steps, one generation at a time, it behaves very differently. In 1976 the ecologist Robert May set it out in a review in Nature, "Simple mathematical models with very complicated dynamics", thinking of insects and other creatures whose generations don't overlap. He showed that as the growth rate rises, the population first settles to a steady level, then swings between two values (boom and bust), then four, eight, sixteen, and finally never settles at all. May urged that everyone should meet this map early, because it shows that simple rules don't promise simple behaviour.
A year earlier, Tien-Yien Li and James Yorke had published "Period three implies chaos", which gave the subject its name: if a map like this has a cycle of three, it has cycles of every length. (Oleksandr Sharkovsky had proved a stronger result in 1964, little known in the West.) The period-3 window here, opening at r = 1 + √8 ≈ 3.8284, is the cycle they meant.
In 1975 Mitchell Feigenbaum, at Los Alamos, was working out where the doublings happen on a programmable calculator. He noticed that each gap between them was close to 4.669 times shorter than the one before, and then found the same number in other maps with a single rounded hump. He published it in 1978. That number, δ = 4.669201609…, is now called Feigenbaum's constant; it is the same for a whole family of maps and has since turned up in experiments with fluids and electronic circuits.
The "butterfly effect" comes from the meteorologist Edward Lorenz. Around 1961 he restarted a weather simulation from numbers printed to three decimal places instead of the six the computer held, and after a couple of months of model weather the new forecast had nothing in common with the old one. His 1963 paper "Deterministic Nonperiodic Flow" explained why, and the title of his 1972 talk, "Predictability: Does the flap of a butterfly's wings in Brazil set off a tornado in Texas?", gave the idea its name. Pen B is the butterfly.
HOW IT WORKS
Time series: x for each generation, for both starts. The dashed line marks the step where they first differ by more than 0.1.
Cobweb: the hump is y = r·x·(1 − x) and the dashed line is y = x. From x go up to the hump (that's the next x), across to the diagonal (making it the new x), and repeat. Where the hump crosses the diagonal is the resting point x = 1 − 1/r. When the hump is steeper there than a 45° slope downwards (r above 3), the staircase spirals out instead of in, and the population can't rest.
Bifurcation diagram: for each r across the paper, the map is run 1,000 times or more to forget its start, then the next few thousand values are inked in, darker where they land more often. One line means it settles; two means a 2-cycle; a grey smear means chaos. The pale stripes in the smear are windows where order comes back for a while. Zooming in runs the map longer, so the fine detail stays sharp. The small marks along the top are where each doubling happens.
Feigenbaum table (on the strip printer): each r where the period doubles is found exactly (to about 12 decimal places) by following the cycle with Newton's method and asking where it stops pulling in neighbouring points (where its "multiplier" reaches −1). The ratio column divides each gap by the next one; the ratios close in on 4.6692 within a few doublings. The lamp's "gap ×1.65 a step" comes from the Lyapunov exponent, the average stretch per step; anything above ×1 means chaos.
FURTHER WATCHING AND READING