Double Pendulum and Chaos

UniversityPhysicsIdeal double pendulum, point masses on rigid massless rods, no friction, RK4 with a 1 ms step

Unlock this lab with a pass

A pass opens every simulation on the site, including Present mode for class. The teaching notes below stay free for everyone.

One-time payment, no subscription.

About this experiment

A double pendulum is one pendulum hanging from the end of another. Its equations of motion are completely deterministic, yet for large swings it is chaotic: two pendulums that start a millionth of a radian apart soon move in completely different ways. Run two copies side by side, watch their separation grow exponentially on a log scale, estimate the largest Lyapunov exponent from the slope, and compare with small swings, where the motion stays regular and predictable.

Learning goals

  • Derive or recognise the equations of motion of the double pendulum from the Lagrangian
  • Explain sensitive dependence on initial conditions and why it limits prediction
  • Estimate the largest Lyapunov exponent from the growth of the separation of two nearby trajectories
  • Distinguish regular motion at small amplitudes from chaotic motion at large amplitudes
  • Use energy conservation to judge the accuracy of a numerical integrator

How to use it

  1. 1Press Play with the default large swing. When can you first see the two pendulums separate? Read the time from the graph.
  2. 2Reset and choose Small swing. Play the full 40 s. How does the separation graph differ?
  3. 3Return to Large swing. Change k from 6 to 9 and then to 3. How much later or earlier does the separation reach 1 rad? Relate this to the Lyapunov estimate.
  4. 4Make the lower mass heavy (3 kg) and then light (0.2 kg). Does the motion become more or less chaotic?
  5. 5Check the largest energy error. Why is it a useful test that the numerical solution can be trusted, even when two runs disagree?
  6. 6Try Almost upside down. Explain what happens using the idea of an unstable equilibrium.

The model

Lagrangian with both angles measured from the downward vertical
Nearby trajectories separate exponentially; λ is the largest Lyapunov exponent
Prediction horizon: a thousand times better initial data only adds (ln 1000)/λ seconds

Assumptions

  • The masses are points, the rods are rigid and massless, and there is no friction or air resistance, so total energy is conserved.
  • The equations are integrated with the classical fourth-order Runge-Kutta method and a fixed 1 ms step. The same inputs always give the same motion.
  • The separation is measured in angle space as the distance between (θ₁, θ₂) of the two runs, with angles wrapped to ±π. It saturates once the runs are unrelated.
  • The Lyapunov estimate is a least squares fit of ln δ between 0.5 s and the moment δ reaches 0.1 rad. It is a rough, finite-time value, not the limit used in the formal definition.

Try this in class

  1. Q1If the motion is fully determined by the equations, in what sense is it unpredictable?
  2. Q2Why does the separation stop growing at about 1 to 3 rad?
  3. Q3The energy error is about 10⁻⁸ but the two runs disagree completely. Is the integrator wrong? Explain.
  4. Q4For small angles the double pendulum has two normal modes. Find starting angles that excite mostly one of them.
  5. Q5Weather forecasts lose accuracy after about two weeks. How is that related to this simulation?

Frequently asked questions

Is a real double pendulum chaotic too?

Yes. Real double pendulums made of bars rather than point masses show the same behaviour, although friction slowly drains the energy until the motion becomes regular again. Demonstrations in science museums are usually built this way.

Why not use a smaller step to make the prediction last longer?

Numerical errors grow at the same exponential rate as differences in initial conditions. A smaller step or a better integrator only adds a little time, just as measuring the starting angles more precisely does.

What is a Lyapunov exponent?

It measures how quickly nearby trajectories diverge. A positive value means chaos: the separation multiplies by e every 1/λ seconds. Regular motion has an exponent of zero.