Journal of Electromagnetc Analyss and Applcatons, 04, 6, 0-08 Publshed Onlne September 04 n ScRes. http://www.scrp.org/journal/jemaa http://dx.do.org/0.46/jemaa.04.6000 The Exact Formulaton of the Inverse of the Trdagonal Matrx for Solvng the D Posson Equaton wth the Fnte Dfference Method Sergne Bra Gueye Département de Physque, Faculté des Scences et Technques, Unversté Chekh Anta Dop, Dakar-Fann, Sénégal Emal: sbragy@gmal.com Receved June 04; revsed 5 July 04; accepted 8 August 04 Copyrght 04 by author and Scentfc Research Publshng Inc. Ths work s lcensed under the Creatve Commons Attrbuton Internatonal Lcense (CC BY). http://creatvecommons.org/lcenses/by/4.0/ Abstract A new method for solvng the D Posson equaton s presented usng the fnte dfference method. Ths method s based on the formulaton of the nverse of the trdagonal matrx assocated wth the Laplacan. Ths s the frst tme that the nverse of ths remarkable matrx s determned drectly and ly. Thus, solvng D Posson equaton becomes very accurate and extremely fast. Ths method s a very mportant tool for physcs and engneerng where the Posson equaton appears very often n the descrpton of certan phenomena. Keywords D Posson Equaton, Fnte Dfference Method, Trdagonal Matrx Inverson, Thomas Algorthm, Gaussan Elmnaton, Potental Problem. Introducton The fnte dfference method s a very useful tool for dscretzng and solvng numercally a dfferental equaton. It s effectvely a classcal method of approxmaton based on Taylor seres expansons that has help durng the last years theoretcal results to gan n accuracy, stablty and convergence. In fact, ths method s very useful for solvng for example Posson equaton. Ths ellptc equaton appears very often n mathematcs, physcs, chemstry, bology and engneerng. In one dmenson, the resoluton leads to a trdagonal matrx n the case of centered dfference approxmaton. Ths matrx, whch s dagonally dom- How to cte ths paper: Gueye, S.B. (04) The Exact Formulaton of the Inverse of the Trdagonal Matrx for Solvng the D Posson Equaton wth the Fnte Dfference Method. Journal of Electromagnetc Analyss and Applcatons, 6, 0-08. http://dx.do.org/0.46/jemaa.04.6000
nant, can be nverted wth methods such as Gauss elmnaton, Thomas Algorthm Method []. These techncs are powerful and very effcent. We proposed here, a new and drect method of nverson of ths trdagonal matrx ndependently of the rghthand sde. For Drchlet-Drchlet boundary problems, ths nnovatve method s faster than the Thomas Algorthm. It gves better accuracy and s far more economcal n terms of memory occupaton. Frst, the fnte dfference method s presented for the D Posson equaton. Secondly, the propertes of the matrx assocated wth the Laplacan and ts nverse are dscussed. Then, the nverse matrx s determned and ts propertes are analyzed. Thus, verfcaton s done consderng an nterestng potental problem, and the sensblty of the method s quantfed.. Fnte Dfference Method and D Posson Equaton We consder a functon ( x) whch satsfes the Posson equaton ( x) = f ( x), n the nterval ],[ ab, where f s a specfed functon. ( x) fulflls the Drchlet-Drchlet boundary condtons ( a) = a and ( b) = b. We consder an one-dmensonal mesh wth + dscrete ponts ( x ). Each pont ( x ) s de- ( b a) fned by x = a+ x, where x = = h beng the step sze. We defne ( x), f = f ( x), + = 0,,, +. We have chosen the centered dfference approxmaton ( O( x )), n ths work, for the fact that t gves a trdagonal, dagonally domnant, and symmetrc matrx. Consderng all the above mentoned crtera, one can rewrte the D Posson equaton n a set of algebrac equatons: + = = () + h f,,,,. One gets a lnear system of equatons, whch can be wrtten n a matrx form [] 0 0 0 0 h f a 0 0 0 h f 0 0 0 h f 0 0 0 4 h f = 4 0 0 0 5 h f 5 0 0 0 0 0 h f 0 0 0 0 0 0 h f b : = A : = : = F Thus, solvng the D Posson equaton means to nvert the negatve defnte, and regular -matrx = B =, s also symmetrc. Both matrces have the followng propertes: A ( a j ). Its nverse, that we noted ( b j ) and where, = j aj =, j = 0, j > b + b = δ j bj bj + bj+ = δ, < j <, b b = δ j δ s the Kronecker s delta.. The Inverse of Matrx A From (4), we derve successvely the followng nterestng relatons: () () (4) 04
( ) b = j b + j b and b = j jb + + j (5) wth (5), one sees that the matrx B s entrely determned f the term b s known. Ths term can be determned by observng the behavor of B for dfferent values: It holds From (5) and (6), we get b b = b + = j + = + ( j ) ( ) ow, the matrx B s completely and ly determned. B = ( b );, j =,,, wth B = b j ( ) j, j + = ; ( j ), j + < ( ) ( ) ( j ) ( ) ( ) ( ) ( j ) ( ) ( ) ( ) ( j ) 6 4 9 6 ( ) ( ) ( ) ( ) + 6 9 j 4 6 j j j ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) The soluton of the D Posson equaton s obtaned wth a smple, extremely fast matrx multplcaton: = BF. Thus, the numercal resoluton of the D Posson equaton whch s an nterestng topc n physcs and engneerng s made easy and very accurate. Analyss A frst analyss of the matrx ( ) B let us beleve that, ths new method possesses an algorthm complexty of ( O ) and the one of Thomas s ( O( )) []. B shows that the complexty brought by the Thomas method s largely ( O( )), whch s stuated between the Gauss elmnatons ( ) A deeper analyss of the matrx ( ) mproved n ths study. In addton, one can see a close lnk between ts row vectors and column vectors. The matrx ( B ) s also persymmetrc: b = b + + j j, All the nformaton about t, can be found n the upper trangle (n gray color, see Fgure ). Further, we can even fnd very nterestng relatons n ths matrx whch can help refnng the fnal soluton. That s what we effectvely dd, and one can see a drect soluton for at the pont x, whch can be expressed by = h (6) (7) (8), f (9) = 05
Fgure. Matrx symmetres. Also a drect soluton for at the pont x s: = h f + ( ) f = (0) Generally, a very mportant recurrence relaton can be obtaned, whch gves all solutons: whch s equvalent to: k k= h ( k+ ) f + ( k) ( ( )) f, = = k+ k = 0,,, k k = h k+ f + k f k = = = k+ ( ) ( ( )),,,, () Ths very nnovatve Equaton () gves drectly and accurately all the soluton that we are lookng for. It proves that our method s drect, faster than the one of Thomas s n ths context and gves as well better accuracy. Furthermore, t s far more economcal n terms of memory occupaton. Ths s due to the fact that the matrx ( B ) does not necesstate to be generated. A programmer does not need to declare nor to defne the matrx ( B ) n hs code. In concluson to ths, we can say that the matrx ( B ) s the key of ths effcent new method. Ths matrx ( B ), whch s the nverse of matrx ( A ), s determned explctly, drectly, and ndependently of the rght-hand sde of the Posson equaton..b.: One can prove usng mathematcal nducton that det ( A ) = ( ) ( + ). It holds for the (, j ) cofactor of A : ( ) + CofAj = j ( ), j. We call the matrx B Bra s Matrx. 4. Verfcaton wth a Potental Problem We consder a scalar potental ( x), defned n [0, ], whch satsfes ( x) ( x) = = f ( x) = cos ( x ). ( x) fulflls the followng boundary condtons: ( 0) ( ) π x = =. The soluton s ( ) 0 cos π x x x ( x) = + + 4 π 4 Wth the fnte dfference method, we take = 00, = ( ) = cos π f f x x. The soluton s x = h = +, x x =, ( x ) () (), and 06
h f 00 99 98 99 98 96 6 4 h f h f 4 h f4 = 5 0 h f, 5 6 9 94 96 98 4 6 96 98 99 99 h f99 98 99 00 00 h f 00 (4) Dscussons We defne the varable ε ( 00). Generally, we have, whch s the relatve error at pont ε FDM ( ) = x for ( 00) We can also defne the average value of the relatve error for a gven : ( ) 5 ( 00) 6.60 0. =. FDM represents ε. For = 00, t s: ε We obtan the followng results, presented n Table. The table shows that the soluton s very accurate. otwthstandng that we have been nterested n determn- ε for dfferent values. ng the sensblty of the proposed method. Effectvely, we have plotted ( ) We obtan a hyperbola, whch can be predcted as proportonal to ( ) Ths curve s ftted wth a functon whch can be defned as ( ) α α Trunc = h =, ( + ) where α 0.6598. We obtan two curves represented n Fgure. Table. Results and relatve error. h = + = x. (5) (6) x (00) FDM ε 9.90099009900990E 00.47505046650E 00.4756000E 00.7997645956950E 0006.98098098098E 00 4.950545979065E 00 4.9505446850E 00 6.7709484E 0006.97097097097E 00 7.45989908E 00 7.450946946E 00 9.55554944404E 0006 4.96096096096E 00 9.89985957698E 00 9.899600906004E 00.7454476647E 0005 5 4.95049504950495E 00.786984E 00.76787597E 00.58500947599E 0005 6 5.94059405940594E 00.4849998406E 00.484779576E 00.89579809409E 0005 7 6.9069069069E 00.708758675008E 00.70875085596E 00.00755564E 0005 8 7.9079079079E 00.97709076560E 00.97704469807E 00.50770589858E 0005 9 8.9089089089E 00.7604857E 00.65657044E 00.80696749898044E 0005 0 9.90099009900990E 00.46759048547E 00.4675880570E 00.0944966757E 0005 94 9.069069069E 00.708758675008E 00.70875085596E 00.0075648E 0005 95 9.4059405940594E 00.4849998406E 00.484779576E 00.89579800904E 0005 96 9.5049504950495E 00.786984E 00.76787597E 00.5850094745095E 0005 97 9.6096096096E 00 9. 89985957699E 00 9.899600906005E 00.7454475909E 0005 98 9.70970970970E 00 7.45989908E 00 7.450946947E 00 9.5555490675E 0006 99 9.80980980980E 00 4.950545979065E 00 4.950544685E 00 6.77088798E 0006 00 9.90099009900990E 00.47505046650E 00.4756000E 00.7997645480849E 0006 07
Fgure. Sensblty. We realze that the average relatve error ( ) ( 4) h ( c) ( 4). ( c) lowng manner C ) whch belongs to the nterval [ ab, ]. For our gven functon ε behaves lke a truncaton error that we express n the fol- s the fourth order dervatve of the functon n a pont (here and also the results from the fttng, we have the followng relatons []: α h 4π ε ( ) α h = <, + ( ) Ths proves that the method s very accurate, naturally stable, robust, quck and precse. 5. Conclusons Ths paper has provded a new mproved method for solvng the D Posson equaton wth the fnte dfference method. Accurate results have been obtaned wth a sensblty found to be as the functon of ( + ). In fact, the nverse of the trdagonal matrx, whch s assocated wth ths dfferental equaton, s determned drectly, ly, and ndependently to the rght-hand sde. Thus, a new formulaton of the soluton s gven wth an algorthmc complexty of O(). Wth ths nnovatve method, the D Posson equaton, wth Drchlet-Drchlet boundary condton s solved, wth only one programmng loop. Ths new approach provdes also gan n accuracy and economy n memory allocaton. A future work can consder eumann or mxed boundary condtons. Acknowledgements I would lke to thank my colleagues Dr. Chekh Mbow and Dr. Kharouna Talla for beneft dscussons and remarks that contrbute to mprovng the qualty of ths paper. References [] Conte, S.D. and de Boor, C. (98) Elementary umercal Analyss: An Algorthmc Approach. rd Edton, McGraw- Hll, ew York, 5-57. [] Leveque, R.J.E. (007) Fnte Dfference Method for Ordnary and Partal Dfferental Equatons, Steady State and Tme Dependent Problems. SIAM, 5-6. http://dx.do.org/0.7/.97808987789 [] Mathews, J.H. and Kurts, K.F. (004) umercal Methods Usng Matlab. 4th Edton, Prentce Hall, Upper Saddle Rver, -5, 9-4. (7) 08