Framerate {FPS} Target: 
Initial position x_{0} or (Re z(0))  
Initial velocity v_{0} or (Im z(0))  
Damping coefficient (γ)  
Natural frequency (ω_{0})  
Stimulus frequency (ω_{s})  
Stimulus Amplitude (as accel.)  
Stimulus initial phase lag (α)  
Time step for integrator  
Time axis maximum  
Stimulus force scale factor  
xPosition scale factor  
ωmax  
ωmin  
Point Diameter & Line Width  
Supplementary Material 

Chapter 1 The Story of e The natural growth constant e=2.71828.. can be related to compound interest over many periods. A bank account earning interest at rate r compounded over n periods for a time t yields the following amount P(t) = P(0) (1+rt/n)^{n} where P(0) is the principle amount at the beginning of the time period t. The demonstration is set to graph this formula for P(0)=$1.00 at 100% interest (r=1) for a single year (t=1). You should try setting the number n of periods to 1, 2, 3, 4, ..10, 100, 1000, etc. As n gets larger the amount should approach $2.72; or e dollars!. As shown in the text this gives us a formula for the exponential growth function. It is the limit of exp(rt) = (1 + rt/n)^{n} as n>∞ 

Chapter 2 Power Series
The interest formula binomial (1+x/n)^{n} expands to give exponential function exp(x) in a power series exp(x)=1+x+x^{2}/2! + x^{3}/3! + x^{4}/4!+ ... or by letting x=rt we get exp(rt)=1+rt+(rt)^{2}/2! + (rt)^{3}/3!+ ... The exp(rt) power series demo has r=1. Try setting the number of terms in the series to 1, 2, 3, 4, etc. and comparing the results. Imaginary rates If the rate is imaginary r=i = √1 the series becomes exp(ix)=1+ixx^{2}/2!  ix^{3}/3! + x^{4}/4!+ ... The real terms in this series make the power series for cos(x) while the imaginary terms make sin(x). exp(ix)=cos(x) + i sin(x), where cos(x)=1 x^{2}/2! + x^{4}/4!+ ... sin(x)= x x^{3}/3! + ... The exp(iωt) power series demo has set the complex rate to r= 0+i2π, that is Re r=0 and Im r=2π=i6.28. First plot the real part and then the imaginary parts. Try setting the number of terms in the series to 1, 2, 3, 4, etc. and comparing the results. Note that an exponential function is proportional to its first derivative, and hence to all higher derivatives. 1st derivative of exp(rt) = r exp(rt) 2nd derivative of exp(rt) = r^{2} exp(rt) 3rd derivative of exp(rt) = r^{3} exp(rt) Things to Notice (1)When a power series of order n (that means highest power is t^{n}) approximates sine or cosine functions it seems to stick to the curve for a certain time then suddenly peel away and blow up. (2) It takes quite a few terms to approximate a sine function for one whole period. Try approximateing sin(t) with nterms=10. Is that enough? How many are needed for the approximation to go up and down once and still be sticking to the sine curve at t=2π? 

Chapter 3 Harmonic Oscillation For y=exp(iωt) with imaginary rate r=iω we have 2nd derivative of exp(iωt) = ω^{2} exp(iωt) or y'' = (ω^{2}) y This is the differential equation for the harmonic oscillator. This simple demo plots and animates the real and imaginary parts of this exponential function y(t) = y(0) exp(iωt) = y(0)[cos(iωt)isin(iωt)] Together these parts make what is called the complex phasor representation of the simple harmonic oscillator. Things to Notice (1)The real axis of the phasor corresponds to position and is drawn up (+) and down () in the direction of the oscillating mass. The imaginary axis corresponds to velocity and is drawn right (negative ) to left (+). (2)When phasor is on the positive side of the imaginary axis (to the left) the oscillator velocity is positive and vice versa. (3) Clicking and dragging on the phasor plane resets position and velocity to the value of the cursor when you release the button. You can reset phase and amplitude but this will not change the frequency. 

