4
Journal of Applied Computer Science & Mathematics, no. 11 (5) /2011, Suceava 85 On Calculation of Adomian Polynomials by MATLAB 1 Hooman FATOOREHCHI, 2 Hossein ABOLGHASEMI Center for Separation Processes Modeling and Nano-Computations School of Chemical Engineering, University of Tehran, Tehran, Iran 1 [email protected], 2 [email protected] Abstract–Adomian Decomposition Method (ADM) is an elegant technique to handle an extensive class of linear or nonlinear differential and integral equations. However, in case of nonlinear equations, ADM demands a special representation of each nonlinear term, namely, Adomian polynomials. The present paper introduces a novel MATLAB code which computes Adomian polynomials associated with several types of nonlinearities. The code exploits symbolic programming incorporated with a recently proposed alternative scheme to be straightforward and fast. For the sake of exemplification, Adomian polynomials of famous nonlinear operators, computed by the code, are given. Keywords: Adomian decomposition, Adomian polynomials, MATLAB, Nonlinear functionals, Differential equations. I. INTRODUCTION It is attributed to Albert Einstein to have said “True laws of nature cannot be linear”. Presumably true, mathematicians are continually challenged with the nonlinear problems, particularly in form of partial differential equations, appearing in Physics and engineering. Accordingly, any effort contributing to the world of nonlinear analysis would be of fundamental importance and granted. Among a multitude of previously proposed approaches to tackle nonlinear equations, Adomian Decompostion Method (ADM) has gained astonishing popularity. Having been initially developed and introduced by the acknowledged mathematician George Adomian in 1984, ADM can provide convenient solutions to a wide span of linear, as well as nonlinear, differential/integral equations [1-3]. ADM does not impose any linearization, perturbation or discretizations and leads to convergent solutions rapidly. To get to know about ADM and its efficiency as well as the further modifications thereof in detail, one is recommended to consult the literature [4-6]. Also, many illustrative examples associated with the application of ADM in various areas of science and engineering are available [7-11]. As it will be discussed, ADM requires a particular series representation, viz. Adomian polynomials, for the nonlinearities involved in the target equation. Several efforts have been made to derive procedures for computing these kinds of polynomials [12-16]. However, some of them are restricted to only special cases of nonlinearity and many of them, among those which have been converted into computer codes, involve complexity, long programs and all are coded in Maple. The present paper, proposes a concise computer program to rapidly compute Adomian polynomials in MATLAB, a programming language interested especially by engineers, getting its basic concept from a well-established technique developed by Wazwaz [17]. Illustrative examples are provided to show the reliability of the program. II. BASICS OF ADM IN BRIEF Consider a very general differential equation as follows: Lu Nu Ru g + + = (1) where L is an easily invertible linear operator, N is a nonlinear part and R stands for the remaining part. By defining the inverse operator of L as L -1 , it is directly concluded that: 1 1 1 1 L Lu L Nu L Ru Lg + + = (2) Taking L as an n-th order derivative operator into account, L -1 becomes an n-fold integration operator. Thus, it is followed that L -1 Lu=u+a, where a is emerged from the integrations. ADM proposes the final solution in form of 0 n n u u = = (that is why it is called decomposition). Identifying u 0 as L -1 ga, it yields: 1 1 0 u u L Nu L Ru = (3) Furthermore, Nu shall be decomposed into an infinite series of Adominan polynomials as follows: 0 n n Nu A = = (4) where n A is classically suggested to be computed from [6]: ( ) 0 1 0 0 1 , , , ! n i n n i n i d A u u u N u n d λ λ λ = = = (5) Therefore, a recurrence can be established to calculate the remnant solution terms as: 1 1 1 ; 0 i i i u LA L Ru i + = (6) Wazwaz ingeniously found a characteristic which holds true for Adomian polynomials: sum of subscripts of the components of u in each term of the polynomial A n is equal to

adomian1113

Embed Size (px)

Citation preview

Page 1: adomian1113

Journal of Applied Computer Science & Mathematics, no. 11 (5) /2011, Suceava

85

On Calculation of Adomian Polynomials by MATLAB

1Hooman FATOOREHCHI, 2Hossein ABOLGHASEMI Center for Separation Processes Modeling and Nano-Computations School of Chemical Engineering, University of Tehran, Tehran, Iran

[email protected], [email protected]

