Now, the trains take one hour to collide (their relative speed is 100 km/h and they are 100 km apart initially). Since the fly is traveling at 75 km/h and flies continuously until it is squashed (which it is to be supposed occurs a split second before the two oncoming trains squash one another), it must therefore travel 75 km in the hour’s time. The position x(t) of the fly at time t is plotted above.
However, a brute force method instead solves for the position of the fly along each traversal between the trains. For example, the fly reaches the second train when
or t_1=4/5 h, at which point it has traveled a distance d_1=75t_1=60 km. It then turns around and reaches the first train again when
or t_2=4/25. Continuing, the total distance traveled by the fly is given by summing the series