lecture5.mws

 > with(plots):with(DEtools):

Warning, the name changecoords has been redefined

Oscillation general

 > de:=diff(u(t),t\$2)+16*diff(u(t),t)+192*u(t)=0;

 > sol:=dsolve({de,u(0)=1/2,D(u)(0)=0});

 > plot(solve(sol,u(t)),t=0..1);

No dampening

 > de:=diff(u(t),t\$2)+192*u(t)=0;

 > sol:=dsolve({de,u(0)=1/6,D(u)(0)=-1});

 > plot(solve(sol,u(t)),t=0..1.5);

Dampening

 > de:=diff(u(t),t\$2)+a*diff(u(t),t)+192*u(t)=0;

 > sol:=dsolve({de,u(0)=1,D(u)(0)=10}):

 > sol:=solve(sol,u(t));

 > plot(subs(a=1,sol),t=0..2);

 > plot({subs(a=0,sol),subs(a=5,sol),subs(a=10,sol),subs(a=20,sol)},t=0..1,thickness=3);

 > plot({subs(a=0,sol),subs(a=27.7,sol),subs(a=60,sol)},t=0..1.6,thickness=3);

Beats

 > de:=diff(u(t),t\$2)+u(t)=1/2*cos(0.8*t);

 > sol:=dsolve({de,u(0)=0,D(u)(0)=1/4});

 > sol:=solve(sol,u(t));

 > plot(sol,t=0..50);

 > plot(sol,t=0..200);

Resonance

 > de:=diff(u(t),t\$2)+u(t)=0.5*cos(t);

 > sol:=dsolve({de,u(0)=0,D(u)(0)=1/4});

 > sol:=solve(sol,u(t));

 > plot(sol,t=0..50);

Forced with Dampening

 > de:=diff(u(t),t\$2)+1/8*diff(u(t),t)+u(t)=3*cos(a*t);

 > sol:=solve(dsolve({de,u(0)=0,D(u)(0)=1/4}),u(t));

 > a:=5:

 > plot(sol,t=0..50);

 > a:=1/10:

 > plot(sol,t=0..180);

 > a:=1:

 > plot(sol,t=0..100);

Resonance curve

 > m:=1:omega0:=1:

 > Delta:=sqrt(m^2*(omega0^2-omega^2)^2+g^2*omega^2);

 > plot(subs(g=1/2,1/Delta),omega=0.1..2);

 > display(seq(plot(subs(g=n,1/Delta),omega=0..2),n=[1/16,1/8,1/4,3/8,1/2,1,3]));

Higher order homogeneous

 > de:=diff(y(t),t\$9)-43*diff(y(t),t\$6)+496*diff(y(t),t\$3)-1728*y(t)=0;

 > factor(r^9-43*r^6+496*r^3-1728);

 > solve(r^2+2*r+4=0,r);

 > solve(r^2+3*r+9=0,r);

 > dsolve(de);

Undetermined coefficients

 > de:=diff(y(t),t\$4)-2*diff(y(t),t\$2)+y(t)=exp(t)+sin(t);

 > de2:=diff(y(t),t\$4)-2*diff(y(t),t\$2)+y(t)=0;

 > dsolve(de2);

 > dsolve(de);