{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 1 }0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }} {SECT 0 {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 48 "# Damped motion\n\n# filename = 05.2.mws\n\nrestart;" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 54 "x:='x':\n eq:=diff( x(t),t$2)+8*diff(x(t),t)+16*x(t)=0:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 39 "de:=dsolve(\{eq,x(0)=0,D(x)(0)=1\},x(t));" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 32 "assign(de):\n plot(x(t),t=0..3);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 52 "x:='x':\n DE:=dsolve(\{e q,x(0)=-0.5,D(x)(0)=5\},x(t));" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 32 "assign(DE):\n plot(x(t),t=0..2);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 9 "Example 2" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 53 "x: ='x':\n eq:=diff(x(t),t$2)+5*diff(x(t),t)+4*x(t)=0:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 40 "de:=dsolve(\{eq,x(0)=1,D(x)(0)=-1\},x(t)) ;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 32 "assign(de):\n plot(x( t),t=0..5);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 50 "x:='x':\n d e:=dsolve(\{eq,x(0)=1,D(x)(0)=-6\},x(t));" }}}{EXCHG {PARA 0 "> " 0 " " {MPLTEXT 1 0 32 "assign(de):\n plot(x(t),t=0..5);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 9 "Example 3" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 85 "x:='x':\nsol:=dsolve(\{diff(x(t),t$2)+diff(x(t),t)+16*x(t)=0, \n\011x(0)=0,D(x)(0)=1\},x(t));" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 80 "assign(sol):\n Plot_1:=plot(x(t),t=0..2*Pi):\n with(plots): \n display(\{Plot_1\});" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 119 "Plot_2:=plot(\{2/21*7^(1/2)*exp(-1/2*t),\n\011-2/21*7^(1/2)*exp(- 1/2*t)\},t=0..2*Pi,color=BLACK):\n display(\{Plot_1,Plot_2\});" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 26 "solve(3/2*sqrt(7)*t=Pi,t);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 9 "evalf(%);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 26 "cp:=solve(diff(x(t),t)=0);" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 15 "cp1:=evalf(cp);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 24 "evalf(subs(t=cp1,x(t)));" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 39 "cp2:=fsolve(diff(x(t),t)=0,t =1.5..2.0);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "cp2-cp1;" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 253 "spring:='spring':\n n:=15: eps:=0.1:\n spring:=proc(t0)\n\011local m,xt0,pts;\n\011xt0:=evalf(su bs(t=t0,x(t)));\n\011pts:=[[0,xt0],\n\011\011seq([eps*(-1)^m,xt0+m*(0. 25-xt0)/n],m=1..n-1),\n\011\011\011[0,0.25]];\n\011plot(pts,view=[-1.. 1,-0.25..0.25],\n\011\011xtickmarks=2,ytickmarks=2);\n\011end:" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 84 "with(plots):\n k_vals:=seq( k*6/59,k=0..59):\n to_animate:=[seq(spring(k),k=k_vals)]:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 37 "display(to_animate,insequence=true) ;\n" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 116 "k_vals:=seq(k*4/15, k=0..15):\n an_array:=display([seq(spring(k),k=k_vals)],\n\011\011ins equence=true):\n display(an_array);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 9 "Example 4" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 124 "x:='x': \nc:='c':\n d:=proc(c)\n\011dsolve(\{diff(x(t),t$2)+c*diff(x(t),t)+6* x(t)=0,\n\011\011x(0)=0,D(x)(0)=1\},x(t),method=laplace)\n\011end:" }} }{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 47 "somesols:=map(d,[2*sqrt(6), 4*sqrt(6),sqrt(6)]);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 47 "som esols:=map(d,[2*sqrt(6),4*sqrt(6),sqrt(6)]);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 97 "dsolve(\{diff(x(t),t$2)+2*sqrt(6)*diff(x(t),t)+6 *x(t)=0,\n\011\011x(0)=0,D(x)(0)=1\},x(t),method=laplace);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 31 "plot(map(rhs,somesols),t=0..4);" }} }{EXCHG {PARA 0 "" 0 "" {TEXT -1 9 "Example 5" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 17 "?dsolve,piecewise" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 76 "sol:=dsolve(\{diff(x(t),t$2)+diff(x(t),t)+5/4*x(t)=0, x(0)=0,D(x)(0)=1\},x(t));" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 46 "x1:=t->rhs(sol):\na:=eval(subs(t=Pi,rhs(sol)));" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 37 "b:=eval(subs(t=Pi,diff(rhs(sol),t)));" }} }{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 81 "sol2:=dsolve(\{diff(x(t),t$ 2)+3*diff(x(t),t)+5/4*x(t)=0,x(Pi)=a,D(x)(Pi)=b\},x(t));" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 32 "a:=eval(subs(t=2*Pi,rhs(sol2)));" } }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 40 "b:=eval(subs(t=2*Pi,diff(r hs(sol2),t)));" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 139 "sol3:=ds olve(\{diff(x(t),t$2)+diff(x(t),t)+5/4*x(t)=0,x(2*Pi)=a,D(x)(2*Pi)=b\} ,x(t)):\nsol3a:=convert(sol3,expsincos):\nsol3b:=simplify(sol3a);" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 159 "a:=eval(subs(t=2*Pi,rhs(sol 3))):\nb:=eval(subs(t=2*Pi,diff(rhs(sol3),t))):\nsol4:=dsolve(\{diff(x (t),t$2)+3*diff(x(t),t)+5/4*x(t)=0,x(2*Pi)=a,D(x)(2*Pi)=b\},x(t));" }} }{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 165 "p1:=plot(rhs(sol),t=0..Pi) :\np2:=plot(rhs(sol2),t=Pi..2*Pi):\np3:=plot(rhs(sol3b),t=2*Pi..3*Pi): \np4:=plot(rhs(sol4),t=3*Pi..4*Pi):\nwith(plots):\ndisplay(\{p1,p2,p3, p4\});" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 167 "altsol:=dsolve( \{diff(x(t),t$2)+piecewise(t>=0 and t=Pi and t<2*Pi,3,t>=2*Pi \+ and t<3*Pi,1,t>=3*Pi and t<4*Pi,3)*diff(x(t),t)+5/4*x(t)=0,x(0)=0,D(x) (0)=1\},x(t));" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}} {MARK "1 0 0" 0 }{VIEWOPTS 1 1 0 1 1 1803 1 1 1 1 }{PAGENUMBERS 0 1 2 33 1 1 }