The Fly and Two Trains

The problem
2 trains · 100 km apart · 50 km/h each · fly at 75 km/hhow far does the fly travel before the crash?

Two trains are on the same track, 100 km apart, heading toward each other. Each travels at 50 km/h.

A fly starts at the nose of one train, flies at 75 km/h toward the other, instantly turns around upon touching it, flies back to the first train, and continues bouncing between them until the trains crash and squash it.

How far does the fly travel in total?

Tempting (but wrong)
"sum the infinite series of leg distances?"leg 1: fly →leg 2: fly ←leg 3: fly →leg 4: fly ←...an infinite geometric series… and infinite bouncesintractable!?

The instinct: compute each bounce.

Leg 1: fly leaves train A at 75 km/h, train B approaches at 50 km/h. They close at 125 km/h, starting 100 km apart, so they meet after 100125=0.8\tfrac{100}{125} = 0.8 hours. Fly covers 750.8=6075 \cdot 0.8 = 60 km.

Leg 2: trains are now 2020 km apart (each moved 40 km in 0.8 hr). Fly heads back at 75 km/h, train A at 50 km/h, closing at 125 km/h... and so on.

You get an infinite geometric series. Doable — but tedious, and it misses the point.