play phryzby with physics

Projectile

solved Projectile

Q. A body is thrown at v(u₀) at θ(u₀) where gravity is g. Where does it land, how high does it govy(u₁)=0m/s, and how long is it in the air?

45.0°65 m of ground20.0 m/srangepeak
Inputs
θ
45.00°
v
20.0 m/s
Outputs
rangexx40.77 m
peakxy10.19 m
timeΔtf2.88 s

How it's solved

Solved with Projectile

Given

  • vy(u₁)=0m/s from “how high does it go”
  • θ(u₀), v(u₀), g yours to vary

Assumed

  • xx(u₀)=0m
  • xy(u₀)=0m
  • xy(d₁)=0m

Find xx(d₁), xy(u₁), Δtf.

Working
  1. parts of a velocity(body, start of up, y)vy(u₀)=v(u₀)⋅sin⁡θ(u₀)
  2. vy(u₀)=20⋅sin⁡45°
  3. vy(u₀)=14.1421356m/s
  4. falling freely(up, y)ay(u)=−g
  5. ay(u)=−9.81
  6. ay(u)=−9.81m/s²
  7. velocity after a time(up, y)vy(u₁)=vy(u₀)+ay(u)⋅Δtu
  8. 0=14.1421356+(−9.81)⋅Δtu
  9. Δtu=1.44160404s
  10. position after a time(up, y)xy(u₁)=xy(u₀)+vy(u₀)⋅Δtu+ay(u)⋅Δtu22
  11. xy(u₁)=0+14.1421356⋅1.44160404+(−9.81)⋅1.4416040422
  12. xy(u₁)=10.1936799m
  13. falling freely(down, y)ay(d)=−g
  14. ay(d)=−9.81
  15. ay(d)=−9.81m/s²
  16. position after a time(down, y)xy(d₁)=xy(u₁)+vy(u₁)⋅Δtd+ay(d)⋅Δtd22
  17. 0=10.1936799+0⋅Δtd+(−9.81)⋅Δtd22
  18. Δtd=1.44160404s
  19. parts of a velocity(body, start of up, x)vx(u₀)=v(u₀)⋅cos⁡θ(u₀)
  20. vx(u₀)=20⋅cos⁡45°
  21. vx(u₀)=14.1421356m/s
  22. falling freely(up, x)ax(u)=0
  23. ax(u)=0m/s²
  24. position after a time(up, x)xx(u₁)=xx(u₀)+vx(u₀)⋅Δtu+ax(u)⋅Δtu22
  25. xx(u₁)=0+14.1421356⋅1.44160404+0⋅1.4416040422
  26. xx(u₁)=20.3873598m
  27. velocity after a time(up, x)vx(u₁)=vx(u₀)+ax(u)⋅Δtu
  28. vx(u₁)=14.1421356+0⋅1.44160404
  29. vx(u₁)=14.1421356m/s
  30. falling freely(down, x)ax(d)=0
  31. ax(d)=0m/s²
  32. position after a time(down, x)xx(d₁)=xx(u₁)+vx(u₁)⋅Δtd+ax(d)⋅Δtd22
  33. xx(d₁)=20.3873598+14.1421356⋅1.44160404+0⋅1.4416040422
  34. xx(d₁)=40.7747197m
  35. velocity after a time(down, y)vy(d₁)=vy(u₁)+ay(d)⋅Δtd
  36. vy(d₁)=0+(−9.81)⋅1.44160404
  37. vy(d₁)=−14.1421356m/s
  38. falling freely(flying, y)ay(f)=−g
  39. ay(f)=−9.81
  40. ay(f)=−9.81m/s²
  41. velocity after a time(flying, y)vy(d₁)=vy(u₀)+ay(f)⋅Δtf
  42. (−14.1421356)=14.1421356+(−9.81)⋅Δtf
  43. Δtf=2.88320808s
Conclusion

