The last lesson ended with a promise: in the plane a bounded trajectory with no equilibrium settles onto a closed orbit, so planar autonomous flows cannot be chaotic. Chaos needs a third variable. This lesson adds one and meets the first strange attractor, found by Edward Lorenz in 1963 in a three-equation model of convection. (From memory: a rerun from numbers printed to three digits instead of six gave him a completely different forecast.) For a learner who wants to simulate fluids this is the central warning: some flows have trajectories that no simulation can reproduce, and what a simulation can reproduce is statistics. We measure that: how fast two nearby runs separate, how long a forecast survives, when RK4 and RK45 part ways, and what stays the same. Then the logistic map shows chaos arriving through period doubling in one page of code.
Transcript
- Heat a thin layer of fluid from below and it organizes into convection rolls. Lorenz truncated that fluid model to three modes and got three equations: x prime equals sigma times y minus x, y prime equals x times rho minus z, minus y, and z prime equals x y minus beta z. With sigma ten, beta eight thirds and rho twenty-eight, the orbit winds around two lobes and never settles or repeats. This is a model, not the atmosphere.
- The right-hand sides vanish at the origin and at two more points, C plus and C minus, at plus or minus 8.4853, plus or minus 8.4853, and 27. At rho equals 28 the origin is a saddle, with eigenvalues minus 2.6667, 11.8277 and minus 22.8277. The other two have eigenvalues minus 13.8546 and 0.0940 plus or minus 10.1945 i: a complex pair with positive real part, so they are unstable spirals. The real part crosses zero at rho H equals 24.7368, a Hopf bifurcation.
- Now the divergence. It equals minus sigma minus one minus beta, minus 13.6667, everywhere. So a blob of initial conditions shrinks by a factor of 1.16 times ten to the minus six every time unit: the attractor has zero volume, yet its orbits never settle. Its dimension is a little above two; the Kaplan Yorke estimate is 2.0621. And a bounding function shows that every orbit ends in a bounded region.
- Now start two copies on the attractor, ten to the minus eight apart in x. For a while they are indistinguishable; then they split, one onto each lobe. The log of the gap is a straight line, so the separation grows exponentially. From start one, one, one the gap reaches one at 20.30, with fitted slope 0.856. Over five starts, renormalising gives lambda from 0.892 to 0.945, so my estimate is 0.92 plus or minus 0.03.
- Turn the exponent into a forecast limit. If an error of size one makes a forecast useless, the horizon is one over lambda times the log of delta over delta zero. Measured over five starts: 10.53 time units for ten to the minus four, 21.96 for ten to the minus eight, 31.78 for ten to the minus twelve. A ten-thousand-fold better measurement adds only about ten time units. Accuracy buys additive time, which is why weather centres run ensembles.
- Rounding error is an initial-condition error. RK4 with step 0.01 and with step 0.005 are two nearby runs, so they must part ways: here at t equals 7.69. Halving the step buys only about three time units, since log of 16 over 0.9056 is 3.06. Yet statistics survive. Over length four thousand, the fraction of time with x positive lies between 0.484 and 0.511, and mean z between 23.52 and 23.56, with no trend in step size. Ask a chaotic simulation for its statistics, not its trajectory.
- A one-dimensional model shows the route. The logistic map is x next equals r x times one minus x. For r below 3 the fixed point is stable; at r equals 3 it doubles to a 2-cycle, and at one plus root six, 3.44949, to a 4-cycle, then 8, then 16. The doublings come at 3, 3.44949, 3.54409, 3.56441, 3.56876, 3.56969 and 3.56989, crowding up toward chaos, with periodic windows such as period three near 3.83.
- The gaps shrink by a fixed ratio. Dividing successive gaps gives 4.7514, 4.6563, 4.6682, 4.6687 and 4.6691, approaching Feigenbaum's constant, 4.6692. The Lyapunov exponent of the map is the average log stretching. It is negative on stable cycles, minus 0.2231 at r equals 2.8, positive in chaos, 0.4949 at 3.9, and 0.6931 at r equals 4, which is ln 2. Chaos is stretch and fold.
- Recap. The Lorenz system is a three-mode model of convection, and its divergence, minus 13.6667, makes the attractor a zero-volume set. Twins ten to the minus eight apart give lambda of about 0.92 plus or minus 0.03, so a ten-thousand-fold better start adds only about ten time units. Ask a chaotic simulation for statistics, not trajectories. The logistic map shows one route to chaos, with ratios near 4.67 and exponent ln 2 at r equals 4. Next: the driven and double pendulum.
Where the equations come from
Heat a thin layer of fluid from below. Past a critical temperature difference buoyancy beats viscosity and heat diffusion, and the fluid organizes into rolls of rising and sinking fluid: Rayleigh–Bénard convection. Lorenz expanded the stream function and temperature deviation of the 2D Boussinesq equations in Fourier modes, kept the three lowest, and the PDE became
This paragraph and the next are from memory; I did not re-derive the truncation. is the amplitude of the circulating roll (its sign the direction of circulation), the temperature difference between rising and sinking fluid, how far the vertical temperature profile bends away from a straight line. is the Prandtl number (viscosity over thermal diffusivity), the Rayleigh number scaled by its critical value (the textbook letter is ; it is not density), a geometric factor, for Lorenz’s aspect ratio. The classic values are , , . Read the terms: the roll is driven by the temperature difference and damped by viscosity; it carries heat across the imposed gradient , but a bent profile () weakens it; bends the profile and diffusion relaxes it. This is a model: three modes are a crude picture of a flow with many active scales at , so the equations do not predict the atmosphere. They show that deterministic fluid-like dynamics can be unpredictable.
Equilibria and the road to chaos
The right-hand sides vanish at and, for , at ; at , and . The Jacobian (7.7 Nonlinear Systems & Linearization, now ) is
Numbers below are the sim’s readout.
The origin has eigenvalues and : at , , and , a saddle. At the root is exactly and the eigenvalue that is at reaches : the pitchfork where are born (3.9 Bifurcations).
have characteristic polynomial , at equal to . Its roots are and : a stable real direction and a complex pair with positive real part, so are unstable spirals. (Check: the eigenvalues add to , the trace of .)
When do the spirals turn unstable? Write the roots as and : the polynomial is . Matching gives , and , so and
The sim confirms it: at the real part of the pair is zero to rounding (). It is negative below ( at , at ) and positive above ( at ). This Hopf crossing (7.9 Limit Cycles & Hopf Bifurcations) is subcritical (from memory): chaos already exists from about , so stable and chaos coexist in a window and there is no clean “chaos starts here”.
Dissipation: the attractor has no volume
The divergence is everywhere. By Liouville’s formula (7.5 The Matrix Exponential & Fundamental Matrices, 2.7 Divergence: Sources & Sinks) a blob of initial conditions shrinks like , a factor per time unit, so any attractor has zero volume yet must hold orbits that never settle: its dimension lies between 2 and 3, about (from memory). With (from memory), (along the flow) and the sum rule , and the Kaplan–Yorke estimate (the sim prints it).
Bounded. With a direct computation gives
since the terms cancel (). Outside the ellipsoid , decreases, so every orbit ends up in a bounded region (the conclusion is from memory; I checked the algebra by hand). Measured over one orbit of length (sim): , , .
The strange attractor
The usual picture (from memory): the orbit spirals outward around one unstable spiral (growth rate per time unit), is thrown across near the origin, and spirals around the other. How many turns on each side looks random. Rotate the first sim (side, top, oblique): the orbit winds around two wings, and the section in its lower panel is nearly a line (below), consistent with a thin sheet and a dimension just above 2. The symmetry makes the lobes mirror images, so the long-run fraction of time with should be .
Sensitive dependence
Start on the attractor (run 20 time units first). Start copies and apart in , RK4, . The gap stays small for a few time units (it first reaches at for the five starts below), then grows exponentially (a straight line in the log plot) until it is of order 1, then saturates at the size of the attractor. Lab block A, five starts:
| start | (gap reaches ) | window-fit slope | renormalised |
|---|---|---|---|
| 20.30 | 0.856 | 0.892 | |
| 25.56 | 0.805 | 0.896 | |
| 20.16 | 0.863 | 0.912 | |
| 21.65 | 0.861 | 0.945 | |
| 22.15 | 0.862 | 0.932 |
The window fit fits between gap and gap ; a gap has growing with slope , the largest Lyapunov exponent. Five fits give to , mean . Renormalisation (Benettin; the exercise) rescales the gap to every time units and averages per unit time, covering time units rather than about : to , mean (sim: pick the start). The literature value is (from memory). My estimate is (mean and half-range over starts); the single-pair fits sit about low and I did not isolate why. The exponent is an average of a local expansion rate that fluctuates along the orbit, and a -unit window averages it poorly, so the -unit renormalised numbers cluster more tightly. A gap multiplies by every time units.
Prediction horizon: the price of accuracy
If the gap is and a forecast is useless once the error reaches , then . Lab block B (, same starts; formula with ):
| initial error | measured , five starts | mean | formula |
|---|---|---|---|
| 7.53, 13.12, 10.28, 11.29, 10.42 | 10.53 | 10.17 | |
| 20.30, 25.56, 20.16, 21.65, 22.15 | 21.96 | 20.34 | |
| 30.16, 34.70, 30.02, 30.76, 33.29 | 31.78 | 30.51 |
The measured means sit above the formula by to time units, inside the spread across starts: a rule of thumb, not a prediction for one run. The lesson is the shape: each factor of accuracy adds time units (measured mean gains and ). Accuracy buys additive time. A hundred-million-fold better start, to , only triples the horizon.
Numerical honesty: whose trajectory is right?
Rounding error is an initial-condition error. RK4 with and with have different truncation errors (4.1 Local Error, Global Error & Order), so they are two nearby runs and must separate. Lab block D (first time two solutions differ by ): RK4 against at for the first three starts; against RK45 (rtol , 4.4 Adaptive Step Size & RK45) at . The sim’s “step-size experiment” (five starts): against at a mean ( to ), against at a mean ( to ). Halving cuts RK4’s error by (4.3 Runge–Kutta Methods & Butcher Tableaux) and time units, against a measured : the horizon grows with the logarithm of accuracy. Past about no run tracks the true trajectory. Stability is a separate matter (4.5 Stability Regions & Stiffness): the Jacobian eigenvalues at the equilibria are at most in magnitude, and RK4’s real-axis limit (from that lesson) allows there, so these gaps are truncation error amplified by chaos, not instability.
Block C adds to the starting (about a rounding error). Two starts return the identical , two shift by to , one moves from to . The mechanism is the exponent: the 20-unit run-in multiplies a difference by , so becomes where the twins start, the size of . Every chaotic number here is IEEE double arithmetic without fused multiply-add (the Python lab and the JavaScript sim agree to the digits shown); on another platform a single may shift by a unit or more. Trust averages and spread, not the second decimal of one run.
What does stay the same? Statistics. Three starts, , length each (sim “attractor statistics”): the fraction of time with lies in to and the mean in to , with no trend in . The second lab, length , shows the cost of a shorter run: to and to . That spread is sampling error, which shrinks with run length, not step-size error. Why statistics survive is shadowing (from memory): a numerical orbit stays close to some true orbit for a long time, just not the one you started on. So ask a chaotic simulation for the right invariant statistics, not for this trajectory.
Sections and maps: reducing to one dimension
A Poincaré section turns a flow into a map: record where the orbit pierces a surface. Take and keep upward crossings. In there are (sim, “section”), per time unit, almost on a line: , correlation . The attractor is so thin that the section is nearly one-dimensional.
Lorenz’s own picture: plot each maximum of against the previous one . In there are maxima, between and (about time units apart), on a thin one-humped curve, a unimodal map: the highest next maximum, , follows . Lines fitted on each side of the apex have slopes and (sim) and and (lab, , maxima). Both exceed 1 in absolute value: an error in one maximum is stretched by at least about at the next, the exponent seen one lap at a time, and the fold at the apex (the map comes back down) keeps bounded.
The logistic map: period doubling and Feigenbaum
Take on . For the fixed point is stable (). At , and orbits alternate between two values, a 2-cycle with and , whose multiplier is
It reaches at , : the 2-cycle doubles to a 4-cycle, then 8, 16, … The sim and the third lab find each doubling by Newton’s method for the -cycle plus bisection on until its multiplier is :
The ratios are , approaching the Feigenbaum constant (universal for smooth unimodal maps; from memory). The fifth is from it, and the geometric-tail extrapolation of the accumulation point is (from memory, ). Beyond lies chaos with periodic windows: the sim finds period at (the tangent bifurcation is from memory) and no period up to at .
The Lyapunov exponent of a map is along an orbit, the same average of log-stretching. Over iterations from : (), (), (, a 4-cycle), (, just below the accumulation point), (), (, the window), (), and at , equal to (derived in Problem 3). Positive means chaos, negative a stable cycle. Chaos is stretch and fold: stretching alone leaves , folding alone gives order, together they keep orbits bounded while separating neighbours.
Try it
What to try. (1) Defaults: the green fit sits on the gap curve and the red dotted line marks . (2) and : the line slides but keeps its slope; compare the horizons with the formula. (3) , run-in : both runs spiral into , the gap decays and the exponent is against the Jacobian’s . (4) : a long chaotic transient with exponent (from memory: transient chaos below ). (5) The two experiment buttons. (6) The lower panel: map or section.
What to try. The buttons and the cobweb: fixed point, 2-cycle, 4-cycle, period 3, chaos. In the range “cascade: 3.4 to 3.6” the dashed lines mark the doublings.
Computing it
Now build the estimator yourself. You get the integrator; write the renormalisation loop.
Concept checks
Problems
For , , find and the coefficients of the characteristic polynomial of its Jacobian. Check that is a root.
Show worked solution
, so . The polynomial is with , and . At : . Dividing by leaves , with roots : an unstable spiral. (By-hand arithmetic; the sim prints the roots.)
Derive from the condition that the characteristic polynomial has a root pair , and compute there.
Show worked solution
, so and : . Collecting : , so (). Then , (the sim’s readout at ), and the real root is .
(a) Show that the logistic 2-cycle has multiplier and find where it equals . (b) At put , show the map is , and use (standard integral) to show .
Show worked solution
(a) The 2-cycle solves , so and . The multiplier is . It equals at , matching the bisection. (b) , so , and . The invariant measure of doubling is uniform in , so . The lab measures .
Key Takeaways
- Lorenz is a three-mode truncation of Rayleigh–Bénard convection (from memory), a model. At the origin is a saddle (, , ) and are unstable spirals (, ); the Hopf threshold is .
- The divergence shrinks volumes by per time unit: zero-volume attractor, dimension about (from memory); bounds the orbits.
- Twins apart separate to at to (mean ). Exponent: window fits to , renormalisation to (mean ; literature ): quote the spread.
- : measured for ; a -fold better start adds about time units, so weather and turbulence use ensembles and statistics.
- Step sizes and methods part ways at to , yet statistics agree (mean to , fraction with to ): ask a chaotic simulation for statistics, not trajectories.
- The Lorenz map of maxima is unimodal with slopes , ; the section is nearly a line.
- Logistic map: doublings at , ratios (, from memory); exponent at , negative in windows. A gateway, not a treatment.