The Chebyshev Tau technique for the solution of Laplace’s equation

The Chebyshev Tau technique for the solution of Laplace’s equation

Applied Mathematics and Computation 184 (2007) 895–900 www.elsevier.com/locate/amc The Chebyshev Tau technique for the solution of Laplace’s equation...

745KB Sizes 1 Downloads 59 Views

Applied Mathematics and Computation 184 (2007) 895–900 www.elsevier.com/locate/amc

The Chebyshev Tau technique for the solution of Laplace’s equation M.R. Ahmadi *, H. Adibi Department of Applied Mathematics, Faculty of Mathematics and Computer Science, Amirkabir University of Technology, No. 424, Hafez Ave., Tehran, Iran

Abstract An effective numerical method is developed in this paper for the Laplace equation as one of the most significant equations of physics and engineering. Our approach based on Chebyshev Tau technique utilizes Chebyshev polynomials and the associated operational matrix of derivative. Illustrative examples are included and numerical results obtained via the technique are encouraging and suggest that the proposed technique is efficient in treating the Laplace equation.  2006 Elsevier Inc. All rights reserved. Keywords: Chebyshev Tau method; Laplace’s equation; Chebyshev polynomials; Spectral method; Operational matrix

1. Introduction Consider the problem of finding solution of the following Laplace equation r2 uðx; yÞ ¼ uxx þ uyy ¼ 0;

ðx; yÞ 2 X;

ð1Þ

with the Dirichlet boundary condition, u ¼ f;

ðx; yÞ 2 oX;

ð2Þ

where f 2 C(oX) is given and X is the domain of the problem with the piecewise smooth boundary oX. Eq. (1) with the boundary condition can be found in modeling of various physical an engineering phenomena [1]. Therefore a lot of attention has been devoted to study this problem. Some numerical treatments of this problem are found in [2]. A wide variety of finite element and finite difference methods are discussed in many papers e.g. [4,3]. Some boundary integral methods are developed in [5]. Also integral equation methods are presented in [10] for solving problems of potential theory and elastostatics. Another approach for solving this problem is the method of fundamental solutions (MFS) which is a boundary-type method for the solution of certain elliptic boundary value problems. In [6] the method of fundamental solutions is investigated for solving the Laplace equation with the Dirichlet boundary condition in a disk. The Adomian decomposition method as *

Corresponding author. E-mail addresses: [email protected] (M.R. Ahmadi), [email protected] (H. Adibi).

0096-3003/$ - see front matter  2006 Elsevier Inc. All rights reserved. doi:10.1016/j.amc.2006.05.212

896

M.R. Ahmadi, H. Adibi / Applied Mathematics and Computation 184 (2007) 895–900

well as the combination method are respectively utilized in [1,7]. The classical spectral method can also be used by implementing the collocation technique. Such a technique is used in [8] for a semilinear parabolic equation. One benefit of this procedure is that this method constructs a numerical solution for Laplace’s equation in the form appropriate for a rapidly convergence series. The comparison with a variety of alternative techniques shows that our method is more efficient and easy to use. 2. Some properties of Chebyshev polynomials The well known Chebyshev polynomials are defined on the interval [1, 1] and are obtained by expanding the following formulae [11] T n ðxÞ ¼ cosðn arccosðxÞÞ;

n ¼ 0; 1; . . . ; x 2 ½1; 1:

Also they have the following properties (a) Three-term recurrence T 0 ðxÞ ¼ 1; T 1 ðxÞ ¼ x; T n ðxÞ ¼ 2xT n1 ðxÞ  T n2 ðxÞ;

n P 2:

(b) Second order differential equations ð1  x2 ÞT 00n ðxÞ  xT 0n ðxÞ þ n2 T n2 ðxÞ ¼ 0: (c) Orthogonality Z 1 dx T k ðxÞT m ðxÞ pffiffiffiffiffiffiffiffiffiffiffiffiffi ¼ 0; k 6¼ m; 1  x2 1 p Z 1 k > 0; dx 2 T k ðxÞ pffiffiffiffiffiffiffiffiffiffiffiffiffi ¼ 2 2 p k ¼ 0: 1x 1 In this paper we use orthonormal Chebyshev polynomials, noting property (c). A function u(x, y) of two independent variables defined for 1 6 x, y 6 1 may be expanded in terms of double Chebyshev polynomials n X m X uðx; yÞ ¼ aij T i ðyÞT j ðxÞ ¼ UTn ðyÞAUm ðxÞ; ð3Þ i¼0

j¼0

where the Chebyshev matrix A and the Chebyshev vector U(x) are defined by 0 1 a00 . . . a0m B . .. C C A¼B . A; @ .. an0 . . . anm T

