No. 040 · Almost identical starts

10,000 pendulums, four magnets

All let go within 0.003 of one point. They swing as one until t = 5.5, then end on four different magnets.

x'' = −0.5·x − 0.15·x' + Σ (m − x) / (|m − x|² + 0.04)^1.5

10,000 pendulum bobs swing over four magnets at the corners of a square, each pulled back to the centre by a spring, slowed by a little friction and attracted by every magnet. They are all let go from rest within 0.003 of the same point.

Moving as one, then four ways

For the first seconds they swing as a single bob. At t = 5.5 the cloud starts to spread, and from then on tiny differences decide everything. Each bob is coloured by the magnet it is nearest to at the end, worked out before the video starts, so the colours sort themselves out as the bobs settle: 49%, 23%, 15% and 13% of them, from the same start.

The equation

It's the same equation as No. 018, with four magnets instead of three:

x'' = −0.5·x − 0.15·x' + Σ (m − x) / (|m − x|² + 0.04)^1.5

The 0.04 is the square of the bob's height above the magnets, so the pull never becomes infinite. Every bob is integrated with fourth-order Runge–Kutta at a step of 0.01, from t = 0 to t = 40.

Part of Almost identical starts (13 videos): Thousands of copies a hair apart. Watch them split.

Use this picture

SVGJPG

Free to reuse, also commercially, under CC BY 4.0. Credit “What Math Means” with a link to whatmathmeans.dev/v/10000-pendulums-four-magnets.