Flow Lab

Syllabus / Module 7: Systems of ODEs & Dynamical Systems

Lesson 7.10

Chaos & the Lorenz System

Lorenz's convection model, strange attractors, sensitive dependence, Lyapunov exponents, and what chaos means for simulation.

Written byClaude Sonnet

🌊
Why this matters for simulation: The Lorenz system is a 3-mode truncation of fluid convection — chaos was discovered in a fluid model.

By the end of this lesson you can…

  • Say where the Lorenz equations come from (a three-mode truncation of Rayleigh–Bénard convection; derivation sketch from memory), what $\sigma$, $\rho$, $\beta$ mean, and why the result is a model and not the atmosphere.
  • Find the equilibria $(0,0,0)$ and $C_\pm$, classify them from the Jacobian eigenvalues at $\rho = 28$, and derive the Hopf threshold $\rho_H = \sigma(\sigma+\beta+3)/(\sigma-\beta-1) = 24.7368$.
  • Use the divergence $-(\sigma+1+\beta)$ to show that volumes shrink exponentially, so the attractor has zero volume, and derive the bounding function $V = \rho x^2 + \sigma y^2 + \sigma(z-2\rho)^2$.
  • Measure sensitive dependence with twin runs $10^{-8}$ apart: the separation time $T^*$ and the largest Lyapunov exponent by a window fit and by renormalisation, reporting the spread instead of one tidy number.
  • Turn an exponent into a prediction horizon $T_{\mathrm{pred}} \approx \lambda^{-1}\ln(\Delta/\delta_0)$ and explain why a $10^4$-fold better measurement buys only about $10$ time units.
  • Explain why chaotic trajectories computed with different steps or methods part ways while attractor statistics agree, and what a simulation of a chaotic flow should be asked to reproduce.
  • Read a Lorenz map and a Poincaré section, then follow the logistic map through period doubling: derive $r = 1 + \sqrt 6$, compute Feigenbaum's ratio from your own bifurcation values, and compute the logistic Lyapunov exponent.
On this page
·
  1. Where the equations come from
  2. Equilibria and the road to chaos
  3. Dissipation: the attractor has no volume
  4. The strange attractor
  5. Sensitive dependence
  6. Prediction horizon: the price of accuracy
  7. Numerical honesty: whose trajectory is right?
  8. Sections and maps: reducing to one dimension
  9. The logistic map: period doubling and Feigenbaum
  10. Try it
  11. Computing it
  12. Concept checks
  13. Problems
  14. Key Takeaways

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.

▶ Video Two Lorenz trajectories start 1e-8 apart, coincide, then split onto different lobes; the logistic map doubles its period on the way to chaoscaptions only
Transcript
  1. 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.
  2. 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.
  3. 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.
  4. 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.
  5. 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.
  6. 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.
  7. 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.
  8. 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.
  9. 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

x′=σ(y−x),y′=x(ρ−z)−y,z′=xy−βz.x' = \sigma(y - x), \qquad y' = x(\rho - z) - y, \qquad z' = xy - \beta z .

This paragraph and the next are from memory; I did not re-derive the truncation. xx is the amplitude of the circulating roll (its sign the direction of circulation), yy the temperature difference between rising and sinking fluid, zz how far the vertical temperature profile bends away from a straight line. σ\sigma is the Prandtl number (viscosity over thermal diffusivity), ρ\rho the Rayleigh number scaled by its critical value (the textbook letter is rr; it is not density), β\beta a geometric factor, 8/38/3 for Lorenz’s aspect ratio. The classic values are σ=10\sigma = 10, β=8/3\beta = 8/3, ρ=28\rho = 28. Read the terms: the roll is driven by the temperature difference and damped by viscosity; it carries heat across the imposed gradient ρ\rho, but a bent profile (zz) weakens it; xyxy 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 ρ=28\rho = 28, 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 (0,0,0)(0,0,0) and, for ρ>1\rho \gt 1, at C±=(±β(ρ−1),±β(ρ−1),ρ−1)C_\pm = \big(\pm\sqrt{\beta(\rho-1)}, \pm\sqrt{\beta(\rho-1)}, \rho - 1\big); at ρ=28\rho = 28, β(ρ−1)=72\beta(\rho - 1) = 72 and C±=(±8.4853,±8.4853,27)C_\pm = (\pm 8.4853, \pm 8.4853, 27). The Jacobian (7.7 Nonlinear Systems & Linearization, now 3×33\times3) is

