Chapter 11 · Part III · Complex dynamics

Chaos & strange attractors

A population model you could work out on a pocket calculator settles down, then flips between two values, then four, then eight, and then stops repeating altogether. The way it gets there is the same for a whole class of systems, down to a constant that nobody expected. And the shapes that chaos leaves behind, in that model and in Lorenz's weather equations, are fractals.

4.669201609…Feigenbaum's δ: how much faster each period doubling arrives than the last
1 + √8 ≈ 3.8284where the logistic map's period-3 window of order opens, inside the chaos
10, 28, 8/3the parameters Edward Lorenz used in 1963 for his butterfly-shaped attractor

Common mix-up: chaos is not randomness. Every system on this page is completely deterministic: the same start always gives exactly the same future. What chaos means is that tiny differences in the start grow exponentially, so any error in knowing the start, however small, eventually swamps the prediction.

One line of algebra

The logistic map

Imagine a population of insects that breed once a year. Call x the population as a fraction of the most the habitat can hold, so x runs from 0 to 1. Next year's population depends on this year's in two ways. More insects lay more eggs, so it grows with x. But a crowded habitat starves them, so it shrinks with 1 − x, the room left. Put the two together with a growth rate r and you have the logistic map.

xn+1 = r · xn · (1 − xn)
Next year equals the growth rate times this year times the room left. For r between 0 and 4, x stays between 0 and 1 forever.

In 1976 the ecologist Robert May published a review in Nature called "Simple mathematical models with very complicated dynamics", built around this map. His point was the title. Ecologists, economists and physicists all used equations like this one, and most assumed simple equations gave simple behaviour. May showed that as you turn up r, this one goes through every kind of behaviour there is, and he urged that it be taught early, so people would stop being surprised by it.

Here is what happens. Below r = 1 the population dies out: x shrinks toward 0 every year. Between 1 and 3 it settles to a steady value, x = 1 − 1/r, approached either smoothly or with a few dying wobbles. At r = 3 the steady state breaks and the population starts alternating between a high year and a low year, forever. At about 3.449 each of those values splits again and the cycle takes four years. Then eight, sixteen, thirty-two, faster and faster, until at about r = 3.5699 the cycle length becomes infinite: the population never repeats. That is chaos. Beyond it, out to r = 4, chaos is mixed with islands of order, the "windows", where a short cycle suddenly reappears.

Growth rate rWhat the population does
0 – 1Dies out
1 – 3Settles to x = 1 − 1/r
3 – 3.4495Alternates: a 2-year cycle
3.4495 – 3.5441A 4-year cycle
3.5441 – 3.5644An 8-year cycle, then 16, 32, …
≈ 3.569946The doublings pile up: onset of chaos
3.5699 – 4Chaos, broken by windows of periodic order
4Chaos over the whole interval from 0 to 1
A way to see it

Cobweb plots

You can iterate a map with a pencil and no arithmetic at all. Draw the curve y = f(x); for the logistic map it is an upside-down parabola peaking at x = ½. Draw the diagonal line y = x. Start at your x₀ on the horizontal axis and go straight up to the curve: the height there is x₁. Now go sideways to the diagonal, which turns that height back into a position on the x axis, then up or down to the curve again for x₂. Repeat. The zigzag path is called a cobweb.

Where the curve crosses the diagonal, f(x) = x, and the map stands still: a fixed point. Whether the cobweb spirals in toward it or away from it depends only on how steep the curve is there. If the slope is shallower than 45° either way, each step shrinks the distance and the point attracts. If it is steeper, each step grows the distance and the point repels. A negative slope makes the cobweb spiral, overshooting from side to side, and that is exactly what happens at r = 3.

x* = 1 − 1/r, f′(x*) = 2 − r
The fixed point and the slope of the curve there. It attracts while |2 − r| < 1, that is for 1 < r < 3. At r = 3 the slope passes −1, the fixed point starts repelling, and a 2-cycle takes over.
Go deeper: why the cycle doubles

A 2-cycle of f is a pair of points that f swaps. Each of them is a fixed point of f∘f, the map applied twice. So to understand the 2-cycle, draw the graph of f∘f, which has two humps instead of one. At r just above 3 the twice-applied curve crosses the diagonal in two new places, either side of the old fixed point, and those two crossings are the 2-cycle.

