An accurate solution of the Poisson equation by the

7 downloads 0 Views 322KB Size Report
A new Tau method is presented for the two-dimensional Poisson equation. Comparison of ..... Multiply both sides of the differential equation (3.7) by. Ae 1 = 1 -1.
JOURNAL OF COMPUTATIONAL AND APPLIED MATHEMATICS

ELSEVIER

Journal of Computational and Applied Mathematics 85 (1997) 1-10

An accurate solution of the Poisson equation by the Chebyshev-Tau method H.I. S i y y a m a'*, M.I. S y a m b a Department of Mathematical Science, Jordan University of Science and Technology, Irbid, Jordan b Department of Mathematics, Yarmouk University, Irbid, Jordan Received 30 October 1996; received in revised form 21 April 1997

Abstract A new Tau method is presented for the two-dimensionalPoisson equation. Comparisonof the results for the test problem u(x, y ) = sin(47~x)sin(4ny) with those computed by Haidvogel and Zang, using the matrix diagonalizationmethod, and Dang-Vu and Delcarte, using the Chebyshevcollocation method, indicates that our method would be more accurate.

Keywords: Poisson equation; Chebyshevpolynomials; Tau method AMS classification." 65

1. Introduction Haidvogel and Zang [3] developed a matrix diagonalization method for the solution of the twodimensional Poisson equation. This method is efficient but requires a preprocessing calculation of the eigenvalues and eigenvectors which limits the accuracy of the solution to that of the preprocessing calculations, especially at large N values. Dang-Vu and Delcarte [2] developed a Chebyshev collocation method for solving the same problem. Their method has the same accuracy as the matrix diagonalization method when N is small and it is more accurate when N is large. In this paper we present a new alternative method for solving

Au(x,y)=Uxx +Uyy= f(x,y),

x, y E ( - 1 , 1 ) ,

u ( + l , y ) = u ( x , + l )=O. which is more accurate than the above two methods. * Corresponding author. E,mail: [email protected]. 0377-0427/97/$17.00 (~) 1997 Elsevier Science B.V. All rights reserved PH S0377-0427(97)00104-0

(1.1)

H.I. Siyyam, M.I. Syam/ Journal of Computational and Applied Mathematics 85 (1997) 1-10

Let us describe the utility of our method. Consider the following boundary-value problem: z(+l)=0,

z"(x)=g(x),

-l 1 and if n # m .

~"'~=

Other properties of Chebyshev polynomials include the recursion relation Tn+l(X)

= 2xTn(x)

-

T._l(x)

(2.2)

for n t> 1 and the endpoint relation T,(±I) = (+1)".

(2.3)

Suppose that f ( x ) E C2[-1, 1] and f ' " ( x ) is a piecewise continuous function on [-1, 1]. Then for d2 D2 f ( x ) = -~x2f ( x ) , we have that

D2 f ( x ) = ~ .1-(2)T.(x) n=O converges uniformly on [-1, 1] where f(2): L Cn

~ p(p2 p=n+2 p+n even

_

nZ)fp,

(2.4)

and

2 f l f ( x ) Tn(x) dx. fn = rcc----~, I vii - x 2 The coefficients also satisfy the recursion relation

c n - l J n¢(q) -1

¢'(q) =2nf(n q-l),

-- Jn+l

For more details, see [4, 1].

n >>.1, q -~" 1,2.

(2.5)

4

H.1. Siyyam, M.I. Syam/Journal of Computational and Applied Mathematics 85 (1997) 1-10

3. Chebyshev-Tau method for solving two-dimensional Poisson equation The basic topics of this section involve the Chebyshev-Tau method to discretize a class of linear boundary-value problems of the form of Problem (1.1). To explain the total procedure both analytic and numerical results are presented. Referring to the boundary-value problem (1.1), approximate u and f in terms of Chebyshev polynomials as N

uN(x, y) = ~

ak(x) Tk(y),

k=0

and N

fN(x,y) = Z

bk(x)Tk(y).

k=0

For the approximate solution uN, the residual is given by

RN(uN ) = AuN(x, y) -- fN(x, y).

(3.1)

Thus, the residual can be written as N

RN(uu) = ~ [a~2)(x)+ a~'(x) -- bk(x)]T~(y),

(3.2)

