{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 }{CSTYLE "2D Math" -1 2 "Times" 1 12 0 0 0 1 0 0 0 2 2 2 0 0 0 1 }{CSTYLE "2D Comment" 2 18 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 }{CSTYLE "_cstyle1" -1 202 "MS Serif" 1 18 0 0 0 1 2 1 2 2 2 2 0 0 0 1 }{CSTYLE "_cstyle2" -1 203 "MS Serif" 1 18 0 0 0 0 0 1 0 2 2 2 0 0 0 1 }{CSTYLE "_cstyle3" -1 204 "Times" 1 12 0 0 0 1 2 2 2 2 2 2 0 0 0 1 }{CSTYLE "_cstyle4" -1 205 "Times" 0 1 0 0 0 0 0 0 0 2 2 2 0 0 0 1 } {CSTYLE "_cstyle5" -1 206 "Courier" 1 12 255 0 0 1 2 1 2 2 1 2 0 0 0 1 }{CSTYLE "_cstyle6" -1 207 "Times" 1 12 0 0 0 1 1 2 2 2 2 2 0 0 0 1 }{CSTYLE "_cstyle7" -1 208 "Times" 1 10 0 0 0 1 2 2 2 2 2 2 0 0 0 1 } {CSTYLE "_cstyle8" -1 209 "Times" 1 12 0 0 0 1 2 1 2 2 2 2 0 0 0 1 } {CSTYLE "_cstyle9" -1 210 "Courier" 1 12 255 0 0 1 2 1 2 2 1 2 0 0 0 1 }{CSTYLE "_cstyle10" -1 211 "Courier" 1 12 255 0 0 1 0 1 0 2 1 2 0 0 0 1 }{CSTYLE "_cstyle11" -1 212 "Times" 1 12 0 0 0 1 2 2 2 2 2 2 0 0 0 1 }{CSTYLE "" -1 256 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE " " -1 257 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 }{PSTYLE "Normal" -1 0 1 {CSTYLE "" -1 -1 "Times" 1 12 0 0 0 1 2 2 2 2 2 2 1 1 1 1 }1 1 0 0 0 0 1 0 1 0 2 2 0 1 }{PSTYLE "_pstyle1" -1 200 1 {CSTYLE "" -1 -1 "MS Se rif" 1 18 0 0 0 1 2 1 2 2 2 2 1 1 1 1 }1 1 0 0 8 4 2 0 2 0 2 2 0 1 } {PSTYLE "_pstyle2" -1 201 1 {CSTYLE "" -1 -1 "Times" 1 12 0 0 0 1 2 2 2 2 2 2 1 1 1 1 }1 1 0 0 0 0 2 0 2 0 2 2 0 1 }{PSTYLE "_pstyle3" -1 202 1 {CSTYLE "" -1 -1 "Courier" 1 12 255 0 0 1 2 1 2 2 1 2 1 1 1 1 } 1 1 0 0 0 0 2 0 2 0 2 2 0 1 }{PSTYLE "_pstyle4" -1 203 1 {CSTYLE "" -1 -1 "MS Serif" 1 18 0 0 0 1 2 1 2 2 2 2 1 1 1 1 }1 1 0 0 8 4 1 0 1 0 2 2 0 1 }{PSTYLE "_pstyle5" -1 204 1 {CSTYLE "" -1 -1 "Times" 1 12 0 0 0 1 2 2 2 2 2 2 1 1 1 1 }1 1 0 0 0 0 2 0 2 0 2 2 0 1 }{PSTYLE "_ps tyle6" -1 205 1 {CSTYLE "" -1 -1 "Times" 1 12 0 0 0 1 2 2 2 2 2 2 1 1 1 1 }1 1 0 0 0 0 1 0 1 0 2 2 0 1 }{PSTYLE "Normal" -1 256 1 {CSTYLE " " -1 -1 "Times" 1 12 0 0 0 1 2 2 2 2 2 2 1 1 1 1 }3 1 0 0 0 0 1 0 1 0 2 2 0 1 }{PSTYLE "" 0 257 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 }3 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }} {SECT 0 {SECT 1 {PARA 200 "" 0 "" {TEXT 202 7 "Restart" }{TEXT 203 0 " " }}{EXCHG {PARA 201 "" 0 "" {TEXT 204 44 "Some packages that we use i n this worksheet:" }{TEXT 205 0 "" }}{PARA 201 "> " 0 "" {MPLTEXT 1 206 21 "restart: with(plots):" }{TEXT -1 0 "" }}}}{SECT 1 {PARA 200 " " 0 "" {TEXT 202 12 "Introduction" }{TEXT 203 0 "" }}{PARA 201 "" 0 " " {TEXT 204 152 "In this worksheet we use some definitions by Anton Dz hamay from University of Michigan to compute solutions to some example s and problems from out text " }{TEXT 207 64 "Introduction to Partial \+ Differential Equations with Applications" }{TEXT 204 4 " by " }{TEXT 208 31 "E.C. Zachmanoglou and D.W. Thoe" }{TEXT 204 2 ". " }{TEXT 205 0 "" }}}{SECT 1 {PARA 200 "" 0 "" {TEXT 202 11 "Definitions" }{TEXT 203 0 "" }}{EXCHG {PARA 201 "> " 0 "" {MPLTEXT 1 206 37 "assume(n,inte ger);\nassume(m,integer);" }{TEXT 205 0 "" }}}{EXCHG {PARA 201 "" 0 " " {TEXT 204 38 "Shorthand notation for basic functions" }{TEXT 205 0 " " }}{PARA 201 "> " 0 "" {MPLTEXT 1 206 63 "s:=(x,n)->sin(n*Pi*x/L):s(x ,n);\nc:=(x,n)->cos(n*Pi*x/L):c(x,n);" }{TEXT 205 0 "" }}}{EXCHG {PARA 201 "" 0 "" {TEXT 204 30 "Fourier sine coefficients for " } {XPPEDIT 2 0 "f(x)" "6#-%\"fG6#%\"xG" }{TEXT 204 18 " on the interval " }{XPPEDIT 2 0 "[0,L]" "6#7$\"\"!%\"LG" }{TEXT 204 1 " " }{TEXT 205 0 "" }}{PARA 201 "> " 0 "" {MPLTEXT 1 206 120 "B:=proc(expr,var,n)\n \+ simplify(int(expr*s(var,n),var=0..L)/int(s(var,n)*s(var,n),var=0 ..L));\nend proc:B(f(x),x,n);" }{TEXT 205 0 "" }}}{EXCHG {PARA 201 "" 0 "" {TEXT 204 32 "Fourier cosine coefficients for " }{XPPEDIT 2 0 "f( x)" "6#-%\"fG6#%\"xG" }{TEXT 204 18 " on the interval " }{XPPEDIT 2 0 "[0,L]" "6#7$\"\"!%\"LG" }{TEXT 204 44 " (note that the formulas ar e different for " }{XPPEDIT 2 0 "n=0" "6#/%\"nG\"\"!" }{TEXT 204 6 " \+ and " }{XPPEDIT 2 0 "n>0" "6#2\"\"!%\"nG" }{TEXT 204 2 " )" }{TEXT 205 0 "" }}{PARA 201 "> " 0 "" {MPLTEXT 1 206 132 "A:=proc(expr,var,n) \n simplify(int(expr*c(var,n),var=0..L)/int(c(var,n)*c(var,n),v ar=0..L));\nend proc:A(f(x),x,0);A(f(x),x,n);" }{TEXT 205 0 "" }}} {EXCHG {PARA 201 "" 0 "" {TEXT 204 30 "Full Fourier coefficients for \+ " }{XPPEDIT 2 0 "f(x)" "6#-%\"fG6#%\"xG" }{TEXT 204 18 " on the inter val " }{XPPEDIT 2 0 "[-L, L];" "6#7$,$%\"LG!\"\"F%" }{TEXT 204 1 " " } {TEXT 205 0 "" }}{PARA 201 "> " 0 "" {MPLTEXT 1 206 262 "Bf:=proc(expr ,var,n)\n simplify(int(expr*s(var,n),var=-L..L)/int(s(var,n)*s( var,n),var=-L..L));\nend proc:Bf(f(x),x,n);\nAf:=proc(expr,var,n)\n \+ simplify(int(expr*c(var,n),var=-L..L)/int(c(var,n)*c(var,n),var=- L..L));\nend proc:Af(f(x),x,0);Af(f(x),x,n);" }{TEXT 205 0 "" }}} {EXCHG {PARA 201 "" 0 "" {TEXT 204 53 "Fourier sine series and Fourier sine polynomial for " }{XPPEDIT 2 0 "f(x)" "6#-%\"fG6#%\"xG" }{TEXT 204 17 " on the interval " }{XPPEDIT 18 0 "[0, L];" "6#7$\"\"!%\"LG" } {TEXT 204 65 " (The subtle difference here is that sometimes series (t hat uses " }{TEXT 209 3 "sum" }{TEXT 204 64 ") has troubles with divis ion by zero. The polynomial (that uses " }{TEXT 209 3 "add" }{TEXT 204 84 ") does not have this problem, but on the other hand can not ev aluate symbolic sums)." }{TEXT 205 0 "" }}{PARA 201 "> " 0 "" {MPLTEXT 1 206 172 "FPs:=proc(expr,var,n)\n add(B(expr,var,m)*s (var,m),m=1..n);\nend proc:\nFSs:=proc(expr,var,n)\n sum(B(expr ,var,m)*s(var,m),m=1..n);\nend proc:FSs(f(x),x,infinity);" }{TEXT 205 0 "" }}}{EXCHG {PARA 201 "" 0 "" {TEXT 204 56 "Fourier cosine series a nd Fourier cosine polynomial for " }{XPPEDIT 2 0 "f(x)" "6#-%\"fG6#%\" xG" }{TEXT 204 17 " on the interval " }{XPPEDIT 18 0 "[0, L];" "6#7$\" \"!%\"LG" }{TEXT 205 0 "" }}{PARA 201 "> " 0 "" {MPLTEXT 1 206 200 "FP c:=proc(expr,var,n)\n A(expr,var,0)+add(A(expr,var,m)*c(var,m), m=1..n);\nend proc:\nFSc:=proc(expr,var,n)\n A(expr,var,0)+sum( A(expr,var,m)*c(var,m),m=1..n);\nend proc:FSc(f(x),x,infinity);" } {TEXT 205 0 "" }}}{EXCHG {PARA 201 "" 0 "" {TEXT 204 52 "Full Fourier \+ series and full Fourier polynomial for " }{XPPEDIT 2 0 "f(x)" "6#-%\"f G6#%\"xG" }{TEXT 204 17 " on the interval " }{XPPEDIT 18 0 "[-L, L];" "6#7$,$%\"LG!\"\"F%" }{TEXT 205 0 "" }}{PARA 202 "> " 0 "" {MPLTEXT 1 210 249 "FP:=proc(expr,var,n)\n Af(expr,var,0)+add(Af(expr,var, m)*c(var,m)+Bf(expr,var,m)*s(var,m),m=1..n);\nend proc:\nFS:=proc(expr ,var,n)\n Af(expr,var,0)+sum(Af(expr,var,m)*c(var,m)+Bf(expr,va r,m)*s(var,m),m=1..n);\nend proc:FS(f(x),x,infinity);" }{MPLTEXT 1 211 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 98 "pext:=proc(expr, var,L)\n unapply(unapply(expr,var)(var - floor((var+L)/(2*L))*2*L),v ar)\nend proc:" }}}}{SECT 1 {PARA 203 "" 0 "" {TEXT -1 33 "Chapter VII , Example 8.5 (p. 216)" }}{EXCHG {PARA 202 "> " 0 "" {MPLTEXT 1 211 8 "L := Pi;" }}}{EXCHG {PARA 202 "> " 0 "" {MPLTEXT 1 211 25 "FSc(x*(Pi- x),x,infinity);" }}}{EXCHG {PARA 202 "> " 0 "" {MPLTEXT 1 211 25 "FSs( x*(Pi-x),x,infinity);" }}}{EXCHG {PARA 202 "> " 0 "" {MPLTEXT 1 211 60 "F :=piecewise(x>=-Pi and x<0, -1, x=0, 0, x>0 and x<=Pi, 1);" }}} {EXCHG {PARA 202 "> " 0 "" {MPLTEXT 1 211 17 "FS(F,x,infinity);" }}} {EXCHG {PARA 202 "> " 0 "" {MPLTEXT 1 211 70 "G :=piecewise(x>=-Pi and x<0, -Pi-2*x, x=0, 0, x>0 and x<=Pi, Pi-2*x);" }}}{EXCHG {PARA 202 "> " 0 "" {MPLTEXT 1 211 17 "FS(G,x,infinity);" }}}}{SECT 1 {PARA 203 " " 0 "" {TEXT -1 34 "Chapter VIII, Problem 8.5 (p. 316)" }}{EXCHG {PARA 202 "> " 0 "" {MPLTEXT 1 211 22 "L := 'L'; assume(L>0);" }}} {EXCHG {PARA 202 "> " 0 "" {MPLTEXT 1 211 22 "psi := L/2-abs(x-L/2);" }}}{EXCHG {PARA 202 "> " 0 "" {MPLTEXT 1 211 27 "plot(subs(L=1,psi),x= 0..1);" }}}{EXCHG {PARA 202 "> " 0 "" {MPLTEXT 1 211 20 "FSs(psi,x,inf inity);" }}}{EXCHG {PARA 202 "> " 0 "" {MPLTEXT 1 211 65 "u := sum(B(p si,x,m)*s(x,m)*sin(m*Pi*t/L)/(m*Pi/L),m=1..infinity);" }}}{EXCHG {PARA 204 "" 0 "" {TEXT 212 29 "Check the boundary condition:" }}} {EXCHG {PARA 202 "> " 0 "" {MPLTEXT 1 211 30 "simplify(subs(t=0,diff(u ,t)));" }}}}{SECT 1 {PARA 203 "" 0 "" {TEXT -1 34 "Chapter VIII, Probl em 8.6 (p. 316)" }}{EXCHG {PARA 202 "> " 0 "" {MPLTEXT 1 211 27 "L := \+ 'L'; assume (0 " 0 "" {MPLTEXT 1 211 48 "psi := piecewise(x>(L-a)/2 and x<(L+a)/2, 1, 0);" }}}{EXCHG {PARA 202 "> " 0 "" {MPLTEXT 1 211 52 "plot(subs(L=1,a=1/5,psi),x=0..1, view =[0..1,-1..1]);" }}}{EXCHG {PARA 202 "> " 0 "" {MPLTEXT 1 211 20 "FSs( psi,x,infinity);" }}}{EXCHG {PARA 202 "> " 0 "" {MPLTEXT 1 211 65 "u : = sum(B(psi,x,m)*s(x,m)*sin(m*Pi*t/L)/(m*Pi/L),m=1..infinity);" }}} {EXCHG {PARA 204 "" 0 "" {TEXT 212 29 "Check the boundary condition:" }}}{EXCHG {PARA 202 "> " 0 "" {MPLTEXT 1 211 30 "simplify(subs(t=0,dif f(u,t)));" }}}{EXCHG {PARA 202 "> " 0 "" {MPLTEXT 1 211 76 "P := subs( L=Pi,a=1/5,sum(B(psi,x,m)*s(x,m)*sin(m*Pi*t/L)/(m*Pi/L),m=1..35)):" }} }{EXCHG {PARA 202 "> " 0 "" {MPLTEXT 1 211 56 "animate( P,x=0..Pi, t=0 ..2*Pi, frames=100, thickness=2);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 61 "For comparison, here is the D'Alembert ('integral') solution:" }} {PARA 257 "" 0 "" {XPPEDIT 18 0 "u = (phi(x+t)+phi(x-t))/2+1/2*int(psi (s),s = x-t .. x+t);" "6#/%\"uG,&*&,&-%$phiG6#,&%\"xG\"\"\"%\"tGF-F--F )6#,&F,F-F.!\"\"F-F-\"\"#F2F-*(F-F-F3F2-%$intG6$-%$psiG6#%\"sG/F;;,&F, F-F.F2,&F,F-F.F-F-F-" }{TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 6 "whe re " }{XPPEDIT 18 0 "phi" "6#%$phiG" }{TEXT -1 5 " and " }{XPPEDIT 18 0 "psi" "6#%$psiG" }{TEXT -1 34 " are extended to odd functions on " } {XPPEDIT 18 0 "[-L,L]" "6#7$,$%\"LG!\"\"F%" }{TEXT -1 47 ", then perio dically over the whole line. Here " }{XPPEDIT 18 0 "phi=0" "6#/%$phiG \"\"!" }{TEXT -1 1 "." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 17 "L \+ := 1; a := 1/5;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 79 "psi := p iecewise(x>(L-a)/2 and x<(L+a)/2, 1, x>-(L+a)/2 and x<-(L-a)/2, -1, 0) ;" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 28 "The only way I could 'fool' \+ " }{TEXT 256 5 "Maple" }{TEXT -1 14 " and force it " }{TEXT 257 3 "not " }{TEXT -1 109 " to skip over many of the humps of the periodic exten tion when integrating was to use a sum of translates of " }{XPPEDIT 18 0 "psi" "6#%$psiG" }{TEXT -1 85 ". Luckily, because of the periodi city of the solution, n=10 here is just as good as " }{XPPEDIT 18 0 "i nfinity" "6#%)infinityG" }{TEXT -1 1 "." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 40 "p:=sum(unapply(psi,x)(x-2*n),n=-10..10):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 27 "u := 1/2*int(p,x=s-t..s+t):" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 50 "animate(u,s=0..1,t=0..2, fra mes=100, thickness=2);" }}}}{SECT 1 {PARA 203 "" 0 "" {TEXT -1 34 "Cha pter VIII, Problem 8.7 (p. 316)" }}{EXCHG {PARA 202 "> " 0 "" {MPLTEXT 1 211 8 "L := Pi;" }}}{EXCHG {PARA 202 "> " 0 "" {MPLTEXT 1 211 18 "phi := b*x*(Pi-x);" }}}{EXCHG {PARA 202 "> " 0 "" {MPLTEXT 1 211 51 "u := sum(B(phi,x,m)*s(x,m)*cos(m*t),m=1..infinity);" }}} {EXCHG {PARA 202 "> " 0 "" {MPLTEXT 1 211 19 "p := subs(b=1,phi):" }}} {EXCHG {PARA 202 "> " 0 "" {MPLTEXT 1 211 43 "P := sum(B(p,x,m)*s(x,m) *cos(m*t),m=1..30):" }}}{EXCHG {PARA 202 "> " 0 "" {MPLTEXT 1 211 56 " animate( P,x=0..Pi, t=0..2*Pi, frames=100, thickness=2);" }}}}{SECT 1 {PARA 203 "" 0 "" {TEXT -1 32 "Chapter IX, Problem 2.7 (p. 340)" }} {EXCHG {PARA 202 "> " 0 "" {MPLTEXT 1 211 37 "L := 'L'; a := 'a'; assu me (0 " 0 "" {MPLTEXT 1 211 48 "phi := piecewise(x>(L-a)/2 and x<(L+a)/2, U, 0);" }}}{EXCHG {PARA 202 "> " 0 "" {MPLTEXT 1 211 59 "plot(subs(L=Pi,a=1/5,U=1,phi),x=0..Pi, view=[0 ..Pi,-1..1]);" }}}{EXCHG {PARA 202 "> " 0 "" {MPLTEXT 1 211 76 "u := A (phi,x,0) + sum(A(phi,x,m)*c(x,m)*exp(-m^2*Pi^2*t/L^2),m=1..infinity); " }}}{EXCHG {PARA 202 "> " 0 "" {MPLTEXT 1 211 50 "phi := piecewise(x> (Pi-1)/2 and x<(Pi+1)/2, 1, 0);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "L := Pi;" }}}{EXCHG {PARA 202 "> " 0 "" {MPLTEXT 1 211 64 "P := A(phi,x,0) + sum(A(phi,x,m)*cos(m*x)*exp(-m^2*t),m=1..100):" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 34 "Q := piecewise(t<0,subs(t=0, P),P):" }}}{EXCHG {PARA 202 "> " 0 "" {MPLTEXT 1 211 57 "animate( Q, x =0..Pi, t=-1/4..1, frames=100, thickness=2);" }}}{EXCHG }{EXCHG {PARA 0 "" 0 "" {TEXT -1 146 "I stopped the animation for 1/4 so that one ca n see more clearly the shape of the initial configuration, a Fourier c osine series approximation of " }{XPPEDIT 18 0 "phi" "6#%$phiG" } {TEXT -1 7 " (with " }{XPPEDIT 18 0 "n <= 100" "6#1%\"nG\"$+\"" } {TEXT -1 2 ")." }}}}{PARA 205 "" 0 "" {TEXT 205 0 "" }}{PARA 205 "" 0 "" {TEXT 205 0 "" }}{PARA 205 "" 0 "" {TEXT -1 0 "" }}}{MARK "7" 0 } {VIEWOPTS 1 1 0 1 1 1803 1 1 1 1 }{PAGENUMBERS 0 1 2 33 1 1 }