Now the same story repeats one level down. The 2-cycle is stable while the slope of f∘f at its points is between −1 and 1. As r grows the slope passes −1, the 2-cycle repels, and two fixed points of f∘f∘f∘f appear: the 4-cycle. Each hump of f∘f looks, up to rescaling and flipping, like a small copy of the original parabola, and that resemblance is the seed of the universality in the next section.

Every r at once

Period doubling and the bifurcation diagram

Plot every value of r across the page. For each one, iterate the map a few hundred times to let it settle, then mark the next few hundred values of x above that r. Where the population is steady you get one dot. A 2-cycle gives two dots, a 4-cycle four. Chaos gives a smear. The result is the bifurcation diagram, one of the most reproduced pictures in science, and a fractal in its own right.

The single line forks at r = 3, each branch forks again at 3.449, and the forks come closer and closer together until they pile up at 3.5699. Past that point the smear has structure: bright curves where x lands most often, which are the images of the parabola's peak, and pale vertical gaps that are the windows. Zoom into one branch of the cascade, or into the middle of a window, and the whole diagram appears again, smaller and squashed but recognizably the same. That repeated self-similarity is what the instrument below lets you check for yourself.

Instrument 1

A bifurcation diagram you can zoom

Every column is computed live: the map is iterated from x = ½, the first transients thrown away, and the next values plotted. Drag a box on the diagram to zoom into it, scroll to zoom in r, and tap to pick an r. The cobweb on the right follows the r you picked, with the slider for fine control. The readouts count the actual period and measure the Lyapunov exponent at that r.

r–
Settles into–
Lyapunov exponent λ–
View–

λ below zero means nearby starts converge (order); above zero, they separate exponentially (chaos). At a superstable cycle, where the orbit passes through x = ½, λ plunges toward minus infinity.

A number nobody expected

Feigenbaum's constants

In the mid-1970s Mitchell Feigenbaum, a physicist at Los Alamos, was computing the r values where the logistic map's cycle doubles. Call them r₁ = 3, r₂ ≈ 3.449490, r₃ ≈ 3.544090, r₄ ≈ 3.564407, and so on. The gaps between them shrink, and he noticed they shrink by almost the same factor each time. The ratio of one gap to the next settles toward a single number, about 4.669.

δ = lim (rn − rn−1) / (rn+1 − rn) = 4.669201609…
Each doubling arrives about 4.669 times sooner than the one before. Add up the shrinking gaps and the cascade has to stop at a finite r: the onset of chaos, r∞ ≈ 3.569945672.
nCycle bornrnGap ratio
123–
243.449490–
383.5440904.751
4163.5644074.656
5323.5687594.668
∞chaos3.569946δ = 4.669201609…

That alone would be a curiosity. The surprise came when Feigenbaum tried a different map, x → r·sin(πx), and got the same 4.669. It wasn't a property of the parabola at all. Any smooth map with a single hump whose top is quadratic, rounded like a parabola rather than pointed or flat, doubles its way into chaos with the same ratio. He published the result, with the theory of why, in 1978; Pierre Coullet and Charles Tresser found the same universality independently at about the same time.

There is a second constant for the other direction. At each doubling the forks in the diagram are narrower than the forks before, again by a fixed factor in the limit: α ≈ 2.502907875. (Some authors write it as negative, −2.5029, because each smaller copy is also flipped upside down.) δ says how the cascade shrinks along r; α says how it shrinks along x. Together they say that the region near the onset of chaos is self-similar: zoom in by δ one way and α the other, and the picture repeats.

Universality made the prediction testable in the real world, where nobody knows the exact equations. Around 1980 Albert Libchaber and Jean Maurer saw period doubling in convection rolls of liquid helium heated from below, with spacings close to Feigenbaum's ratio. Similar cascades turned up in dripping faucets, electronic circuits and lasers. Libchaber and Feigenbaum shared the 1986 Wolf Prize in Physics.

Go deeper: why one number for every hump

