There and Back: Speed
Q. A man walks 2.5 kmkm to a market in 30 minmin, finds it shut, and walks straight homekm in 20 minmin. What is his average speed over the whole walk, in km/h?
Inputs
Outputs
average speed?
How it's solved
Solved with Velocity
Given
- km
- min
- min
- km from “walks straight home”
Find .
Working
- kmm
- mins
- mins
- kmm
- path in parts(walking)
- m
- time in parts(walking)
- s
- path a time(walking)
- km/h
- m/skm/h
Conclusion
Average speed counts every step of the path, so it is never less than the size of the average velocity, and a tired man is not told he stood still.
The web of concepts
given read from the words equation asked
The Ruby that solves it
The question and its solution are small Ruby files. The engine runs them.
1require_relative "../physics"23question :there_and_back_speed do4 kind :numerical5 describes "A man walks %{path_there} to a market in %{time_there}, finds it shut, and walks straight home in " \6 "%{time_back}. %{average_speed}, in km/h?"7 given path_there: "2.5 km", time_there: "30 min", time_back: "20 min"8 asks average_speed: "What is his average speed over the whole walk"9end1require_relative "../questions/there_and_back_speed"2require_relative "../science/motion_in_a_straight_line/velocity"34solve :there_and_back_speed, using: Velocity do5 objects :man6 instants :start, :market, :home7 man.goes(:to_market, during: start..market)8 man.goes(:back_home, during: market..home)9 man.goes(:walking, during: start..home)10 take path_there: to_market.path_length, time_there: to_market.time_taken, time_back: back_home.time_taken11 deduce_from "walks straight home", back_home.path_length => "2.5 km"12 average_speed = walking.average_speed13 answer average_speed:, in: "km/h"14 conclusion "Average speed counts every step of the path, so it is never less than the size of " \15 "the average velocity, and a tired man is not told he stood still."16endplayground.rb
1require_relative "../solutions/there_and_back_speed"23play_with :there_and_back_speed do4 title "There and Back: Speed"5endThe laws it drew on
| quantity | written | units | within | from |
|---|---|---|---|---|
| position | m | — | Velocity | |
| displacement | m | — | Velocity | |
| path length | m | — | Velocity | |
| time taken | s | 0 … 1e+05 | Velocity | |
| average velocity | m/s | — | Velocity | |
| average speed | m/s | — | Velocity | |
| starting position | m | — | Velocity | |
| final position | m | — | Velocity | |
| displacement of man during to market | m | — | ||
| position of man at market | m | — | ||
| position of man at start | m | — | ||
| displacement of man during back home | m | — | ||
| position of man at home | m | — | ||
| displacement of man during walking | m | — | ||
| average velocity of man during to market | m/s | — | ||
| time taken of to market | s | 0 … 1e+05 | ||
| average velocity of man during back home | m/s | — | ||
| time taken of back home | s | 0 … 1e+05 | ||
| average velocity of man during walking | m/s | — | ||
| time taken of walking | s | 0 … 1e+05 | ||
| average speed of man during to market | m/s | — | ||
| path length of man during to market | m | — | ||
| average speed of man during back home | m/s | — | ||
| path length of man during back home | m | — | ||
| average speed of man during walking | m/s | — | ||
| path length of man during walking | m | — |