U‘ ðtÞ ¼ ½T 0 ðtÞ; T 1 ðtÞ; . . . ; T ‘ ðtÞ :

ð4Þ ð5Þ

The derivative of vector U(x) can be expressed by dUðxÞ ¼ DUðxÞ; dx in which D is the (m + 1) · (m + 1) operational matrix of derivative given by 8 2ði  1Þ; i  j is odd and i > j > 1; > > < pffiffiffi D ¼ ðd ij Þ ¼ 2ði  1Þ; i  j is odd and i > j ¼ 1; > > : 0; otherwise:

ð6Þ

M.R. Ahmadi, H. Adibi / Applied Mathematics and Computation 184 (2007) 895–900

For example, for even m 0 0 pffiffiffi B 2 B B B 0 B pffiffiffi B 3 2 B D¼B B 0 B pffiffiffi B 5 2 B B .. B @ . pffiffiffi ðm  1Þ 2

897

we have 1

0

0

0 ...

0

0

0

0

0 4

0 0

0 ... 0 ...

0 0

0 0

0 0

0 8

6 0

0 ... 8 ...

0 0

0 0

0 0

0 .. .

10 .. .

0 ... .. . ...

0 .. .

0 .. .

0 .. .

C 0C C 0C C 0C C C: 0C C 0C C .. C C .A

0

2ðm  1Þ

0 ...

2ðm  1Þ

ð7Þ

0 2ðm  1Þ 0

3. Solving the problem From (3) and (6) we get uxx ¼ UTn ðyÞAU00m ðxÞ ¼ UTn ðyÞADU0m ðxÞ ¼ UTn ðyÞAD2 Um ðxÞ;

ð8Þ

and similarly we can show that uyy ¼ ðD2 ÞT UTn ðyÞAUm ðxÞ:

ð9Þ

By substituting (7) and (8) into (1), we get 2

UTn ðyÞðDT Þ AUm ðxÞ þ UTn ðyÞAD2 Um ðxÞ ¼ 0;

ðx; yÞ 2 X:

ð10Þ

Also by using (2) and (3), we obtain UTn ðyÞAUm ðxÞ ¼ f ðx; yÞ;

ðx; yÞ 2 oX:

ð11Þ

Now from Eq. (10), we get ðDT Þ2 A þ AD2 ¼ 0:

ð12Þ

By collocating boundary condition (2) in 2(m + n) points on oX, we get UTn ðy i ÞAUm ðxi Þ ¼ f ðxi ; y i Þ ðxi ; y i Þ 2 oX; i ¼ 1; . . . ; 4n

ð13Þ

Eqs. (12) and (13) yield a system of (n + 1)(m + 1) linear equations with (n + 1)(m + 1) unknowns, which is solved for Aij, i = 1, . . . , n, j = 1, . . . , m, for determining u(x, y). 4. Numerical examples This section is devoted to computational results. The presented method in the proceeding section is implemented for solving two test examples, already discussed in [1,9]. Example 1. Consider the Laplace equation [1]  uxx þ uyy ¼ 0; ðx; yÞ 2 X; uðx; yÞ ¼ expðxÞ cosðyÞ; ðx; yÞ 2 oX;

ð14Þ

where X is the unit disk x2 + y2 < 1. The exact solution of this problem is u*(x,y) = exp (x)cos (y). We have applied our method and solved Eq. (14) for m = n. Here we divide the boundary of the problem into 4n elepffiffiffiffiffiffiffiffiffiffiffiffi ffi ments with nodes (xi, yi) where xis are the roots of T2n(x) and y i ¼  1  x2i ; i ¼ 1; . . . ; 2n. Define the maximum error as en;m ¼ kun;m  u k1 ¼ maxfjun;m ðx; yÞ  u ðx; yÞj; ðx; yÞ 2 Xg;

898

M.R. Ahmadi, H. Adibi / Applied Mathematics and Computation 184 (2007) 895–900

