play phryzby with physics

A Ball off a Roof Lands

solved UniformAcceleration

Q. A ball is thrown straight up at 20 m/sv0=20m/s from the top of a building 25 mx0=25m tall. Taking g asa=−g 10 m/s²g=10m/s², how many seconds pass before it hits the groundx1=0m?

x₀ = 25 mv₀ = 20 m/sx = 0 mv = ?displacement ?a = ?v̄ = ?
Inputs
v0
20.0 m/s
x0
25.00 m
g
10 m/s²
Outputs
timeΔt?

How it's solved

Solved with UniformAcceleration

Given

  • v0=20m/s
  • x0=25m
  • g=10m/s²
  • x1=0m from “hits the ground”
  • a=−g from “thrown straight up” and “Taking g as”

Find Δt.

Working
  1. thrown straight up and Taking g asa=−g
  2. a=−10
  3. a=−10m/s²
  4. position after a time(flying)x1=x0+v0⋅Δt+a⋅Δt22
  5. 0=25+20⋅Δt+(−10)⋅Δt22
  6. Δt=5.00 s
Conclusion

There is no need to split the flight at the top: the acceleration never changes, so one equation covers the way up and the way down. It has two roots, and only the one after the throw is an answer.

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_ball_off_a_roof_lands do4  kind :numerical5  describes "A ball is thrown straight up at %{throw_speed} from the top of a building %{building_height} tall. Taking g as " \6          "%{gravity}, %{time}?"7  given throw_speed: "20 m/s"8  given building_height: "25 m"9  given gravity: "10 m/s2"10  asks time: "how many seconds pass before it hits the ground"11end
solution.rb
1require_relative "../questions/a_ball_off_a_roof_lands"2require_relative "../science/motion_in_a_straight_line/uniform_acceleration"34solve :a_ball_off_a_roof_lands, using: UniformAcceleration do5  objects :ball6  ball.goes(:flying)78  deduce_from "thrown straight up", "Taking g as", ball.acceleration => -g9  take throw_speed: ball.initial_velocity, building_height: ball.initial_position, gravity: g10  deduce_from "hits the ground", ball.final_position => "0 m"11  take time: flying.time_taken12  answer find_value(:time, in: "s")1314  conclusion "There is no need to split the flight at the top: the acceleration never changes, so " \15             "one equation covers the way up and the way down. It has two roots, and only the one " \16             "after the throw is an answer."17end
playground.rb
1require_relative "../solutions/a_ball_off_a_roof_lands"23play_with :a_ball_off_a_roof_lands do4  title "A Ball off a Roof Lands"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
accelerationam/s²—UniformAcceleration
gravitygm/s²—UniformAcceleration
timets0 … 1e+05UniformAcceleration
displacement of ball during flyingΔxm—
position of ball at end of flyingx1m—
position of ball at start of flyingx0m—
average velocity of ball during flyingvavm/s—
time taken of flyingΔts0 … 1e+05
average speed of ball during flyingcavm/s—
path length of ball during flyingdm—
change of velocity of ball during flyingΔvm/s—
velocity of ball at end of flying from groundv1m/s—
velocity of ball at start of flying from groundv0m/s—
average acceleration of ball during flyingaavm/s²—
acceleration of ball during flyingam/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
t≡Δtm
time
di(whole)=di(part 1)+di(part 2)
path in parts
Δtw=Δtp+Δtp
time in parts
ai(part 1)=ai(whole)
steady through its parts
Δx=x1-x0
change of position(flying)
vav=ΔxΔt
displacement a time(flying)
cav=dΔt
path a time(flying)
Δv=v1-v0
velocity gained(flying)
aav=ΔvΔt
velocity gained a time(flying)
v1=v0+a⋅Δt
velocity after a time(flying)
x1=x0+v0⋅Δt+a⋅Δt22
position after a time(flying)
v12=v02+2⋅a⋅(x1-x0)
velocity after a distance(flying)
x1-x0=(v1+v0)⋅Δt2
mean of the velocities(flying)
a=−g
thrown straight up and Taking g as