The Setup
A Boy, A Train, and a Clever Idea
Imagine you are standing on a railway platform. A train is passing by at a uniform speed, and you decide to play a little game to calculate both the speed of the train and the length of its coaches. You don't have a stopwatch or a measuring tape, but you know your own running speed and the length of your stride. This is exactly the scenario our clever boy finds himself in.
Let's define our variables to bring order to this physical situation. Let the unknown speed of the train be v and the unknown length of a single coach be L. We are given the boy's constant running speed u=10 km/h. We also know that each of his steps covers a distance l=1.0 m.
The Power of Relative Velocity
When two objects are moving simultaneously, analyzing their motion from the ground can get messy. You have to track the absolute position of the boy and the absolute position of the train. However, physics offers us a beautiful shortcut: Relative Motion.
By shifting our perspective to the frame of reference of the train, the train becomes completely stationary. The boy is now moving relative to this stationary train. The distance he needs to cover to "pass by a coach" is simply the length of the coach itself, L. This single realization turns a complex tracking problem into a straightforward application of the formula: Distance=Speed×Time.
Chasing the Train
The First Run
In the first scenario, the boy runs in the same direction as the train. Because he successfully overtakes the coach from behind, his speed must be greater than the train's speed (u>v).
In the train's frame of reference, the boy is approaching with a relative speed of vrel=u−v. He takes n1=30 steps to pass the coach. Since he covers a distance l in each step, the total time he spends running is the total distance he ran on the ground divided by his ground speed: t1=un1l.
Using our relative motion formula, the length of the coach is the relative speed multiplied by the time taken:
L=(u−v)t1=(u−v)un1l
Running Head-On
The Return Journey
Now, the boy turns around and runs in the opposite direction. The train is still moving forward, so they are now rushing towards each other.
In the train's frame of reference, the boy is now sprinting past with a much higher relative speed: vrel=u+v. Because he is moving faster relative to the train, it takes him fewer steps to pass the coach. He completes the pass in just n2=20 steps. The time taken for this run is t2=un2l.
Again, applying our relative motion formula, the length of the coach is:
L=(u+v)t2=(u+v)un2l
The Master Equation
Bringing It Together
We now have two different expressions for the exact same physical quantity: the length of the coach, L. This is our golden ticket. By equating these two expressions, we can eliminate L and solve directly for the train's speed, v.
Notice how beautifully the term ul appears on both sides. We can divide it out, leaving us with a pure, elegant algebraic relationship:
Let's expand the brackets and group the terms containing v on one side and the terms containing u on the other:
un1−vn1=un2+vn2
u(n1−n2)=v(n1+n2)
Isolating v, we get our master formula for the train's speed:
The Final Reveal
Calculating Speed and Length
Now comes the satisfying part—plugging in the numbers. We know u=10 km/h, n1=30, and n2=20.
v=10×30+2030−20=10×5010=2 km/h
The train is moving at a leisurely 2 km/h.
To find the length of the coach, we substitute our expression for v back into our first equation for L:
L=(u−un1+n2n1−n2)un1l
Watch what happens when we simplify the terms inside the parenthesis. We take a common denominator:
L=u(n1+n2n1+n2−(n1−n2))un1l
L=u(n1+n22n2)un1l
The boy's speed, u, completely cancels out! This is a profound physical insight. The length of the coach depends only on the number of steps and the length of each step, completely independent of how fast the boy was running (as long as he maintained the same speed in both directions).
Substituting our values (n1=30, n2=20, l=1.0 m):
L=30+202×30×20×1.0=501200=24 m
The length of the coach is exactly 24 m. Through the elegant application of relative velocity, we've solved what initially seemed like an impossible puzzle with minimal information.