question.rb
solution.rb
playground.rb
1 require_relative "../physics" 2 3 question :a_clamped_string_s_component_waves do 4 kind :numerical 5 describes "The transverse displacement of a string (clamped at its both ends) is given by y(x, t) = 0.06 sin (2π/3 x) " \ 6 "cos (120 πt) where x and y are in m and t in s. Interpret the wave as a superposition of two waves " \ 7 "travelling in opposite directions. %{speed}, in m/s?" 8 asks speed: "What is the speed of each wave" 9 end
1 require_relative "../questions/a_clamped_string_s_component_waves" 2 require_relative "../science/waves/travelling_wave" 3 4 solve :a_clamped_string_s_component_waves , using: TravellingWave do 5 objects :wave 6 7 deduce_from "sin (2π/3 x)" , wave . wave_number => "120 deg/m" 8 deduce_from "cos (120 πt)" , wave . angular_frequency => "60 rev/s" 9 10 speed = wave . wave_speed 11 answer speed :, in: "m/s" , figures: 2 12 13 conclusion "A standing wave is two equal waves running opposite ways with the same wave number and angular " \ 14 "frequency, so each moves at the angular frequency over the wave number." 15 end
1 require_relative "../solutions/a_clamped_string_s_component_waves" 2 3 play_with :a_clamped_string_s_component_waves do 4 title "A Clamped String's Component Waves" 5 end