{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 56 "Example 1, Chapter 6.4: Discontinuous Forcing functions" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 34 "g:=Heaviside(t-5)-Heaviside( t-20);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 43 "de:=2*diff(y(t),t $2)+diff(y(t),t)+2*y(t)=g;" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }} {PARA 0 "" 0 "" {TEXT -1 232 "We could solve this directly using dsolv e, but it may be nice to be able to check the steps we take when we're manually solving this differential equation. Below, we take the Lapl ace transform and solve for Y(s) as we did in class." }}}{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)=0\},Y);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 32 "Y2:=solve(Y1,laplace(y(t),t,s));" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 21 "H:=1/(s*(2*s^2+s+2));" }}} {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 o ur work, we'll solve it directly. Note the use of \"method=laplace\" \+ in the dsolve command." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 54 "Y s:=dsolve(\{de,y(0)=0,D(y)(0)=0\},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..40,color=black,linestyl e=[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 t he derivatives of the solution- Which derivatives are continuous, and \+ which are not?" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 12 "yy:=rhs(Y s):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 39 "plot(diff(yy,t$2),t= 0..40,color=black);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 84 "In the sec ond derivative of y(t), there are large discontinuities at times 5 and 20." }}}}{MARK "0 1 0" 56 }{VIEWOPTS 1 1 0 1 1 1803 1 1 1 1 } {PAGENUMBERS 0 1 2 33 1 1 }