# Math 2250 Maple Lab 6. Mechanical Vibrations. # L6-1 # EXAMPLE(Wrong parameters! Change it!) # Use semicolons to see what you have done. # Define the differential equation de:=3*diff(x(t),t,t)+1.5*diff(x(t),t)+4*x(t)=0: # Solve the characteristic equation. solve(3*r^2+1.5*r+4=0,r); # Define the initial conditions ic:=x(0)=0,D(x)(0)= 1: # Symbolically solve for x(t) p:=dsolve({de,ic},x(t),method=laplace): # Capture the dsolve symbolic solution as a function X(t) X:=unapply(rhs(p),t): # Plot the solution plot(X(t),t=0..5); # L6-2 #EXAMPLE(Beware! Wrong values!) F:=15: m:=1: k:=25: c:='c': w:='w': C:=(w,c)->F/sqrt((k-m*w*w)^2+(c*w)^2): plot({C(w,4),C(w,3),C(w,2)},w=0..15,color=black);