The argument is a renormalization, the same idea physicists use for phase transitions. Take f∘f near its middle hump, flip it and rescale it by α so it looks like the original map again. That operation turns one map into another; call it T. A period doubling for f becomes a period doubling one level up for T(f). Repeat T and every single-humped map with a quadratic top is pulled toward the same fixed point, a universal function g that satisfies g(x) = −α·g(g(−x/α)).

δ is the rate at which T pushes maps away from that fixed point along its one unstable direction, which is why it is the same for all of them. The full proof that the fixed point exists and has exactly this structure was completed by Oscar Lanford in 1982 with a computer-assisted proof, one of the first of its kind.

Order inside chaos

Windows of order

Scan the chaotic part of the diagram and you'll see pale vertical stripes. The widest one opens at r = 1 + √8 ≈ 3.8284. Inside it the smear collapses to just three values: the population runs in a steady 3-year cycle, right in the middle of chaos. Just to its left, the map behaves strangely in a different way. For long stretches it looks almost periodic, cycling close to three values, then bursts into chaos, then settles back. That pattern is called intermittency; it is the ghost of the 3-cycle that is about to be born.

The window then repeats the whole story in miniature. Each of the three branches doubles: period 6 near r ≈ 3.8415, period 12 near 3.8477, and so on, with Feigenbaum's ratio again in the limit, until chaos returns around r ≈ 3.8495. The window closes near r ≈ 3.857, where the three chaotic bands suddenly merge back into one. Zoom into the middle branch and you see a small, upside-down copy of the entire bifurcation diagram. There are infinitely many windows, one for every period, most of them far too narrow to see.

Period 3 has a special place in the theory. In 1975 Tien-Yien Li and James Yorke proved that if a continuous map of an interval has a point of period 3, it has points of every period, and an uncountable set of starting points that never settle into any cycle. Their paper was called "Period three implies chaos", and it is where the word "chaos" got its mathematical meaning. It later emerged that Oleksandr Sharkovsky had proved a stronger ordering of periods in 1964, in a paper little known in the West: 3 comes first, so period 3 forces every other period.

Go deeper: a picture of the parabola's peak

The bright curves that snake through the chaotic part of the diagram are not noise. They are the first few images of x = ½, the top of the parabola: f(½) = r/4, then f(r/4), and so on. A chaotic orbit spends extra time near the images of the peak, because the curve is flat there and many nearby x values get squeezed into a narrow range of outputs. Where one of those bright curves crosses another, or meets an edge of the band, the dynamics change, and that is often where a window opens.

The butterfly effect, measured

Sensitive dependence

The defining property of chaos is that two starts which are almost the same end up completely different. Take r = 4 and two starting values that differ in the tenth decimal place. After ten steps they differ in about the seventh; after thirty-three steps the difference is the size of the whole interval, and knowing one tells you nothing about the other.

The rate of that separation is the Lyapunov exponent, written λ. If nearby orbits separate like eλn after n steps, λ is the average of the logarithm of how much each step stretches. For a one-dimensional map that stretch is just the slope of the curve at each point the orbit visits.

λ = limN→∞ (1/N) Σ ln |f′(xn)| = lim (1/N) Σ ln |r(1 − 2xn)|
The average stretching per step, on a log scale. Negative λ: nearby orbits converge and the motion is orderly. Positive λ: they separate exponentially, which is chaos.

At r = 4 the exponent is exactly ln 2 ≈ 0.693. Each step doubles the error on average, so each step loses one binary digit of what you knew about the start. A double-precision number holds about 53 bits, so a computer simulation of the logistic map at r = 4 has forgotten its starting value entirely after about 53 steps, and from then on it is following some other true orbit, not the one you asked for. (A result called shadowing says that, for many chaotic systems, there is always a true orbit that stays close to the computed one, which is why the statistics of such simulations can still be trusted even though the individual path cannot.)

Go deeper: why r = 4 is exactly ln 2

Substitute x = sin²(πθ). Then 4x(1 − x) = 4 sin²(πθ) cos²(πθ) = sin²(2πθ). So the logistic map at r = 4 is the doubling map θ → 2θ (mod 1) in disguise. Doubling an angle shifts its binary expansion one place to the left, discarding the leading digit. The stretch per step is exactly 2, so λ = ln 2, and the "one bit lost per step" description is literal.

