Week 3 Notebook

Double Oscillators

Here you get to play with relative amplitudes, frequency ratios, and relative phase of two simple harmonic oscillators - you can also specify the amount of time over which to view the two oscillators move together.  Try making ωratio an integer...how about a fraction like 1/2?  Now try a rational number (ratio of two integers, like 2/3).  Finally, try an irrational number (like π=3.1415926535...) by just including a large number of digits.

Manipulate[ParametricPlot[{Cos[t],Aratio Cos[ωratio t+α]},{t,0,tmax},PlotRange->{{-1.1,1.1},{-Aratio*1.1,Aratio*1.1}},PlotPoints->100],{Aratio,1/2,2},{{ωratio,2},1,8},{{α,π/2},0,2π},{tmax,2π,100 π}]

Damped Oscillators

Here you get to play with damped oscillators.  The Q value is related to the amount of damping -Q = ω0/γ.  Note that the approximate number of oscillations that are expected to happen before the amplitude decays by a factor of 1/E is NUM = Q/π.  The value of Q will initiate to 10 π, meaning 10 oscillations are expected before one 1/e-decay of the amplitude.

ρp[ω0_,Q_]=-ω0(1/2/Q+I  Sqrt[1-1/4/Q^2]);ρm[ω0_,Q_]=-ω0(1/2/Q-I  Sqrt[1-1/4/Q^2]);

Manipulate[Plot[{Cos[1 t],1/2(E^(ρp[1,Q] t)+E^(ρm[1,Q] t)),1/E,E^(-1/2/Q t)},{t,5
0,NUM*2π/1},PlotRange->{-1,1},PlotPoints->200],{Q,0.01,1},{{NUM,10},1,100}]

Here we plot exactly the same thing, but with Q starting at critical damping (Q = 1/2), and with a slightly smaller range on the slider (Q between 1/10 and 4 π):

Manipulate[Plot[{Cos[1 t],1/2(E^(ρp[1,Q] t)+E^(ρm[1,Q] t)),1/E,E^(-1/2/Q t)},{t,5
0,NUM*2π/1},PlotRange->{-1,1},PlotPoints->200],{{Q,1/2},1/10,4π},{{NUM,4},1,4}]