Sie sind auf Seite 1von 4

Journal of Applied Computer Science & Mathematics, no.

11 (5) /2011, Suceava

On Calculation of Adomian Polynomials by MATLAB


1

Hooman FATOOREHCHI, 2Hossein ABOLGHASEMI

Center for Separation Processes Modeling and Nano-Computations


School of Chemical Engineering, University of Tehran, Tehran, Iran
1
hfatoorehchi@gmail.com, 2abolghasemi.ha@gmail.com
AbstractAdomian 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.

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:

Keywords: Adomian decomposition, Adomian polynomials,


MATLAB, Nonlinear functionals, Differential equations.

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:
(2)
L1Lu + L1 Nu + L1 Ru = L1 g

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].

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

u = n =0 un (that is why it is called decomposition).


Identifying u0 as L-1 ga, it yields:
(3)
u = u0 L1 Nu L1 Ru
Furthermore, Nu shall be decomposed into an infinite

series of Adominan polynomials as follows:

Nu = An

(4)

n =0

where

An is classically suggested to be computed from

[6]:

An ( u0 , u1 , , un ) =

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

1 dn
i
N
ui

n ! d n i =0
=0

(5)

Therefore, a recurrence can be established to calculate the


remnant solution terms as:

ui +1 = L1 Ai L1 Rui

; i0

(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

85

Mathematics Section

A2 = 2u0u2 + u12

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.

A3 = 2u0u3 + 2u1u2
A4 = u22 + 2u1u3 + 2u0u4
A5 = 2u2u3 + 2u0u5 + 2u1u4
A6 = 2u0u6 + 2u1u5 + 2u2u4 + u32
A7 = 2u0u7 + 2u2u5 + 2u3u4 + 2u1u6
A8 = 2u2u6 + 2u3u5 + u42 + 2u0u8 + 2u1u7

III. MATLAB PROGRAM TO COMPUTE Ans

A9 = 2u0u9 + 2u2u7 + 2u3u6 + 2u1u8 + 2u4u5

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);

Nonlinearity

A0 = u03
A1 = 3u02u1
A2 = 3u12u0 + 3u02u2
A3 = u13 + 3u02u3 + 6u1u2u0
A4 = 3u12u2 + 3u22u0 + 3u02u4 + 6u1u3u0
A5 = 6u2u3u0 + 3u22u1 + 3u12u3 + 3u02u5 + 6u1u4u0
A6 = u23 + 3u32u0 + 6u2u4u0 + 6u2u3u1 + 3u12u4
+3u02u6 + 6u1u5u0
A7 = 3u32u1 + 3u22u3 + 6u3u4u0 + 6u2u4u1 + 6u2u5u0
+3u12u5 + 3u02u7 + 6u1u6u0
A8 = 6u3u4u1 + 3u42u0 + 3u32u2 + 3u22u4 + 6u3u5u0
+6u2u5u1 + 6u2u6u0 + 3u12u6 + 3u02u8 + 6u1u7u0

A9 = 6u2u6u1 + 6u4u5u0 + 3u42u1 + u33 + 3u22u5

IV. EXAMPLES

+6u3u6u0 + 6u3u5u1 + 6u3u4u2 + 6u2u7u0 + 3u02u9

By defining a symbolic variable in MATLAB as:

+u12u7 + 6u1u8u0

NON = u0 + u1 + u2 + + un
where ui is a symbolic variable and n is large enough. A

Nonlinearity

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

Nu = u 3

Nu = u 4

A0 = u04
A1 = 4u03u1
A2 = 4u03u2 + 6u12u02
A3 = 4u13u0 + 4u03u3 + 12u1u2u02

Nu = u 2

A4 = 12u12u2u0 + u14 + 6u22u02 + 4u03u4 + 12u1u3u02

A0 = u02

A5 = 12u12u3u0 + 4u13u2 + 12u22u0u1 + 4u03u5

A1 = 2u0u1

+12u2u3u02 + 12u1u4u02

86

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

A6 = 4u23u0 + 6u32u02 + 6u22u12 + 4u13u3 + 4u03u6

1 2
1 7 1 3

5040 u1 + 6 u2 u1 + 2 u3 u1 + u4u3

+u u + u u + 1 u 2 u 3 + 1 u u 5
5 2 6 1 12 2 1 120 2 1
A7 = eu0

+ 1 u3u14 + 1 u3u22 + 1 u4u13 + 1 u5u12


24

