play phryzby with physics

Under the Ceiling

solved Projectile

Q. A ball is thrown at 40 m/sv(thrown)=40m/s in a long hall whose ceiling is 25 mxy(peak)=25m high. Taking g as 9.8 m/s²g=9.8m/s², how far can it go without touching the ceilingvy(peak)=0m/s, in metres?

v₀ = 40 m/sθvx = ?y = 25 mt upt downg = 9.8 m/s²
Inputs
v
40.0 m/s
g
9.8 m/s²
xy
25.00 m
Outputs
distancexx?

How it's solved

Solved with Projectile

Given

  • v(thrown)=40m/s
  • g=9.8m/s²
  • xy(peak)=25m
  • vy(peak)=0m/s from “without touching the ceiling”
  • vy(thrown): the positive one of the values that fit from “without touching the ceiling”
  • θ(thrown): the smallest of the values that fit from “how far can it go”

Assumed

  • xx(thrown)=0m
  • xy(thrown)=0m
  • xy(lands)=0m

Find xx(lands).

Working
  1. falling freely(up, y)ay(u)=−g
  2. ay(u)=−9.8
  3. ay(u)=−9.8m/s²
  4. velocity after a distance(up, y)vy(peak)2=vy(thrown)2+2⋅ay(u)⋅(xy(peak)-xy(thrown))
  5. 02=vy(thrown)2+2⋅(−9.8)⋅(25-0)
  6. vy(thrown)=22.1359436m/s
  7. parts of a velocity(ball, thrown, y)vy(thrown)=v(thrown)⋅sin⁡θ(thrown)
  8. 22.1359436=40⋅sin⁡θ(thrown)
  9. θ(thrown)=33.6°,146.4°the smallest is taken
  10. θ(thrown)=33.60°
  11. parts of a velocity(ball, thrown, x)vx(thrown)=v(thrown)⋅cos⁡θ(thrown)
  12. vx(thrown)=40⋅cos⁡33.6°
  13. vx(thrown)=33.3166625m/s
  14. velocity after a time(up, y)vy(peak)=vy(thrown)+ay(u)⋅Δtu
  15. 0=22.1359436+(−9.8)⋅Δtu
  16. Δtu=2.25876976s
  17. falling freely(up, x)ax(u)=0
  18. ax(u)=0m/s²
  19. position after a time(up, x)xx(peak)=xx(thrown)+vx(thrown)⋅Δtu+ax(u)⋅Δtu22
  20. xx(peak)=0+33.3166625⋅2.25876976+0⋅2.2587697622
  21. xx(peak)=75.2546697m
  22. velocity after a time(up, x)vx(peak)=vx(thrown)+ax(u)⋅Δtu
  23. vx(peak)=33.3166625+0⋅2.25876976
  24. vx(peak)=33.3166625m/s
  25. falling freely(down, y)ay(d)=−g
  26. ay(d)=−9.8
  27. ay(d)=−9.8m/s²
  28. position after a time(down, y)xy(lands)=xy(peak)+vy(peak)⋅Δtd+ay(d)⋅Δtd22
  29. 0=25+0⋅Δtd+(−9.8)⋅Δtd22
  30. Δtd=2.25876976s
  31. falling freely(down, x)ax(d)=0
  32. ax(d)=0m/s²
  33. position after a time(down, x)xx(lands)=xx(peak)+vx(peak)⋅Δtd+ax(d)⋅Δtd22
  34. xx(lands)=75.2546697+33.3166625⋅2.25876976+0⋅2.2587697622
  35. xx(lands)=150.51 m
Conclusion