1963

Lorenz's butterfly

Edward Lorenz, a meteorologist at MIT, was running a small weather model on a Royal McBee computer in the early 1960s. As he told the story later, he wanted to look at one run again, so he typed in numbers from a printout and restarted it in the middle. The printout showed three decimals, 0.506, where the machine had kept six, 0.506127. The new run tracked the old one for a while, then drifted, and before long had nothing to do with it. A rounding error of one part in ten thousand had grown to the size of the weather.

In 1963 he published "Deterministic Nonperiodic Flow", built on a stripped-down model of convection, fluid heated from below, derived from a model by Barry Saltzman. It has three variables: x measures how fast the convection rolls turn, y the temperature difference between rising and falling fluid, z how far the vertical temperature profile is from a straight line. Lorenz chose σ = 10, ρ = 28 and β = 8/3.

dx/dt = σ(y − x) dy/dt = x(ρ − z) − y dz/dt = xy − βz
Three equations, two of them with a single product term. That small nonlinearity is all it takes. With σ = 10, ρ = 28, β = 8/3 the solution never settles and never repeats.

Plot the solution in three dimensions and it traces two lopsided loops, like the wings of a butterfly. It circles one wing a few times, swaps to the other, circles that a few times, and swaps back, with no pattern to the number of turns. It never crosses its own path, because in a three-dimensional flow, a point's position fixes its whole future. And it never leaves this shape: start anywhere and the trajectory is pulled onto it. The shape is called the Lorenz attractor.

The two wings circle two unstable steady states, at x = y = ±√72 ≈ ±8.49, z = 27, where convection would turn steadily one way or the other. For ρ below about 24.74 those steady states are stable and the solution spirals into one of them. Above it they repel, and the solution is left wandering between them forever. The famous image of a butterfly flapping its wings in Brazil comes from the title of a talk Lorenz gave in 1972, "Predictability: Does the flap of a butterfly's wings in Brazil set off a tornado in Texas?"

Go deeper: how much of this is proved

For decades the Lorenz attractor was known only from computer runs, and computer runs of a chaotic system cannot be trusted step by step: they lose a digit every so often, exactly as Lorenz's rerun did. Stephen Smale put "is the Lorenz attractor really a strange attractor?" on his 1998 list of problems for the next century. Warwick Tucker answered yes in 2002, with a computer-assisted proof that tracked every rounding error with interval arithmetic.

The attractor's largest Lyapunov exponent is about 0.906 per unit of time: a small error grows by a factor of e roughly every 1.1 time units, which is about one circuit of a wing. Its fractal dimension is about 2.06. It is a surface folded onto itself so many times that it is slightly more than two-dimensional, an infinite stack of sheets that you would need ever finer magnification to tell apart.

Instrument 2

Two butterflies, almost identical

Two copies of the Lorenz system start a tiny distance apart and are integrated side by side with a fourth-order Runge–Kutta step. For a while you see one trail; then they part. The strip below plots the distance between them on a log scale. The straight rising stretch is exponential growth, and its slope is a measurement of the Lyapunov exponent.

Time0
Separation–
Measured growth rate–
Stretch so far–

Time is in the model's own units. With ρ = 28 the growth rate should come out near 0.9 per unit, though any one pair of starts wobbles around that average. Turn ρ below about 24.7 and both copies spiral into the same steady state: no chaos, and the separation shrinks.

Stretch and fold

Strange attractors

An attractor is where a system ends up: a point, for a pendulum with friction; a loop, for a heartbeat or a cycle of the logistic map. In 1971 David Ruelle and Floris Takens, writing about how turbulence starts, called the other kind strange attractors: sets that pull everything in, but on which the motion is chaotic. The name stuck. Nearly all of them turn out to be fractals.

The reason is a tension. Chaos needs stretching, so nearby points separate. But the attractor is bounded, so whatever is stretched must be folded back. Stretch, fold, stretch, fold: it is the motion of a baker kneading dough, and Stephen Smale's "horseshoe" map of the 1960s is the cleanest mathematical version. After many folds, a cross-section through the dough is a Cantor-like stack of layers, layers within layers. That is the fractal.