Abstract–Adomian Decomposition Method (ADM) is an elegant technique to handle an extensive class of linear or nonlinear differential and integral equations. However, in case of nonlinear equations, ADM demands a special representation of each nonlinear term, namely, Adomian polynomials. The present paper introduces a novel MATLAB code which computes Adomian polynomials associated with several types of nonlinearities. The code exploits symbolic programming incorporated with a recently proposed alternative scheme to be straightforward and fast. For the sake of exemplification, Adomian polynomials of famous nonlinear operators, computed by the code, are given.

Keywords: Adomian decomposition, Adomian polynomials, MATLAB, Nonlinear functionals, Differential equations.

I. INTRODUCTION

It is attributed to Albert Einstein to have said “True laws of nature cannot be linear”. Presumably true, mathematicians are continually challenged with the nonlinear problems, particularly in form of partial differential equations, appearing in Physics and engineering. Accordingly, any effort contributing to the world of nonlinear analysis would be of fundamental importance and granted. Among a multitude of previously proposed approaches to tackle nonlinear equations, Adomian Decompostion Method (ADM) has gained astonishing popularity. Having been initially developed and introduced by the acknowledged mathematician George Adomian in 1984, ADM can provide convenient solutions to a wide span of linear, as well as nonlinear, differential/integral equations [1-3]. ADM does not impose any linearization, perturbation or discretizations and leads to convergent solutions rapidly. To get to know about ADM and its efficiency as well as the further modifications thereof in detail, one is recommended to consult the literature [4-6]. Also, many illustrative examples associated with the application of ADM in various areas of science and engineering are available [7-11].

As it will be discussed, ADM requires a particular series representation, viz. Adomian polynomials, for the nonlinearities involved in the target equation. Several efforts have been made to derive procedures for computing these kinds of polynomials [12-16]. However, some of them are restricted to only special cases of nonlinearity and many of them, among those which have been converted into computer

codes, involve complexity, long programs and all are coded in Maple.

The present paper, proposes a concise computer program to rapidly compute Adomian polynomials in MATLAB, a programming language interested especially by engineers, getting its basic concept from a well-established technique developed by Wazwaz [17]. Illustrative examples are provided to show the reliability of the program.

II. BASICS OF ADM IN BRIEF

Consider a very general differential equation as follows: Lu Nu Ru g+ + = (1)

where L is an easily invertible linear operator, N is a nonlinear part and R stands for the remaining part. By defining the inverse operator of L as L-1, it is directly concluded that:

1 1 1 1L Lu L Nu L Ru L g− − − −+ + = (2)

Taking L as an n-th order derivative operator into account, L-1 becomes an n-fold integration operator. Thus, it is followed that L-1Lu=u+a, where a is emerged from the integrations. ADM proposes the final solution in form of

0n nu u∞==∑ (that is why it is called decomposition).

Identifying u0 as L-1− ga, it yields: 1 1

0u u L Nu L Ru− −= − − (3)

Furthermore, Nu shall be decomposed into an infinite series of Adominan polynomials as follows:

0n

nNu A

=

=∑ (4)

where nA is classically suggested to be computed from [6]:

( )0 10 0

1, , ,!

ni

n n ini

dA u u u N un d

λ

λλ

= =

⎡ ⎤⎛ ⎞= ⎢ ⎥⎜ ⎟

⎝ ⎠⎣ ⎦∑… (5)

Therefore, a recurrence can be established to calculate the remnant solution terms as:

1 11 ; 0i i iu L A L Ru i− −+ = − − ≥ (6)

Wazwaz ingeniously found a characteristic which holds true for Adomian polynomials: sum of subscripts of the components of u in each term of the polynomial An is equal to

Page 2: adomian1113

Mathematics Section

86

n. Through this, he came up with an alternative scheme to obtain Adomian polynomials with a reduced volume of calculation [17]. Following the method proposed by Wazwaz, we have built a piece of computer code (in form of a procedure) in MATLAB which uses symbolic programming and string functions efficiently to compute any desired component of Adomian polynomials pertaining to different nonlinearities. As it is observed the code is simple and short and thus saves calculation time/volume.

III. MATLAB PROGRAM TO COMPUTE Ans function sol=AdomPoly(expression,nth) % Coded by H. F. & H. A., Feb, 2011 Ch=char(expand(expression)); s=strread(Ch, '%s', 'delimiter', '+'); for i=1:length(s) t=strread(char(s(i)), '%s', 'delimiter', '*()expUlogsinh'); t=strrep(t,'^','*'); if length(t)~=2 p=str2num(char(t)); sumindex=sum(p)-p(1); else sumindex=str2num(char(t)); end list(i)=sumindex; end A=''; for j=1:length(list) if nth==list(j) A=strcat(A,s(j),'+'); end end N=length(char(A))-1; F=strcat ('%',num2str(N),'c%n'); sol=sscanf(char(A),F);

