play phryzby with physics

Both Times a Ball Passes a Ledge

solved UniformAcceleration

Q. A ball is thrown straight up at 20 m/sv0=20m/s from the foot of a wallx0=0m with a ledge 15 mx1=15m up it. Taking g asa=−g 9.8 m/s²g=9.8m/s², at what times after the throw does it pass the ledge, in seconds?

x₀ = 0 mv₀ = 20 m/sx = 15 mdisplacement ?a = ?
Inputs
v0
20.0 m/s
x1
15.00 m
g
9.8 m/s²
Outputs
timesΔt?

How it's solved

Solved with UniformAcceleration

Given

  • v0=20m/s
  • g=9.8m/s²
  • x1=15m
  • x0=0m from “from the foot of a wall”
  • a=−g from “thrown straight up” and “Taking g as”

Find Δt.

Working
  1. thrown straight up and Taking g asa=−g
  2. a=−9.8
  3. a=−9.8m/s²
  4. position after a time(flying)x1=x0+v0⋅Δt+a⋅Δt22
  5. 15=0+20⋅Δt+(−9.8)⋅Δt22
  6. Δt=0.990241822,3.09139083sall of them are taken
  7. Δt=0.99 s and 3.09 s
  8. Δt≈0.990,3.09sto 3 significant figures
Conclusion

The ball passes the ledge twice, once rising and once falling back, so both times answer the question; they sit evenly either side of the top of the flight, about 2.04 s after the throw.

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 :both_times_a_ball_passes_a_ledge do4  kind :numerical5  describes "A ball is thrown straight up at %{throw_speed} from the foot of a wall with a ledge %{height} up it. " \6            "Taking g as %{gravity}, %{times}, in seconds?"7  given throw_speed: "20 m/s"8  given height: "15 m"9  given gravity: "9.8 m/s2"10  asks times: "at what times after the throw does it pass the ledge"11end
solution.rb
1require_relative "../questions/both_times_a_ball_passes_a_ledge"2require_relative "../science/motion_in_a_straight_line/uniform_acceleration"34solve :both_times_a_ball_passes_a_ledge, 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, gravity: g, height: ball.final_position10  deduce_from "from the foot of a wall", ball.initial_position => "0 m"11  take times: flying.time_taken12  answer find_value(:times, in: "s", figures: 3, root: :all)1314  conclusion "The ball passes the ledge twice, once rising and once falling back, so both times answer the " \15             "question; they sit evenly either side of the top of the flight, about 2.04 s after the throw."16end
playground.rb
1require_relative "../solutions/both_times_a_ball_passes_a_ledge"23play_with :both_times_a_ball_passes_a_ledge do4  title "Both Times a Ball Passes a Ledge"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