{VERSION 5 0 "IBM INTEL NT" "5.0" } {USTYLETAB {CSTYLE "Maple Input" -1 0 "Courier" 0 1 255 0 0 1 0 1 0 0 1 0 0 0 0 1 }{PSTYLE "Normal" -1 0 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 }0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }} {SECT 0 {EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 75 "Example 2, Chapter 6.4: Discontinuous Forcing functions (Probl em 9, p 322)" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 56 "g:=(t/2)*(H eaviside(t)-Heaviside(t-6))+3*Heaviside(t-6);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 26 "de:=diff(y(t),t$2)+y(t)=g;" }}}{EXCHG {PARA 0 " " 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 232 "We could solve th is directly using dsolve, but it may be nice to be able to check the s teps we take when we're manually solving this differential equation. \+ Below, we take the Laplace transform and solve for Y(s) as we did in c lass." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 15 "with(inttrans):" } }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 19 "Y:=laplace(de,t,s);" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 31 "Y1:=subs(\{y(0)=0,D(y)(0)=1 \},Y);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 32 "Y2:=solve(Y1,lapl ace(y(t),t,s));" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 49 "H:=1/(s^ 2*(s^2+1)); #This is the H(s) as in class" }}}{EXCHG {PARA 0 "> " 0 " " {MPLTEXT 1 0 21 "convert(H,parfrac,s);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 18 "invlaplace(H,s,t);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 123 "Now that we have double checked our work, we'll solve it direc tly. Note the use of \"method=laplace\" in the dsolve command." }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 54 "Ys:=dsolve(\{de,y(0)=0,D(y)( 0)=1\},y(t),method=laplace);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 57 "Now we'll compare the forcing function \+ g to the solution:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 86 "plot( [g,rhs(Ys)],t=0..15,color=black,linestyle=[1,2],title=\"Forcing versus Response\");" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 106 "We'll take a look at the derivatives of the solution- Which derivatives are continuous, and which are not?" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 12 "yy:=rhs(Ys):" }}}{EXCHG {PARA 0 "> \+ " 0 "" {MPLTEXT 1 0 39 "plot(diff(yy,t$3),t=0..40,color=black);" }}}} {MARK "8 0 0" 49 }{VIEWOPTS 1 1 0 1 1 1803 1 1 1 1 }{PAGENUMBERS 0 1 2 33 1 1 }