Michel Hénon made the process visible in 1976 with a map of the plane simpler than Lorenz's flow: x → 1 − a·x² + y, y → b·x, with a = 1.4 and b = 0.3. Its attractor looks like a curved boomerang drawn with a single line, until you zoom in and the line turns out to be several lines, and each of those several more. Its dimension is about 1.26.

Later, people went looking for pretty ones. The Clifford attractors, named after Clifford Pickover, and the Peter de Jong attractors are two-dimensional maps built from sines and cosines with four free parameters. Most parameter choices give a boring point or loop; a lucky few give lace. They have been a staple of generative art ever since, and the instrument below draws all three families.

AttractorRuleTypical parameters
Hénon (1976)x′ = 1 − a x² + y, y′ = b xa = 1.4, b = 0.3
Cliffordx′ = sin(a y) + c cos(a x), y′ = sin(b x) + d cos(b y)a = −1.4, b = 1.6, c = 1.0, d = 0.7
de Jongx′ = sin(a y) − cos(b x), y′ = sin(c x) − cos(d y)a = 1.4, b = −2.3, c = 2.4, d = −2.1
Points plotted0
Rule–

Each picture is a single orbit, a million or more points, accumulated as a density: brighter where the orbit returns more often. "Shuffle" picks random parameters and keeps them only if the orbit doesn't collapse to a point or a short cycle.

Two growth rates, taking turns

Lyapunov space

In 1989 Mario Markus and Benno Hess asked what happens when the growth rate itself changes from year to year in a fixed pattern. Pick two rates, a and b, and a sequence of letters such as AB or AABAB. Iterate the logistic map using r = a on the A years and r = b on the B years, repeating the pattern forever. Then compute the Lyapunov exponent of the result. Do that for every (a, b) in a square and colour each pixel by λ: one family of colours where λ is negative and the orbit settles into order, another where λ is positive and it is chaotic.

The pictures, now called Markus–Lyapunov fractals, look like nothing else in this book: smooth, glossy shapes like bent metal or folded silk, edged with fine chaotic filigree. They reached a wide audience in A. K. Dewdney's "Computer Recreations" column in Scientific American in 1991. Each one is a map of how forced population cycles respond to their two rates, and the bright, sharp-edged spines are where the exponent dives toward minus infinity: superstable cycles, where the orbit passes exactly through the top of the parabola.

Instrument 3

A Markus–Lyapunov renderer

Type a sequence of A and B. Each pixel runs the forced logistic map at its own (a, b), warms up, then averages ln|r(1 − 2x)| over a few hundred steps. Gold is order (λ < 0), brighter as λ falls; blue-black is chaos (λ > 0). Drag to pan, scroll or pinch to zoom, tap to zoom in.

Region–
Ordered pixels–
Last render–

On the diagonal a = b the sequence doesn't matter and you are looking at the ordinary logistic map: the order–chaos pattern along that line is the bifurcation diagram's, read as colour. JellyDazzle has a Lyapunov mode that draws this same quantity live.

Cheat sheet

Terms from this chapter

Logistic map
x → r·x·(1 − x). The standard one-dimensional model of chaos (May, 1976).
Fixed point
A value the map leaves alone: f(x) = x. Attracting if |f′| < 1 there.
Cobweb plot
Iterating a map graphically by bouncing between the curve and the diagonal.
Period doubling
A stable cycle losing stability and being replaced by one twice as long.
Bifurcation diagram
The long-run values of x plotted against r.
Feigenbaum δ
4.669201609…, the limiting ratio of successive gaps between doublings.
Feigenbaum α
2.502907875…, the limiting ratio of successive fork widths.
Window
An interval of r inside the chaotic region where a stable cycle returns.
Lyapunov exponent
The average exponential rate at which nearby orbits separate. Positive means chaos.
Attractor
The set a system settles onto from a range of starting points.
Strange attractor
An attractor on which the motion is chaotic. Usually a fractal.
Markus–Lyapunov fractal
λ of the logistic map with two rates in a fixed A/B pattern, plotted over (a, b).
Where this comes from

Sources