A Bullet from a Moving Van
Q. A police van doing 30 km/hkm/h fires a bullet at 150 m/sm/s, relative to the van, at a car ahead doing 192 km/hkm/h the same way. At what speed does the bullet hit the car, in m/s?
Inputs
Outputs
speed?
How it's solved
Solved with RelativeVelocity
Given
- km/h
- km/h
- m/s
Find .
Working
- km/hm/s
- km/hm/s
- changing frames(bullet, van, ground)
- m/s
- changing frames(bullet, car, ground)
Conclusion
What does the damage is the bullet's speed as the car sees it: the van's speed adds to the bullet's, and the car's running away takes from it.
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 :a_bullet_from_a_moving_van do4 kind :numerical5 describes "A police van doing %{van_speed} fires a bullet at %{muzzle_speed}, relative to the van, " \6 "at a car ahead doing %{car_speed} the same way. %{speed}, in m/s?"7 given van_speed: "30 km/h", car_speed: "192 km/h", muzzle_speed: "150 m/s"8 asks speed: "At what speed does the bullet hit the car"9end1require_relative "../questions/a_bullet_from_a_moving_van"2require_relative "../science/motion_in_a_straight_line/relative_velocity"34solve :a_bullet_from_a_moving_van, using: RelativeVelocity do5 objects :bullet, :van, :car6 take van_speed: van.velocity, car_speed: car.velocity, muzzle_speed: bullet.velocity(from: van)7 speed = bullet.velocity(from: car)8 answer speed:, in: "m/s"9 conclusion "What does the damage is the bullet's speed as the car sees it: the van's speed adds " \10 "to the bullet's, and the car's running away takes from it."11endplayground.rb
1require_relative "../solutions/a_bullet_from_a_moving_van"23play_with :a_bullet_from_a_moving_van do4 title "A Bullet from a Moving Van"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 | |
| velocity | m/s | — | Acceleration | |
| change of velocity | m/s | — | Acceleration | |
| average acceleration | m/s² | — | Acceleration | |
| starting velocity | m/s | — | Acceleration | |
| final velocity | m/s | — | Acceleration | |
| velocity of ground from bullet | m/s | — | ||
| velocity of ground from van | m/s | — | ||
| velocity of bullet from van | m/s | — | ||
| velocity of ground from car | m/s | — | ||
| velocity of bullet from car | m/s | — | ||
| velocity of van from bullet | m/s | — | ||
| velocity of van from car | m/s | — | ||
| velocity of car from bullet | m/s | — | ||
| velocity of car from van | m/s | — | ||
| velocity of bullet from ground | m/s | — | ||
| velocity of van from ground | m/s | — | ||
| velocity of car from ground | m/s | — |