SimuBoard App
Numerical Simulation

Double Pendulum and Chaos

Hero image for Double Pendulum and Chaos

Take a pendulum, and attach a second pendulum to the end of the first one. That’s it — that’s the entire setup. No exotic forces, no randomness injected anywhere, no unusual materials. And yet this simple mechanical system is one of the most famous examples of chaos in all of physics, capable of motion so unpredictable that two nearly identical starting positions produce wildly different outcomes within seconds.

Setting up the system

A double pendulum consists of a pendulum of length L1L_1 and mass m1m_1, with a second pendulum of length L2L_2 and mass m2m_2 hanging from its end. The state of the system at any moment is fully described by two angles, θ1\theta_1 and θ2\theta_2 (measured from vertical), and their angular velocities.

For a single pendulum, the equation of motion is comparatively tame — for small angles, it reduces to simple harmonic motion, exactly the same mathematical pattern as a mass on a spring. But the double pendulum couples two rotating bodies together, and the resulting equations of motion (typically derived via the Lagrangian method) are considerably messier:

(m1+m2)L1θ¨1+m2L2θ¨2cos⁡(θ1−θ2)+m2L2θ˙22sin⁡(θ1−θ2)+(m1+m2)gsin⁡θ1=0L2θ¨2+L1θ¨1cos⁡(θ1−θ2)−L1θ˙12sin⁡(θ1−θ2)+gsin⁡θ2=0\begin{aligned} (m_1 + m_2)L_1\ddot\theta_1 + m_2 L_2 \ddot\theta_2 \cos(\theta_1 - \theta_2) + m_2 L_2 \dot\theta_2^2 \sin(\theta_1-\theta_2) + (m_1+m_2)g\sin\theta_1 &= 0 \\ L_2 \ddot\theta_2 + L_1 \ddot\theta_1 \cos(\theta_1-\theta_2) - L_1\dot\theta_1^2 \sin(\theta_1-\theta_2) + g\sin\theta_2 &= 0 \end{aligned}

You don’t need to memorize these — the point is simply that θ¨1\ddot\theta_1 and θ¨2\ddot\theta_2 are tangled together through nonlinear trigonometric terms. There’s no known way to isolate and solve for θ1(t)\theta_1(t) and θ2(t)\theta_2(t) as clean formulas the way you can for a single pendulum’s small-angle approximation.

Image placeholder
Diagram of the double pendulum showing L1, L2, m1, m2, and the angles θ1 and θ2 measured from vertical

What “chaos” actually means

It’s tempting to hear “chaotic” and think “random,” but that’s exactly backwards. The double pendulum is completely deterministic: given exact initial angles and velocities, the equations above determine the entire future trajectory with total precision, forever. There’s no randomness anywhere in the model.

The catch is a property called sensitive dependence on initial conditions. Take two double pendulums, release them from angles that differ by an immeasurably small amount — say, one ten-billionth of a degree — and their trajectories start out essentially identical. But the tiny difference doesn’t stay tiny. It grows, and it grows exponentially:

δ(t)≈δ0 eλt\delta(t) \approx \delta_0 \, e^{\lambda t}

where δ0\delta_0 is the initial (minuscule) difference and λ\lambda is the Lyapunov exponent — a positive number for chaotic systems. Because the growth is exponential rather than linear, the difference goes from immeasurably small to completely dominant surprisingly quickly. This is the real definition of chaos: not randomness, but unpredictability born from perfect determinism plus exponential sensitivity.

GIF placeholder
Two double pendulums released a fraction of a degree apart, tracking together at first and then diverging completely within a few swings

Why this matters beyond the pendulum

This isn’t just a curiosity about swinging arms — it’s the same underlying phenomenon behind why weather forecasts become unreliable after about a week, no matter how powerful the computer running the simulation. Edward Lorenz, who effectively founded modern chaos theory, discovered this while running a toy weather model in the 1960s: rounding a single number in his initial conditions from 0.506127 to 0.506 produced a completely different simulated weather pattern within a simulated month.

The double pendulum is popular precisely because it makes this same phenomenon visible and mechanical, using nothing more exotic than gravity and two rigid arms. It’s chaos you can build on a desk.

Simulating it numerically

Because there’s no closed-form solution, the only way to actually compute a double pendulum’s trajectory is numerical integration — advancing the state forward in small time steps using the equations of motion. A basic (if numerically crude) approach using Euler integration looks like this:

function step(state, dt, g, L1, L2, m1, m2) {
  const { theta1, theta2, omega1, omega2 } = state;

  // Compute angular accelerations from the coupled equations of motion
  const alpha1 = /* ...derived from the Lagrangian equations above... */ 0;
  const alpha2 = /* ... */ 0;

  return {
    theta1: theta1 + omega1 * dt,
    theta2: theta2 + omega2 * dt,
    omega1: omega1 + alpha1 * dt,
    omega2: omega2 + alpha2 * dt,
  };
}

In practice, physics engines use more accurate integrators (like Runge-Kutta 4 or semi-implicit Euler) because naive Euler integration accumulates energy error over time — a chaotic system will happily amplify small numerical errors just as readily as it amplifies small initial-condition errors, so integrator quality actually matters more here than in well-behaved, non-chaotic systems.

Watch sensitivity to initial conditions directly: the double pendulum’s chaos is far more convincing to watch than to read about. SimuBoard’s mechanical engine simulates the full nonlinear dynamics in real time on an infinite whiteboard — drop two nearly-identical double pendulums side by side, nudge one by a fraction of a degree, and watch their paths diverge within a few swings.

The takeaway

The double pendulum is a reminder that “simple system” and “predictable system” are not the same thing. Two rigid arms and gravity are enough to produce genuinely chaotic behavior — deterministic in principle, yet practically unpredictable beyond a short time horizon. That gap between deterministic laws and long-term predictability turns out to be one of the deepest and most consequential ideas in all of physics, showing up again in fluid turbulence, population dynamics, and yes, the weather.

Frequently asked questions

Is the double pendulum's motion truly random?

No — it's deterministic, not random. Given exact initial conditions, its future is completely determined by the same equations of motion every time. What makes it chaotic isn't randomness, it's extreme sensitivity to those initial conditions: any imperfection in specifying them, however tiny, grows exponentially and eventually dominates the outcome.

Why can't the double pendulum be solved with a simple formula?

Its equations of motion are coupled, nonlinear second-order differential equations with no known closed-form (analytic) solution. Unlike the single pendulum, which can be approximated by simple harmonic motion for small angles, the double pendulum's coupling between the two arms makes that kind of simplification impossible in general.

What is the Lyapunov exponent?

It's a number that measures how fast two nearby trajectories in a dynamical system diverge over time — typically exponentially, as e^(λt). A positive Lyapunov exponent (λ > 0) is one of the standard mathematical signatures of chaos, and the double pendulum has one across most of its energy range.

Does chaos mean the system violates physical laws?

Not at all — chaotic systems still obey Newton's laws and energy conservation exactly. Chaos is about predictability, not about physics breaking down. The equations are perfectly deterministic; it's just that tiny, unavoidable uncertainty in the starting conditions makes long-term prediction practically impossible, even though the underlying laws are exact.