play phryzby with physics

Heading across the Current

solved Vectors

Q. A motorboat heads north at 25 km/hA=25km/h through a current that flows at 10 km/hB=10km/h toward 60° east of southφ=120°. How many degrees east of north does it actually move?

A = 6.94B = 2.78Rφ = 120°β = ?
Inputs
A
25 km/h
B
10 km/h
Outputs
headingβ?

How it's solved

Solved with Vectors

Given

  • A=25km/h
  • B=10km/h
  • φ=120° from “toward 60° east of south”

Find β.

Working
  1. A=25km/h=6.94444444m/s
  2. B=10km/h=2.77777778m/s
  3. law of cosinesR2=A2+B2+2⋅A⋅B⋅cos⁡φ
  4. R2=6.944444442+2.777777782+2⋅6.94444444⋅2.77777778⋅cos⁡120°
  5. R=6.05402631
  6. law of sinesR⋅sin⁡β=B⋅sin⁡φ
  7. 6.05402631⋅sin⁡β=2.77777778⋅sin⁡120°
  8. β=23.41°
Conclusion

The current pushes the boat eastward as well as slowing it, so its true course turns off north toward the east.

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 :heading_across_the_current do4  kind :numerical5  describes "A motorboat heads north at %{boat_speed} through a current that flows at %{current_speed} toward 60° east of south. %{heading}?"6  given boat_speed: "25 km/h"7  given current_speed: "10 km/h"8  asks heading: "How many degrees east of north does it actually move"9end
solution.rb
1require_relative "../questions/heading_across_the_current"2require_relative "../science/motion_in_a_plane/vectors"34solve :heading_across_the_current, using: Vectors do5  take boat_speed: :A, current_speed: :B6  deduce_from "toward 60° east of south", phi: "120 deg"7  take heading: :beta8  answer find_value(:heading, in: "deg")910  conclusion "The current pushes the boat eastward as well as slowing it, so its true course " \11             "turns off north toward the east."12end
playground.rb
1require_relative "../solutions/heading_across_the_current"23play_with :heading_across_the_current do4  title "Heading across the Current"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
timetime——Vectors
powerpower——Vectors
total path lengths——Vectors
energyenergy——Vectors
gravitational potentialgravitationalpotential——Vectors
coefficient of frictionμ——Vectors
chargecharge——Vectors
accelerationacceleration——Vectors
velocityvelocity——Vectors
displacementdisplacement——Vectors
angular velocityangularvelocity——Vectors
forceforce——Vectors
angular momentumangularmomentum——Vectors
linear momentumplin——Vectors
electric fieldelectricfield——Vectors
average velocityaveragevelocity——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
A=Ax2+Ay2
magnitude from components
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