Mah 65 - Linear Differenial Equaions A. J. Meir Copyrigh (C) A. J. Meir. All righs reserved. This workshee is for educaional use only. No par of his publicaion may be reproduced or ransmied for profi in any form or by any means, elecronic or mechanical, including phoocopy, recording, or any informaion sorage and rerieval sysem wihou prior wrien permission from he auhor. No for profi disribuion of he sofware is allowed wihou prior wrien permission, providing ha he workshee is no modified in any way and full credi o he auhor is acknowledged. Forced Undamped scillaors We consider equaions of he ype m d x C kx = F cos w. d For example ake m =, k = 9, and F = 4 (he roos of he characerisic polynomial are 3 I and K3 I) wih iniial condiions d x d x = C 9 x = 4 cos w and dx d ()=. resar:wih(deools): dsolve({d(d(x))()+9*x()=4*cos(omega*),x()=,d(x)()=},x ()); rig ideniies x = 4 cos 3 K9 C w K 4 cos w K9 C w Tha is given a periodic funcion of he form f = a cos w C b sin w we can wrie i as f = A cos w K d where A = a C b and d = arcan b a (noe his las equaion has wo soluions which differ by p, you mus chose he correc soluion). Also recall he wo rigonomeric ideniies and cos a K cos b = K sin ac b sin ak b
ac b sin a K sin b = cos sin ak b using hese ideniies we can ofen rewrie periodic funcions o beer see he phenomenon of beas. sol():=-8/(-9+omega^)*sin((3-omega)*/)*sin((3+omega)*/) ; 8 sin sol := K 3 K w sin K9 C w 3 C w env():=-8/(-9+omega^)*sin((3-omega)*/); 8 sin 3 K w env := K K9 C w omega:=:plo([sol(),env(),-env()],=..,color=[black, red,red]);..5 5 5 K.5 K. omega:=:plo([sol(),env(),-env()],=..,color=[black, red,red]);
.5..5 K.5 5 5 K. K.5 omega:=5/:plo([sol(),env(),-env()],=..,color=[black, red,red]); 3 K 5 5 K K3 omega:=.75*sqr():plo([sol(),env(),-env()],=.., color=[black,red,red]);
K 5 5 K omega:=9/:plo([sol(),env(),-env()],=..5,color= [black,red,red]); 5 K5 3 4 5 K For w = 3 we ge dsolve({d(d(x))()+9*x()=4*cos(3*),x()=,d(x)()=},x()); x = 3 sin 3 sol():=/3*sin(3*)*; env():=/3*; sol := 3 sin 3
env := 3 plo([sol(),env(),-env()],=..5,color=[black,red,red]); 5 5 K5 5 5 5 K K5 Forced Damped scillaors We consider equaions of he ype m d x d C c dx d C kx = F cos w For example assume ha m =, k =, c =, and F = 3 (he roos of he characerisaic polynomial 8 K C I are 55 K K I and 55 ). 56 56 We now in addiion assume ha w =.3 and solve he iniial value problem wih iniial condiions x()= dx d ()= resar:wih(deools):wih(plos): Warning, he name changecoords has been redefined de:=diff(x(),,)+/8*diff(x(),)+x()=3*cos(omega*); de := d d x C d 8 d x C x = 3 cos w dsolve({subs(omega=3/,de),x()=,d(x)()=},x()); x = K 3488 5657 ek 6 sin 6 55 55 K 4368 37 ek 6 cos 6 55
We now idenify he seady sae (he erm ha persiss in ) and he ransien he erm ha decays in. sol:=rhs(%); We now plo he soluion, seady sae and ransien on he same coordinae sysem. plo({sol,ransien,seady}, =..4,color=[magena,red,blue]); and C 8 37 sin 3 C 4368 37 cos 3 sol := K 3488 5657 ek 6 sin 6 55 55 K 4368 37 ek C 8 37 sin 3 C 4368 37 cos 3 ransien:=selec(has,sol,exp); ransien := K 3488 5657 ek K 4368 37 ek 6 cos 6 sin 6 6 55 55 55 6 cos seady:=remove(has,sol,exp); seady := 8 37 sin 3 C 4368 37 cos 3 5 4 3 K K K3 K4 6 55 3 4 plo({sol,ransien,seady}, =..8,color=[magena,red,blue]);
5 4 3 K K K3 K4 3 4 5 6 7 8 Noe ha he soluion "converges" o he saedy sae as /N. Also noe ha he seady sae is p periodic wih period which is he same as he period of he forcing funcion. Moreover, we 3 observe ha he seady sae is no in phase wih he forcing. To deermine he phase difference beween he seady sae and forcing, we wrie he seady sae in phase-ampliude form. s:=simplify(subs(=,seady)); s := 4368 37 phase_amp:=a*cos(3/*-dela); phase_amp := A cos K 3 C d p:=simplify(subs(=, phase_amp)); p := A cos d s:=simplify(subs(=,diff(seady,))); s := 54 37 p:=simplify(subs(=, diff(phase_amp,))); p := 3 A sin d solve({p=s,p=s},{a,dela}); d = arcan 5 Roof K C 37 _Z, label = _L7, 364 Roof K C 37 _Z, label = _L7 allvalues(%); 5 d = arcan, A = 364 37 = arcan 5 364, A = Roof K C 37 _Z, label = _L7 K p 37, A = K 37 37, d
evalf(%); A = 3.9397684, d =.4854885, d = K3.4765, A = K3.9397684 The seady sae is displaced in phase by abou.4 from he forcing. Nex we show ha he ampliude and phase of he seady sae are independen of he iniial condiions (hence he iniial condiions affec only he ransien). To do his we find a general soluion of he equaion and show ha x()=x and dx d ()=x appear only in he ransien erms. dsolve({subs(omega=3/,de),x()=x_,d(x)()=x_},x()); x = x = 33843855 ek C e K 6 cos 6 6 sin C 4368 37 cos 3 6 55 55 3536 x_ K 53 C 37 x_ 55 x_ K 4368 37 C 8 37 sin 3 combine(%,rig): collec(%,exp); 6 55 sin 55 55 x_ K 3488 6 5657 sin 6 C 55 sin 6 55 55 x_ C cos 6 55 x_ 55 55 K 4368 37 cos 6 C 4368 37 cos 3 55 e K 6 C 8 37 sin 3 We now consider he general equaion where w is a fixed posiive consan. We solve he equaion wih ha iniial condiions x()=x and dx d ()=x. We again idenify he seady sae and show i is independen of x and x. de; d d x C 8 d d x C x = 3 cos w dsolve({de,x()=x_,d(x)()=x_},x()); x = 55 K 6 64 K 7 w C 64 w 4 e sin 6 55 55 4 x_ w 4 K 9 C 64 x_ w 4 K 3 x_ w K 9 w K 7 x_ w C 4 x_ C 64 x_
C e K 6 cos 6 55 64 x_ K 7 x_ w C 64 x_ w 4 K 9 C 9 w 64 K 7 w C 64 w 4 C 4 sin w w C 9 cos w K 9 w cos w 64 K 7 w C 64 w 4 combine(%,rig): gen_sol:=collec(rhs(%),exp); gen_sol := 63 K 3385 w C 63 w 4 K3 sin 6 55 55 x_ w K 9 sin 6 55 55 w K 7 sin 6 55 55 x_ w C 4 sin 6 55 55 x_ C 64 sin 6 55 55 x_ C 63 cos 6 55 x_ K 3385 cos 6 55 x_ w C 63 cos 6 55 x_ w 4 K 4896 cos 6 55 C 4896 cos 6 55 w C 4 sin 6 55 55 x_ w 4 K 9 sin 6 55 55 C 64 sin 6 55 55 x_ w 4 e K 6 We now wrie he seady sae in he phase ampliude form. s:=simplify(subs(=,seady)); C 6 sin w w C 4896 cos w K 4896 w cos w 63 K 3385 w C 63 w 4 seady:=simplify(remove(has,%,exp)); seady := K 4 Ksin w w K 8 cos w C 8 w cos w 64 K 7 w C 64 w 4 9 K C w s := K 64 K 7 w C 64 w 4 phase_amp:=a*cos(omega*-dela); phase_amp := A cos w K d p:=simplify(subs(=,phase_amp));
p := A cos d s:=simplify(subs(=,diff(seady,))); 4 w s := 64 K 7 w C 64 w 4 p:=simplify(subs(=,diff(phase_amp,))); p := A sin d w solve({p=s,p=s},{a,dela}); d = arcan w Roof K C 64 K 7 w C 64 w 4 _Z, label = _L, 8 K 8 w Roof K C 64 K 7 w C 64 w 4 _Z, label = _L, A = 4 Roof K C 64 K 7 w C 64 w 4 _Z, label = _L allvalues(%); A = 4 64 K 7 w C 64 w 4, d = arcan w 64 K 7 w C 64 w 4, 8 K 8 w 64 K 7 w C 64 w 4, d = arcan Kw 64 K 7 w C 64 w 4, assign(%[]); We ake a value of d corresponding o a posiive value for A. We now compue he phase lag for differen w. evalf(subs(omega=,dela));.5779637 K 8 K 8 w 64 K 7 w C 64 w 4, A = K4 evalf(subs(omega=,dela)); 3.58454 evalf(subs(omega=3,dela)); 3.947594 So he phase lag is approximaely.57 when w =, 3.58 when w =, and 3.95 when w = 3. plo(dela,omega=...); 64 K 7 w C 64 w 4
3 We also deermine he ampliude of he seady sae as a funcion of he forcing frequency w. A; 4 64 K 7 w C 64 w 4 plo(a,omega=...); 3 4 5 6 7 8 9 omega 5 5 We finally find he value of w for which he ampliude is maximal. Aprime:=diff(A,omega); K54 w C 56 w 3 Aprime := K 64 K 7 w C 64 w 4 64 K 7 w C 64 w 4 solve(aprime=,omega);, 6 3 4 5 6 7 8 9 omega 54, K 6 54
evalf(%);.,.9968696, K.9968696 The maximum ampliude occurs when w is approximaely.996. This value is close o a which he corresponding undamped oscillaor exhibis resonance. Also no ha we exclude w = since hen he forcing is consan. subs(omega=.9968696,a); 4.473 Also noe ha unlike resonance he ampliude for his w is sill finie (approximaely 4.5).