No. 072 · Almost identical starts

Where does a pendulum over 5 magnets land?

160,000 starts, each painted the colour of the magnet it ends on. Near a magnet it's simple; at the edges the map turns fractal.

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

A 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, so it always ends up resting over one of them. But which one?

A map of 160,000 starts

Each pixel of the picture is one starting point: 400 × 400 = 160,000 of them, covering a square that reaches 1.8 from the centre each way (the magnets sit 1 from the centre). From every one, a bob is let go from rest, and once it has landed (within 0.25 of a magnet and moving slower than 0.05) the pixel takes that magnet's colour and flashes as it settles: pink for the top magnet, cyan upper left, yellow lower left, lavender lower right and green upper right. Until then it glows dimly in the colour of the magnet it's over.

Starts close to a magnet settle quickly, and they make the five big, plain regions around the magnets. Half of all the starts have landed by t = 30. Starts farther out swing past several magnets first, and there the colours break up into thin, tangled bands: two starts a hair apart can end on different magnets. That's the fractal part of the map, and those edges stay undecided longest.

By t = 62 every start has landed, and each magnet gets about 20% of them.

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. It's the same equation and the same five magnets as No. 053, where 10,000 bobs started almost at one point; here every start gets its own pixel.

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/where-a-pendulum-over-5-magnets-lands.