M3 - ADVANCED ENGINEERING MATHEMATICS Lecture 18: Lplce s Eqution, Anltic nd Numericl Solution Our emple of n elliptic prtil differentil eqution is Lplce s eqution, lso clled the Diffusion Eqution. If the het eqution is written in terms of 3 spce vriles,, nd z, it hs the form u t = (u + u + u zz ) = u, where is red del squred, nd is clled the Lplcin opertor. When the temperture u reches sted stte, tht is, it stops chnging with time, then u t = nd we hve the sted stte het eqution u = u + u + u zz =. This is Lplce s eqution in three spce vriles. The eqution we re going to solve is Lplce s eqution in two spce vriles, which cn e written s u = u + u =. (1) It cn e seen tht eqution (1) is n elliptic prtil differentil eqution, ccording to our definition, noting tht A = C = 1 nd B = impl B AC = <. As n emple of phsicl sitution where this eqution rises, consider the temperture u(, ) in rectngulr metl plte which is insulted on the top nd ottom, so tht het cnnot flow in the z-direction. If the tempertures on ll four edges of the rectngle re specified, then s t, the temperture in the interior of the rectngulr plte will pproch the solution of eqution (1). u = g() u = h() u + u = u = f() u = k() Sted stte temperture in n insulted rectngulr plte 1
Solution of Lplce s Eqution Seprtion of Vriles The method of seprtion of vriles tht we pplied to the het eqution nd the wve eqution cn lso e used to solve eqution (1), if it is ssumed tht three sides of the rectngle re held t temperture. The temperture on the fourth side cn e specified n ritrr piecewise continuous function. Since Lplce s eqution is liner nd homogeneous, we cn find four different series solutions, ech one stisfing non-zero condition on different side, nd dd them together to get solution which stisfies ritrr conditions round the entire oundr of the rectngle. Note tht there is no initil condition on u, since we re looking for the sted stte temperture inside the rectngle R = {, }. We will ssume first tht the oundr conditions re s shown in the figure elow. u(, ) = R u + u = u(, ) = u(, ) = u(, ) = f() If u(, ) = X()Y () is sustituted into eqution (1), nd the result is divided XY, X Y XY + XY XY = X = Y X Y = λ. The two ordinr differentil equtions in nd re X () + λx() =, Y () λy () =. The oundr conditions u(, ) = X()Y () = nd u(, ) = X()Y () = for ll in the intervl [, ] impl tht X() = X() =. These oundr conditions give us the sme Sturm-Liouville prolem for X + λx = tht we hve solved twice efore. The eigenvlues will e λ n = n π nd the corresponding eigenfunctions re X n () = c n sin( nπ). The eqution for Y n, with λ n = n π, ecomes Y n n π Y n =, which hs solution Y n () = n cosh( nπ ) + n sinh( nπ ).
The series solution, which will e clled u 1 (, ), cn e written s u 1 (, ) = sin( nπ )[A n cosh( nπ ) + B n sinh( nπ )], nd the coefficients A n nd B n must e chosen to stisf the remining two conditions u 1 (, ) =, u 1 (, ) = f(), for. The condition u 1 (, ) = f() = A n sin( nπ ) implies tht the A n re the coefficients in the Fourier Sine Series for f(); therefore, A n = nπ f() sin( )d. The other condition implies tht u 1 (, ) = sin( nπ )[A n cosh( nπ ) + B n sinh( nπ )], nd therefore, for ech n = 1,,, we must hve A n cosh( nπ)+b n sinh( nπ) =. This mens tht nd the solution u 1 cn e written s u 1 (, ) = cosh( nπ B n = A ) n sinh( nπ) = A n coth( nπ ), sin( nπ )A n1[cosh( nπ ) coth(nπ ) sinh(nπ )], A n1 = f() sin( nπ )d. The other three cses correspond to oundr conditions specified s shown elow: g() u (, ) The corresponding solutions re: u 3 (, ) h() 3 u (, ) k()
u (, ) = u 3 (, ) = u (, ) = sin( nπ )[B n sinh( nπ )], B n = nπ g() sin( )d sinh( nπ) sin( nπ )A n3[cosh( nπ ) coth(nπ ) sinh(nπ )], A n3 = h() sin( nπ )d sin( nπ )[B n sinh( nπ )], B n = nπ k() sin( )d sinh( nπ) In the eercises ou will e sked to derive the solution u (, ). In this cse the Sturm-Liouville eqution is the eqution in, rther thn the eqution in. Emple 1 Consider the rectngle R = { 15, 1} with tempertures long the oundr given u(, ) = f() =.7(15 ), u(, 1) = g(), u(, ) = h() = sin( π ), nd u(15, ) = k() = (1 ). 5 Using MAPLE progrm to compute the coefficients, the series for u(, ) = u 1 (, ) + u 3 (, ) + u (, ), with terms in ech series ws plotted in Figure 1() s three-dimensionl surfce ove the rectngle R. A contour plot showing where the temperture hs the vlues 1,, 5, 1, 15, nd 3 is lso shown, in Figure 1(). In this emple, the oundr functions were chosen so tht u = t ll four corners. This gurnteed continuous solution everwhere inside the rectngle. temperture in R 1 Contour plot of temperture 8 1 6 8 1 8 6 1 5 1 15 15 3 15 1 1 6 8 1 1 1 Figure 1: () Figure 1: ()
Numericl Solution of Lplce s Eqution If the rectngle R is prtitioned long the nd es, letting = /N nd = /M for integers N nd M, the centrl difference formul for u nd u cn e used to write the following difference pproimtion to eqution (1): u( +, ) u(, ) + u(, ) u(, + ) u(, ) + u(, ) ( ) + ( ) =. If nd cn e chosen to e equl, then letting = = h, the eqution cn e multiplied h on oth sides, resulting in u( + h, ) u(, ) + u( h, ) + u(, + h) u(, ) + u(, h) =. This cn e solved for u(, ) in the form u(, ) = u( + h, ) + u( h, ) + u(, + h) + u(, h). () Note tht this ss tht the temperture t ech grid point in the interior of R is the verge of the tempertures t the four nerest grid points. If ll of the oundr vlues re given, this produces sstem of liner equtions for the unknown tempertures in the grid. The numer of equtions in the liner sstem is equl to the numer of interior grid points. Emple We will numericll pproimte the tempertures tht were clculted the series solution in Emple 1. With = 15 nd = 1, we cn let = = h = 5, nd use the grid shown elow. There re onl two unknown tempertures to e computed, lelled T 1 nd T. The should e pproimtions to u(5, 5) nd u(1, 5), respectivel. The oundr tempertures were otined from the formuls for f(), g(), h(), nd k() in Emple 1. T 1 T 5 35 35 5
Using eqution (), the two liner equtions for T 1 nd T re: Written in the form T 1 = + T + 35 +, T = + 5 + 35 + T 1 T 1 T = 35 T 1 + T = 6 the equtions cn e solved to give T 1 = 13.3333 nd T = 18.3333. These compre to the vlues T 1 = u(5, 5) 1.6 nd T = u(1, 5) 16.3 otined from the series solution in Emple 1. It is cler tht much etter numericl pproimtion would result if the step size h is decresed. If we tke h =.5, which is one hlf of the originl h, the numer of unknown tempertures inside the rectngle increses to 15 (Check it!). Similrl, the numer of liner equtions in the sstem increses to 15. Computer methods for solving lrge sstems of liner equtions hve een round for long time, nd the re ver es to ppl. This is topic tht is covered in oth Liner Alger nd Numericl Anlsis courses. Prctice Prolems: 1. * Derive the series solution for u(, ) where u stisfies Lplce s eqution inside the rectngle R, nd the oundr conditions re: u(, ) = u(, ) =, ; u(, ) =, u(, ) k(),. Your nswer should look like u (, ) on pge.. * Use the numericl method for solving Lplce s eqution to find pproimtions to T 1, T, nd T 3 in the L-shped region shown here. The oundr tempertures re ll given in the digrm. 6
38 T 1 35 3 T T 3 5 Note: The method of seprtion of vriles does not work for nonrectngulr region of this tpe. 3. Etr Credit: Set up nd solve the sstem of liner equtions to find the numericl solution to Emple, using h =.5. The corresponding 15 interior tempertures given the series in Emple 1 (with terms) re:.5 5. 7.5 1. 1.5 = 7.5-1.737.719 7.71 8.6165 11.176 = 5. 6.816 1.59 15.55 16.337 18.86 =.5 16.58 1.89 5.8.6.39 Compre our numericl solution to these vlues. Is the greement etter thn it ws with h = 5? Eplin. Hint: The 15 15 mtri ou need cn e set up s 3 3 lock mtri, where the locks consist of 3 different 5 5 mtrices. One of these is the zero mtri, nother is I, where I is the 5 5 identit mtri, nd the third hs specil form. To see how to set up lock mtri in MAPLE, eecute the instruction?lockmtri.. * If nd re hlved gin, so tht h = 1.5, how mn unknown tempertures must e computed in the numericl solution in Emple? Determine wht the mtri of coefficients will look like for this sstem. Give complete description of it s lock mtri. 7