# 2.7 Example 1, page 71 of Asmar, analysis in maple. # my''+cy'+ky=F(t) with F a sawtooth wave. # Assume here that we know F as a Fourier cosine series # and m=2, c=0.05, k=50. F:=unapply(10*cos((2*n+1)*t)/(2*n+1)^2,(n,t)); FS:=unapply(sum(F(n,t),n=0..infinity),t); FS(0); # FS is a sawtooth wave of height FS(0) and period 2*Pi plot(FS(t),t=0..4*Pi,axes=boxed); de:=2*diff(y(t),t,t)+0.05*diff(y(t),t)+50*y(t)=F(n,t); dsolve(de,y(t)); subs(_C1=0,_C2=0,%); Y:=unapply(rhs(%),(n,t)); Z:=unapply(evalf(sum(Y(n,t),n=0..5),2),t); # Dominant term is 1.6 sin(5t), from Y(2,t) # This is the term of the series solution whose frequency # most closely matches the natural frequency of the homogeneous # DE 2y''+0.05y'+50y=0, i.e., the practical resonance value # sqrt(k/m - c^2/(2 m^2)) for my''+cy'+ky=0. naturalFrequency := evalf(sqrt(50/2 - (0.05)^2/(2*2^2))); opts:=axes=boxed,color=[blue,red],thickness=2; plot({Z(t),1.6*sin(5*t)},t=0..2*Pi,opts); # Computer problem: analyze with maple Example 2 of Asmar page 74 # my''+cy'+ky=F(t), m=2, c=0.01, k=18.01 and F(t) is the # 2*Pi-periodic square wave with # F(t)=pulse(t,0,Pi)-pulse(t,Pi,2*Pi) on 0 <= t <= 2*Pi.