x'' = −0.5·x − 0.15·x' + Σ (m − x) / (|m − x|² + 0.04)^1.5A pendulum bob hangs over five magnets at the corners of a regular pentagon. It's pulled back to the middle by its string, slowed by friction, and attracted by each magnet. Here 10,000 bobs are let go from rest, all within 0.003 of one point.
As one, then apart
At first they swing together as one bob. But near the magnets small differences grow quickly, and at t = 3.6 the swarm splits apart. Each bob ends up still over one of the magnets, and its colour shows which one: 19% on the top magnet, 16% upper right, 24% lower right, 24% lower left and 17% upper left.
The equation
x'' = −0.5·x − 0.15·x' + Σ (m − x) / (|m − x|² + 0.04)^1.5
The first term is the string, the second friction, and the sum is the pull of each magnet m, which sits 0.2 below the plane the bob swings in. It's solved with the RK4 method. The same equation with three magnets (No. 018) and four (No. 040) gives the same story: the end can't be predicted without following every swing.
Part of Almost identical starts (13 videos): Thousands of copies a hair apart. Watch them split.
Use this picture
Free to reuse, also commercially, under CC BY 4.0. Credit “What Math Means” with a link to whatmathmeans.dev/v/10000-pendulums-five-magnets.







