BlogApple Vision Pro

Double pendulums and chaos: why a hair's difference changes everything

A double pendulum is chaotic, so two swings started a hair apart soon have nothing in common, even though the physics is exactly the same. Here is why, what a Lyapunov exponent measures, why weather forecasts run out at about two weeks, and how to watch it happen.

Many copies of a double pendulum in the Everdust engine, drawn as glowing translucent sheets of white, green and violet that fan apart across a black background

A double pendulum is chaotic: start two of them a hair apart and they swing together for a moment, then drift apart until they have nothing in common, even though both follow exactly the same laws of physics.

It is one of the simplest machines that does this. Hang one pendulum from the end of another, let it go from high up, and it whips, flips and tumbles in a way nobody can predict for long. Not because the physics is random, but because the future depends on the start more sharply than any measurement can match.

What is a double pendulum?

A double pendulum is two rods joined by a hinge: the top rod swings from a fixed pivot, and the bottom rod swings from the end of the top one. Its position at any moment is just two angles, one for each rod.

A single pendulum is the opposite of chaos. It swings back and forth on a steady beat, which is why pendulums ran clocks for centuries. Add the second hinge and each rod keeps shoving the other, trading speed and energy back and forth. That coupling is where the trouble starts.

Why does a tiny difference grow?

Take two double pendulums, identical in every way, and release them from angles that differ by a millionth of a degree. For a while you can't tell them apart. Then one flips over the top a moment before the other, and from then on their paths split completely.

This is called sensitive dependence on initial conditions, and it is a defining feature of chaos. The important word is deterministic. There is no randomness anywhere in the equations of a double pendulum. Run the same start twice, exactly, and you get exactly the same motion. What we can't do is know the start exactly: every measurement has some error, and in a chaotic system that error grows until it swamps everything else.

The meteorologist Edward Lorenz ran into this in the early 1960s. He restarted a weather simulation from numbers he had rounded to three decimal places, and the new run soon looked nothing like the old one. The rounding error had grown until it took over.

What is phase space?

To see chaos clearly, physicists use phase space, a map of every state a system can be in. For a double pendulum, a state is four numbers: the two angles and how fast each is changing. Each moment of the motion is one point in that four-dimensional space, and the motion traces a path through it.

Without friction, the pendulum's energy stays fixed, which confines the path to a slice of phase space. Slice that again and mark a dot each time the path crosses, and you get a Poincaré section. Regular motion leaves neat closed curves. Chaotic motion sprays dots across a whole region.

What is a Lyapunov exponent?

In a chaotic system, the gap between two nearby paths grows, on average, exponentially:

  • separation ≈ (starting separation) × e^(λt)

The number λ is the Lyapunov exponent. A positive λ means chaos. Its inverse, 1/λ, is the Lyapunov time: roughly how long it takes the gap to grow by a factor of e, about 2.7.

In 1992 Troy Shinbrot and colleagues measured this for a real double pendulum. In their experiment, uncertainties grew with λ = 7.5 ± 1.5 per second, and a computer model gave 7.9 ± 0.4 per second. Take 7.5: the Lyapunov time is about 0.13 seconds, so a small error grows about tenfold every 0.3 seconds.

That is why prediction horizons exist. The time you can predict for is roughly (1/λ) × ln(how much error you can tolerate ÷ how much you start with). The logarithm is the cruel part. Measuring the start a billion times more precisely buys only ln(1,000,000,000) ÷ 7.5, about 2.8 more seconds, for that pendulum. A bigger pendulum swings more slowly and its errors grow more slowly in seconds, but each extra digit of precision still buys the same small slice of time.

Is a double pendulum always chaotic?

No. It depends on the energy. Give it a small nudge and both rods sway gently in smooth, repeating patterns: at small angles, the motion is a mix of two simple swings, one with the rods moving together and one with them moving opposite. That is perfectly predictable.

Raise the energy and things change. In a 2006 numerical study, Tomasz Stachowiak and Toshio Okada used Poincaré sections and Lyapunov exponents to follow the double pendulum from its regular low-energy limit into chaos as the energy increased. Chaos is the high-energy behavior, the wild flips you see when the pendulum is dropped from near the top.

Who discovered chaos?

