On the 9 Point Difference Formula for Laplace Equation

download On the 9 Point Difference Formula for Laplace Equation

of 16

description

Research paper

Transcript of On the 9 Point Difference Formula for Laplace Equation

  • ON THE 9 -POINT D IFFERENCE FORMULA FOR LAPLACE 'S EQUATION

    by

    A. I. van de Vooren* and A. C. Vl iegenthart**

    1. Introduction.

    One method of solv ing boundary value prob lems for elliptic differential equat ions is to rep lace the differential equat ion by a di f ference equation. Irf case of the two-d imens iona l Lap lace equat ion this is most f requent ly per fo rmed by aid of the so-ca l led 5-point fo rmula , wh ich for a square net of mesh length h involves a truncat ion er ror of o rder h 4. A' number of techn iques for the rap id solution of the result ing sys tem of a lgebra ic equat ions has been deve loped, a.o. by Young (overre laxat ion method based upon the prop- erty A of the matr ix ) [1, 2] and by Rachford (a l ternat ing-d i rect ion methods) I-3-1.

    The present paper is concerned with the invest igat ion of the 9-point formula and its compar i son with the 5-point formula. The truncat ion er ror of the 9-point formula is of o rder h s for a square net. It has a l ready been shown by Gerschgor in in 1930 [4] that the d iscret i zat ion er ror , by which is meant the d i f ference between the exact solutions of the d i f ferent ia l equation and of the sys tem of d i f ference equations, is of o rder h 2 for a ' rec tangu lar reg ion if the 5-point fo rmula is appl ied and if the so]ution is four t imes differentiable, including at the contour. Ana logous ly it can be shown that for the 9-point fo rmula the discret izat ion er ror in a rec tangu lar reg ion is of o rder h 6 prov ided the eighth order der ivat ives exist everywhere . Thus the 9-point fo rmula yields results of the same accuracy with a much smal le r mesh length than the 5-point fo rmula . Th is means both a smal le r sys tem of equat ions and a la rger convergence rate wh ich outwe ighs the d i sadvantage of the more compl icated fo rm of the 9-point fo rmula . In this paper convergence rates are compared for point iteration methods (Jacobi, Gauss -Se ide l and overrelaxat ion) . It is shown that a l though the matr ix of the 9-point fo rmula does not possess proper ty A, the most favourab le re laxat ion factor and the convergence rate for smal l h and for a rec tangu lar reg ion can be calculated by an analytic method, based on separat ion of var iables. Our result, wh ich is conf i rmed by numer ica l calculations, differs f rom an earl ier result obta ined by Garabed ian [5].

    The authors w ish to acknowledge useful d i scuss ions with Mr . H. J. Burema.

    2. The 5-point and 9-point formulas and their truncation errors.

    In o rder to rep lace the two-d imensional Laplace equation by a d i f ference equation, we introduce a rectangu lar net with mesh lengths h and k in x- and y -d i rec t ion . We present the d i f ference equations for regu lar points of the region, that are points of which all neighbouring points, whose function values also appear in the d i f ference equation, lie within the region or on its boundary. The der ivat ion, which makes use of Tay lor ser ies expansions for the exact solution u(x,y) of Lap lace 's equation, has been given in detai l in the authors ' repor t [6 ] .

    When U(x,y) denotes the solution of the sys tem of d i f ference equations, then the 5-points formula is

    * Dept. of Mathematics, University of Oroningen, the Netherlands. **Technological University, Delft, the Netherlands.

  • 188

    U(x, y) =

    A.l. van de Vooren and A.G.Vliegenthart

    k 2

    2(h 2+k2) {U(x+h,y )+U(x -h ,y )} +

    h 2

    2(h2+k2) {U(x ,y

    1 h2k 2 w i th the t runcat ion er ror - a4u(x, y)

    8x 4

    + k) +U(x, y - k ) )

    (2.1)

    The 9-point fo rmula is

    1 { U(x +h, u(x, y) = -fb-

    h 2 _ 5k 2 __~i. {U(x+h,y)+U(x-h,y)}

    10h2 + k 2

    y+k) +U(x -h , y+k) +U(x -h , y -k ) +U(x+h, y -k )}

    i 5h2- k2 {U(x, y +k) + U(x, y _ k)} +10 h2+k 2

    (2.2)

    with the t runcat ion er ror ~00 h2k2(h2 - k2) a6u(x, y)

    8x 6

    In the case h = k the

    U(x,y) = ~0-o { U(x+h,

    1{ ) +~- U(x+h,y ) + U(x -h ,y ) + U(x ,y+k) + U(x ,y -k )

    with the t runcat ion er ror 1 h s 8Su(x 'Y ) 10080 8 8x

    9-po int fo rmula becomes

    y+k) +U(x -h , y+k) +U(x -h , y -k ) +U(x+h, y -k )}

    (2.3)

    In the last case the t runcat ion er ror is of smal le r o rder than if h fi k.

    3~ General remarks on the i terat ive method.

    We now shal l cons ider the D i r i ch le t p rob lem for a rec tangu lar reg ion w i th s ides a and b in x and y -d i rec t ion respect ive ly . The net po ints have coor d inate s

    x = ph (p = i ,2 . . . . m - 1), y = qk (q = 1,2 . . . . n - 1)

    while mh = a and nk = b.

    Since all net points are regu lar points, the d i f ference equation, given by one of the fo rmulas (2.1) through (2.3), complete ly rep laces the d i f fe rent ia l equation. The d i f ference equation is solved by an i terat ive process which genera l ly can be wr i t ten as

    U(n+1)-- HU (~) + k. (3.1)

    U (n) denotes the vector of which the elements are the values of U(x,y) in the net points, obtained after n iterations. H is the square matrix of order (m - l)(n- i) determined by the difference equation and the iterative method chosen. Solution by iteration is employed since the matrix Ii is

  • On the 9-point difference formula for Laplace's equation 189

    sparse . The vector k is due to the g iven boundary va lues . It enters into the d i f fe rence equat ion i f this is appl ied to a po.int of which: one or more of the ne ighbour ing points are on the boundary .

    If U is the exact so lut ion of the d i f fe rence equat ion, then

    U=HU+k

    which shows that the er ror v(n) = U - U (n) sa t i s f ies

    (3.2)

    V(n+l) = HV (n) or V (n) = Hnv (0) .

    A necessary and suff ic ient cond i t ion for convergence (i.e. lira ~(n)= 0) n- -~

    with an arb i t ra ry s tar t ing vector v (~ is that lira H n -- 0. Accord ing to a

    we l l -know~.theorem of mat r ix theory [7] , this is the case if the spect ra l rad ius X(II) of II is smal le r than i. S ince the e lements of ~r (n) will van ish asymptot i ca l ly as k , they will become smal le r than c as soon as ek < c, i.e. if n log k becomes smal le r than a cer ta in va lue.

    The number of s teps n is inverse ly propor t iona l to log k. There fore the rate of convergence is de f ined by

    R(H) = - log k(H) (3.3)

    In the fo l lowing sect ions we shal l compare the convergence ra tes for the 5- and 9-po int fo rmulas if the Jacob i , Gauss -Se ide l and over re laxat ion methods are appl ied.

    4. The Jacobi method.

    Th is method , a l so known as the method of s imu l taneous d i sp lacements , cons is ts of subst i tut ing the n -th approx imat ion at the r ight hand s ide of the d i f fe rence equat ion g iven in See. 2. The n+l "th approx imat ion is ob - ta ined by us ing on ly va lues of the n-th approx imat ion for all po ints of the net.

    The i terat ion fo rmula is in the case of the 5 -po in t fo rmula , accord ing to eq. (2.1)

    k i h 2

    u(n+l)(x,y} 2(h2+ki ) {u(n) (x+hoy) + U (n) (x - h, y}) + 2(h t+k 2) fU (n) (x ,y+k)+

    + u(n) (x, y - k)} (4.1)

    or, wr i t ten in mat r ix fo rm,

    U (n+D = B (5) U (n) + k ,

    B (5) be ing a symmetr ic mat r ix . C5) a The e igenva lues of B s tisfy the equat ion

    wh ich agrees w i th the d i f fe rence equat ion

    k i -- { lx +h, yl yl}

    uU(x ,y ) 2(h 2+k l )

    h 2

    ah2+k l) { U(x,y+k)+ U(x,y- k)} (4.2)

  • 190 A.I. van de Voomn and A.C.Vliegenthart

    prov ided the va lues of U for po in ts on the boundary are taken equa l to 0. For the 9 -po in t fo rmula we can der ive f rom eq. (2 .2) a Jacob i mat r ix

    B(9) and a d i f fe rence equat ion wh ich is comparab le to eq. (4.2), v iz.

    /~U(x,y) =~0 {U(x+h, y+k)+ U(x -h , y+k)+ U(x -h , y -k )+ U(x+h, y -k )}

    h2-5k2{ )} 1 5h2-k2 } 1 U(x +h,y ) +U(x - h, y + i0 h2+k 2 10h2 + k 2 U(x ,y+k) +U(x ,y - k)

    (4.3)

    Eqs. (4.2) and (4.3) can be solved by aid of separation of variables, that is by putting

    u(x,y) = X(x) Y(y).

    The resu l t (see [6] for deta i ls of der ivat ion) is that the e igenva lues of eq. (4.2) are given by

    k 2 h 2 - cos P--~-~ + ~ cos q--~-~ (4.4)

    h2 +k 2 m h 2 +k 2 n

    and those of eq. (4 .3) by

    5k 2 _ h 2 5h 2 _ k 2

    = I P~ 1 P--~ cos q~r + ~ c o s - - + ~ e o s ~ ) . (4 .5) ~- cos m --n- h2+k 2 m h2+k 2 In both cases p = 1 ,2 . . . . m - 1 and q = 1 ,2 . . . . n - i. It fo l lows f rom eq. (4 .4) that the spect ra l rad ius of }3 (5) is obta ined by

    put t ing p = q = 1

    k 2 h 2 X(B (5)) - - - cos ~h + ~cos --~rk (4++6)

    h2+k 2 a h2+k 2 b

    which is smal le r than 1. For la rge va lues of m and n the convergence rate becomes

    R iB (5)) _ 1 h2k2 2 h2+k ~

    - -~" + . (4.7)

    The spect ra l rad ius of B (9) is a lso obta ined for p = q = 1, p rov ided 1/~/5 < h/k < ~]5. In that case the convergence rate is

    h2k 2 3

    R(B(g)) = -~ h2+k 2

    1 (4.8)

    If h > k x/-5, all te rms in eq. (4 .5) become negat ive if cos qTr/n i s taken negat ive . The e igenva lue w i th the la rgest abso lu te va lue occurs for p = i~ q = n - 1 and is equa l to

    . . . . . + i+ - - - - - h 2 + k 2 +h2+ k2/ ] 2m 2 h2+k 2

    $

  • On the 9-point formula for Laplace's equation 191 The terms independent of m and n are

    -~ - 1 = - 5 - k2 , h 2 + k 2 5- h 2 +

    which is smaller than -i. Convergence is here only possible if m and n are not too large. The same reasoning holds for k > h ~/-5. The,conclusion is drawn that if the ratio of the mesh sizes is larger

    than V5 5, convergence with the 9-point formula is not guaranteed and is certainly absent if h and k are sufficiently small. In that case the operator (2.2) is no longer positive, which means that if it is applied to positive U-values, the left hand side may become negative. This is inadmissible for a solution of Laplace's equation.

    If the ratio of the mesh sizes is smaller than k/5, the Jacobi procedure is convergent and gives even faster convergence in the case of the 9-point formula than for the 5-point formula, since R(B (9)) = 1.2 R(B(5) ) .

    5. The Gauss-Seidel method.

    In this method , wh ich is a l so known as the method of success ive d is - p lacements , the (n+l ) th approx imat ion for an e lement in the vector U is used in the fu r ther ca lcu la t ions as soon as it is known. The proper t ies of the method then depend upon the order of the e lements in the vector . We shal l take these e lements in " read ing" o rder wi th x inc reas ing to the r ight and y inc reas ing , in downward d i rect ion.

    If we d iv ide the Jacob i mat r ix B, of wh ich the d iagona l ent r ies a re all ze ro , in the lower and upper t r iangu lar mat r i ces L and R , the equat ion of the Gauss -Se ide l method becomes in matr ix fo rm

    U (n+l) = L U (n+l) + R U (n) + k

    U(n+D U(n) -I or = ( I -L) ' I R + (I-L) k . (5. l)

    Convergence is determined by the spect ra l rad ius of

    C = (I- L ) ' I R

    wh ich shou ld be smal le r than i.

    5-point formula.

    The e igenva lues of C (5) = ( I - L ) - I R sat isfy the equat ion laU = C (5) U or ~( I -L )U = R U.

    The last fo rm cor responds to the d i f fe rence equat ion (see eq. (2. i))

    k2 h 2 } U(x - h, y) U(x , y - k) - -

    /a U(x ,y ) - 2 (h2+k2) 2 (h2+k2)

    k 2 h 2

    U(x+h,y ) + 2(h2+k2) -U(x ,y+k) . 2(h2 +k 2 ) (5 .2)

  • 19 2 A.I. van de Vooren and A.C.Vliegenthart

    The method of seperat ion of var iab les is aga in app l ied for the so lu t ion of eq. (5.2), see [6 ] . The resu l t is, as is we l l -know~ [1 ,2 ] , that the e igenva lues a re the squares of the e igenva lues of the matr ix B (5). The convergence ra te for la rge va lues of m and n is g iven by

    R(C (5)) - - - I t 2 + (5 3) h 2 + k 2 a 2

    and hence is tw ice that of the Jaeob i method w i th the 5 -po in t fo rmula .

    9-point formula.

    The d i f fe rence equat ion for the i te ra t ion is

    u (n+D(x ,y )=~0 IU (n ) (x+h, y+k)+U (a) (x -h , y+k)+U(n+l ) (x+h, y -k ) +

    h2- 5k2 { (x+h,y ) } 1 U (n) + u(n+l ) (x_h ,y ) + U (n+l) (x -h , ynk) - 10 h2+ k 2 +

    1 5h2 - k2 { } U (n) (x, y + k) + U (n+ D(x, y - k)

    + 10 h2+k 2

    This f ixes the matr i ces L, R and C (9) = ( I - L ) -1 R and hence, the equat ion for the e igenva lues and e igenvectors of C (9) becomes

    h 2 _ 5k 2 5h 2_ k 2 I U (x -h ,y ) - 1 U(x, y) - ~0 U(x +h. y - k) - ~0 U(x - h, Y-k )+10h2+ k 2 I0 h2+k 2

    (5.4) h 2 _ 5k 2 5h 2 _ k 2

    1 U(x+h, y)~ = U(x+h,y+k)+_ U(x -h ,y+k) ~-~in p-~N lOh2 + k2 h2+k 2 U(x ,y - k)

    U(x , y + k).

    Separat ion of var iab les , see [ 6 ] for deta i ls , l eads to the fo l low ing cub ic equat ion for z = ~-/~

    25z 3 _e2(e2f_ 10 f+40)z 2 2 2 2 2 2 2 2 - (e le2+el f 164)z e~ezf (5 .5) -egf +8egf- - =0

    where e I = cos pTr /m, e 2 = cos q~r/n, f =(5k 2 - h2),/(h 2 + k2). (5 .6)

    The roots of this equat ion have been invest igated numer ica l ly by a id of the Te le funken TR4 computer of Gron ingen Un ivers i ty for var ious va lues of the parameters f, e I and e 2. The parameter f is res t r i c ted to the in- te rva l (-i, 5) s ince h and k a re rea l . It was found that I z I = 1 on ly occurs if at leas t one of the quant i t ies e I and e 2 is equa l to +_ i. S ince , however , e I and e2 are in abso lu te va lue a lways smal le r than i, the same ho lds for I z I, wh ich means that there is a lways convergence .

    The spect ra l rad ius of C (9) aga in occurs for p = q = i. For la rge va lues of m and n, we can obta in the dev ia t ion of z f rom 1 by subst i tu t ing in eq. (5.5)

    J

    z = 1 + 6z, e I = 1 7r2 /2m 2, e2 = 1 - 7r2/2n 2.

  • On the 9-point difference formula for Laplace's equation 193

    Neglect ing h igher powers of 5z, 1 /m 2 and 1/n 2, we find

    h2 k2 @ V) 3 ~r 2 + 5 z = - 5 h 2 + k 2

    Hence , the convergence rate is

    h2k 2 ( 1 12) 6 2 (5.7)

    R(C(9)) = 5- h2+ k 2~ ~a 2 +b'

    which again is twice that of the Jacob i method in those cases where the la t te r method converges .

    6. The overrelaxation method.

    The over re laxat ion method cons is ts , in fact, of an ext rapo lat ion at each step of the resu l t obtained by the Gauss -Se ide l method. In mat r ix fo rm

    U (n+1)= U (n) + r { ~(n u(n) } ,

    where u(n+l) is the Gauss-Seidel approximation (5.1) ~(n+D = L U (n+l) + R U (n) + k .

    U (n+D in the r ight hand side of the la t te r equat ion is the vector of va lues obtained f rom the over re laxat ion method. E l im inat ion of ~(n+D y ie lds

    U (n+l) = CwU (n) + k I (6. i)

    C~ = (I-coL) -1 ~(1 -t0)I + wR k l where . . } and = ( I -wL) -1 wk. (6.2) For convergence of the I terat ion the spect ra l rad ius of Ca should again

    be smal le r than 1.

    5-point formula.

    The e igenva lues of C w sat is fy the equat ion

    ~(I-~0L)U = {! I - r U

    or, wr i t ten as d i f fe rence equat ion for the 5 -po in t fo rmula (see eq. (2. i)): [ { k2 U(x,y) - a U(x -h ,y )+

    2 (h 2 + k 2 )

    { k2 (1 -~o) U(x,y) + ~o -- U (x+h,y ) +

    2(h2 + k 2 )

    h2 ,}] 2(h2+ k2) U(x ,y - k =

    2(h2 +k2) U(x ,y+k) . (6.3)

    Separation of variables leads to a quadratic equation in z = '~, viz

    Z 2 -tO g Z + 09 - 1 = 0 (6.4)

    h 2 q~r - k - - - -~ 2 P~ + _ (6 .5 ) where g h 2 + k 2c~ ~ h 2 + k 2c~ n "

    Fur thez" invest igat ion of this case y ie lds the we l l -known [1 ,2 ] resu l t s

    2(I V1 - r = and k (C (5)) = w - I, (6.6) opt 2 opt

    gi

    where gl is the value of g when p = q = 1 is subst i tuted in eq. (6.5). For la rge va lues of m and n the resu l t s become

  • 194 A. I. van de Vooren and A.C.Vliegenthart

    x(c(~5) ) = _l- 2t',hktoOP~v -~/= 2- +--t' 1 R(C~)) : t ) where t ~ b 2

    (6 .7 )

    Hence , the convergence speed is much bet ter than in the case of the Gauss -Se ide l method . If one takes m equa l to n, R (C(2) ) = 27r/n, wh i le R(C(~)) = ~2/n2.

    9-point formula.

    The equ iva lent to eq . (6 .3 ) becomes

    20(U+to- 1) U(x ,y ) -

    -uw ~ U(x +h~ y - k) +U(x -h , y - k )+2 t

    5h 2 _ k 2 h 2 _ 5k 2

    h2+k 2

    to{U(x+h, y+k)+U(x -h , y + k ) + 2 - -

    5h 2 _ k 2

    h2+k 2

    U(x, y - k ) - 2

    U(x , y +k) - 2

    l U (x - h, y)

    h 2 + k 2 J

    h 2 _ 5k 2 U(x + h, y) } .

    h 2 + k 2

    Separat ion of var iables now leads to a quartic equat ion in z = ~/-~, see [6], wh ich is

    25z 4 - toe2(toe~f - lO f +40)z 3 - (t02%%2 2 +to 2e x2f2_ to2e~f2 + 8 to2e2f_2 16to 2e 2 _ 50 to+ 50)z 2 _

    toe 2(toe 2 - if - 10wf + 10f + 40to - 40)z + 25( to - i )2=0. (6 .8)

    The roots of this quar t i c have been invest igated numer ica l ly for f = 2 (h = k) on the Te le funken TR 4 computer . The resu l t s a re shown in fig. i.

    1.0

    I.I

    0.8

    0.6

    0."

    0 .2"

    02

    / / / b 15 " / / e l+ e2

    f 1.2 1 .~ 1.g 1.8 ~ 2.0

    Fig. 1. Eigenvatue of C (9) for various values of e I + e 2. (h = k)

  • On the 9-point difference formula for Laplace's equation 195

    For e I and e 2 near i, the roots appear to depend approx imate ly on ly on the sum e I + e 2. In fig. l I M J is g iven as a funct ion of to(l

  • 196

    coefficients of k / r

    2A I (20 - 3f)

    2A I (55 -16 f )

    A.I. van de Vooren and A.C.Vliegenthart

    + ~6 2 y ie lds the sys tem

    = 25Cz + 25DI

    = BI(55 - 16f) + CI(55 - iSf) + 50D I

    2A 1 (60 -13 f ) = 2B I (65 - 8f) + C I (55 - !6f) '+ 25DI

    2A 1 = 3B I + C 1

    (6~ ].2)

    Th is homogeneous sys tem has a matr ix of rank 3 and the rat io of A t , B I , C I and D1 can be determined . The resu l t is

    B I 5 + 7f 275 + 85f - 48f 2 1 5+3f 1

    - 2 - - A I " C I - 2 - - A I ' D1 = A1. 5 + 4f 5 + 4f 50(5 + 4f)

    (6 .13)

    That AI is an independent parameter is due to the fact that the te rms with ~/ ~61 + ~6 2 in ~0, r,s and t are not yet affected by the change in el and e 2. This means that one of these te rms may be chosen with an ar- bitrary magnitude.

    Identification of the coefficients of 61 gives the sys tem

    A~f~ + 2A2(20 - 3f) - 8f = 25C 2 + 25D 2

    A~ ~(i 5 - 8f) + 2A2(55 - 16f) + 8f 2 + 8 = 25BID I~ + 25CID I~+ B2(55 - 16f) +

    C2(55 - 16f) +50D2 2

    A~a'(40 - 9 f )+ 2A2(60 - 13f) - 8f = 75B1a+BIC I~(55 - 16f) + 25BID Ia +

    + 25CID Ia+2B2(65 - 8f) +C2(55 - 16f) + 25D2

    A2a + 2A 2 = 3B2r (6.14)

    Mu l t ip l i ca t ion of these equat ions by -i, i, -i and 25 fo l lowed by add i t ion y ie lds

    8f 2 + 16f + 8 = B ICz~(20+I6 f ) . (6.15)

    Identification of the coefficients of 62 yields

    A~f /~+2A3(20-3 f )+16f -80 = 25C 3 + 25D 3

    A12/~(15 - 8 f )+2A3(55 - 16f) - 8f 2 +64f - 120 = 25BID~8 +'25CID I~+B3(55 - 16 f )+ I +C3(55 ' 16f) +50D3 i)31

    A~/~(40 - 9 f )+2A3(60 - 13 f )+ 16f - 80 = 75B12~ + BICI /~(55 - 16f) + 25BID I /~ +

    + 25C]DI /~ +2B 3(65 - 8f) +C3(55 - 16f) + 25

    A~ + 2A 3 = 3B12~ + 3B IC I~ + 3B3 + C3 . (6 .16)

    The same linear combinat ion as calculated give s

    -8f 2 + 32f +40 = B IC I~(20 + 16f).

    for the sys tem (6 .14) now

    (6 .17)

    Compar i son of eqs. (6 .15) and (6 .17) y ie lds for the rat io o~/~

    1

    t3 5 - f (6.18)

  • On the 9-point difference formula for Laplace's equation 197

    Since -i < f < 5 it is c lear that this ratio is a lways positive as requ i red in (6. ll).

    Eq. (6.15) gives

    (l + f)~ BIC I (~ = 2

    5+4f

    Us ing the results obta ined in (6.12) we may write also

    (1 + f)2(5 + 4f) A~ = 8

    (5 + 3f)(5 + 7f)

    Substitution in (6. ii) yields \/~l +f)(5 +~f) t0op t = 2 - 2

    V (5+3f ) (5+7f )

    .2(i +f)(5 + 3f) )t(C(9)) = [ " [max=r2=l - 2V ~%4-~

    + 7f)

    \ /~l_ +f)(5 + 3f) R (C(~ 9) ) -- 2

    V (5 +4f)(5 + 7f)

    9 V ( I +f)61 +(5 - f) 62+ o(61 ) +0(62)

    9 ~ / ( I +f)61 + (5 - f)6 2 +0(61) + 0(6 2)

    9 ( l+f )61+(5- f )62 +0(61) + 0(62 )

    5 Wi th regard to the fac tor 5 + 7f wh ich becomes negat ive fo r f < -V ,

    we may remind the reader that i t was assumed that r > s s ince o therwise the fo rego ing cons iderat ions do not ho ld . F rom (6 .11) i t i s c lear that the cond i t ion r ___ s i s equ iva lent to B1 _< C1 i f te rms of o rder 51 and 52 are neg lected . It fo l lows f rom (6 .13) that--J31 0.

    Hence , the resu l t s obta ined are va l id on ly fo r f _>__ 0 o r h ~ k~-5. F ina l ly , subs t i tu t ing

    h a _ 5k 2 f = - 51 = 1 - cos --zr and 52 = 1 - cos - - - ~

    h 2 + k 2' m n

    the resu l t s can a l so be wr i t ten as

    2+10k2) (h2+ k2) ( -h 2 +20k 2) a 2 b 2 (6.19)

    +25k2) (h 2 +k2) ( -h 2 +20k 2) a 2 b 2

    For a square (a =b) w i th equa l meshs izes (h =k) we now der ive resu l t s fo r coop t and R conta in ing er rors 0(h 3) ins tead of 0(h2) " as wou ld be the ease when us ing eq. (6 .19) .

    S ince then e 1 = e 2 = e, we make the expans ions

    e = 1 -5

    co = 2 - AS 89 + A '5 + A"6312

    r = 1 - B6 89 B '6 B"5 3/2

    s = 1 - C5 89 + C '5 C"5 3/2

    23 _ D5 89 + D '6 + Dr'6 3/2 t =2--5

    (6.20)

  • 198 A. I. van de Vooren and A.C. Vliegenthart

    The re la t ions between A , B0 C, and D fo l low f rom eq. (6 .13) by tak ing f equa l 2

    I i 19 253 A. (6 21) B =-~-A , C =-~-~-A and D - 650

    Ident i f icat ion of the coef f ic ients of 5 in the equat ions (6. I0) leads to the sys tem (compare (6 .14) and (6.16))

    2A 2 + 28A' - 64 = 25C' + 25D'

    -A 2 + 46A' + 16 23B' + 23C' + 50D' + 25BD + 25CD

    22A 2 + 68A' 64 98B' + 23C' + 25D' + 75B 2 4- 23BC + 25BD + 25CD

    A2 + 2A' = 3B' + C' + 3B2 + 3BC (6.22)

    Mul t ip l i cat ion of these equat ions by -i~ 1, - i and 25 fo l lowed by addit ion y ie lds 13BC = 36 . Hence A = 2.9928o B = 1. 2662, C = 2. 1871, D = 1. 1649.

    Three o ther l inear combinat ions of eqs. (6.28) y ie ld three re la t ions between the four unknowns A ' , B ' , C ' , D ' . We e l iminate D' and obtain two re la t ions for A ' , B' and C ' . Mul t ip l icat ion of the equat ions by -2, +1, 0 and 27 and addit ion g ives a f ter subst i tut ion of the va lues obta ined for A, Bj C and D

    l lA ' 26B' = 28.4211.

    The last equat fon of (6 .22) becomes

    2A' 3B' C ' = 4 .1605.

    The third equation between A', B' and C' is obtained f rom identification of the eoefficients of 53 in eqs. (6. i0). This gives the system

    44A - 4AA' + 28A" = 25C" + 25D"

    -16A + 2AA' +46A" = 23B" + 23C" + 50D" -25BD' -25B 'D -25CD'-25C'D

    84A - 44AA' + 68A" = 98B" + 23C" + 25D" -25B 3 -150BB'-25BCD

    23BC' - 25BD' - 23B'C - 25B'D- 25CD' - 25C'D

    - 2AA' + 2A" = 3]3" + C" - B 3 -3B2C - 6BB'- 3BC ' - 3B'C.

    Mul t ip l i ca t ion of the equat ions by i, -i, 1 and -25 fo l lowed by add i t ion l eads to

    144 A = 75B2C - 25BCD + 52BC' + 52B 'C

    or, after subst i tut ion of the va lues for A , B , C and D

    19B ' + I IC ' = 41 .5385.

    F ina l ly we f ind

    A T = 4 .478 , B' = 0 .802 , C' = 2 .392 .

    Wi th 5 = ~2h2/2a2 this g ives the resu l t s

    0)op t = 2 - 2. 116 z,h/a + 2 .24 (~rh/a) 2 + 0(h 3)

    k(C (9)) 1 1.791 ~h/a + 1.60 (~h/a) 2 + 0(h 3)

    1.791 h/a + 0(h3).

    (6.23)

  • On the 9-point difference formula for Laplace's equation 199

    These resu l t s can be compared wi th the cor respond ing resu l ts for the 5 -po in t fo rmula as g iven by eq. (6.6)

    toopt = 2 - 2 lrh/a + 2(~rh/a) 2 + O(h 3) /

    X(C~ )) = 1 - 2 ~rh/a + 2(Trh/a) 2 + O(h3) I (6.24) (s)

    R(Cco ) = 2 zrh/a + 0(h3).

    It may be noted that eq. (6 .23) dif fers f rom a resu l t obta ined by Garabed ian , viz.

    toopt 2 - 2 .04 ~h/a + 0(h2).

    There are a number of assumpt ions in Garabed ian 's work which are d i f f icu l t to assess , but which apparent ly a re not jus t i f i ed . It wil l be shown in the next sect ion that the exper imenta l resu l t s a re in agreement with our resu l t s .

    7. Numerical results.

    F i rs t exper iment .

    The D i r i ch le t p rob lem has been numer ica l ly so lved for the square 0 4__ x

  • 200 A.I. van de Vooren and A.C,Vl iegenthart

    N i

    160 I

    160

    140

    120

    100

    \

    / ' 9 - p t

    :5 -p t

    1.79 1.80 1,81 1.82 1.83 1.8/*

    Fig. 2. Number of ,iterationsteps to obtain accuracy of 10 -9. Overrelaxation method. First experiment.

    Us ing for R (Cw) the va lues of eqs. (6.24) and (6.23) we find

    5-po int fo rmula N ~ 99. (exper imenta l ly 122) 9 -po int " N "" 115. ( " 110)

    The reason for the d i sc repancy is that the resu l t s of eqs . (6 .23) and (6.24) a re asymptot i c resu l t s , that is they only hold a f te r a la rge number of s teps . The exper imenta l resu l t s give an average convergence ra te dur ing N s teps and this d i f fe rs f rom the asymptot i c va lue. Th is conc lus ion is conf i rmed in the second exper iment and there it is a l so shown that asymp- to t i ca l ly the exper imenta l and the theoret i ca l convergence ra te complete ly agree .

    Second exper iment 1)

    The D i r i ch le t p rob lem was numer ica l ly so lved for the square 0 _< x

  • On the 9-point difference formula for Laplace's equation 201

    where x denotes the vector of the initial va lues at the regu lar points. The vectornorm used is the norm, wh ich is equa l to the sum of the abso lu te va lues of all components . In fact, fo rmula (7.1) expresses that after suf- f icient i te ra t ionsteps the norm of the vector decreases in each step by a factor k. A der ivat ion of the fo rmula is g iven in [6 ].

    Formula (7.1) has been eva luated for var ious va lues of n and p. For inc reas ing n and p the fo rmula will g ive a bet ter approx imat ion for the spect ra l rad ius k. Th is exper imenta l va lue of k has been compared wi th the theoret i ca l va lue obta ined f rom the equat ion for z = v~ (eq. (6 .4 ) fo r the 5 -po in t fo rmula and eq. (6.8) for the 9 -po int fo rmula) . The root of this equat ion wh ich is la rgest in modu lus is the spect ra l rad ius k.

    For to < to^,t the final exper imenta l va lue of k (Cw) was usua l ly reached ~F

    if n+pwas la rger than 150. Th is va lue agreed w i th the theoret ica l va lue. For to > toopt the exper imenta l va lue of to(Cw) osc i l la ted around the theoret ica l va lue if n+p was taken suff ic iently large, say 500. Th is is due to the fact that then there are many complex e igenva lues of the matr ix C W wh ich all have near ly la rgest modu lus . These are not on ly the two complex roots of la rgestmodu lus g iven by eq. (6.8), but a l so complex roots of the same equat ion for smal le r e I and e2, wh ich cor respond to o ther p and q (see eq. (5.6)) and wh ich roots have a lso the same modu lus accord ing to fig. i.

    In all cases the exper imenta l va lue of k (Cw) obta ined for smal l n and p is la rger than the final va lue . Th is means that the convergence rate at the beg inn ing of the i terat ion is smal le r than its asymptot i c va lue. In par - t icular this is t rue for the 5 -po in t fo rmula , wh ich agrees w i th the fact that in the first exper iment the number of i terat ions necessary for obta in ing a cer ta in accuracy was la rger than wou ld be expected f rom the eqs. (6 .23) and (6.24).

    F ig. 3 g ives the spect ra l rad ius as funct ion of the over re laxat ion factor for both 5 -po in t and 9 -po in t fo rmula (h = 1/30).

    1.0

    0.9

    0.8

    0.7

    0.6

    0.5

    /

    1.1 1.2 1.3 1.r 1.5 1,6 1.7 1.0 1.9 2.1

    Fig. 3. Spectral radius of C w for unit square and h = k = 1/30.

    Third experiment,

    i 2.0

    A final exper iment has been conducted w i th regard to the max imal d is - c re t i za t ion er ror in the field. It has been shown by Gerschgor in [4 ] that if the four th part ia l der ivat ives a re bounded, the d i sc re t i za t ion er ror for the 5 -po in t fo rmula decreases as h 2 if h is the mesh s ize in both d i rect ions . In the same way it fo l lows that, w i th part ia l der ivat ives up to the e ighth order bounded, the d i sc re t i za t ion er ror decreases as h 6.

    S ince the d i sc re t i za t ion er rors were very smal l for the harmon ic funct ion

  • 202 A.I. van de Vooren and A.C.Vliegenhart

    taken in the f i r s t example , we now took as harmon ic funct ion

    u (x ,y ) = e 3x cos 3y .

    Table 1 shows the resu l t s for the max imal d i sc re t i za t ion er ror in the f ie ld

    Table 1

    The maximal discretization error in the field as function of h for the 9-point formula

    h 1/4 1/6 1/8 1/10 1/16

    error 6400.10 "8 5q8. i0 ~8 99.10 -8 28.10 -8 2.10 -8

    The error is proportional to h 6, which is inagreement with the theory.

    as a funct ion of h for the 9-point fo rmula . This e r ro r is def ined as the la rgest d i f fe rence in absolute value between the exact t ia rmonic funct ion and the exact so lut ion of the d i f fe rence equat ions occur r ing somewhere in the f ield. It is c lear f rom these resu l t s that the d i sc re t i za t ion er ror indeed decreases as h 6.

    8 References.

    1. G.E.Forsythe and W. R. Wasow:

    2. D.M.Young:

    3. G.Birkhoff, R.S.Varga and D.M.Young:

    4. S. Gerschgorin:

    5. P.R. Garabedian:.

    6. A.I. van de Vooren and A. C.Vliegenthart:

    7. L H. Wilkinsom

    "Finite -difference methods for partial differential equations", Wiley and Sons, New York, 1960.

    "Iterattve methods for solving partial difference equations of elliptic type", Ttans. Amer. Math.Soc. Vol.~/6, p. 92-111, 1954.

    "Alternating direction implicit methods 't, Advances in Computers. VoI. 3, p. 190-T/3, 1962.

    "Pehlerabschgtzung fiir des Differenzenverfahren zur L6sung partieller Dif- ferentialgleichungen", Z.A.M.M. Vol. 10, p. 373-382, 1930.

    "Estimation of the relaxation factor for small mesh size", Math. Tables Aids Comp. Vol. 10, p. 18a-185, 1956.

    "On the 9-point difference formuia for Laplace's equation". RepOrt TW-42, Math. Institute, University of Groningen, 196~?.

    "The algebraic eigenvaiue problem '~, Clarendon Press, Oxford, 1965.

    Rece ived May 25, 1967]