play phryzby with physics

A Bullet from a Moving Van

solved RelativeVelocity

Q. A police van doing 30 km/hvv=30km/h fires a bullet at 150 m/svbv=150m/s, relative to the van, at a car ahead doing 192 km/hvc=192km/h the same way. At what speed does the bullet hit the car, in m/s?

vancarbulletgroundv = 8.33 m/sv = 53.3 m/sv = 150 m/s from vanv = ? from car
Inputs
vv
30 km/h
vc
192 km/h
vbv
150.0 m/s
Outputs
speedvbc?

How it's solved

Solved with RelativeVelocity

Given

  • vv=30km/h
  • vc=192km/h
  • vbv=150m/s

Find vbc.

Working
  1. vv=30km/h=8.33333333m/s
  2. vc=192km/h=53.3333333m/s
  3. changing frames(bullet, van, ground)vbv=vb-vv
  4. 150=vb-8.33333333
  5. vb=158.333333m/s
  6. changing frames(bullet, car, ground)vbc=vb-vc
  7. vbc=158.333333-53.3333333
  8. vbc=105.0 m/s
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.

question.rb
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"9end
solution.rb
1require_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."11end
playground.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"5end
The laws it drew on
quantitywrittenunitswithinfrom
positionxm—Velocity
displacementΔxm—Velocity
path lengthdm—Velocity
time takenΔts0 … 1e+05Velocity
average velocityvavm/s—Velocity
average speedcavm/s—Velocity
starting positionx0m—Velocity
final positionxm—Velocity
velocityvm/s—Acceleration
change of velocityΔvm/s—Acceleration
average accelerationaavm/s²—Acceleration
starting velocityv0m/s—Acceleration
final velocityvm/s—Acceleration
velocity of ground from bulletvgbm/s—
velocity of ground from vanvgvm/s—
velocity of bullet from vanvbvm/s—
velocity of ground from carvgcm/s—
velocity of bullet from carvbcm/s—
velocity of van from bulletvvbm/s—
velocity of van from carvvcm/s—
velocity of car from bulletvcbm/s—
velocity of car from vanvcvm/s—
velocity of bullet from groundvbm/s—
velocity of van from groundvvm/s—
velocity of car from groundvcm/s—
x0≡xi(start of motion)
starting position
x≡xi(end of motion)
final position
v0≡vi(start of motion)
starting velocity
v≡vi(end of motion)
final velocity
di(whole)=di(part 1)+di(part 2)
path in parts
Δtw=Δtp+Δtp
time in parts
vab(t)=vac(t)-vbc(t)
changing frames
Δx=x-x0
change of position
vav=ΔxΔt
displacement a time
cav=dΔt
path a time
Δv=v-v0
velocity gained
aav=ΔvΔt
velocity gained a time
vgb=vgv-vbv
changing frames(ground, bullet, van)
vgb=vgc-vbc
changing frames(ground, bullet, car)
vgv=vgb-vvb
changing frames(ground, van, bullet)
vgv=vgc-vvc
changing frames(ground, van, car)
vgc=vgb-vcb
changing frames(ground, car, bullet)
vgc=vgv-vcv
changing frames(ground, car, van)
vb=vbv-vgv
changing frames(bullet, ground, van)
vb=vbc-vgc
changing frames(bullet, ground, car)
vbv=vb-vv
changing frames(bullet, van, ground)
vbv=vbc-vvc
changing frames(bullet, van, car)
vbc=vb-vc
changing frames(bullet, car, ground)
vbc=vbv-vcv
changing frames(bullet, car, van)
vv=vvb-vgb
changing frames(van, ground, bullet)
vv=vvc-vgc
changing frames(van, ground, car)
vvb=vv-vb
changing frames(van, bullet, ground)
vvb=vvc-vbc
changing frames(van, bullet, car)
vvc=vv-vc
changing frames(van, car, ground)
vvc=vvb-vcb
changing frames(van, car, bullet)
vc=vcb-vgb
changing frames(car, ground, bullet)
vc=vcv-vgv
changing frames(car, ground, van)
vcb=vc-vb
changing frames(car, bullet, ground)
vcb=vcv-vbv
changing frames(car, bullet, van)
vcv=vc-vv
changing frames(car, van, ground)
vcv=vcb-vvb
changing frames(car, van, bullet)