Sub topic 2
Relative Speed: Moving Toward, Away, and in the Same Direction
Prerequisites
This chapter assumes you can rearrange distance = rate × time, convert units such as minutes to hours, and solve a linear equation in one variable.
Relative Speed
Relative speed is how fast one object moves compared with another. Add the two speeds when the objects move toward each other or away from each other. Subtract them when they move in the same direction.
- Toward or away: relative speed = speed A + speed B
- Same direction: relative speed = faster speed − slower speed
Meeting and Catch-Up Problems
Divide the gap by the relative speed to get the time. Two trains 300 miles apart, moving toward each other at 50 and 70 mph, close the gap at 120 mph and meet after 2.5 hours.
A car 30 miles ahead, going 40 mph, is chased by a car going 60 mph. The gap closes at 20 mph, so the chaser catches up in 1.5 hours.
def time_to_close(gap, speed_a, speed_b, toward=True):
relative = speed_a + speed_b if toward else abs(speed_a - speed_b)
return gap / relative
print(time_to_close(300, 50, 70)) # 2.5
print(time_to_close(30, 60, 40, toward=False)) # 1.5Current and Wind
A current or wind changes your ground speed. Add its speed when you travel with it and subtract it when you travel against it. A boat that goes 10 mph in still water moves 12 mph downstream and 8 mph upstream if the current is 2 mph.
Work as a Rate
Work is a rate when you measure it as a fraction of a job per unit of time. A worker who finishes a job in t hours has a rate of 1/t jobs per hour. Add the rates of workers who work together. A 6-hour worker and a 12-hour worker have rates of 1/6 and 1/12, which sum to 1/4, so they finish in 4 hours.
Opposing rates work the same way, with one rate subtracted. A pipe fills a tank in 6 hours, and a drain empties it in 12 hours. The net rate is 1/6 − 1/12 = 1/12 tank per hour, so filling takes 12 hours.
Exercise
Two workers finish a job alone in 3 hours and 6 hours. How long do they take together?
Show answer
Their rates are 1/3 and 1/6, which sum to 1/2 job per hour, so they finish in 2 hours.