The first hints came from the sky. In the late 1880s Henri Poincaré studied the three-body problem, three masses pulling on each other by gravity, and found motion so tangled he couldn't draw it. Years later he wrote that "small differences in the initial conditions produce very great ones in the final phenomena." You can see that kind of breakup in Three-Body Ink, a gravity simulator that starts three orbs on a delicate figure-eight orbit and lets chaos take it apart.

In 1963 Lorenz published "Deterministic Nonperiodic Flow," three equations whose solutions never repeat yet stay on a two-winged shape, the strange attractor I wrote about in What is a strange attractor?. In 1972 he gave a talk titled "Predictability: Does the Flap of a Butterfly's Wings in Brazil Set off a Tornado in Texas?" The butterfly effect got its name.

Why do weather forecasts stop at about two weeks?

The atmosphere is chaotic too. In 2019, a study led by Fuqing Zhang used high-resolution global models, including that of the European Centre for Medium-Range Weather Forecasts, to test how far ahead day-to-day weather can be predicted. Today's practical limit is about 10 days. Even with nearly perfect starting data, the forecasts lost all skill at around two weeks, and cutting today's starting errors tenfold would add up to about five days at most.

That is the double pendulum's lesson at the scale of a planet. Better data and models help, but the logarithm sets a ceiling.

Watch it happen

Everdust, the universe simulator I make, has pendulum worlds on Apple Vision Pro built on exactly this idea. A fan of double pendulums is released from starts that differ by far less than you could ever measure. For a few seconds they swing as one white pendulum; then the exact physics amplifies that invisible difference and they fan out into a rainbow bloom, and the release starts again. The bloom plays in slow motion so you can follow it; the equations don't change.

New in Everdust 1.1 for Apple Vision Pro: 3D ribbon pendulums. Chaotic pendulums swing freely in three dimensions, neighboring strands are joined into ribbons of light that tear apart as chaos grows, and in Throw the Butterfly you can catch and throw one by hand. This is a render of that scene from our development build:

3D ribbon pendulums, in Everdust 1.1 for Apple Vision Pro: one white pendulum at first, then the copies tear apart into ribbons of color. Rendered from a development build, silent, with music response off; the opening is sped up and the bloom plays in slow motion.

If you want chaos in your browser today, the Strange Attractors world sends a cloud of particles around the Lorenz attractor and three others.

Questions people ask

Why is a double pendulum chaotic? Its two rods keep pushing on each other, so tiny differences in how it starts grow exponentially. Two double pendulums started a hair apart soon swing completely differently, even though the physics is identical and fully deterministic.

Is a double pendulum random? No. Its equations contain no randomness, and the same exact start always gives the same motion. It is unpredictable only because no real start can be known exactly.

What is a Lyapunov exponent? It measures how fast nearby paths separate in a chaotic system: the gap grows roughly as e to the power λt. One experiment measured about 7.5 per second for a double pendulum, so errors grew about tenfold every 0.3 seconds.

Is a double pendulum always chaotic? No. At low energy, with small swings, it moves in smooth, predictable patterns. Chaos appears as the energy rises.

What is the butterfly effect? It is the popular name for sensitive dependence on initial conditions, from Edward Lorenz's 1972 talk asking whether the flap of a butterfly's wings in Brazil could set off a tornado in Texas.

How far ahead can weather be predicted? About 10 days with today's forecasts. A 2019 study found that even near-perfect starting data would push the limit to only about two weeks.

Try it

Sources

  • Shinbrot, T., Grebogi, C., Wisdom, J. and Yorke, J. A., Chaos in a double pendulum, American Journal of Physics 60, 491–499 (1992).
  • Stachowiak, T. and Okada, T., A numerical analysis of chaos in the double pendulum, Chaos, Solitons & Fractals 29, 417–422 (2006).
  • Lorenz, E. N., Deterministic Nonperiodic Flow, Journal of the Atmospheric Sciences 20, 130–141 (1963).
  • Motter, A. E. and Campbell, D. K., Chaos at fifty, Physics Today 66(5), 27–33 (2013): on Poincaré, Lorenz's rounding discovery and his 1972 butterfly talk.
  • Poincaré, H., Science and Method (1908; English translation by F. Maitland, 1914).
  • Zhang, F. et al., What Is the Predictability Limit of Midlatitude Weather?, Journal of the Atmospheric Sciences 76, 1077–1091 (2019).
  • Strogatz, S. H., Nonlinear Dynamics and Chaos, 2nd edition, Westview Press (2015), chapter 9 (Lyapunov exponents and prediction horizons).