Wherever the throw sent it. Nothing touches it after it leaves the hand, so the angle it left at, the speed it left at, and how hard the world pulls decide the whole flight.

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 :projectile do4  describes "A body is thrown at %{speed} at %{angle} where gravity is %{gravity}. %{range}, %{peak}, and %{time}?"5  given :angle6  given :speed7  given :gravity8  asks range: "Where does it land", peak: "how high does it go", time: "how long is it in the air"9end
solution.rb
1require_relative "../questions/projectile"2require_relative "../science/motion_in_a_plane/projectile"34solve :projectile, using: Projectile do5  objects :body6  axes :x, :y7  body.goes(:up)8  body.goes(:down, after: up)9  body.goes(:flying, made_of: [ up, down ])10  take angle: body.direction(at: flying.start), speed: body.speed(at: flying.start), gravity: g,11       range: body.position(at: flying.end, along: x), peak: body.position(at: up.end, along: y), time: flying.time_taken12  assume body.position(at: flying.start, along: x) => "0 m", body.position(at: flying.start, along: y) => "0 m",13         body.position(at: flying.end, along: y) => "0 m"14  deduce_from "how high does it go", body.velocity(at: up.end, along: y) => "0 m/s"15  find_value :range16  find_value :peak17  find_value :time1819  conclusion "Wherever the throw sent it. Nothing touches it after it leaves the hand, so the angle it left at, the speed it left at, and how hard the world pulls decide the whole flight."20end
playground.rb
1require_relative "../solutions/projectile"2require_relative "../science/motion_in_a_plane/gravity"3require_relative "../pictures/in_view"4require_relative "../pictures/flight"56play_with :projectile do7  title "Projectile"89  input :angle, default: 45.deg, step: 5.deg10  input :speed, 10.0..100.0, in: "m/s", step: 10.0, default: 20.01112  input :world, GRAVITY, default: "earth"13  input :in_view, IN_VIEW1415  input(:gravity) { world }1617  output :range, in: "m"18  output :peak,  in: "m"19  output :time,  in: "s"2021  draw Flight::Picture do22    ground23    flight leaving_at: :angle24    reach "range", :range25    apex "peak", :peak26  end27end
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 body during up along xΔxx(u)m—
position of body at end of up along xxx(u₁)m—
position of body at start of up along xxx(u₀)m—
displacement of body during up along yΔxy(u)m—
position of body at end of up along yxy(u₁)m—
position of body at start of up along yxy(u₀)m—
displacement of body during down along xΔxx(d)m—
position of body at end of down along xxx(d₁)m—
displacement of body during down along yΔxy(d)m—
position of body at end of down along yxy(d₁)m—
displacement of body during flying along xΔxx(f)m—
displacement of body during flying along yΔxy(f)m—
average velocity of body during up along xvav,x(u)m/s—
time taken of upΔtus0 … 1e+05
average velocity of body during up along yvav,y(u)m/s—
average velocity of body during down along xvav,x(d)m/s—
time taken of downΔtds0 … 1e+05
average velocity of body during down along yvav,y(d)m/s—
average velocity of body during flying along xvav,x(f)m/s—
time taken of flyingΔtfs0 … 1e+05
average velocity of body during flying along yvav,y(f)m/s—
average speed of body during upcav(u)m/s—
path length of body during upd(u)m—
average speed of body during downcav(d)m/s—
path length of body during downd(d)m—
average speed of body during flyingcav(f)m/s—
path length of body during flyingd(f)m—
change of velocity of body during up along xΔvx(u)m/s—
velocity of body at end of up from ground along xvx(u₁)m/s—
velocity of body at start of up from ground along xvx(u₀)m/s—
change of velocity of body during up along yΔvy(u)m/s—
velocity of body at end of up from ground along yvy(u₁)m/s—
velocity of body at start of up from ground along yvy(u₀)m/s—
change of velocity of body during down along xΔvx(d)m/s—
velocity of body at end of down from ground along xvx(d₁)m/s—
change of velocity of body during down along yΔvy(d)m/s—
velocity of body at end of down from ground along yvy(d₁)m/s—
change of velocity of body during flying along xΔvx(f)m/s—
change of velocity of body during flying along yΔvy(f)m/s—
average acceleration of body during up along xaav,x(u)m/s²—
average acceleration of body during up along yaav,y(u)m/s²—
average acceleration of body during down along xaav,x(d)m/s²—
average acceleration of body during down along yaav,y(d)m/s²—
average acceleration of body during flying along xaav,x(f)m/s²—
average acceleration of body during flying along yaav,y(f)m/s²—
acceleration of body during up along xax(u)m/s²—
acceleration of body during up along yay(u)m/s²—
acceleration of body during down along xax(d)m/s²—
acceleration of body during down along yay(d)m/s²—
acceleration of body during flying along xax(f)m/s²—
acceleration of body during flying along yay(f)m/s²—
acceleration of body during upa(u)m/s²—
acceleration of body during flyinga(f)m/s²—
acceleration of body during downa(d)m/s²—
velocity of ground at start of up from ground along xvg,x(u₀)m/s—
velocity of ground at start of up from groundvg(u₀)m/s—
direction of ground at start of up from groundθg(u₀)—-3.142 … 3.142
velocity of ground at start of up from ground along yvg,y(u₀)m/s—
velocity of ground at end of up from ground along xvg,x(u₁)m/s—
velocity of ground at end of up from groundvg(u₁)m/s—
direction of ground at end of up from groundθg(u₁)—-3.142 … 3.142
velocity of ground at end of up from ground along yvg,y(u₁)m/s—
velocity of ground at end of down from ground along xvg,x(d₁)m/s—
velocity of ground at end of down from groundvg(d₁)m/s—
direction of ground at end of down from groundθg(d₁)—-3.142 … 3.142
velocity of ground at end of down from ground along yvg,y(d₁)m/s—
velocity of body at start of up from groundv(u₀)m/s—
direction of body at start of up from groundθ(u₀)—-3.142 … 3.142
velocity of body at end of up from groundv(u₁)m/s—
direction of body at end of up from groundθ(u₁)—-3.142 … 3.142
velocity of body at end of down from groundv(d₁)m/s—
direction of body at end of down from groundθ(d₁)—-3.142 … 3.142
displacement of body during upΔx(u)m—
position of body at end of upx(u₁)m—
position of body at start of upx(u₀)m—
displacement of body during downΔx(d)m—
position of body at end of downx(d₁)m—
displacement of body during flyingΔx(f)m—
average velocity of body during upvav(u)m/s—
average velocity of body during downvav(d)m/s—
average velocity of body during flyingvav(f)m/s—
change of velocity of body during upΔv(u)m/s—
change of velocity of body during downΔv(d)m/s—
change of velocity of body during flyingΔv(f)m/s—
average acceleration of body during upaav(u)m/s²—
average acceleration of body during downaav(d)m/s²—
average acceleration of body during flyingaav(f)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(u₁)-xx(u₀)
change of position(up, x)
Δxy(u)=xy(u₁)-xy(u₀)
change of position(up, y)
Δxx(d)=xx(d₁)-xx(u₁)
change of position(down, x)
Δxy(d)=xy(d₁)-xy(u₁)
change of position(down, y)
Δxx(f)=xx(d₁)-xx(u₀)
change of position(flying, x)
Δxy(f)=xy(d₁)-xy(u₀)
change of position(flying, 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)
vav,x(f)=Δxx(f)Δtf
displacement a time(flying, x)
vav,y(f)=Δxy(f)Δtf
displacement a time(flying, 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)
cav(f)=d(f)Δtf
path a time(flying, x)
cav(f)=d(f)Δtf
path a time(flying, y)
Δvx(u)=vx(u₁)-vx(u₀)
velocity gained(up, x)
Δvy(u)=vy(u₁)-vy(u₀)
velocity gained(up, y)
Δvx(d)=vx(d₁)-vx(u₁)
velocity gained(down, x)
Δvy(d)=vy(d₁)-vy(u₁)
velocity gained(down, y)
Δvx(f)=vx(d₁)-vx(u₀)
velocity gained(flying, x)
Δvy(f)=vy(d₁)-vy(u₀)
velocity gained(flying, 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)
aav,x(f)=Δvx(f)Δtf
velocity gained a time(flying, x)
aav,y(f)=Δvy(f)Δtf
velocity gained a time(flying, y)
vx(u₁)=vx(u₀)+ax(u)⋅Δtu
velocity after a time(up, x)
vy(u₁)=vy(u₀)+ay(u)⋅Δtu
velocity after a time(up, y)
vx(d₁)=vx(u₁)+ax(d)⋅Δtd
velocity after a time(down, x)
vy(d₁)=vy(u₁)+ay(d)⋅Δtd
velocity after a time(down, y)
vx(d₁)=vx(u₀)+ax(f)⋅Δtf
velocity after a time(flying, x)
vy(d₁)=vy(u₀)+ay(f)⋅Δtf
velocity after a time(flying, y)
xx(u₁)=xx(u₀)+vx(u₀)⋅Δtu+ax(u)⋅Δtu22
position after a time(up, x)
xy(u₁)=xy(u₀)+vy(u₀)⋅Δtu+ay(u)⋅Δtu22
position after a time(up, y)
xx(d₁)=xx(u₁)+vx(u₁)⋅Δtd+ax(d)⋅Δtd22
position after a time(down, x)
xy(d₁)=xy(u₁)+vy(u₁)⋅Δtd+ay(d)⋅Δtd22
position after a time(down, y)
xx(d₁)=xx(u₀)+vx(u₀)⋅Δtf+ax(f)⋅Δtf22
position after a time(flying, x)
xy(d₁)=xy(u₀)+vy(u₀)⋅Δtf+ay(f)⋅Δtf22
position after a time(flying, y)
vx(u₁)2=vx(u₀)2+2⋅ax(u)⋅(xx(u₁)-xx(u₀))
velocity after a distance(up, x)
vy(u₁)2=vy(u₀)2+2⋅ay(u)⋅(xy(u₁)-xy(u₀))
velocity after a distance(up, y)
vx(d₁)2=vx(u₁)2+2⋅ax(d)⋅(xx(d₁)-xx(u₁))
velocity after a distance(down, x)
vy(d₁)2=vy(u₁)2+2⋅ay(d)⋅(xy(d₁)-xy(u₁))
velocity after a distance(down, y)
vx(d₁)2=vx(u₀)2+2⋅ax(f)⋅(xx(d₁)-xx(u₀))
velocity after a distance(flying, x)
vy(d₁)2=vy(u₀)2+2⋅ay(f)⋅(xy(d₁)-xy(u₀))
velocity after a distance(flying, y)
xx(u₁)-xx(u₀)=(vx(u₁)+vx(u₀))⋅Δtu2
mean of the velocities(up, x)
xy(u₁)-xy(u₀)=(vy(u₁)+vy(u₀))⋅Δtu2
mean of the velocities(up, y)
xx(d₁)-xx(u₁)=(vx(d₁)+vx(u₁))⋅Δtd2
mean of the velocities(down, x)
xy(d₁)-xy(u₁)=(vy(d₁)+vy(u₁))⋅Δtd2
mean of the velocities(down, y)
xx(d₁)-xx(u₀)=(vx(d₁)+vx(u₀))⋅Δtf2
mean of the velocities(flying, x)
xy(d₁)-xy(u₀)=(vy(d₁)+vy(u₀))⋅Δtf2
mean of the velocities(flying, y)
d(f)=d(u)+d(d)
path in parts(flying)
Δtf=Δtu+Δtd
time in parts(flying)
a(u)=a(f)
steady through its parts(flying, 1)
a(d)=a(f)
steady through its parts(flying, 2)
vg,x(u₀)=vg(u₀)⋅cos⁡θg(u₀)
parts of a velocity(ground, start of up, x)
vg,y(u₀)=vg(u₀)⋅sin⁡θg(u₀)
parts of a velocity(ground, start of up, y)
vg,x(u₁)=vg(u₁)⋅cos⁡θg(u₁)
parts of a velocity(ground, end of up, x)
vg,y(u₁)=vg(u₁)⋅sin⁡θg(u₁)
parts of a velocity(ground, end of up, y)
vg,x(d₁)=vg(d₁)⋅cos⁡θg(d₁)
parts of a velocity(ground, end of down, x)
vg,y(d₁)=vg(d₁)⋅sin⁡θg(d₁)
parts of a velocity(ground, end of down, y)
vx(u₀)=v(u₀)⋅cos⁡θ(u₀)
parts of a velocity(body, start of up, x)
vy(u₀)=v(u₀)⋅sin⁡θ(u₀)
parts of a velocity(body, start of up, y)
vx(u₁)=v(u₁)⋅cos⁡θ(u₁)
parts of a velocity(body, end of up, x)
vy(u₁)=v(u₁)⋅sin⁡θ(u₁)
parts of a velocity(body, end of up, y)
vx(d₁)=v(d₁)⋅cos⁡θ(d₁)
parts of a velocity(body, end of down, x)
vy(d₁)=v(d₁)⋅sin⁡θ(d₁)
parts of a velocity(body, end of down, 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)
ax(f)=0
falling freely(flying, x)
ay(f)=−g
falling freely(flying, y)
Δx(u)=Δxx(u)2+Δxy(u)2
magnitude from components(displacement of body during up)
x(u₁)=xx(u₁)2+xy(u₁)2
magnitude from components(position of body at end of up)
x(u₀)=xx(u₀)2+xy(u₀)2
magnitude from components(position of body at start of up)
Δx(d)=Δxx(d)2+Δxy(d)2
magnitude from components(displacement of body during down)
x(d₁)=xx(d₁)2+xy(d₁)2
magnitude from components(position of body at end of down)
Δx(f)=Δxx(f)2+Δxy(f)2
magnitude from components(displacement of body during flying)
vav(u)=vav,x(u)2+vav,y(u)2
magnitude from components(average velocity of body during up)
vav(d)=vav,x(d)2+vav,y(d)2
magnitude from components(average velocity of body during down)
vav(f)=vav,x(f)2+vav,y(f)2
magnitude from components(average velocity of body during flying)
Δv(u)=Δvx(u)2+Δvy(u)2
magnitude from components(change of velocity of body during up)
v(u₁)=vx(u₁)2+vy(u₁)2
magnitude from components(velocity of body at end of up from ground)
v(u₀)=vx(u₀)2+vy(u₀)2
magnitude from components(velocity of body at start of up from ground)
Δv(d)=Δvx(d)2+Δvy(d)2
magnitude from components(change of velocity of body during down)
v(d₁)=vx(d₁)2+vy(d₁)2
magnitude from components(velocity of body at end of down from ground)
Δv(f)=Δvx(f)2+Δvy(f)2
magnitude from components(change of velocity of body during flying)
aav(u)=aav,x(u)2+aav,y(u)2
magnitude from components(average acceleration of body during up)
aav(d)=aav,x(d)2+aav,y(d)2
magnitude from components(average acceleration of body during down)
aav(f)=aav,x(f)2+aav,y(f)2
magnitude from components(average acceleration of body during flying)
a(u)=ax(u)2+ay(u)2
magnitude from components(acceleration of body during up)
a(d)=ax(d)2+ay(d)2
magnitude from components(acceleration of body during down)
a(f)=ax(f)2+ay(f)2
magnitude from components(acceleration of body during flying)
vg(u₀)=vg,x(u₀)2+vg,y(u₀)2
magnitude from components(velocity of ground at start of up from ground)
vg(u₁)=vg,x(u₁)2+vg,y(u₁)2
magnitude from components(velocity of ground at end of up from ground)
vg(d₁)=vg,x(d₁)2+vg,y(d₁)2
magnitude from components(velocity of ground at end of down from ground)