IV. EXAMPLES

By defining a symbolic variable in MATLAB as:

0 1 2 nNON u u u u= + + + +

where iu is a symbolic variable and n is large enough. A simple command calling the established AdomPoly function would calculate the Adomian polynomial equivalents of nonlinear operators acting upon NON. To illustrate the program results several Adomian polynomials related to most frequent, in real world applications, nonlinearities are presented here.

Nonlinearity 2Nu u= 2

0 0A u=

1 0 12A u u=

22 0 2 12A u u u= +

3 0 3 1 22 2A u u u u= + 2

4 2 1 3 0 42 2A u u u u u= + +

5 2 3 0 5 1 42 2 2A u u u u u u= + + 2

6 0 6 1 5 2 4 32 2 2A u u u u u u u= + + +

7 0 7 2 5 3 4 1 62 2 2 2A u u u u u u u u= + + + 2

8 2 6 3 5 4 0 8 1 72 2 2 2A u u u u u u u u u= + + + +

9 0 9 2 7 3 6 1 8 4 52 2 2 2 2A u u u u u u u u u u= + + + +

Nonlinearity 3Nu u= 3

0 0A u= 2

1 0 13A u u= 2 2

2 1 0 0 23 3A u u u u= + 3 2

3 1 0 3 1 2 03 6A u u u u u u= + + 2 2 2

4 1 2 2 0 0 4 1 3 03 3 3 6A u u u u u u u u u= + + + 2 2 2

5 2 3 0 2 1 1 3 0 5 1 4 06 3 3 3 6A u u u u u u u u u u u u= + + + + 3 2 2

6 2 3 0 2 4 0 2 3 1 1 420 6 1 5 0

3 6 6 3

3 6

A u u u u u u u u u u u

u u u u u

= + + + +

+ +

2 27 3 1 2 3 3 4 0 2 4 1 2 5 0

2 21 5 0 7 1 6 0

3 3 6 6 6

3 3 6

A u u u u u u u u u u u u u

u u u u u u u

= + + + +

+ + +

2 2 28 3 4 1 4 0 3 2 2 4 3 5 0

2 22 5 1 2 6 0 1 6 0 8 1 7 0

6 3 3 3 6

6 6 3 3 6

A u u u u u u u u u u u u

u u u u u u u u u u u u u

= + + + +

+ + + + +

2 3 29 2 6 1 4 5 0 4 1 3 2 5

23 6 0 3 5 1 3 4 2 2 7 0 0 9

21 7 1 8 0

6 6 3 3

6 6 6 6 3

6

A u u u u u u u u u u u

u u u u u u u u u u u u u u

u u u u u

= + + + +

+ + + + +

+ +

Nonlinearity 4Nu u= 4

0 0A u= 3

1 0 14A u u= 3 2 2

2 0 2 1 04 6A u u u u= + 3 3 2

3 1 0 0 3 1 2 04 4 12A u u u u u u u= + + 2 4 2 2 3 2

4 1 2 0 1 2 0 0 4 1 3 012 6 4 12A u u u u u u u u u u u= + + + + 2 3 2 3

5 1 3 0 1 2 2 0 1 0 52 2

2 3 0 1 4 0

12 4 12 4

12 12

A u u u u u u u u u u

u u u u u u

= + + +

+ +

Page 3: adomian1113

Journal of Applied Computer Science & Mathematics, no. 11 (5) /2011, Suceava

87

3 2 2 2 2 3 36 2 0 3 0 2 1 1 3 0 6

2 2 22 3 1 0 2 4 0 1 4 0 1 5 0

4 6 6 4 4

24 12 12 12

A u u u u u u u u u u

u u u u u u u u u u u u u

= + + + +

+ + + +

2 2 3 3 37 3 1 0 2 3 0 2 1 1 4 0 7

2 2 23 4 0 2 5 0 2 4 0 1 2 3 1

2 25 1 0 1 6 0

12 12 4 4 4

12 12 24 12

12 12

A u u u u u u u u u u u u

u u u u u u u u u u u u u

u u u u u u

= + + + +

+ + + +

+ +

2 2 2 4 2 28 3 5 0 2 3 1 2 6 0 2 4 0

2 2 2 2 3 33 1 3 0 2 2 4 0 1 5 0 8

