From one joint to three
A single pendulum is one of the most predictable systems in physics: for small swings it is exactly periodic, and even at large amplitude its motion stays confined to a simple, well-understood orbit in phase space. Add a second rigid link and the system, the well-known double pendulum, already becomes chaotic once it swings energetically enough. Add a third link — three rigid rods joined by frictionless pivots, each carrying its own mass, all swinging under gravity in a vertical plane — and the chaos does not just continue, it intensifies dramatically.
The reason is dimensionality. The double pendulum's state is described by two angles and their two angular velocities, a four-dimensional phase space. The triple pendulum needs three angles and three angular velocities — six dimensions — and every one of the extra directions gives energy another channel to slosh between the links. More coupling terms, more ways for a small disturbance to grow, and a system that scrambles an observer's certainty about its future far faster than its two-link cousin.
Deriving the motion: a dense, angle-dependent mass matrix
There is no closed-form solution for a triple pendulum's trajectory. It is built from Lagrangian mechanics: write the kinetic energy of every mass as a function of all three joint angles and their rates (each mass's position depends on the whole chain above it, so the velocities appear multiplied together with cos and sin terms of the angle differences), write the potential energy from each mass's height, and apply the Euler-Lagrange equations. The result is three coupled, nonlinear, second-order differential equations that are cleanest written in matrix form.
M(θ) · θ'' = F(θ, θ') θ'' = M(θ)⁻¹ · F(θ, θ') // M is a dense 3×3 matrix that changes with the current angles — // every joint's acceleration depends on the state of all three links
Every simulation step re-evaluates that mass matrix at the current configuration and inverts it to get the three angular accelerations. There is nothing exotic about the algebra, but the density of the coupling — every entry of the inverse depends on every angle — is exactly what makes the system's behaviour so hard to anticipate by intuition alone.
Why three beats two: a bigger Lyapunov exponent
Chaos is not just "complicated motion" — it has a number attached to it. The largest Lyapunov exponent, λ, measures how fast two initially close trajectories separate: a tiny initial difference δ(0) grows roughly as δ(0)·e^(λt). For an energetically-swinging double pendulum, λ is typically a few per second, giving a predictability horizon of a couple of seconds. The triple pendulum's extra coupling terms roughly double the largest Lyapunov exponent for a comparable amount of energy, so the same initial uncertainty blows up to a full-scale, unrecognisable difference in swing pattern in a fraction of the time.
t_horizon ≈ (1 / λ) · ln(Δ_max / Δ0) // Δ0 = initial uncertainty, Δ_max = the largest error you can tolerate // doubling λ roughly halves how long your prediction stays useful
Why the integrator has to be trustworthy here
A companion article on this site, Verlet, Leapfrog & RK4, goes through the general trade-offs between numerical integrators. For a chaotic system like this one, the choice matters in a specific and slightly unnerving way: a crude, low-order integrator introduces its own numerical error every step, and in a chaotic system that error gets amplified exponentially by the same mechanism that amplifies real physical perturbations. A coarse scheme does not just make the simulation slightly wrong — past the predictability horizon it can quietly generate an entirely different, purely artificial chaotic trajectory that has nothing to do with the true physics. That is why this simulation integrates with classical fourth-order Runge-Kutta at a small, fixed time step, and why plotting total mechanical energy over a run is a cheap, effective sanity check: for an undamped, conservative system the energy should stay essentially flat, and any steady drift is a sign the numerics, not the physics, have taken over.
What five nearly identical launches show
The clearest way to see sensitive dependence is not a formula but a picture: launch five copies of the same triple pendulum, differing in their very first angle by as little as 0.0001 radians, and trace each with its own colour. For a moment all five trails lie on top of each other, because the divergence starts from almost nothing. Then, exactly as the exponential growth law predicts, they visibly peel apart, and within a handful of swings the five pendulums are in completely different configurations — even though every one of them is following exactly the same deterministic equations from an almost identical start. That gap between full determinism and practical unpredictability is the entire content of chaos theory, and the triple pendulum makes it vivid enough to watch happen in real time.
Frequently asked questions
Is the triple pendulum's motion actually random?
No. It is completely deterministic, governed by Newton's laws with no randomness anywhere in the equations. The apparent unpredictability comes from exponential sensitivity to initial conditions, not from any random process.
Why does a third arm make it so much more chaotic than the double pendulum?
Each extra joint adds two more phase-space dimensions and more nonlinear coupling terms to the equations of motion, giving energy more channels to slosh between links. The largest Lyapunov exponent, which sets the rate of divergence, grows accordingly for comparable energy.
Why not just use a simple integrator like Euler for a fun demo?
An inaccurate integrator introduces its own numerical error, and in a chaotic system that error gets amplified exponentially just like a real perturbation would. A low-order method can quickly diverge into a trajectory that has nothing to do with the true physical solution, which is why RK4 with a small time step is used here, with the total energy plotted as a cheap sanity check.
Try it live
Everything above runs in your browser — open Triple Pendulum and change the parameters while it is running. Nothing is installed, nothing is uploaded, the whole model lives in one tab.
▶ Open Triple Pendulum simulation