J=(−σσ0ρ−z−1−xyx−β).J = \begin{pmatrix} -\sigma & \sigma & 0 \\ \rho - z & -1 & -x \\ y & x & -\beta \end{pmatrix}.

Numbers below are the sim’s readout.

The origin has eigenvalues −β-\beta and 12(−(σ+1)±(σ−1)2+4σρ)\tfrac12\big(-(\sigma+1) \pm \sqrt{(\sigma-1)^2 + 4\sigma\rho}\big): at ρ=28\rho = 28, −2.6667-2.6667, 11.827711.8277 and −22.8277-22.8277, a saddle. At ρ=1\rho = 1 the root is exactly 1111 and the eigenvalue that is 11.827711.8277 at ρ=28\rho = 28 reaches 00: the pitchfork where C±C_\pm are born (3.9 Bifurcations).

C±C_\pm have characteristic polynomial λ3+(σ+β+1)λ2+β(σ+ρ)λ+2σβ(ρ−1)\lambda^3 + (\sigma+\beta+1)\lambda^2 + \beta(\sigma+\rho)\lambda + 2\sigma\beta(\rho-1), at ρ=28\rho = 28 equal to λ3+13.6667λ2+101.3333λ+1440\lambda^3 + 13.6667\lambda^2 + 101.3333\lambda + 1440. Its roots are −13.8546-13.8546 and 0.0940±10.1945 i0.0940 \pm 10.1945\,i: a stable real direction and a complex pair with positive real part, so C±C_\pm are unstable spirals. (Check: the eigenvalues add to −13.8546+2(0.0940)=−13.6667-13.8546 + 2(0.0940) = -13.6667, the trace of JJ.)

When do the spirals turn unstable? Write the roots as −a-a and ±iω\pm i\omega: the polynomial is λ3+aλ2+ω2λ+aω2\lambda^3 + a\lambda^2 + \omega^2\lambda + a\omega^2. Matching gives a=σ+β+1a = \sigma+\beta+1, ω2=β(σ+ρ)\omega^2 = \beta(\sigma+\rho) and 2σβ(ρ−1)=aω22\sigma\beta(\rho-1) = a\omega^2, so 2σ(ρ−1)=(σ+β+1)(σ+ρ)2\sigma(\rho-1) = (\sigma+\beta+1)(\sigma+\rho) and

ρH=σ(σ+β+3)σ−β−1=24.7368,ω=9.6245.\rho_H = \frac{\sigma(\sigma+\beta+3)}{\sigma-\beta-1} = 24.7368, \qquad \omega = 9.6245 .

The sim confirms it: at ρH\rho_H the real part of the pair is zero to rounding (<10−12\lt 10^{-12}). It is negative below (−0.0225-0.0225 at ρ=24\rho = 24, −0.4409-0.4409 at 1313) and positive above (+0.0940+0.0940 at 2828). This Hopf crossing (7.9 Limit Cycles & Hopf Bifurcations) is subcritical (from memory): chaos already exists from about 24.0624.06, so stable C±C_\pm and chaos coexist in a window and there is no clean “chaos starts here”.

Dissipation: the attractor has no volume

The divergence is ∂xx′+∂yy′+∂zz′=−σ−1−β=−13.6667\partial_x x' + \partial_y y' + \partial_z z' = -\sigma - 1 - \beta = -13.6667 everywhere. By Liouville’s formula (7.5 The Matrix Exponential & Fundamental Matrices, 2.7 Divergence: Sources & Sinks) a blob of initial conditions shrinks like e−13.6667 te^{-13.6667\,t}, a factor 1.16×10−61.16\times10^{-6} per time unit, so any attractor has zero volume yet must hold orbits that never settle: its dimension lies between 2 and 3, about 2.062.06 (from memory). With λ1=0.9056\lambda_1 = 0.9056 (from memory), λ2=0\lambda_2 = 0 (along the flow) and the sum rule λ1+λ2+λ3=−13.6667\lambda_1 + \lambda_2 + \lambda_3 = -13.6667, λ3=−14.5723\lambda_3 = -14.5723 and the Kaplan–Yorke estimate 2+λ1/∣λ3∣=2.06212 + \lambda_1/|\lambda_3| = 2.0621 (the sim prints it).