2 23 4 1 0 2 5 1 0 2 4 1 6 0 1

21 7 0

12 12 12 6

6 12 12 4 4

24 24 12 12

12

A u u u u u u u u u u u u

u u u u u u u u u u u u

u u u u u u u u u u u u u u

u u u

= + + + +

+ + + + +

+ + + +

+

2 2 29 4 0 1 2 5 0 2 6 1 0 3 6 0

2 3 33 4 2 0 4 5 0 3 0 2 3

2 2 3 33 5 0 1 3 1 2 2 4 1 1 6 0 9

2 2 2 23 4 1 2 7 0 2 5 1 1 7 0

21 8 0

12 12 24 12

24 12 4 4

24 12 12 4 4

12 12 12 12

12

A u u u u u u u u u u u u u

u u u u u u u u u u u

u u u u u u u u u u u u u u

u u u u u u u u u u u u

u u u

= + + +

+ + + + +

+ + + +

+ + + +

+

Nonlinearity uNu e=

00

uA e= 0

1 1uA u e=

0 22 2 1

12

uA e u u⎛ ⎞= +⎜ ⎟⎝ ⎠

0 33 3 1 1 2

16

uA e u u u u⎛ ⎞= + +⎜ ⎟⎝ ⎠

0 4 2 24 1 3 1 2 1 2 4

1 1 124 2 2

uA e u u u u u u u⎛ ⎞= + + + +⎜ ⎟⎝ ⎠

0

2 5 25 1 2 1 4 1 1 3

5

2 3

1 1 12 120 2u u u u u u u u u

A eu u

⎛ ⎞+ + + +⎜ ⎟= ⎜ ⎟⎜ ⎟+⎝ ⎠

0

4 2 2 21 2 3 1 2 1 2 6 1 4

62 33 2 2 4 1 5

1 1 124 4 2

1 12 6

uu u u u u u u u u u

A eu u u u u u

⎛ ⎞+ + + +⎜ ⎟= ⎜ ⎟

⎜ ⎟+ + + +⎜ ⎟⎝ ⎠

0

7 3 21 2 1 3 1 4 3

2 3 55 2 6 1 2 1 2 1

74 2 3 2

3 1 3 2 4 1 5 1

24 2 1 7 3 2 1

1 1 15040 6 2

1 112 120

1 1 1 124 2 6 2

12

u

u u u u u u u

u u u u u u u uA e

u u u u u u u u

u u u u u u u

⎛ ⎞+ + +⎜ ⎟⎜ ⎟⎜ ⎟+ + + +⎜ ⎟

= ⎜ ⎟⎜ ⎟+ + + +⎜ ⎟⎜ ⎟⎜ ⎟+ + +⎝ ⎠

0

5 27 1 6 2 3 1 5 3 4

2 4 8 43 2 2 1 4 1

2 3 2 2 24 2 5 1 3 1 2 3 1

83 2 3 22 1 2 3 1 4 2 1

6 25 2 1 4 3 1 2 1 6 1

2 42 1 8

1 1120 2

1 1 1 12 24 40320 241 1 1 12 6 4 21 1 1

12 6 21 1

720 2148

u

u u u u u u u u u

u u u u u u

u u u u u u u u uA e

u u u u u u u u

u u u u u u u u u u

u u u

⎛ ⎞+ + + +⎜ ⎟⎜⎜+ + + +⎜⎜⎜+ + + +⎜= ⎜⎜+ + + +⎜⎜

+ + +⎜⎜⎜+ +⎜⎝ ⎠

⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟

(0 34 1 2

2 4 2 25 2 1 3 1 2 3 1 2

25 3 1 4 1 2 6 2 1

2 9 3 94 1 3 3 12 24 1 5

9

2

60480

181440 15120 90720

3628

1626697008263629590

80 181440 362880

181440 362880 60480

181440 181440 18

295810358705651712

1

u u u u

u u u u u u u u u

u u u u u u u u u

u u u

A

u u u

u u u

e

u

+ + + +

+ + +

+

+

=

+ + +

+

)

27 1

2 53 2 4 3 2 1 4 1

7 4 31 2 2 1 2 3 5 4

67 2 8 1 1 34 5 2 2 3 3 3

5 1 1 2 3 1 2 1

36 1 6 3

440

362880 181440 3024

72 15120 60480 362880

362880 362880 504

15120 1512 30240 10080

60480 362880

u u

u u u u u u u u

u u u u u u u u

