question.rb
solution.rb
playground.rb
1 require_relative "../physics" 2 3 question :a_harmonic_wave_s_frequency do 4 kind :numerical 5 describes "A transverse harmonic wave on a string is described by y(x, t) = 3.0 sin (36 t + 0.018 x + π/4) where x " \ 6 "and y are in cm and t in s. %{frequency}, in hertz?" 7 asks frequency: "What is its frequency" 8 end
1 require_relative "../questions/a_harmonic_wave_s_frequency" 2 require_relative "../science/waves/travelling_wave" 3 4 solve :a_harmonic_wave_s_frequency , using: TravellingWave do 5 objects :wave 6 7 deduce_from "36 t" , wave . angular_frequency => "36 rad/s" 8 9 frequency = wave . frequency 10 answer frequency :, in: "Hz" , figures: 2 11 12 conclusion "The number multiplying t is the angular frequency, radians of phase each second; a full turn of " \ 13 "phase is one oscillation." 14 end
1 require_relative "../solutions/a_harmonic_wave_s_frequency" 2 3 play_with :a_harmonic_wave_s_frequency do 4 title "A Harmonic Wave's Frequency" 5 end