[Math] Solve the “two trains and a fly” problem the hard way

sequences-and-series

Few days ago, I was asked the following question:

There are $2$ cities. city $A$ and city $B$ with distance $d$=600km
There are $2$ trains with speed of $vt$ = 100km/h.
There is $1$ fly with speed of $vf$ = 300km/h.

The question:
Train 1 goes from city A to city B , while Train 2 goes in the opposite direction.(both start at the same time). the fly starts from train 1 and go to train 2 , than back to train 1 , than back to train 2…etc…

What is the distance that the fly passes till the trains cross each other ?

The answer is simple – it takes 3 hours for the train to cross -> fly was running 900km($300 \times 3$).

I was wondering on the "hard" way of solving this problem by actually calculating the distance the fly pass on each stage. It appears to be the sum of a (finite?) series of the distances.

Could you help me solve this problem the "hard way" ?

Best Answer

If the trains are distance $d$ apart and the fly starts on one train then it takes $d/(vt+vf)=d/400$ hours for the fly to reach the other train, and at that time the trains are $(2 vt) d/400 = d/2$ km apart, the fly having flown $(3 d/4)$ km. So after each trip from train to train the trains close by half the distance, so the fly travels $3 d/4+3d/8+3d/16+\cdots$, or $3d/4 \sum_{n=0}^\infty 1/2^n$. Now, the series $\sum_{n=0}^\infty 1/2^n$ is a geometric series of the form $\sum_{n=0}^\infty \alpha^n$ which if $|\alpha|<1$ equals $1/(1-\alpha)$, or in our case 2. So in our case, as $d=600$ the fly travels $2 * 3 * 600 / 4 = 900$km.

The story of von Neumann saying that he summed the series, always struck me as a completely reasonable approach. If you stare at geometric series all day, it is easy to recognize this problem as a series problem, and it is not much more difficult than using the "trick". In a certain sense, the "trick" is implicit in the formula.