2
6
2

1
+u4u2u1 + u7 + u3u2u12

1
1 2

5
u7u1 + u6u2 + 120 u3u1 + u5u3 + 2 u4

+ 1 u 2u + 1 u 4 + 1 u 8 + 1 u u 4
2 3 2 24 2 40320 1 24 4 1

+ 1 u4u22 + 1 u5u13 + 1 u32u12 + 1 u22u3u1

2
6
4
2
A8 = eu0

1
1
1

+ u23u12 + u2u3u13 + u4u2u12 +


6
2

12

1
1
u2u16 + u6u12

u5u2u1 + u4u3u1 +
720
2

1 2 4

+ u2 u1 + u8
48

+24u2u3u1u0 + 12u u u + 12u u u + 12u u u


2
2 4 0
2
2 3 0

2
1 4 0
3
2 1

2
1 5 0

A7 = 12u32u1u0 + 12u u u + 4u u + 4u13u4 + 4u03u7


+12u3u4u02 + 12u2u5u02 + 24u2u4u0u1 + 12u2u3u12
+12u5u12u0 + 12u1u6u02

A8 = 12u3u5u02 + 12u22u3u1 + 12u2u6u02 + u24 + 6u42u02


+6u32u12 + 12u32u0u2 + 12u22u4u0 + 4u13u5 + 4u03u8
+24u3u4u1u0 + 24u2u5u1u0 + 12u2u4u12 + 12u6u0u12
+12u1u7u02
A9 = 12u42u0u1 + 12u22u5u0 + 24u2u6u1u0 + 12u3u6u02
+24u3u4u2u0 + 12u4u5u02 + 4u33u0 + 4u23u3 +
24u3u5u0u1 + 12u32u1u2 + 12u22u4u1 + 4u13u6 + 4u03u9
+12u3u4u12 + 12u2u7u02 + 12u2u5u12 + 12u12u7u0
+12u1u8u02
Nonlinearity

Nu = eu

A0 = eu0

1626697008263629
eu0 60480u4u13u2
590295810358705651712
+181440u5u2u12 + 15120u3u14u2 + 90720u3u12u22 +
A9 =

A1 = u1eu0
1

A2 = eu0 u2 + u12
2

A3 = eu0 u3 + u13 + u1u2


6

1
1
1

A4 = eu0 u1u3 + u14 + u22 + u12u2 + u4


24
2
2

1 2
1 5 1 2

u1u2 + u1u4 +
u1 + u1 u3
u0 u5 +
A5 = e
2
120
2

+u2u3

362880u5u3u1 + 181440u4u1u22 + 362880u6u2u1 +


181440u4u12u3 + 362880u 9 + 60480u33 + u19 +
181440u42u1 + 181440u5u22 + 181440u7u12 +
362880u3u2u4 + 181440u32u2u1 + 3024u4u15 +
72u17u2 + 15120u24u1 + 60480u23u3 + 362880u5u4 +
362880u7u2 + 362880u8u1 + 504u16u3 +
15120u5u14 + 1512u15u22 + 30240u32u13 + 10080u23u13
+60480u6u13 + 362880u6u3

1
1
1

u1u2u3 + u14u2 + u12u22 + u6 + u12u4

24
4
2
A6 = eu0

+ 1 u 2 + 1 u3 + u u + u u

3
2
2 4
1 5
6
2

87

Mathematics Section

V. DISCUSSION

[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 Adomians 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. 831841, 2005.
[9] A. Wazwaz, A. Gorguis, An analytic study of Fishers
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.

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]
[2]

[3]
[4]

[5]

G. Adomian, A new approach to nonlinear partial differential


equations, J. Math. Anal. Appl., vol. 102, pp. 402-434, 1984.
Adomian, G., Solving Frontier Problems of Physics: The
Decomposition Method, Kluwer Academic Publishers, Boston,
1994.
G. Adomian, Solutions of nonlinear PDE, Appl. Math. Lett.,
vol. 11(3), pp. 121-123, 1998.
J.-L. Li., Adomians decomposition method and homotopy
perturbation method in solving nonlinear equations, J.
Comput. Appl. Math., vol. 228, pp. 168-173, 2009.
K. Abbaoui, Y. Cherruault, Convergence of Adomians
Method Applied to Nonlinear Equations, Mathl. Comput.
Modeling, vol. 20(9), pp. 69-73, 1994.

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.

88

Das könnte Ihnen auch gefallen