Double Pendulum


Introduction

A double pendulum is one of the simplest physical systems that exhibits chaos. It consists of a first pendulum arm hanging from a fixed pivot, with a second pendulum arm hanging from the end of the first. Under gravity, this arrangement produces motion that is extraordinarily sensitive to its starting conditions — two double pendulums released from positions that differ by even a fraction of a degree will, within seconds, trace out completely different paths. This behaviour is not the result of randomness or noise; it is a deterministic consequence of the nonlinear equations that govern the system. The double pendulum sits at the crossroads of classical mechanics, oscillation theory, and chaos theory, making it one of the most instructive and visually striking systems in all of physics.


The Physics Explained

A simple single pendulum swings back and forth in a regular, repeating pattern. For small angles the motion is nearly sinusoidal, and the period depends only on the length of the arm and the strength of gravity — not on the mass or the amplitude. This is why pendulums were used in clocks for centuries. The single pendulum is a well-behaved, predictable oscillator.

The double pendulum breaks that predictability. Because the second arm is attached to a moving point rather than a fixed pivot, the two arms interact with each other through their mutual forces. The motion of the upper arm changes the effective gravity experienced by the lower arm, and the swinging of the lower arm pulls back on the upper arm through tension in the connecting rod. These interactions are nonlinear — the forces depend on the angles in a way that cannot be simplified into a clean proportional relationship — and it is this nonlinearity that produces chaos.

The correct framework for analysing the double pendulum is Lagrangian mechanics, a reformulation of Newtonian mechanics that works in terms of energy rather than forces. Instead of resolving all the tensions and reactions at the pivot points, we write down the total kinetic energy and the total potential energy of the system, then apply a mathematical procedure called the Euler-Lagrange equations to derive the equations of motion. The result is a pair of coupled, nonlinear, second-order differential equations — one for each angle. These equations have no closed-form analytical solution; to find how the angles change over time, they must be integrated numerically.

Chaos in the double pendulum means that tiny differences in initial conditions grow exponentially over time, a property quantified by the Lyapunov exponent. If two double pendulums start with angles that differ by a tiny amount, the difference between their trajectories grows roughly as e raised to the power of the Lyapunov exponent multiplied by time. This exponential divergence is the mathematical signature of chaos, and it places an absolute limit on how far into the future the motion can be predicted in practice. Despite this, the system conserves energy perfectly — no chaos here means randomness in energy, only in trajectory.

For small oscillations about the downward equilibrium position, the nonlinear terms are negligible and the system behaves like two coupled linear oscillators. In this regime there are two normal modes: one in which both arms swing in the same direction at the same frequency, and one in which the arms swing in opposite directions at a higher frequency. As the amplitude grows, the nonlinear terms kick in and the motion transitions from regular oscillation to chaos.


Key Equations

Angle of upper arm from vertical theta1 — measured in radians from the downward vertical
Angle of lower arm from vertical theta2 — measured in radians from the downward vertical
Total kinetic energy KE = (1/2)(m1 + m2)*L1^2*theta1_dot^2 + (1/2)*m2*L2^2*theta2_dot^2 + m2*L1*L2*theta1_dot*theta2_dot*cos(theta1 - theta2)
Total potential energy PE = -(m1 + m2)*g*L1*cos(theta1) - m2*g*L2*cos(theta2)
Equation of motion for upper arm (from Euler-Lagrange) (m1 + m2)*L1*theta1_ddot + m2*L2*theta2_ddot*cos(theta1 - theta2) + m2*L2*theta2_dot^2*sin(theta1 - theta2) + (m1 + m2)*g*sin(theta1) = 0
Equation of motion for lower arm (from Euler-Lagrange) m2*L2*theta2_ddot + m2*L1*theta1_ddot*cos(theta1 - theta2) - m2*L1*theta1_dot^2*sin(theta1 - theta2) + m2*g*sin(theta2) = 0
Conservation of total mechanical energy E = KE + PE = constant (no friction or air resistance)
Exponential divergence of nearby trajectories (chaos) |delta(t)| is approximately |delta(0)| * e^(lambda * t), where lambda is the Lyapunov exponent

Key Variables

Symbol Unit Description
theta1radAngle of the upper arm measured from the downward vertical
theta2radAngle of the lower arm measured from the downward vertical
theta1_dotrad/sAngular velocity of the upper arm
theta2_dotrad/sAngular velocity of the lower arm
theta1_ddotrad/s^2Angular acceleration of the upper arm
theta2_ddotrad/s^2Angular acceleration of the lower arm
m1kgMass of the bob at the end of the upper arm
m2kgMass of the bob at the end of the lower arm
L1mLength of the upper arm
L2mLength of the lower arm
gm/s^2Acceleration due to gravity (9.81 m/s^2 at Earth's surface)
KEJTotal kinetic energy of both arms and bobs
PEJTotal gravitational potential energy of both bobs
EJTotal mechanical energy; conserved throughout the motion
lambda1/sLyapunov exponent; measures the rate of divergence of nearby trajectories

Real World Examples


How the Simulation Works

The simulation lets you set the length and mass of each arm using sliders, and choose the starting angles of both the upper and lower arms. When you press the play button, the simulation integrates the two coupled equations of motion forward in time using a fourth-order Runge-Kutta numerical integration scheme. This method estimates the rate of change of all four state variables — theta1, theta2, theta1_dot, and theta2_dot — at several intermediate points within each time step, then combines those estimates to produce a highly accurate update. The step size is kept small enough that the total energy of the system remains very nearly constant throughout the run, confirming that the integration is accurate.

The positions of the two bobs are computed from the angles using standard trigonometry: the upper bob sits at (L1*sin(theta1), -L1*cos(theta1)) relative to the pivot, and the lower bob sits at that position plus (L2*sin(theta2), -L2*cos(theta2)). These coordinates are drawn to the canvas on every frame, with an optional trail showing the path traced by the lower bob. The trail makes the chaotic, space-filling nature of the trajectory immediately visible.

To demonstrate chaos directly, a second ghost pendulum can be enabled. This second pendulum starts with an initial angle that differs from the first by a very small amount — far less than anything visible on screen at the start. You can watch as the two pendulums quickly diverge and begin tracing entirely different paths, illustrating sensitive dependence on initial conditions without any hand-waving. The energy readout confirms that both pendulums conserve their total mechanical energy throughout, showing that chaos and energy conservation coexist in this deterministic system.


Further Reading