Chapter 4 Damped Oscillation For y=exp(ΓiωΓ)t with complex rate r=ΓiωΓ we have y'' + 2Γ y' + ω_{0}^{2} y = 0 where ωΓ = √( ω_{0}^{2} Γ^{2} ) is an angular frequency reduced by the damping factor Γ or gamma. If Γ is small, ωΓ is very close to the natural frequency ω_{0}. But the amplitude decays as an exponential function with rate Γ , that is A(t) = A(0)expΓt. Things to Notice (1)For weak damping the frequency of the oscillator is not changed much but its amplitude decays by 95% in a time interval of 3/Γ which is called the 5% lifetime. The number of oscillations in a 5% lifetime is ω_{0}/2Γ. (2)For more damping the frequency of the oscillator is reduced noticeably. As before oscillator amplitude decays by 95% in a time interval of 3/Γ. (3)When the damping constant Γ equals or exceeds the frequency ω_{0} of the oscillator it will not be able to oscillate at all. It will simply 'ooze' or decay at a rate that is approximately determined by the exponential function expΓt. 

Chapter 5 Forced Oscillation and Resonance The solutions to the following forceddamped oscillator equation can be shown. y'' + 2Γ y' + ω_{0}^{2} y = As cos(ω_{s}ta) Let the natural frequency be ω_{0} = 2.0π=6.28 and the damping be Γ=0.2. We will vary the stimulus frequency ω_{s} = ω from 0.3 to 12.0 without changing the stimulus amplitude As or F. We will look at the magnitude of the response z=R and the phase lag angle r of the response phasor z behind the stimulus phasor F. Things to Notice (1) ω=0.1p z is quite small and in phase with F. z not sensitive to small change of ω. (2) ω=1.6p z is a little larger and in phase with F. z more sensitive to ω. (3) ω=1.8p z is larger and its phase lags 16° behind F. z much more sensitive to ω. (4) ω=2.0p z is near max. Its phase lags 90°behind F and is most sensitive to ω. This is the Resonance peak and for practical purposes the maximum response. (5) ω=2.2p z reduced and its phase lags about150°behind F and very sensitive to ω. (6) ω=2.4p z reduced and its phase lags almost180° behind F..not as sensitive to ω. (7) ω=4.0p z is vanishing and180°behind F and not at all sensitive to ω. Note that a given value below resonance like (3) has greater response than the corresponding value (5) above resonance. The resonance curve shown below is slightly lopsided. Its DC values are not zero but its high frequency values approach zero rapidly. The ratio of the max response to the DC response is called the amplification factor or angular quality factor for the oscillator. Amplification factor = z(at ω= ω_{0})/z(at ω=0.0) = ω_{0}/2Γ. Little known fact: this is about equal to the number of oscillations in a 5% lifetime 

Extra Topic Frequency Scan Suppose the stimulus frequency ω of a stimulus force F=cos ωt is increased very slowly from zero according to a linear ramp ω = rt while the natural frequency is constant at 1 Hz (ω_{0}=6.28). You might expect the oscillator to be most excited when the value ω passed the resonance at ω=6.28ω_{0}. (Imagine you were tuning a radio.) However, this is wrong! The oscillator gets excited when the phase derivative is in resonance, that is when df/dt =6.28. Here we have the phase given by f=ωt=rt^{2} so the derivative is df/dt=2rt=2ω. Hence the resonance occurs when ω= 3.14. The ω factor is not the correct angular frequncy when its value is being scanned or changing in any way. To see a scan select the demo button to the right. You can control the scan rate using the variable control before it starts, or you can change it while its running. The resonance response is similar to the Lorentz function if the scan rate is quite small. A scan rate of .001 (the default value) makes the resonance happen fully. How slowly do you have to scan to get a resonance at the natural frequency? Obviously the answer depends upon the damping constant Γ or the 5% lifetime 3/Γ since that is related to the "memory" of the oscillator. Notice that there is a strong beating or transient behavior just after the scan passes resonance. The response phasor will oscillate between greater than π and less than π phase lag behind the force phasor. 