u u u u u u

u u u u u u u u

u u u u

+

+ + +

+ + + +

+ + +

+ + +

+ +

Page 4: adomian1113

Mathematics Section

88

V. DISCUSSION

The proposed algorithm intended to calculate Adomian polynomials enjoys a great deal of simplicity, conciseness and efficiency. As it is converted to a function file in MATLAB, it can easily be integrated into any codes dealing with solution of partial differential equations and be called anywhere in the program to compute any desired Adomian polynomial component of interested nonlinearity. By taking well advantage of as-built string functions and symbolic infrastructures of MATLAB, we have managed to shorten the code considerably. The authors are working on application of this computer code to tackle a nonlinear mathematical modeling dealing with heat radiation encountered in thermal engineering.

ACKNOWLEDGMENT

The authors are grateful to Mr. Moein Assar (M.SC. in Chemical Engineering from University of Tehran) for double-checking the calculations.

REFERENCES

[1] G. Adomian, “A new approach to nonlinear partial differential

equations,” J. Math. Anal. Appl., vol. 102, pp. 402-434, 1984. [2] Adomian, G., Solving Frontier Problems of Physics: The

Decomposition Method, Kluwer Academic Publishers, Boston, 1994.

[3] G. Adomian, “Solutions of nonlinear PDE,” Appl. Math. Lett., vol. 11(3), pp. 121-123, 1998.

[4] J.-L. Li., “Adomian’s decomposition method and homotopy perturbation method in solving nonlinear equations,” J. Comput. Appl. Math., vol. 228, pp. 168-173, 2009.

[5] K. Abbaoui, Y. Cherruault, “Convergence of Adomian’s Method Applied to Nonlinear Equations,” Mathl. Comput. Modeling, vol. 20(9), pp. 69-73, 1994.

[6] Y-C. Jiao, C. Dang, Y. Yamamoto, “An extension of the decomposition method for solving nonlinear equations and its convergence,” Comput. Math. Appl., vol. 55, pp. 760-775, 2008.

[7] S. Pamuk, “An application for linear and nonlinear heat equations by Adomian’s decomposition method,” Appl. Math. Comput., vol. 163, pp.89-96, 2005.

[8] C. Arslanturk, “A decomposition method for fin efficiency of convective straight fins with temperature-dependent thermal conductivity,” Int. Comm. Heat Mass Tran., vol. 32, pp. 831-841, 2005.

[9] A. Wazwaz, A. Gorguis, “An analytic study of Fisher’s equation by using Adomian decomposition method,” Appl. Math. Comput., vol. 154, pp. 609-620, 2004.

[10] B. Adjedj, “Application of the decomposition method to the understanding of HIV immune dynamics,” Kybernetes, vol. 28(3), pp. 271-283, 1999.

[11] A. Wazwaz, Partial Differential Equations Method and Applications, Balkema Publishers, Abingdon, 2002.

[12] H.-W. Choi, J.-G., “Symbolic implementation of the algorithm for calculating Adomian polynomials,” Appl. Math. Comput., vol. 146, pp. 257-271, 2003.

[13] J. Biazar, M. Pourabd, “A Maple program for computing Adomian Polynomials,” International Mathematical Forum, vol. 1(39): 1919-1924, 2006.

[14] J.-S. Duan, “Recurrence triangle for Adomian polynomials,” Appl. Math. Comput., vol. 216(4), pp. 1235-1241, 2010.

[15] E. Babolian, Sh. Javadi, “New method for calculating Adomian polynomials,” Appl. Math. Comput., vol. 153, pp. 253-259, 2004.

[16] J. Biazar, E. Babolian, G. Kember, A. Nouri, R. Islam, “An alternate algorithm for computing Adomian polynomials in special cases,” Appl. Math. Comput., vol. 138, pp. 523-529, 2003.

[17] A. Wazwaz, “A new algorithm for calculating Adomian polynomials for nonlinear operators,” Appl. Math. Comput., vol. 111, pp. 53-69, 2000.

Hooman Fatoorehchi is pursuing his PhD in chemical engineering at University of Tehran, Iran. He has always maintained

a strong interest in applied mathematics, particularly functional analysis and mathematical modeling, as well as computer programming. Each day more than before, he finds himself charmed by the beauty of mathematics.

Hossein Abolghasemi received his PhD in chemical engineering from University of Tehran in 2000. His primary areas of

interests include control theory, engineering mathematics and mathematical modeling. So far, he has published a textbook on chemical process control and several scientific articles.