{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" 0 1 0 0 0 0 0 0 2 0 0 0 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 "" -1 256 "" 1 14 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 }{CSTYLE "" -1 258 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 259 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 260 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 } {CSTYLE "" -1 261 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 262 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 263 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 264 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 265 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 } {CSTYLE "" -1 266 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 267 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 268 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 269 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 270 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 } {CSTYLE "" -1 271 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 272 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 273 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 274 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 275 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 } {CSTYLE "" -1 276 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 277 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 278 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 }{PSTYLE "Normal" -1 0 1 {CSTYLE "" -1 -1 "Tim es" 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 "Heading 1" -1 3 1 {CSTYLE "" -1 -1 "Times" 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 }} {SECT 0 {PARA 0 "" 0 "" {TEXT 256 70 "Module 32b: Two Dimensional Diff usion with Neumann Boundary Conditions" }}{PARA 0 "" 0 "" {TEXT -1 0 " " }}{PARA 0 "" 0 "" {TEXT -1 65 "In Lecture 32, we considered boundary conditions that are called " }{TEXT 258 29 "Dirichlet Boundary Condit ions" }{TEXT -1 36 ". Here, we will work a problem with " }{TEXT 259 18 "Neumann Conditions" }{TEXT -1 64 " corresponding to an insulated s urface in the diffusion of heat." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }} {PARA 0 "" 0 "" {TEXT -1 54 "We illustrate this type problem with a si mple example." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT 257 36 "Consider the heat conduction problem" }{TEXT -1 100 " in a rectangle where there is insulation on all boundaries and the initi al condition is as follows:" }}{PARA 0 "" 0 "" {TEXT -1 48 " \+ " }{XPPEDIT 18 0 "du/dt = Delta( u);" "6#/*&%#duG\"\"\"%#dtG!\"\"-%&DeltaG6#%\"uG" }{TEXT -1 1 "," }} {PARA 0 "" 0 "" {TEXT -1 26 "Insulated boundaries: " }{XPPEDIT 18 0 "du/dy;" "6#*&%#duG\"\"\"%#dyG!\"\"" }{TEXT -1 10 "(t,x,0) = " } {XPPEDIT 18 0 "du/dy;" "6#*&%#duG\"\"\"%#dyG!\"\"" }{TEXT -1 15 "(t,x, 1)= 0, " }{XPPEDIT 18 0 "du/dx;" "6#*&%#duG\"\"\"%#dxG!\"\"" } {TEXT -1 10 "(t,0,y) = " }{XPPEDIT 18 0 "du/dx;" "6#*&%#duG\"\"\"%#dxG !\"\"" }{TEXT -1 11 "(t,1,y)= 0." }}{PARA 0 "" 0 "" {TEXT -1 61 "Initi al condition: u(0, x, y) = x (1-x) y (1-y)." }}{PARA 0 " " 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 38 "Here are the tasks we will accomplish:" }}{PARA 0 "" 0 "" {TEXT -1 109 "(A) Give three O DE's, together with boundary conditions, whose solutions lead to a sol ution for this problem." }}{PARA 0 "" 0 "" {TEXT -1 42 "(B) Give the s olution for the three ODE's." }}{PARA 0 "" 0 "" {TEXT -1 42 "(C) Give \+ the general solution for the PDE." }}{PARA 0 "" 0 "" {TEXT -1 78 "(D) \+ Approximate the particular solution that goes with this initial condit ion." }}{PARA 0 "" 0 "" {TEXT -1 36 "(E) Animate a graph of the soluti on." }}{PARA 0 "" 0 "" {TEXT -1 55 "(F) Compute the total heat for the system for all time." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 50 "(A.) Here are three OD E's and boundary conditions:" }}{PARA 0 "" 0 "" {TEXT -1 17 " \+ X '' + " }{XPPEDIT 18 0 "lambda^2;" "6#*$%'lambdaG\"\"#" }{TEXT -1 29 " X = 0, X '(0) = X '(1) = 0." }}{PARA 0 "" 0 "" {TEXT -1 16 " \+ Y '' + " }{XPPEDIT 18 0 "mu^2;" "6#*$%#muG\"\"#" }{TEXT -1 29 " Y = 0, Y '(0) = Y '(1) = 0." }}{PARA 0 "" 0 "" {TEXT -1 18 " \+ T ' + ( " }{XPPEDIT 18 0 "lambda^2+mu^2;" "6#,&*$%'lambdaG\"\"#\"\"\"* $%#muGF&F'" }{TEXT -1 9 " ) T = 0." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }} {PARA 0 "" 0 "" {TEXT -1 38 "(B.) Solutions for these equations are" } }{PARA 0 "" 0 "" {TEXT -1 22 " X(x) = cos( n " }{XPPEDIT 18 0 " Pi;" "6#%#PiG" }{TEXT -1 19 " x), Y(y) = cos(m " }{XPPEDIT 18 0 "Pi; " "6#%#PiG" }{TEXT -1 21 " y), T(t) = exp( - (" }{XPPEDIT 18 0 "n^2+m ^2;" "6#,&*$%\"nG\"\"#\"\"\"*$%\"mGF&F'" }{TEXT -1 3 " ) " }{XPPEDIT 18 0 "Pi^2;" "6#*$%#PiG\"\"#" }{TEXT -1 4 " t )" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 40 "(C.) The general solution for the pde is" }}{PARA 0 "" 0 "" {TEXT -1 17 " u(t,x,y) = " } {XPPEDIT 18 0 "sum(sum(A[mn]*cos(n*Pi*x)*cos(m*Pi*y)*exp(-(n^2+m^2)*Pi ^2*t),n),m);" "6#-%$sumG6$-F$6$**&%\"AG6#%#mnG\"\"\"-%$cosG6#*(%\"nGF- %#PiGF-%\"xGF-F--F/6#*(%\"mGF-F3F-%\"yGF-F--%$expG6#,$*(,&*$F2\"\"#F-* $F8FAF-F-*$F3FAF-%\"tGF-!\"\"F-F2F8" }{TEXT -1 2 " ." }}{PARA 0 "" 0 " " {TEXT -1 62 "This is so important I will check an approximation of t he sum." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "restart;" }}}{PARA 0 "" 0 "" {TEXT -1 15 "Here defines u." }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 98 "u:=(t,x,y)->sum(sum(A [m,n]*cos(n*Pi*x)*cos(m*Pi*y)*\n exp(-(n^2+m^2)*Pi^2*t),n=0..4), m=0..4);" }}}{PARA 0 "" 0 "" {TEXT -1 36 "Here checks the boundary con ditions." }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 63 "D[3](u)(t,x,0); \nD[3](u)(t,x,1);\nD[2](u)(t,0,y);\nD[2](u)(t,1,y);" }}}{PARA 0 "" 0 " " {TEXT -1 20 "Here checks the PDE." }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 49 "D[1](u)(t,x,y)-D[2,2](u)(t,x,y)-D[3,3](u)(t,x,y);" }} }{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 72 "(D.) We \+ compute several terms of the particular solution. The values of " } {XPPEDIT 18 0 "A[n,m];" "6#&%\"AG6$%\"nG%\"mG" }{TEXT -1 29 " come fro m a double integral:" }}{PARA 0 "" 0 "" {TEXT -1 6 " " }{XPPEDIT 18 0 "A[n,m];" "6#&%\"AG6$%\"nG%\"mG" }{TEXT -1 3 " = " }{XPPEDIT 18 0 "1/(int(cos(n*Pi*x)^2,x = 0 .. 1)*int(cos(m*Pi*y)^2,y = 0 .. 1))*int (int(h(x,y)*cos(n*Pi*x)*cos(m*Pi*y),x = 0 .. 1),y = 0 .. 1);" "6#,$-%$ intG6$-F%6$*(-%\"hG6$%\"xG%\"yG\"\"\"-%$cosG6#*(%\"nGF/%#PiGF/F-F/F/-F 16#*(%\"mGF/F5F/F.F/F//F-;\"\"!F//F.;F " 0 "" {MPLTEXT 1 0 25 "x *(1-x)*y*(1-y)=u(0,x,y);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 201 "for n from 0 to 4 do\nfor m from 0 to 4 do\n A[n,m]:=int(x*(1-x) *cos(n*Pi*x),x=0..1)/int(cos(n*Pi*x)^2,x=0..1)*\n int(y*(1-y)*co s(m*Pi*y),y=0..1)/int(cos(m*Pi*y)^2,y=0..1);\nod: \nod:\nn:='n'; m:='m ';" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{PARA 0 "" 0 "" {TEXT -1 98 "In order to check my solution, I compare the graph of the initial value with the initial function." }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 43 "plot3d(u(0,x,y),x=0..1,y=0..1,axes=normal);" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 50 "plot3d(x*(1-x)*y*(1-y),x=0.. 1,y=0..1,axes=normal);" }}}{PARA 0 "" 0 "" {TEXT -1 54 "Note that ther e is a small error along the boundaries." }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 31 "plot([u(0,x,0)],x=0..1,y=0..1);" }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 42 "(E.) Here is an animation of the solution." }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 13 "with(pl ots): " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 55 "animate3d(u(t,x,y ),x=0..1,y=0..1,t=0..1/8,axes=normal);" }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 88 "(F.) We compute the total heat and v erify that it is the same as the initial total heat." }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 74 "int(int(u(t,x,y),x=0..1),y=0..1);\nint(in t(x*(1-x)*y*(1-y),x=0..1),y=0..1);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 153 "Finally, we recall how to make changes in case the bound ary conditions were not homogeneous. A quick review for working such a problem seems appropriate." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{SECT 1 {PARA 3 "" 0 "" {TEXT -1 49 "Non homogeneous Neumann Type Boundary C onditions." }}{PARA 0 "" 0 "" {TEXT -1 79 "Suppose the partial differe ntial equation and boundary conditions have the form" }}{PARA 0 "" 0 " " {TEXT -1 48 " " } {XPPEDIT 18 0 "du/dt = Delta(u);" "6#/*&%#duG\"\"\"%#dtG!\"\"-%&DeltaG 6#%\"uG" }{TEXT -1 1 "," }}{PARA 0 "" 0 "" {TEXT -1 25 "Boundary Condi tions: " }{XPPEDIT 18 0 "du/dy;" "6#*&%#duG\"\"\"%#dyG!\"\"" } {TEXT -1 14 "(t,x,0) = 0, " }{XPPEDIT 18 0 "du/dy;" "6#*&%#duG\"\"\"% #dyG!\"\"" }{TEXT -1 16 "(t,x,1)= -1, " }{XPPEDIT 18 0 "du/dx;" "6# *&%#duG\"\"\"%#dxG!\"\"" }{TEXT -1 14 "(t,0,y) = 0, " }{XPPEDIT 18 0 "du/dx;" "6#*&%#duG\"\"\"%#dxG!\"\"" }{TEXT -1 11 "(t,1,y)= 1." }} {PARA 0 "" 0 "" {TEXT -1 64 "Initial condition: u(0, x, y ) = x (1-x) y (1-y) + (" }{XPPEDIT 18 0 "x^2-y^2;" "6#,&*$%\"xG\"\"#\" \"\"*$%\"yGF&!\"\"" }{TEXT -1 6 ") / 2." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT 260 12 "Note changes" }{TEXT -1 1 " " } {TEXT 261 26 "from the previous problem:" }}{PARA 0 "" 0 "" {TEXT -1 10 " The " }{TEXT 262 19 "boundary conditions" }{TEXT -1 88 " hav e been changed to model heat coming in at the top and going out the ri ght side. The " }{TEXT 263 18 "initial conditions" }{TEXT -1 100 " hav e been changed so that the results computed at the beginning of this w orksheet can be used here." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 148 "The pattern for working problems of this type ha ve been set. First, we solve the steady state problem. The steady stat e problem will have this form:" }}{PARA 0 "" 0 "" {TEXT -1 59 "PDE: \+ 0 = " }{XPPEDIT 18 0 " Delta;" "6#%&DeltaG" }{TEXT -1 4 " v, " }}{PARA 0 "" 0 "" {TEXT -1 25 "Boundary Conditions: " }{XPPEDIT 18 0 "dv/dy;" "6#*&%#dvG\"\"\"%# dyG!\"\"" }{TEXT -1 14 "(t,x,0) = 0, " }{XPPEDIT 18 0 "dv/dy;" "6#*&% #dvG\"\"\"%#dyG!\"\"" }{TEXT -1 16 "(t,x,1)= -1, " }{XPPEDIT 18 0 " dv/dx;" "6#*&%#dvG\"\"\"%#dxG!\"\"" }{TEXT -1 14 "(t,0,y) = 0, " } {XPPEDIT 18 0 "dv/dx;" "6#*&%#dvG\"\"\"%#dxG!\"\"" }{TEXT -1 11 "(t,1, y)= 1." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 106 "We have addressed this problem previously. We found the following solution which we define and check here." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 22 "v:=(x,y)->(x^2-y^2)/2 ;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 55 "D[2](v)(x,0);\nD[2](v) (x,1);\nD[1](v)(0,y);\nD[1](v)(1,y);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 34 "D[1,1](v)(t,x,y)+D[2,2](v)(t,x,y);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{PARA 0 "" 0 "" {TEXT -1 50 "Next we \+ find the transient solution which we call " }{TEXT 264 1 "w" }{TEXT -1 150 ". To do this we use homogeneous boundary condtions and an init ial condition to reflect that the solution u for the original problem \+ will be defined by" }}{PARA 0 "" 0 "" {TEXT -1 22 " \+ " }{TEXT 265 1 "u" }{TEXT -1 12 "(t, x, y) = " }{TEXT 266 1 "w" } {TEXT -1 12 "(t, x, y) + " }{TEXT 267 1 "v" }{TEXT -1 7 "(x, y)." }} {PARA 0 "" 0 "" {TEXT -1 145 "The initial conditions of this non-homog eneous problem have been created so that the transient solution is exa ctly the problem we worked above: " }{TEXT 273 1 "w" }{TEXT -1 12 "(t , x, y) = " }{TEXT 271 1 "u" }{TEXT -1 12 "(t, x, y) - " }{TEXT 272 6 "v(x,y)" }{TEXT -1 28 ". We use these results here." }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 98 "w:=(t,x,y)->sum(sum(A[m,n]*cos(n*Pi*x)*cos( m*Pi*y)*\n exp(-(n^2+m^2)*Pi^2*t),n=0..4),m=0..4);" }}}{PARA 0 " " 0 "" {TEXT -1 70 "The solution for the problem in this section shoul d now be the sum of " }{TEXT 268 1 "w" }{TEXT -1 5 " and " }{TEXT 269 1 "v" }{TEXT -1 16 ". We check this." }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 36 "u:=unapply(w(t,x,y)+v(x,y),(t,x,y)):" }}}{PARA 0 "" 0 "" {TEXT -1 33 "We check the boundary conditions." }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 63 "D[3](u)(t,x,0);\nD[3](u)(t,x,1);\nD[2](u)(t ,0,y);\nD[2](u)(t,1,y);" }}}{PARA 0 "" 0 "" {TEXT -1 17 "We check the \+ PDE." }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 49 "D[1](u)(t,x,y)-D[2,2 ](u)(t,x,y)-D[3,3](u)(t,x,y);" }}}{PARA 0 "" 0 "" {TEXT -1 68 "Finally , we check the initial conditions by comparing the graphs of " }{TEXT 270 1 "u" }{TEXT -1 14 "(0, x, y) and " }}{PARA 0 "" 0 "" {TEXT -1 29 " x (1-x) y (1-y) - (" }{XPPEDIT 18 0 "x^2-y^2;" "6#,&*$%\"xG \"\"#\"\"\"*$%\"yGF&!\"\"" }{TEXT -1 95 ") / 2.\nIn order to see that \+ there are two graphs here, we displace the second by an amount 0.1." } }{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 87 "plot3d(\{u(0,x,y),x*(1-x)*y *(1-y)+(x^2-y^2)/2+0.1\},\n x=0..1,y=0..1,axes=normal);" }}} {PARA 0 "" 0 "" {TEXT -1 132 "Finally, to give us intuition, we draw t he animation as the solution moves from the initial condition to the s teady state condition." }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 54 "an imate3d(u(t,x,y),x=0..1,y=0..1,t=0..2, axes=normal);" }}}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 39 "plot3d( \{sin(x-y),x-y\},x=0..Pi,y=0..Pi);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{MARK "0 0" 0 }{VIEWOPTS 1 1 0 1 1 1803 1 1 1 1 }{PAGENUMBERS 0 1 2 33 1 1 }