Math 331.1 •  Fall 2005

Response for finite impulse

Copyright © 2005 Murray Eisenberg.  All rights reserved.

Math 431 • 6 May 1999

Model:

	y''  =  (Subscript[d, 3,  h])(t),      
      y(0)  =  0,  y' (0)  =  1

The following sequence of cells will plot the three-piece solution (Subscript[y, h])(t) to this finite-impulse model.

\(y[t_, \ h_]\  := \ 
      Which[
		0\  ≤ \ t\  < \ 3, \ t, \ 
		
        3\  ≤ \ t\  < \ 3\  + \ h, \ 
        t\  + \ \(1\/\(2  h\)\) \((t\  - \ 3)\)\^2, 
		
        3\  + \ h\  ≤ \ t, \ 
        t\  + \ \(1\/\(2  h\)\) 
            \((\((t\  - \ 3)\)\^2\  - \ \((t\  - \ \((3\  + \ h)\))\)\^2)\)\ ]
        \)

\(a[h_]\  := \ 
      Plot[y[t, \ h], \ {t, \ 0, \ 3}, \ 
        PlotStyle\  -> RGBColor[1, 0, 0], 
	
        DisplayFunction\  -> \ Identity, \ 
        AspectRatio\  -> \ 0.85]; 

    b[h_]\  := \ 
      Plot[y[t, \ h], \ {t, \ 3, \ 3 + \ h}, \ 
        PlotStyle\  -> RGBColor[0, 0, 1], 
	
        DisplayFunction\  -> \ Identity]; 

    c[h_]\  := \ 
      Plot[y[t, \ h], \ {t, \ 3\  + \ h, \ 5}, \ 
        PlotStyle\  -> \ RGBColor[1, 0, 1], 
	
        DisplayFunction\  -> \ Identity]\)

graph[h_]  :=  
      Show[{a[h],  b[h],  c[h]},  
        DisplayFunction  ->  $DisplayFunction];

For example:

graph[0.5];

After evaluating the next cell, animate the entire group of graphs to visualize the limiting function:

	\(TraditionalForm
      \`y(t)\  = \ lim\_\(\ h -> \ \(0\^+\)\ \ \)\(y\_h\)(t)\)

Table[graph[h],  {h,  1.0,  0.1,  -0.05}];