# A couple of 2nd order spring problems are solved for a couple different # masses and spring constants. # # APPLICATIONS TO HIGHER ORDER DE's- # SPRING PROBLEMS # Dr. Kirschner, Math 308 # # > diffeq:=m*diff(u(t),t$2)+mygamma*diff(u(t),t)+k*u(t)=F; / 2 \ | d | / d \ diffeq := m |----- u(t)| + mygamma |---- u(t)| + k u(t) = F | 2 | \ dt / \ dt / # For example number 5 page 181: # > m:=2/32; mygamma:=0; k:=2/(1/2); F:=0; inits:=u(0)= -1/4,D(u)(0)=0; m := 1/16 mygamma := 0 k := 4 F := 0 inits := u(0) = -1/4, D(u)(0) = 0 > dsolve({diffeq,inits},u(t)); u(t) = - 1/4 cos(8 t) # From the solution, we read off that the amplitude is 1/4, the # period is 8, and the frequency is (2*Pi)/8. > with(plots): plot(rhs("), x=0..10); Error, (in rhs) invalid arguments # This is problem number 9, page 188. # # > restart;diffeq:=m*diff(u(t),t$2)+mygamma*diff(u(t),t)+k*u(t)=F; / 2 \ | d | / d \ diffeq := m |----- u(t)| + mygamma |---- u(t)| + k u(t) = F | 2 | \ dt / \ dt / > m:=6/32;mygamma:=0;k:=1/(1/2);F:=4*cos(7*t);inits:=u(0)=0,D(u)(0)=0; m := 3/16 mygamma := 0 k := 2 F := 4 cos(7 t) inits := u(0) = 0, D(u)(0) = 0 > interface(labelling=false); sol:=dsolve({diffeq,inits},u(t)); 32 28 1/2 32 sol := u(t) = - --- %1 cos(%2) + --- %1 cos(%2) 6 - --- %1 cos(%4) 115 115 115 28 1/2 32 28 1/2 - --- %1 cos(%4) 6 - --- %3 sin(%4) - --- %3 sin(%4) 6 115 115 115 32 28 1/2 64 - --- %3 sin(%2) + --- %3 sin(%2) 6 + --- %1 115 115 115 1/2 %1 := cos(4/3 6 t) 1/2 %2 := 4/3 6 t + 7 t 1/2 %3 := sin(4/3 6 t) 1/2 %4 := 4/3 6 t - 7 t > plot(rhs(sol),t=0..40); # NOW, we see one more example, page 190, #22. # # > restart;diffeq:=diff(u(t),t$2)+0.125*diff(u(t),t)+u(t)=F; inits:=u(0)=2,D(u)(0)=0; / 2 \ | d | / d \ diffeq := |----- u(t)| + .125 |---- u(t)| + u(t) = F | 2 | \ dt / \ dt / inits := u(0) = 2, D(u)(0) = 0 > F:=3*cos(t); F := 3 cos(t) > sol:=dsolve({diffeq,inits},u(t)); sol := u(t) = .7514691495 %2 cos(1.998044964 t) - .02350638884 %2 sin(1.998044964 t) - .7514691944 %2 cos(.001955036200 t) + 24.02350639 %2 sin(.001955036200 t) + 24.02350639 %1 cos(.001955036200 t) + .7514691944 %1 sin(.001955036200 t) + .02350638884 %1 cos(1.998044964 t) + .7514691495 %1 sin(1.998044964 t) + 2.000000045 exp( - .06250000000 t) %2 - 23.92176793 exp( - .06250000000 t) %1 %1 := sin(.9980449638 t) %2 := cos(.9980449638 t) > trange:=t=0..100: a:=plot(rhs(sol),trange,thickness=3): b:= plot(F,trange): with(plots): display([a,b]); # As one can see, the amplitude of the response is much larger # than the amplitude of the forcing function (The signal was # amplified.) # There is a quarter wavelength or 90 degree lag between the # response and the signal (The signal F crosses the x-axis going # up, then a quarter of a wavelength later, the response u crosses # going up.) #