BTP-04 SHEET 04 / 08 / JUL 2026

Double Pendulum

Deriving the equations of motion from the Euler–Lagrange equation and simulating chaos in Python.

STATUS
EOM:LAGRANGE
SOLVER:NUMERIC
TIME-TO-FLIP ACROSS INITIAL CONDITIONS / FRACTAL STRUCTURE
GENERAL VIEW / TIME-TO-FLIP ACROSS INITIAL CONDITIONS / FRACTAL STRUCTURE NTS

Overview

The double pendulum is one of the simplest systems that produces chaos. I derived its equations of motion from the Euler–Lagrange equation and solved the resulting non-linear ODEs numerically in Python to explore how chaotic it really is.

Time-to-flip fractal

This plot maps every starting position of both pendulums against how long it takes the second pendulum to flip over. The result is a fractal, a signature of chaos. The black region marks starting positions without enough energy for the second pendulum to ever flip.

Sensitivity to initial conditions

I ran 200 simulations with initial angles varying by one billionth of a radian. The trajectories stay synchronized for roughly 40–45 seconds, then diverge completely. By 60 seconds the system is fully chaotic.

To put into perspective how small 1e-9 rad is, if you shined two lasers at the moon seperated by 1e-9 rad, the distance between them would be just over a foot.

200 RUNS, Δθ₀ = 1e-9 RAD / DIVERGENCE OVER TIME
200 RUNS, Δθ₀ = 1e-9 RAD / DIVERGENCE OVER TIME

Method

EULER–LAGRANGE DERIVATION, TYPESET IN LATEX
EULER–LAGRANGE DERIVATION, TYPESET IN LATEX
  • Derived the equations of motion with Lagrangian mechanics (full derivation typeset in LaTeX)
  • Solved the coupled non-linear ODEs numerically in Python
  • Swept initial conditions to map flip times and divergence behavior
TOOLS & METHODS
PythonLagrangian MechanicsODEsLaTeXLinear Algebra
DRAWN BY
DIMENSIONS IN MM / TOLERANCES ±0.5 UNLESS NOTED / DO NOT SCALE DRAWING
← ALL DRAWINGS CONTINUED ON SHEET 05 AIR CANNON
DETAIL VIEW