6.3 and 6.4. Step functions and Dirac delta functions 

 

The following graphs illustrate the effect of the external force on the solution of an IVP associated to vertical oscillation of a mass-spring system. I am interested in the case when the external force is either a step function (case 3) or a Dirac delta function (case 4), but the homogeneous and sine/cosine cases are also given for comparison. 

 

The IVP is:       y'' + 4y = r(t),   y(0)=1,   y'(0)=0,   where 

y(t) = vertical displacement at time t from the equilibrium position 

 

 

> with(plots); -1
 

 

Case 1. r(t) is identical zero (undamped homogeneous IVP) 

In tihs case the solution is y(t)=cos(2t). 

 

> plot(cos(2*t), t = 0 .. 4*Pi, thickness = 1, linestyle = 3, labels = ([t, y])); 1
 

Plot 

> g1 := plot(cos(2*t), t = 0 .. 4*Pi, thickness = 1, linestyle = 3); -1
 

 

Case 2. r(t) = sin(t) (undamped nonresonant IVP) 

The solution is y(t)=

 

 

> plot(cos(2*t)-1/6*sin(2*t)+1/3*sin(t), t = 0 .. 4*Pi, thickness = 2, color = blue); 1
plot(cos(2*t)-1/6*sin(2*t)+1/3*sin(t), t = 0 .. 4*Pi, thickness = 2, color = blue); 1
 

Plot 

> g2 := plot(cos(2*t)-1/6*sin(2*t)+1/3*sin(t), t = 0 .. 4*Pi, thickness = 2, color = blue); -1
g2 := plot(cos(2*t)-1/6*sin(2*t)+1/3*sin(t), t = 0 .. 4*Pi, thickness = 2, color = blue); -1
 

> g3 := plot(sin(t), t = 0 .. 4*Pi, thickness = 2, linestyle = 2, color = green); -1
 

> display([g1, g2, g3], labels = ([t, y])); 1
 

Plot 

 

Case 3. r(t) = u(t-Pi)  

The solution is y(t)= 

makes the new equilibrium be 1/4. 

 

> g4 := plot(cos(2*t), t = 0 .. Pi, thickness = 2, color = blue); -1
 

> g5 := plot(3/4*cos(2*t)+1/4, t = Pi .. 4*Pi, thickness = 2, color = blue); -1
 

> g6 := plot(0, t = 0 .. Pi, thickness = 2, linestyle = 2, color = green); -1; g7 := plot(1, t = Pi .. 4*Pi, thickness = 2, linestyle = 2, color = green); -1
g6 := plot(0, t = 0 .. Pi, thickness = 2, linestyle = 2, color = green); -1; g7 := plot(1, t = Pi .. 4*Pi, thickness = 2, linestyle = 2, color = green); -1
 

> display([g1, g4, g5, g6, g7], labels = ([t, y])); 1
 

Plot 

 

Case 4. r(t) = 4 delta(t-Pi)  

The solution is y(t)= 


 

 

> g8 := plot(cos(2*t)+2*sin(2*t), t = Pi .. 4*Pi, thickness = 2, color = blue); -1
 

> g9 := plot(0, t = Pi .. 4*Pi, thickness = 2, linestyle = 2, color = green); -1; g10 := plot(100*t-100*Pi, t = Pi .. Pi+.1, y = -3 .. 3, thickness = 3, linestyle = 2, color = green); -1
g9 := plot(0, t = Pi .. 4*Pi, thickness = 2, linestyle = 2, color = green); -1; g10 := plot(100*t-100*Pi, t = Pi .. Pi+.1, y = -3 .. 3, thickness = 3, linestyle = 2, color = green); -1
g9 := plot(0, t = Pi .. 4*Pi, thickness = 2, linestyle = 2, color = green); -1; g10 := plot(100*t-100*Pi, t = Pi .. Pi+.1, y = -3 .. 3, thickness = 3, linestyle = 2, color = green); -1
 

> display([g1, g4, g8, g6, g9, g10], labels = ([t, y])); 1
 

Plot 

>