Damped springs with forcing
Some MAPLE output is omitted for simplicity. To see them, run the commands in MAPLE. This was written in MAPLE 5 but should work in later versions.
wdj,1-14-98
>
de1:=2*diff(x(t),t$2)+4*diff(x(t),t)+100*x(t)=0;
ic1:=x(0)=0,D(x)(0)=1;
> soln1:=dsolve({de1,ic1},x(t));
>
y1:=s->subs(t=s,rhs(simplify(soln1))):
y1(t);
> plot(y1(t),t=0..5,title=`damped spring with no forcing`);
>
>
de2:=2*diff(x(t),t$2)+4*diff(x(t),t)+100*x(t)=2*sin(7*t);
ic2:=x(0)=0,D(x)(0)=0;
>
soln2:=dsolve({de2,ic2},x(t));
Notice the unusual form of the solution MAPLE gives without putting in the
method=laplace
option.
> soln2:=dsolve({de2,ic2},x(t),method=laplace);
>
y2:=s->subs(t=s,rhs(simplify(soln2))):
y2(t);
> plot(y2(t),t=0..5,title=`damped spring with forcing`);
> with(student);
>
max_y1:=maximize(y1(t),{t},{t=0..10}):
evalf(max_y1);
max_y2:=maximize(y2(t),{t},{t=0..10}):
evalf(max_y2);
>
min_y1:=minimize(y1(t),{t},{t=0..10}):
evalf(min_y1);
min_y2:=minimize(y2(t),{t},{t=0..10}):
evalf(min_y2);
>
min2_y1:=maximize(-y1(t),{t},{t=0..10}):
evalf(min2_y1);
min2_y2:=maximize(-y2(t),{t},{t=0..10}):
evalf(min2_y2);
The amplitudes of the steady state part and transient part of the solution can be determined from the coefficients of the terms of y2(t):
>
c1:=op(1,op(1,y2(t)));evalf(c1);
c2:=op(1,op(2,y2(t)));evalf(c2);
A:=sqrt(c1^2+c2^2);evalf(A);
A1:=op(1,op(3,y2(t)));evalf(A1);
A2:=op(1,op(4,y2(t)));evalf(A2);
B:=sqrt(A1^2+A2^2);evalf(B);
> phi:=arctan(c2/c1); evalf(phi);
>
cos(phi); c1/A;
sin(phi); c2/A;
A*exp(-t)*cos(7*t-phi);
The transient term
> theta:=arctan(A2/A1)+Pi; evalf(theta);
>
cos(theta); A1/B;
sin(theta); A2/B;
B*cos(10*t-theta);
The steady state term
>