O (1)O O O (5)(3)O (4)(2)O Resonance (Example 9.4.2)unit:= (t,a,b) -> Heaviside(t-a) - Heaviside(t-b);unit:=t,a,b/HeavisidetKaKHeavisidetKbSquare wave functionF1 := t-> piecewise(0<t and t<=Pi, 10, Pi<t and t<=2*Pi,-10);F1:=t/piecewise0 !tandt% p, 10, p !tandt% 2 p,K10use Heaviside functions to get a few periods (at least for t>0, which is what we care for)F1per := t-> sum(Heaviside(t-2*Pi*n)*F1(t-2*Pi*n),n=0..5);F1per:=t/>n= 05HeavisidetK2 p n F1 tK2 p nplot(F1per(t),t=0..6*Pi);2 4 6 8 10 12 14 16 18K10K50510b1 := n-> (1/Pi)*int(F1(t)*sin(n*t),t=0..2*Pi);b1:=n/02 pF1 t sinn tdtpb1(n) assuming integer;O (8)O O (5)O (9)(6)(7)O K20 K1 CK1np nSawtooth wave functionF2 := t-> 10*t * unit(t,-Pi,Pi);F2:=t/10 t unit t,Kp, pUse Heaviside functions to get a few periodsF2per := t-> sum(Heaviside(t-(2*n+1)*Pi)*F2(t-(2*n+2)*Pi),n=-1..5);F2per:=t/>n=K15HeavisidetK2 nC 1 p F2 tK2 nC 2 pplot(F2per(t),t=0..6*Pi);2 4 6 8 10 12 14 16 18K30K20K100102030b2 := n-> (1/Pi)*int(F2(t)*sin(n*t),t=-Pi..Pi);b2:=n/KppF2 t sinn tdtpb2(n) assuming integer;O O O (5)(9)O K20 K1nnConvolution solutions obtained using Laplace transformx1(t) := (1/8)*int(sin(4*(t-tau))*F1per(tau),tau=0..t):x2(t) := (1/8)*int(sin(4*(t-tau))*F2per(tau),tau=0..t):The displacement is periodicplot(x1(t),t=0..6*Pi,color=black);2 4 6 8 10 12 14 16 18K1.0K0.500.51.0The amplitude of the displacement increases with time (linearly) we have resonance.plot(x2(t),t=0..6*Pi,color=black);O (9)(5)2 4 6 8 10 12 14 16
View Full Document