# 2 Trains and Fly Problem. Find the number of trips made by the fly back and forth.

Question: A Train A is approaching at a speed of 10m/sec, another Train B moving in the opposite direction at a speed of 20m/sec. A fly whose absolute speed is 50m/sec goes repeatedly from A to B and back, without loosing any time at any of the trains. The repeated moving back and forth stops when the 2 trains crash into each other. The initial distance between the 2 trains is 300m.

1>Find the distance traveled by the fly

2>Find the number of trips made by the fly back and forth

My Question: I get that the answer to the first question is 500m, since it takes 10 seconds for the 2 trains to crash, so in 10 seconds at a speed of 50m/sec the fly covers 50m/sec*10sec = 500m.

But how do I find the number of trips(back and forth) the fly makes until the trains crash?

• Flies fly fast. The initial distance between the trains should be given. – André Nicolas May 3 '14 at 2:13
• oh, sorry forgot to mention the initial distance, now edited! The initial distance is 300m. – Abhishek Potnis May 3 '14 at 2:15
• There are infinitely many back-and-forth trips. – André Nicolas May 3 '14 at 2:17
• If you think mathematically there are infinitaly many trips, but if you want a physical interpretation you can say that the trips over when the space between the trains is less than the fly's lenght – DiegoMath May 3 '14 at 2:19
• Ignore train A. Train B is approaching a fixed point at a relative speed of 10m/s. Train B can be represented graphically as a downward slope. The fly can be represented as a steeper (faster) zigzagging line between the train's slope and the horizontal. Consider what happens at the crash, no matter how much we 'zoom' into that point where the Train meets the y-axis, the fly is still zigzagging between the trains. – mjsqu May 3 '14 at 2:31

But an engineering solution might be to say that the fly stops going back and forth when the distance between the trains is equal to the fly's length, say $1$ cm. After all the work he's done, the poor guy starts getting smashed after this time. The distance between the trains could be expressed as, $D(t)=300-30t$, where $D$ and $t$ are in units of meters and seconds, respectively. To avoid the infinite result, we can calculate the trips the fly makes up until he starts getting smashed, $T_{smash}=\frac{300-\frac{1}{100}}{30}=9.999667$ seconds. Seems like the number of round trips the fly makes ($N$) can be approximated as:

$$N=\frac{1}{2}\int_{0}^{T_{smash}} \frac{dt}{\frac{D(t)}{v}}$$ where $v=50$ m/s is the fly's speed and the $1/2$ multiplier is to make $N$ equate to 'round trips'. This computes to $$N\dot = 8.59.$$

Cheers,

Paul Safier

Your answer to the first part is the intended one. It commits you to claiming the fly has no length and there are an infinite number of trips. You could compute the length of each trip. You would find a geometric series that when summed to infinity gives 500m. If there isn't an infinite number of trips, perhaps because you say the fly is crushed when the trains are closer than the length of a fly, you don't get 500m any more.

• The problem statement says the fly stops flying only when the trains crash, that is, when the distance between them is zero. So we cannot stop the fly before the trains touch. This implies the fly effectively has zero length, because no matter how close the trains are, the fly can still move between them if they are not touching. – David K May 3 '14 at 12:38
• I think it would be a shame to let facts get in the way of a good story, but just out of curiosity is it true that someone gave John von Neumann this problem and he answered the question quickly. "Oh, said the questioner, "I was hoping you wouldn't see the trick." "What trick?" said von Neumann, "I just summed the series." – Airymouse Jan 6 '17 at 22:19
• @Airymouse: I have heard the same story. I don't know whether it is true. – Ross Millikan Jan 6 '17 at 22:23
• @RossMillikan I like to think this problem may have inspired one of Larson's best cartoons, called Math Phobic's Nightmare.. It's the one about the man seeking entrance to the pearly gates who is told," Now listen up. No one gets in here without answering the following question. A train leaves Philadelphia at 1PM. It is travelling 65 miles per hour. Another train leaves Denver at 4PM..." – Airymouse Jan 6 '17 at 22:41

The problem can be solved much more simpler by using graphs. A plot of d(t) vs t for the trains A and B will be two straight line who intersect at the time and position where the two trains crash. Furthermore, plotting the d(t) of the bird on the same plane will show clearly where the fly keeps going to and fro between the two train plots….The graphical solution is simple and easy to understand