where un,m(x, y) is the computed result for n and m. In Table 1 we give the errors en,m, for m = n = 5, 7, 9, 11, 13. From Table 1 we see that the errors decrease rapidly as n and m increase. Fig. 1. shows the error function e(x) = un,m(x,y)  u*(x,y),(x, y) 2 X for m = n = 9 schematically. In Table 2 the present method is compared with Nystrom and Adomian methods discussed in [1]. It is remarkable that, in contrast with [1] we no longer have any singularity on the boundary. It is seen from Table 2 that as the point (x, y) approaches to the boundary through the polar line  p p ðx; yÞ ¼ q cos ; sin ; 0 6 q < 1: ð15Þ 4 4 the errors via Nystrom and Adomian methods increase whereas in our method the error does not increase (Fig. 1). Example 2. Consider Laplace’s equation ( uxx þ uyy ¼ 0; uðx; 1Þ ¼ uð1; yÞ; uð1; yÞ ¼ 0; uðx; 1Þ ¼

ðx; yÞ 2 X; Þ; sinðpðxþ1Þ 2

ðx; yÞ 2 oX;

where X is the rectangle {(x, y); 1 < x, y < 1}. The exact solution of this problem is [9] uðx; yÞ ¼

sinhð1=2pðy þ 1ÞÞ sinð1=2pðx þ 1ÞÞ : sinhðpÞ

Table 1 The maximum errors for example 1 n m=n

5 6.2 · 104

7 2.8 · 106

9 7.6 · 109

Fig. 1. Error function e(x) for n = m = 9.

11 1.4 · 1011

13 1.8 · 1014

M.R. Ahmadi, H. Adibi / Applied Mathematics and Computation 184 (2007) 895–900

899

Table 2 Comparison between the present method with Nystrom and Adomian methods in example 1 q

Nystrom method

Adomian method

Present method

0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 0.99

1.2244 · 108 0.11 · 109 0.39 · 109 0.49 · 109 0.49 · 109 0.40 · 109 0.566 · 109 0.1269980 · 105 0.24441877 · 102 2.308452531

0.77 · 109 0 0.23 · 1010 0.301 · 1010 0.301 · 1010 0.59 · 1010 0.104 · 108 0.1270 · 105 0.2444188238 · 102 2.308452530

0.91 · 1011 0.24 · 1011 0.55 · 1011 0.11 · 1010 0.11 · 1010 0.54 · 1011 0.27 · 1011 0.81 · 1011 0.7 · 1011 0.81 · 1012

Table 3 The maximum errors for example 2 n m=n

6 7.6 · 104

9 2.6 · 107

10 2.7 · 1010

11 1.4 · 1011

13 1.8 · 1014

Fig. 2. Error function e(x) for m = n = 11.

Table 3 shows the errors en,m, for m = n = 5, 7, 9, 11, 13 via our method. Here we choose collocation points xi,i = 1, . . . , n and yi,i = 1, . . . , m where xi and yi are the roots of Tn(x) and Tm(x) respectively. Fig. 2. demonstrates the error function e(x) for m = n = 11. It should be noted that in [9] the maximum error is =O(106) for 0.82 6 x, y 6 0.82. 5. Conclusion In this study, a technique has been developed for solving Laplace’s equation with Dirichlet boundary condition. The method is based upon Chebyshev Tau method. The Chebyshev polynomials are utilized to solve

900

M.R. Ahmadi, H. Adibi / Applied Mathematics and Computation 184 (2007) 895–900

the problem effectively. The method leads to solving a system of linear algebraic equations. Illustrative examples demonstrate the accuracy, validity and applicability of the technique. References [1] M. Tatari, M. Dehghan, Numerical solution of Laplace equation in a disk using the Adomian decomposition method, J. Phys. Scr. 72 (2005) 345–348. [2] W. Hackbusch, Elliptic Differential Equations, Springer Verlag, Berlin, Heidelberg, 1992. [3] G.E. Forsythe, W.R. Wasow, Finite Difference Methods for Partial Defferential Equations, Wiley, New York, 1960. [4] P.G. Ciarlet, Finite Element Method for Elliptic Problem, North-Holland, Amsterdam, 1978. [5] K.E. Atkinson, The Numerical Solution of Integral Equation of the Second Kind, Combridge Unibersity Press, Combridge, UK, 1997. [6] Y.S. Smyrlis, A. Karageorghis, Some aspects of the method of fundamental solutions for certain harmonic problems, J. Sci. Comput. 16 (2001) 341–371. [7] K. Al-Khaled, D. Kaya, M. Noor, Numerical comparison of methods for solving parabolic equations, J. Appl. Math. Comput. 157 (2004) 735–743. [8] A. Saadatmandi, M. Dehghan, A. Campo, The Legendre Tou technique for the determination of a source parameter in a semilinear parabolic equation, Mathematical Problems in Engineering. [9] J.R. Cannon, The Numerical solution of the Dirichlet problem for Laplace’s Equation by linear programming, SIAM (1964). [10] M.A. Jaswon, G.T. Symm, Integral Equation Methods in Potential Theory and Elastostatics, Academic Press, London, New York, San Francisco, 1977. [11] T.J. Rivlin, An Introduction to the Approximation of Functions, Dover Publications, Inc., New York, 1969.