Bounded. With V=ρx2+σy2+σ(z−2ρ)2V = \rho x^2 + \sigma y^2 + \sigma(z - 2\rho)^2 a direct computation gives

V˙=−2σ(ρx2+y2+β(z−ρ)2−βρ2),\dot V = -2\sigma\big(\rho x^2 + y^2 + \beta(z - \rho)^2 - \beta\rho^2\big),

since the xyxy terms cancel (2σρ+2σ(ρ−z)+2σ(z−2ρ)=02\sigma\rho + 2\sigma(\rho - z) + 2\sigma(z - 2\rho) = 0). Outside the ellipsoid ρx2+y2+β(z−ρ)2=βρ2\rho x^2 + y^2 + \beta(z-\rho)^2 = \beta\rho^2, VV 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 20002000 (sim): x∈[−18.79,19.15]x \in [-18.79, 19.15], y∈[−25.63,26.40]y \in [-25.63, 26.40], z∈[2.29,47.01]z \in [2.29, 47.01].

The strange attractor

The usual picture (from memory): the orbit spirals outward around one unstable spiral C±C_\pm (growth rate 0.0940.094 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 (x,y,z)→(−x,−y,z)(x,y,z) \to (-x,-y,z) makes the lobes mirror images, so the long-run fraction of time with x>0x \gt 0 should be 12\tfrac12.

Sensitive dependence

Start on the attractor (run 20 time units first). Start copies AA and BB 10−810^{-8} apart in xx, RK4, h=0.005h = 0.005. The gap ∣A−B∣|A - B| stays small for a few time units (it first reaches 10−610^{-6} at t=1.66,7.99,1.73,5.38,7.13t = 1.66, 7.99, 1.73, 5.38, 7.13 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:

startT∗T^* (gap reaches 11)window-fit sloperenormalised λ\lambda
(1,1,1)(1,1,1)20.300.8560.892
(0,1,1.05)(0,1,1.05)25.560.8050.896
(−5,5,20)(-5,5,20)20.160.8630.912
(3,−2,10)(3,-2,10)21.650.8610.945
(8,8,27)(8,8,27)22.150.8620.932

The window fit fits ln⁡∣A−B∣\ln|A - B| between gap 100 δ0100\,\delta_0 and gap 11; a gap δ0eλt\delta_0e^{\lambda t} has ln⁡\ln growing with slope λ\lambda, the largest Lyapunov exponent. Five fits give 0.8050.805 to 0.8630.863, mean 0.8490.849. Renormalisation (Benettin; the exercise) rescales the gap to 10−810^{-8} every 0.50.5 time units and averages ln⁡(gap/δ0)\ln(\text{gap}/\delta_0) per unit time, covering 100100 time units rather than about 1515: 0.8920.892 to 0.9450.945, mean 0.9150.915 (sim: pick the start). The literature value is 0.90560.9056 (from memory). My estimate is λ≈0.92±0.03\lambda \approx 0.92 \pm 0.03 (mean and half-range over starts); the single-pair fits sit about 6%6\% low and I did not isolate why. The exponent is an average of a local expansion rate that fluctuates along the orbit, and a 1515-unit window averages it poorly, so the 100100-unit renormalised numbers cluster more tightly. A gap multiplies by ee every 1/λ≈1.11/\lambda \approx 1.1 time units.

Prediction horizon: the price of accuracy

If the gap is δ0eλt\delta_0 e^{\lambda t} and a forecast is useless once the error reaches Δ\Delta, then Tpred≈λ−1ln⁡(Δ/δ0)T_{\mathrm{pred}} \approx \lambda^{-1}\ln(\Delta/\delta_0). Lab block B (Δ=1\Delta = 1, same starts; formula with λ=0.9056\lambda = 0.9056):

initial error δ0\delta_0measured TpredT_{\mathrm{pred}}, five startsmeanformula
10−410^{-4}7.53, 13.12, 10.28, 11.29, 10.4210.5310.17
10−810^{-8}20.30, 25.56, 20.16, 21.65, 22.1521.9620.34
10−1210^{-12}30.16, 34.70, 30.02, 30.76, 33.2931.7830.51

The measured means sit above the formula by 0.40.4 to 1.61.6 time units, inside the spread across starts: a rule of thumb, not a prediction for one run. The lesson is the shape: each factor 10410^4 of accuracy adds λ−1ln⁡104=10.17\lambda^{-1}\ln 10^4 = 10.17 time units (measured mean gains 11.411.4 and 9.89.8). Accuracy buys additive time. A hundred-million-fold better start, 10−410^{-4} to 10−1210^{-12}, only triples the horizon.

Numerical honesty: whose trajectory is right?

Rounding error is an initial-condition error. RK4 with h=0.01h = 0.01 and with h=0.005h = 0.005 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 11): RK4 h=0.01h = 0.01 against h=0.005h = 0.005 at t=7.69,12.89,11.84t = 7.69, 12.89, 11.84 for the first three starts; h=0.005h = 0.005 against RK45 (rtol 10−910^{-9}, 4.4 Adaptive Step Size & RK45) at 12.77,16.76,15.0312.77, 16.76, 15.03. The sim’s “step-size experiment” (five starts): h=0.01h = 0.01 against 0.0050.005 at a mean 11.2411.24 (7.697.69 to 12.8912.89), h=0.005h = 0.005 against 0.00250.0025 at a mean 14.8214.82 (12.7612.76 to 16.7516.75). Halving hh cuts RK4’s error by 24=162^4 = 16 (4.3 Runge–Kutta Methods & Butcher Tableaux) and ln⁡16/0.9056=3.06\ln 16/0.9056 = 3.06 time units, against a measured 14.82−11.24=3.5814.82 - 11.24 = 3.58: the horizon grows with the logarithm of accuracy. Past about t=12t = 12 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 22.8322.83 in magnitude, and RK4’s real-axis limit 2.7852.785 (from that lesson) allows h≈0.12h \approx 0.12 there, so these gaps are truncation error amplified by chaos, not instability.

Block C adds 10−1510^{-15} to the starting xx (about a rounding error). Two starts return the identical T∗T^*, two shift by 0.010.01 to 0.020.02, one moves from 20.1620.16 to 18.7818.78. The mechanism is the exponent: the 20-unit run-in multiplies a difference by e0.9056⋅20=7.3×107e^{0.9056\cdot20} = 7.3\times10^{7}, so 10−1610^{-16} becomes 7×10−97\times10^{-9} where the twins start, the size of δ0\delta_0. 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 T∗T^* 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, h=0.02,0.01,0.005h = 0.02, 0.01, 0.005, length 40004000 each (sim “attractor statistics”): the fraction of time with x>0x \gt 0 lies in 0.4840.484 to 0.5110.511 and the mean zz in 23.5223.52 to 23.5623.56, with no trend in hh. The second lab, length 500500, shows the cost of a shorter run: 0.4630.463 to 0.5270.527 and 23.5623.56 to 23.6423.64. 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 z=ρ−1=27z = \rho - 1 = 27 and keep upward crossings. In T=2000T = 2000 there are 26602660 (sim, “section”), 1.331.33 per time unit, almost on a line: y=1.389 x+0.016y = 1.389\,x + 0.016, correlation 0.99830.9983. The attractor is so thin that the section is nearly one-dimensional.

Lorenz’s own picture: plot each maximum zn+1z_{n+1} of zz against the previous one znz_n. In T=2000T = 2000 there are 26612661 maxima, between 30.2530.25 and 47.0347.03 (about 0.750.75 time units apart), on a thin one-humped curve, a unimodal map: the highest next maximum, 47.0347.03, follows zn=38.55z_n = 38.55. Lines fitted on each side of the apex have slopes +1.670+1.670 and −1.722-1.722 (sim) and +1.614+1.614 and −1.733-1.733 (lab, T=500T = 500, 669669 maxima). Both exceed 1 in absolute value: an error in one maximum is stretched by at least about 1.61.6 at the next, the exponent seen one lap at a time, and the fold at the apex (the map comes back down) keeps znz_n bounded.

The logistic map: period doubling and Feigenbaum

Take xn+1=r xn(1−xn)x_{n+1} = r\,x_n(1 - x_n) on [0,1][0,1]. For 1<r<31 \lt r \lt 3 the fixed point x∗=1−1/rx^* = 1 - 1/r is stable (f′(x∗)=2−rf'(x^*) = 2 - r). At r=3r = 3, f′=−1f' = -1 and orbits alternate between two values, a 2-cycle x1,x2x_1, x_2 with x1+x2=(r+1)/rx_1 + x_2 = (r+1)/r and x1x2=(r+1)/r2x_1x_2 = (r+1)/r^2, whose multiplier is

f′(x1)f′(x2)=r2(1−2x1)(1−2x2)=4+2r−r2.f'(x_1) f'(x_2) = r^2(1 - 2x_1)(1 - 2x_2) = 4 + 2r - r^2 .

It reaches −1-1 at r2−2r−5=0r^2 - 2r - 5 = 0, r=1+6=3.44949r = 1 + \sqrt 6 = 3.44949: 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 pp-cycle plus bisection on rr until its multiplier is −1-1:

r0=3,  r1=3.44949,  r2=3.54409,  r3=3.56441,  r4=3.56876,  r5=3.56969,  r6=3.56989.r_0 = 3,\ \ r_1 = 3.44949,\ \ r_2 = 3.54409,\ \ r_3 = 3.56441,\ \ r_4 = 3.56876,\ \ r_5 = 3.56969,\ \ r_6 = 3.56989 .

The ratios δk=(rk−rk−1)/(rk+1−rk)\delta_k = (r_k - r_{k-1})/(r_{k+1} - r_k) are 4.7514, 4.6563, 4.6682, 4.6687, 4.66914.7514,\ 4.6563,\ 4.6682,\ 4.6687,\ 4.6691, approaching the Feigenbaum constant 4.6692…4.6692\ldots (universal for smooth unimodal maps; from memory). The fifth is 0.0015%0.0015\% from it, and the geometric-tail extrapolation of the accumulation point is 3.569953.56995 (from memory, 3.56994563.5699456). Beyond lies chaos with periodic windows: the sim finds period 33 at r=3.83r = 3.83 (the tangent bifurcation 1+8=3.82841 + \sqrt 8 = 3.8284 is from memory) and no period up to 6464 at 3.93.9.

The Lyapunov exponent of a map is λ=⟨ln⁡∣f′(x)∣⟩=⟨ln⁡∣r(1−2x)∣⟩\lambda = \langle\ln|f'(x)|\rangle = \langle\ln|r(1 - 2x)|\rangle along an orbit, the same average of log-stretching. Over 10510^5 iterations from x0=0.3x_0 = 0.3: −0.2231-0.2231 (r=2.8r = 2.8), −0.9163-0.9163 (3.23.2), −0.8725-0.8725 (3.53.5, a 4-cycle), −0.0037-0.0037 (3.56993.5699, just below the accumulation point), +0.3538+0.3538 (3.73.7), −0.3697-0.3697 (3.833.83, the window), +0.4949+0.4949 (3.93.9), and +0.6931+0.6931 at r=4r = 4, equal to ln⁡2=0.6931\ln 2 = 0.6931 (derived in Problem 3). Positive means chaos, negative a stable cycle. Chaos is stretch and fold: stretching alone leaves [0,1][0,1], folding alone gives order, together they keep orbits bounded while separating neighbours.

Try it

◆ Interactive Lorenz attractor with twin trajectories, the divergence plot with fitted slope, the Lorenz map and the z = rho - 1 section; rho, d0, run-in and start sliders

Loading simulation…

What to try. (1) Defaults: the green fit sits on the gap curve and the red dotted line marks T∗T^*. (2) δ0=10−12\delta_0 = 10^{-12} and 10−410^{-4}: the line slides but keeps its slope; compare the horizons with the formula. (3) ρ=13\rho = 13, run-in 00: both runs spiral into C±C_\pm, the gap decays and the exponent is −0.451-0.451 against the Jacobian’s −0.4409-0.4409. (4) ρ=24\rho = 24: a long chaotic transient with exponent +0.707+0.707 (from memory: transient chaos below 24.0624.06). (5) The two experiment buttons. (6) The lower panel: map or section.

◆ Interactive Logistic map: bifurcation diagram, Lyapunov exponent against r, cobweb, and the period doublings with their ratios

Loading simulation…

What to try. The buttons r=2.8,3.2,3.5,3.83,3.9,4r = 2.8, 3.2, 3.5, 3.83, 3.9, 4 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

🐍 PythonLab: twin runs, fitted slope, prediction horizon, a 1e-15 nudge, and RK4 against RK45 (blocks A to D)
⌘/Ctrl + Enter
🐍 PythonLab: attractor statistics for two step sizes, and the Lorenz map (blocks A and B)
⌘/Ctrl + Enter
🐍 PythonLab: Lyapunov exponents of the logistic map and the period-doubling points with Feigenbaum's ratio
⌘/Ctrl + Enter

Now build the estimator yourself. You get the integrator; write the renormalisation loop.

🧪 Coding exerciseExercise: estimate the largest Lyapunov exponent of the Lorenz system by renormalisation
⌘/Ctrl + Enter

Concept checks

✅ Concept check

At $\rho = 28$ the eigenvalues at $C_+$ are $-13.8546$ and $0.0940 \pm 10.1945\,i$. What must the three eigenvalues sum to, at every equilibrium and every $\rho$?

✅ Concept check

With $\lambda = 0.9056$ and $\Delta = 1$, how many time units does a $10^4$-fold more accurate initial state buy?

✅ Concept check

RK4 with $h = 0.01$ and $h = 0.005$ from the same point on the attractor part ways after about $t = 11$. What should a simulator of a chaotic flow conclude?

✅ Concept check

The logistic map has Lyapunov exponent $-0.3697$ at $r = 3.83$ but positive values at $3.7$ and $3.9$. What is happening at $3.83$?

Problems

✏️ Pen & paperEquilibria and the characteristic polynomial●○○

For σ=10\sigma = 10, β=8/3\beta = 8/3, ρ=28\rho = 28 find C+C_+ and the coefficients of the characteristic polynomial of its Jacobian. Check that −13.8546-13.8546 is a root.

Show worked solution

β(ρ−1)=83⋅27=72\beta(\rho - 1) = \tfrac83\cdot27 = 72, so C+=(72,72,27)=(8.4853,8.4853,27)C_+ = (\sqrt{72}, \sqrt{72}, 27) = (8.4853, 8.4853, 27). The polynomial is λ3+aλ2+bλ+c\lambda^3 + a\lambda^2 + b\lambda + c with a=σ+β+1=13.6667a = \sigma+\beta+1 = 13.6667, b=β(σ+ρ)=83⋅38=101.3333b = \beta(\sigma+\rho) = \tfrac83\cdot38 = 101.3333 and c=2σβ(ρ−1)=1440c = 2\sigma\beta(\rho-1) = 1440. At λ=−13.8546\lambda = -13.8546: −2659.4+2623.4−1404.0+1440≈0-2659.4 + 2623.4 - 1404.0 + 1440 \approx 0. Dividing by (λ+13.8546)(\lambda + 13.8546) leaves λ2−0.1879λ+103.94\lambda^2 - 0.1879\lambda + 103.94, with roots 0.0940±10.1945 i0.0940 \pm 10.1945\,i: an unstable spiral. (By-hand arithmetic; the sim prints the roots.)

✏️ Pen & paperThe Hopf threshold●●○

Derive ρH\rho_H from the condition that the characteristic polynomial has a root pair ±iω\pm i\omega, and compute ω\omega there.

Show worked solution

(λ+a)(λ2+ω2)=λ3+aλ2+ω2λ+aω2(\lambda + a)(\lambda^2 + \omega^2) = \lambda^3 + a\lambda^2 + \omega^2\lambda + a\omega^2, so ω2=b\omega^2 = b and c=abc = ab: 2σ(ρ−1)=(σ+β+1)(σ+ρ)2\sigma(\rho - 1) = (\sigma+\beta+1)(\sigma+\rho). Collecting ρ\rho: ρ(σ−β−1)=σ(σ+β+3)\rho(\sigma - \beta - 1) = \sigma(\sigma+\beta+3), so ρH=10⋅15.6667/6.3333=24.7368\rho_H = 10\cdot15.6667/6.3333 = 24.7368 (=470/19=470/19). Then ω2=83(10+24.7368)=92.632\omega^2 = \tfrac83(10 + 24.7368) = 92.632, ω=9.6245\omega = 9.6245 (the sim’s readout at ρH\rho_H), and the real root is −13.6667-13.6667.

✏️ Pen & paperThe 2-cycle and the exponent at r = 4●●●

(a) Show that the logistic 2-cycle has multiplier 4+2r−r24 + 2r - r^2 and find where it equals −1-1. (b) At r=4r = 4 put x=sin⁡2θx = \sin^2\theta, show the map is θ→2θ\theta \to 2\theta, and use ⟨ln⁡∣cos⁡φ∣⟩=−ln⁡2\langle \ln|\cos\varphi|\rangle = -\ln 2 (standard integral) to show λ=ln⁡2\lambda = \ln 2.

Show worked solution

(a) The 2-cycle solves r2x2−r(r+1)x+(r+1)=0r^2x^2 - r(r+1)x + (r+1) = 0, so x1+x2=(r+1)/rx_1 + x_2 = (r+1)/r and x1x2=(r+1)/r2x_1x_2 = (r+1)/r^2. The multiplier is r2(1−2(x1+x2)+4x1x2)=r2−2r(r+1)+4(r+1)=4+2r−r2r^2\big(1 - 2(x_1+x_2) + 4x_1x_2\big) = r^2 - 2r(r+1) + 4(r+1) = 4 + 2r - r^2. It equals −1-1 at r=1+6=3.44949r = 1 + \sqrt 6 = 3.44949, matching the bisection. (b) f(sin⁡2θ)=4sin⁡2θcos⁡2θ=sin⁡22θf(\sin^2\theta) = 4\sin^2\theta\cos^2\theta = \sin^2 2\theta, so θ→2θ\theta \to 2\theta, and f′=4cos⁡2θf' = 4\cos 2\theta. The invariant measure of doubling is uniform in θ\theta, so λ=⟨ln⁡∣4cos⁡2θ∣⟩=ln⁡4−ln⁡2=ln⁡2\lambda = \langle\ln|4\cos2\theta|\rangle = \ln 4 - \ln 2 = \ln 2. The lab measures 0.69310.6931.

Key Takeaways

  • Lorenz is a three-mode truncation of Rayleigh–Bénard convection (from memory), a model. At ρ=28\rho = 28 the origin is a saddle (11.827711.8277, −2.6667-2.6667, −22.8277-22.8277) and C±=(±8.4853,±8.4853,27)C_\pm = (\pm8.4853, \pm8.4853, 27) are unstable spirals (−13.8546-13.8546, 0.0940±10.1945 i0.0940 \pm 10.1945\,i); the Hopf threshold is ρH=24.7368\rho_H = 24.7368.
  • The divergence −13.6667-13.6667 shrinks volumes by 1.16×10−61.16\times10^{-6} per time unit: zero-volume attractor, dimension about 2.062.06 (from memory); VV bounds the orbits.
  • Twins 10−810^{-8} apart separate to 11 at T∗=20T^* = 20 to 2626 (mean 21.9621.96). Exponent: window fits 0.8050.805 to 0.8630.863, renormalisation 0.8920.892 to 0.9450.945 (mean 0.9150.915; literature 0.90560.9056): quote the spread.
  • Tpred≈λ−1ln⁡(Δ/δ0)T_{\mathrm{pred}} \approx \lambda^{-1}\ln(\Delta/\delta_0): 10.5,22.0,31.810.5, 22.0, 31.8 measured for 10−4,10−8,10−1210^{-4}, 10^{-8}, 10^{-12}; a 10410^4-fold better start adds about 1010 time units, so weather and turbulence use ensembles and statistics.
  • Step sizes and methods part ways at t≈8t \approx 8 to 1717, yet statistics agree (mean zz 23.5223.52 to 23.5623.56, fraction with x>0x \gt 0 0.4840.484 to 0.5110.511): ask a chaotic simulation for statistics, not trajectories.
  • The Lorenz map of zz maxima is unimodal with slopes +1.67+1.67, −1.72-1.72; the z=27z = 27 section is nearly a line.
  • Logistic map: doublings at 3,3.44949,3.54409,…3, 3.44949, 3.54409, \dots, ratios 4.7514→4.66914.7514 \to 4.6691 (4.66924.6692, from memory); exponent ln⁡2\ln 2 at r=4r = 4, negative in windows. A gateway, not a treatment.
Finished this lesson?

Mark it complete to track your progress (saved in this browser). Reading every section does this for you.

Where this leads

These later lessons build directly on this one: