Logistic Map Bifurcation Diagram

Zoom into the logistic map’s period-doubling cascade and period-3 window. The Lyapunov exponent below the diagram distinguishes chaos from stable cycles. Choose a preset, inspect r, or drag a box to explore.

One equation, four different outcomes

Choose each example, then compare the time series and the gap between two orbits below. Every example starts at 0.2; only r changes.

Miniature plots show 40 values after 100 iterations. In the bifurcation diagram below, the horizontal axis is r and the vertical axis is long-run x. One, two or three branches show how many values repeat.

3.9000

Drag a box on the diagram to zoom. Click to move the inspected r. The strip underneath is the Lyapunov exponent λ(r): red where it is positive (chaos), blue where negative (a stable cycle).

λ at this r (100 000 steps)—
Attractor—
Twin orbits: steps to Δ > 0.1—
Short fit vs long run—

Two orbits started 10⁻⁸ apart, |Δ| on a log scale. The dashed line is the least-squares fit over the first 60 steps — through the points between 10⁻⁸ and 0.1 when the gap grows, through every point above 10⁻¹⁴ when it shrinks — the same way the experiment measured it. Its slope is the “empirical” rate; the λ in the box above is the long-run average.

What is on the screen

One line of arithmetic, x → r x (1 − x), iterated. For each value of r across the width of the picture the map is run from x₀, the first few hundred iterates are thrown away, and the next few hundred are plotted as dots. Where the orbit settles to a fixed point you see one line; where it alternates between two values, two lines; and where it never settles, a smear that fills a whole band.

The strip underneath is what makes that smear legible. The Lyapunov exponent λ(r) = ⟨ln |r (1 − 2x)|⟩ is the average rate at which a tiny error grows per step. Negative means nearby orbits pull together — that is a stable cycle, however long its period. Positive means they push apart exponentially — chaos, by definition. Every place the red touches zero from above is a window of order opening inside the chaos.

Zoom into the period-3 window

At r ≈ 3.8284 a stable 3-cycle appears out of nowhere, and λ drops sharply below zero. Zoom into the lowest of its three branches and you find the entire diagram again in miniature: the branch splits into 2, 4, 8, and dissolves into chaos, with its own tiny windows inside. There is no bottom to this. (Period 3 is also the case in Li and Yorke’s 1975 theorem, “period three implies chaos”: once a period-3 orbit exists, orbits of every period exist too.)

Measuring Feigenbaum’s constant

The doublings happen at r₁ = 3, r₂ = 3.4495, r₃ = 3.5441, … and the gaps between them shrink by a fixed ratio that tends to δ = 4.6692…. That number is universal — the same for any map with a quadratic maximum — which is why it is worth measuring rather than quoting. The button above does it from the superstable parameters instead of the bifurcation points, because they are easier to find precisely: they are the values of r where x = ½ is itself on the cycle, found by scanning for a sign change of f(2ᵏ)(½) − ½ and bisecting. The first one, R₂ = 1 + √5, you can check by hand; the ratios of successive gaps head for 4.669 in five steps.

The two-orbit experiment

The right-hand panel repeats the measurement from the write-up this tool grew out of. Two orbits are started at x₀ and x₀ + 10⁻⁸ and their separation is plotted on a log scale. At r = 3.9 the gap first exceeds 0.1 at step 29 — ten million times the initial difference — and then saturates because x cannot leave [0, 1]. At r = 2.8 the same 10⁻⁸ gap shrinks by a constant factor every step, falls through 10⁻¹⁰ in about 20 steps, and reaches the double-precision floor of 2.2 × 10⁻¹⁶ around step 80.

The instructive part is the slope. A straight-line fit through the first 36 usable points at r = 3.9 gives 0.284 per step; the long-run Lyapunov exponent over 100 000 steps is 0.498. They differ by almost a factor of two because chaotic stretching is bursty: between steps 5 and 6 the gap actually shrinks, from 2.84 × 10⁻⁷ to 1.46 × 10⁻⁷. The exponent is an average over many such local expansions and contractions, and a 60-step sample simply is not long enough to average them out. At r = 2.8 there is no burstiness — the fixed point x* = 1 − 1/r = 0.643 has derivative r(1 − 2x*) = 2 − r = −0.8 — so the short fit (−0.226) and the long run (−0.223 = ln 0.8) agree.

So the butterfly effect is not a property of the equation. It is a property of where the equation is being run. Move the slider from 3.9 to 2.8 and the same 10⁻⁸ goes from exploding to evaporating; the strip underneath the diagram tells you in advance which will happen.

Reading it honestly

What will you try next?

Share this tool

Part of Shake AI Lab — interactive experiments in mathematics and machine learning. · More tools · 日本語の解説記事