k=0

where a~2) is given in (2.4) and a~'(x) is the second derivative of ak(x) with respect to x. As in a typical Galerkin scheme, we generate ( N - 1) second-order ordinary differential equations by orthogonalizing the residual with respect to the basis functions Tk(y) (RN, Tk(y)) =

f

l RN

Tk(y)

dy = O,

for k = 0 : N - 2 .

,

This leads to the elementwise equation

a~2)(x) + a~'(x) = bk(x).

(3.3)

Since

ak(x ) = rka~2)_2(x) + ska~2)(x) + wka~2(x ) for k : 2 : N , SO

ak :

rk(bk-2

" 2) + sk(bk -- ak") + wk(bk+2 -- ak+ " 2) - ak_ for k = 2 :N,

where Ck-2

rk-4k(k_

--ek+2

l)'

Sk--2(k2_l)'

ek+4

w k - 4 k ( k + l-)'

and ek = 1 for k N.

H.I. Siyyam, M.I. Syaml Journal of Computational and Applied Mathematics 85 (1997) 1-10

5

For simplicity, let us assume that N is an even positive integer. Let D 2 -- d2/dx 2 be the differential operator. Since N

UN(X, + 1 ) = 0 = ~

(+1)kak(x),

k=0 SO

ao(x) + a2(x) + . . - + aN(x) = 0

and a l ( x ) + a3(x) + - - . + aN-l(X) = O. Thus, we have the following two systems

( Ae + DZge )ae = Re

(3.4)

( Ao + D2 Bo )ao = Ro,

(3.5)

and

where ae -- (ao, a 2 , . . . , aN) r, ao = (al, a 3 , . . . , aN-I )T -0 -1

0

0

0

0

...

0

0

0

O

1

...

1

1

r2

S2

W2

0

...

0

0

0

0

1

...

0

0

0

I"4

$4

W4

...

0

0

0

0

Ae--

Be

0

0

...

1

0

0

0

0

0

...

I'N_ 4

SN_ 4

WN_ 4

0

0

0

...

0

1

0

0

0

0

...

0

I"N_ 2

SN_ 2

0

0

0

0

0

...

0

0

rN

0

-0

0

0

0

...

0

0

0

O

1

1

...

1

1"

r3

s3

w3

0

...

0

0

0

0

0

1

...

0

0

0

r5

ss

w5

...

0

0

0

0

..°

Ao=

BO

0

0

...

1

0

0

0

0

0

...

rN-5

SN--5 WN--5 0

0

0

...

0

1

0

0

0

0

...

0

rN_ 3

SN_ 3

0

0

0

0

0

...

0

0

rN_~

0

H.L Siyyam, M.I. Syam/Journal of Computational and Applied Mathematics 85 (1997) 1-10 0 r2bo + s2b2 + w2b4

rab2 + s4b4 + w4b6 re=

rN-4bN-6 + SN-4bN-4 -[- WN--4bN--2 ru-zbu-4 + SN--zbN--2 rNbN-2 0 r3bl + s3b3 + w3b5 rsb3 + s5b5 + wsb7 re=

rN-sbN--7 + SN--sbN--7 + WN-sbN--7 rN--3bN--5 + SN--3bN--3 rN-lbN-3 Since {Tk(y), k=O, 1 , . . . , N } is linearly independent over • and uN(+l, y) -- 0, we see that ae(+l)=0

and

ao(+l)=0.

(3.6)

From Eqs. (3.4)-(3.6), we see that the two systems are similar. For this reason, we will discuss the solution of the following system:

ae(+l)=O.

(Ae + OZBe)ae =Re,

(3.7)

Multiply both sides of the differential equation (3.7) by 1

Ae 1 =

-1

-1

...

-1

-1

0

1

0

...

0

0

0

0

1

...

0

0

0

0

0

...

1

0

0

0

0

...

0

1

to get

(I + D2 C, )a, = qre,

ae(+l) =0.

(3.8)

H.I. Siyyam, M.I. SyamlJournal of Computationaland Applied Mathematics 85 (1997) 1-10

7

Let qe be the (N/2 + 1 ) x 1 vector which is defined as follows: the ith component of q, is the Taylor expansion of the ith component of qr~ about x = 0 of degree N/2 + 1 for all 1