Relative Motion of Two Trains Passing Each Other
Problem
Two trains are moving in opposite directions on parallel tracks. Train A is 150 meters long and moving at a speed of 60 km/h. Train B is 100 meters long and moving at a speed of 40 km/h. How much total distance must they cover to completely pass through each other? Also, calculate the time taken for them to completely cross each other.
Explanation
We have two trains moving in opposite directions on parallel tracks.
- Train A length:
- Train B length:
- Train A speed:
- Train B speed:
We want:
- The total distance they must cover to completely pass each other.
- The time taken for them to completely cross each other.
1. Total distance to completely pass
Two trains "completely pass each other" when the rear of one has just cleared the front of the other. In relative motion, the distance that must be covered equals the sum of their lengths:
So they need to cover 250 m relative to each other.
2. Relative speed and crossing time
They move in opposite directions, so their relative speed is the sum of their speeds.
First, convert speeds from km/h to m/s:
- Train A:
- Train B:
Relative speed (since they move towards each other):
Now use:
So, time to completely cross:
More exactly, using fractions:
Then:
Final results
- Total distance to be covered (sum of lengths):
- Time to completely cross each other:
About the visualization
This visualization treats the two trains as moving bars on parallel tracks in a 1D world:
- You can adjust the lengths and speeds of the two trains.
- The animation shows them approaching from left and right, in opposite directions.
- A relative motion line in the center shows how the separation between the leading fronts shrinks over time.
- The moment they have fully crossed (sum of lengths just covered) is highlighted with a color flash.
Mathematically, the key ideas are:
- Relative distance to cross: .
- Relative speed in opposite directions: .
- Crossing time: (with all quantities in compatible units, e.g., meters and m/s).
You can experiment by changing lengths and speeds to see how the crossing time and relative motion change in real time.