The ceiling caps how much of the speed can go upward; throw at the angle that just grazes it, and the rest of the speed carries the ball as far as it can.

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 :under_the_ceiling do4  kind :numerical5  describes "A ball is thrown at %{speed} in a long hall whose ceiling is %{ceiling} high. Taking g as %{gravity}, " \6          "%{distance}, in metres?"7  given speed: "40 m/s"8  given gravity: "9.8 m/s2"9  given ceiling: "25 m"10  asks distance: "how far can it go without touching the ceiling"11end
solution.rb
1require_relative "../questions/under_the_ceiling"2require_relative "../science/motion_in_a_plane/projectile"34solve :under_the_ceiling, using: Projectile do5  objects :ball6  axes :x, :y7  instants :thrown, :peak, :lands8  ball.goes(:up, during: thrown..peak)9  ball.goes(:down, during: peak..lands)10  take speed: ball.speed(at: thrown), gravity: g, ceiling: ball.position(at: peak, along: y)11  assume ball.position(at: thrown, along: x) => "0 m", ball.position(at: thrown, along: y) => "0 m",12         ball.position(at: lands, along: y) => "0 m"13  deduce_from "without touching the ceiling", ball.velocity(at: peak, along: y) => "0 m/s",14                                              ball.velocity(at: thrown, along: y) => :positive15  deduce_from "how far can it go", ball.direction(at: thrown) => :smallest16  distance = ball.position(at: lands, along: x)17  answer distance:, in: "m"18  conclusion "The ceiling caps how much of the speed can go upward; throw at the angle that just " \19             "grazes it, and the rest of the speed carries the ball as far as it can."20end
playground.rb
1require_relative "../solutions/under_the_ceiling"23play_with :under_the_ceiling do4  title "Under the Ceiling"5end
The laws it drew on
quantitywrittenunitswithinfrom
volumevolume——Vectors
massmass——Vectors
speedspeed——Vectors
densitydensity——Vectors
number of molesn——Vectors
angular frequencyangularfrequency——Vectors
workwork——Vectors
currentcurrent——Vectors
temperaturetemperature——Vectors
pressurepressure——Vectors
timets0 … 1e+05Vectors
powerpower——Vectors
total path lengths——Vectors
energyenergy——Vectors
gravitational potentialgravitationalpotential——Vectors
coefficient of frictionμ——Vectors
chargecharge——Vectors
accelerationam/s²—Vectors
velocityvm/s—Vectors
displacementΔxm—Vectors
angular velocityangularvelocity——Vectors
forceforce——Vectors
angular momentumangularmomentum——Vectors
linear momentumplin——Vectors
electric fieldelectricfield——Vectors
average velocityvavm/s—Vectors
magnetic momentmagneticmoment——Vectors
relative velocityvAB——Vectors
impulseimpulse——Vectors
first vectorA—0 … ∞Vectors
second vectorB—0 … ∞Vectors
angle betweenφ—0 … 3.142Vectors
resultantR—0 … ∞Vectors
resultant directionβ—0 … 3.142Vectors
directionα—-3.142 … 3.142Vectors
x componentAx——Vectors
y componentAy——Vectors
positionxm—Velocity
path lengthdm—Velocity
time takenΔts0 … 1e+05Velocity
average speedcavm/s—Velocity
starting positionx0m—Velocity
final positionxm—Velocity
change of velocityΔvm/s—Acceleration
average accelerationaavm/s²—Acceleration
starting velocityv0m/s—Acceleration
final velocityvm/s—Acceleration
gravitygm/s²—UniformAcceleration
displacement of ball during up along xΔxx(u)m—
position of ball at peak along xxx(peak)m—
position of ball at thrown along xxx(thrown)m—
displacement of ball during up along yΔxy(u)m—
position of ball at peak along yxy(peak)m—
position of ball at thrown along yxy(thrown)m—
displacement of ball during down along xΔxx(d)m—
position of ball at lands along xxx(lands)m—
displacement of ball during down along yΔxy(d)m—
position of ball at lands along yxy(lands)m—
average velocity of ball during up along xvav,x(u)m/s—
time taken of upΔtus0 … 1e+05
average velocity of ball during up along yvav,y(u)m/s—
average velocity of ball during down along xvav,x(d)m/s—
time taken of downΔtds0 … 1e+05
average velocity of ball during down along yvav,y(d)m/s—
average speed of ball during upcav(u)m/s—
path length of ball during upd(u)m—
average speed of ball during downcav(d)m/s—
path length of ball during downd(d)m—
change of velocity of ball during up along xΔvx(u)m/s—
velocity of ball at peak from ground along xvx(peak)m/s—
velocity of ball at thrown from ground along xvx(thrown)m/s—
change of velocity of ball during up along yΔvy(u)m/s—
velocity of ball at peak from ground along yvy(peak)m/s—
velocity of ball at thrown from ground along yvy(thrown)m/s—
change of velocity of ball during down along xΔvx(d)m/s—
velocity of ball at lands from ground along xvx(lands)m/s—
change of velocity of ball during down along yΔvy(d)m/s—
velocity of ball at lands from ground along yvy(lands)m/s—
average acceleration of ball during up along xaav,x(u)m/s²—
average acceleration of ball during up along yaav,y(u)m/s²—
average acceleration of ball during down along xaav,x(d)m/s²—
average acceleration of ball during down along yaav,y(d)m/s²—
acceleration of ball during up along xax(u)m/s²—
acceleration of ball during up along yay(u)m/s²—
acceleration of ball during down along xax(d)m/s²—
acceleration of ball during down along yay(d)m/s²—
velocity of ground at thrown from ground along xvg,x(thrown)m/s—
velocity of ground at thrown from groundvg(thrown)m/s—
direction of ground at thrown from groundθg(thrown)—-3.142 … 3.142
velocity of ground at thrown from ground along yvg,y(thrown)m/s—
velocity of ground at peak from ground along xvg,x(peak)m/s—
velocity of ground at peak from groundvg(peak)m/s—
direction of ground at peak from groundθg(peak)—-3.142 … 3.142
velocity of ground at peak from ground along yvg,y(peak)m/s—
velocity of ground at lands from ground along xvg,x(lands)m/s—
velocity of ground at lands from groundvg(lands)m/s—
direction of ground at lands from groundθg(lands)—-3.142 … 3.142
velocity of ground at lands from ground along yvg,y(lands)m/s—
velocity of ball at thrown from groundv(thrown)m/s—
direction of ball at thrown from groundθ(thrown)—-3.142 … 3.142
velocity of ball at peak from groundv(peak)m/s—
direction of ball at peak from groundθ(peak)—-3.142 … 3.142
velocity of ball at lands from groundv(lands)m/s—
direction of ball at lands from groundθ(lands)—-3.142 … 3.142
displacement of ball during upΔx(u)m—
position of ball at peakx(peak)m—
position of ball at thrownx(thrown)m—
displacement of ball during downΔx(d)m—
position of ball at landsx(lands)m—
average velocity of ball during upvav(u)m/s—
average velocity of ball during downvav(d)m/s—
change of velocity of ball during upΔv(u)m/s—
change of velocity of ball during downΔv(d)m/s—
average acceleration of ball during upaav(u)m/s²—
average acceleration of ball during downaav(d)m/s²—
acceleration of ball during upa(u)m/s²—
acceleration of ball during downa(d)m/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
A=Ax2+Ay2
magnitude from components
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
vo,x(t)=vo(t)⋅cos⁡θo(t)
parts of a velocity
ai,x(m)=0
falling freely
R2=A2+B2+2⋅A⋅B⋅cos⁡φ
law of cosines
R⋅sin⁡β=B⋅sin⁡φ
law of sines
R⋅cos⁡β=A+B⋅cos⁡φ
along the first
Ax=A⋅cos⁡α
resolved along x
Ay=A⋅sin⁡α
resolved along y
Δxx(u)=xx(peak)-xx(thrown)
change of position(up, x)
Δxy(u)=xy(peak)-xy(thrown)
change of position(up, y)
Δxx(d)=xx(lands)-xx(peak)
change of position(down, x)
Δxy(d)=xy(lands)-xy(peak)
change of position(down, y)
vav,x(u)=Δxx(u)Δtu
displacement a time(up, x)
vav,y(u)=Δxy(u)Δtu
displacement a time(up, y)
vav,x(d)=Δxx(d)Δtd
displacement a time(down, x)
vav,y(d)=Δxy(d)Δtd
displacement a time(down, y)
cav(u)=d(u)Δtu
path a time(up, x)
cav(u)=d(u)Δtu
path a time(up, y)
cav(d)=d(d)Δtd
path a time(down, x)
cav(d)=d(d)Δtd
path a time(down, y)
Δvx(u)=vx(peak)-vx(thrown)
velocity gained(up, x)
Δvy(u)=vy(peak)-vy(thrown)
velocity gained(up, y)
Δvx(d)=vx(lands)-vx(peak)
velocity gained(down, x)
Δvy(d)=vy(lands)-vy(peak)
velocity gained(down, y)
aav,x(u)=Δvx(u)Δtu
velocity gained a time(up, x)
aav,y(u)=Δvy(u)Δtu
velocity gained a time(up, y)
aav,x(d)=Δvx(d)Δtd
velocity gained a time(down, x)
aav,y(d)=Δvy(d)Δtd
velocity gained a time(down, y)
vx(peak)=vx(thrown)+ax(u)⋅Δtu
velocity after a time(up, x)
vy(peak)=vy(thrown)+ay(u)⋅Δtu
velocity after a time(up, y)
vx(lands)=vx(peak)+ax(d)⋅Δtd
velocity after a time(down, x)
vy(lands)=vy(peak)+ay(d)⋅Δtd
velocity after a time(down, y)
xx(peak)=xx(thrown)+vx(thrown)⋅Δtu+ax(u)⋅Δtu22
position after a time(up, x)
xy(peak)=xy(thrown)+vy(thrown)⋅Δtu+ay(u)⋅Δtu22
position after a time(up, y)
xx(lands)=xx(peak)+vx(peak)⋅Δtd+ax(d)⋅Δtd22
position after a time(down, x)
xy(lands)=xy(peak)+vy(peak)⋅Δtd+ay(d)⋅Δtd22
position after a time(down, y)
vx(peak)2=vx(thrown)2+2⋅ax(u)⋅(xx(peak)-xx(thrown))
velocity after a distance(up, x)
vy(peak)2=vy(thrown)2+2⋅ay(u)⋅(xy(peak)-xy(thrown))
velocity after a distance(up, y)
vx(lands)2=vx(peak)2+2⋅ax(d)⋅(xx(lands)-xx(peak))
velocity after a distance(down, x)
vy(lands)2=vy(peak)2+2⋅ay(d)⋅(xy(lands)-xy(peak))
velocity after a distance(down, y)
xx(peak)-xx(thrown)=(vx(peak)+vx(thrown))⋅Δtu2
mean of the velocities(up, x)
xy(peak)-xy(thrown)=(vy(peak)+vy(thrown))⋅Δtu2
mean of the velocities(up, y)
xx(lands)-xx(peak)=(vx(lands)+vx(peak))⋅Δtd2
mean of the velocities(down, x)
xy(lands)-xy(peak)=(vy(lands)+vy(peak))⋅Δtd2
mean of the velocities(down, y)
vg,x(thrown)=vg(thrown)⋅cos⁡θg(thrown)
parts of a velocity(ground, thrown, x)
vg,y(thrown)=vg(thrown)⋅sin⁡θg(thrown)
parts of a velocity(ground, thrown, y)
vg,x(peak)=vg(peak)⋅cos⁡θg(peak)
parts of a velocity(ground, peak, x)
vg,y(peak)=vg(peak)⋅sin⁡θg(peak)
parts of a velocity(ground, peak, y)
vg,x(lands)=vg(lands)⋅cos⁡θg(lands)
parts of a velocity(ground, lands, x)
vg,y(lands)=vg(lands)⋅sin⁡θg(lands)
parts of a velocity(ground, lands, y)
vx(thrown)=v(thrown)⋅cos⁡θ(thrown)
parts of a velocity(ball, thrown, x)
vy(thrown)=v(thrown)⋅sin⁡θ(thrown)
parts of a velocity(ball, thrown, y)
vx(peak)=v(peak)⋅cos⁡θ(peak)
parts of a velocity(ball, peak, x)
vy(peak)=v(peak)⋅sin⁡θ(peak)
parts of a velocity(ball, peak, y)
vx(lands)=v(lands)⋅cos⁡θ(lands)
parts of a velocity(ball, lands, x)
vy(lands)=v(lands)⋅sin⁡θ(lands)
parts of a velocity(ball, lands, y)
ax(u)=0
falling freely(up, x)
ay(u)=−g
falling freely(up, y)
ax(d)=0
falling freely(down, x)
ay(d)=−g
falling freely(down, y)
Δx(u)=Δxx(u)2+Δxy(u)2
magnitude from components(displacement of ball during up)
x(peak)=xx(peak)2+xy(peak)2
magnitude from components(position of ball at peak)
x(thrown)=xx(thrown)2+xy(thrown)2
magnitude from components(position of ball at thrown)
Δx(d)=Δxx(d)2+Δxy(d)2
magnitude from components(displacement of ball during down)
x(lands)=xx(lands)2+xy(lands)2
magnitude from components(position of ball at lands)
vav(u)=vav,x(u)2+vav,y(u)2
magnitude from components(average velocity of ball during up)
vav(d)=vav,x(d)2+vav,y(d)2
magnitude from components(average velocity of ball during down)
Δv(u)=Δvx(u)2+Δvy(u)2
magnitude from components(change of velocity of ball during up)
v(peak)=vx(peak)2+vy(peak)2
magnitude from components(velocity of ball at peak from ground)
v(thrown)=vx(thrown)2+vy(thrown)2
magnitude from components(velocity of ball at thrown from ground)
Δv(d)=Δvx(d)2+Δvy(d)2
magnitude from components(change of velocity of ball during down)
v(lands)=vx(lands)2+vy(lands)2
magnitude from components(velocity of ball at lands from ground)
aav(u)=aav,x(u)2+aav,y(u)2
magnitude from components(average acceleration of ball during up)
aav(d)=aav,x(d)2+aav,y(d)2
magnitude from components(average acceleration of ball during down)
a(u)=ax(u)2+ay(u)2
magnitude from components(acceleration of ball during up)
a(d)=ax(d)2+ay(d)2
magnitude from components(acceleration of ball during down)
vg(thrown)=vg,x(thrown)2+vg,y(thrown)2
magnitude from components(velocity of ground at thrown from ground)
vg(peak)=vg,x(peak)2+vg,y(peak)2
magnitude from components(velocity of ground at peak from ground)
vg(lands)=vg,x(lands)2+vg,y(lands)2
magnitude from components(velocity of ground at lands from ground)