Sunteți pe pagina 1din 9

Computers and Mathematics with Applications 54 (2007) 10551063

www.elsevier.com/locate/camwa
The numerical simulation for stiff systems of ordinary
differential equations
M.T. Darvishi
a,
, F. Khani
b
, A.A. Soliman
c
a
Department of Mathematics, Razi University, Kermanshah 67149, Iran
b
Department of Mathematics, Ilam University, P. O. Box 69315516, Ilam, Iran
c
Department of Mathematics, Faculty of Education (AL-Arish), Suez Canal University, AL-Arish, North Sinia 45111, Egypt
Received 28 September 2006; accepted 20 December 2006
Abstract
In this paper, the variational iteration method is applied to solve systems of ordinary differential equations in both linear and
nonlinear cases, focusing interest on stiff problems. Some examples are given to illustrate the accuracy and effectiveness of the
method. We compare our results with results obtained by the Adomian decomposition method. This comparison reveals that the
variational iteration method is easier to be implemented. In fact, the variational iteration method is a promising method to various
systems of linear and nonlinear equations.
c 2007 Elsevier Ltd. All rights reserved.
Keywords: Variational iteration method; Systems of differential equations; Stiff systems
1. Introduction
In this paper, we obtain numerical solutions for systems of ordinary differential equations. We apply the variational
iteration method (see [14]) to nd the numerical and explicit (see Problem 2) solutions of these systems. In many
different elds of science and engineering, it is very important to obtain exact or numerical solutions of systems of
nonlinear ordinary differential equations. It is well known that nonlinear phenomena are very important in a variety
of scientic elds, especially in uid mechanics, solid state physics, plasma physics, plasma waves and chemical
physics. Searching for exact and numerical solutions, especially for traveling wave solutions, of nonlinear equations
in mathematical physics plays an important role in soliton theory [5,6]. Many approaches to nonlinear equations
were proposed, such as Backlund transformation [7], Hirotas bilinear method [7], the sinecosine method [8], the
homogeneous balance method [9,10], the Riccati expansion method [11] and the homotopy perturbation method
(see [1218]). Among all of the analytical methods in open literature, the variational iteration method proposed
by He [14] is the most promising method for all kinds of nonlinear equations. It is an epoch-making theory after
the perturbation method. The main application of the variational iteration method shows miraculous exactness and
convenience compared to other methods.

Corresponding author. Tel.: +98 9123 58 2865; fax: +98 8314 274569.
E-mail addresses: darvishi@razi.ac.ir (M.T. Darvishi), farzad kh@walla.com (F. Khani), asoliman 99@yahoo.com (A.A. Soliman).
0898-1221/$ - see front matter c 2007 Elsevier Ltd. All rights reserved.
doi:10.1016/j.camwa.2006.12.072
1056 M.T. Darvishi et al. / Computers and Mathematics with Applications 54 (2007) 10551063
The variational iteration method was rst proposed by He [14], and was successfully applied to autonomous
ordinary differential equations (by He [19]), to nonlinear polycrystalline solids [20], nonlinear partial differential
equations [2124] and other elds. The combination of perturbation method, variational iteration method, method of
variation of constants and averaging method established an approximate solution of one degree of freedom weakly
nonlinear systems in [25].
The motivation of this paper is to illustrate the merits of the method in solving some systems of ordinary differential
equations. The variational iteration method is useful for obtaining exact and approximate solutions of linear and
nonlinear differential equations. There is no requirement for linearization or discretization and so large computational
work and round-off errors are avoided. The availability of computer symbolic packages such as Mathematica and
Maple give a mathematical tool to perform some complicated manipulations and to carry out some modications on
a method for a specic problem easily. The results of the variational iteration method (VIM) are compared with the
exact solution and those obtained by the Adomian decomposition method (ADM) for different values of constants. It
should be noted that we only report the numerical results of ADM and we do not explain this method. Mahmood et al.
[26] proposed the ADM to solve stiff systems of ordinary differential equations.
The reminder of this paper is organized as follows: in the following section the variational iteration method is
explained. In Section 3 we propose the solution method and we solve three test problems. The numerical results are
proposed in Section 4. The paper is concluded in Section 5.
2. Variational iteration method
In 1978, Inokuti et al. [27] proposed a general Lagrange multiplier method to solve nonlinear problems. In this
method the solution of a mathematical problem with a linearization assumption is used as an initial approximation
or trial function, then a more highly precise approximation at some special point can be obtained. To illustrate this
method, consider the following differential equation
Lu(t ) + Nu(t ) = g(t ), (1)
where L is a linear operator, N is a nonlinear operator and g(t ) is an inhomogeneous term.
Ji-Huan He has modied the above method into an iteration method. According to the variational iteration method,
or more precisely, Hes variational iteration method [28,24,19,29], we construct a correctional functional in the
following way
u
n+1
(t ) = u
n
(t ) +
_
t
0
(Lu
n
() + Nu
n
() g())d, (2)
where is a general Lagrangian multiplier [13], which can be identied optimally via the variational theory, the
subscript n denotes the nth order approximation, u
n
is considered as a restricted variation [13], i.e., u
n
= 0. Eq. (2)
is called a correction functional.
3. Applications
In this section, we apply the proposed variational iteration method to stiff systems of ordinary differential equations.
3.1. Problem 1
This example is due to Alt [30] and has the following form
_
x

1
(t )
x

2
(t )
_
=
_
1 95
1 97
_ _
x
1
(t )
x
2
(t )
_
(3)
with initial condition X
(0)
=
_
1
1
_
. Its exact solution is
_

_
x
1
(t ) =
1
47
(95 e
2t
48 e
96t
),
x
2
(t ) =
1
47
(48 e
96t
e
2t
).
(4)
M.T. Darvishi et al. / Computers and Mathematics with Applications 54 (2007) 10551063 1057
We can construct the following correction functionals for vector X:
x
(n+1)
1
(t ) = x
(n)
1
(t ) +
_
t
0

1
_
x
(n)
1
(s) + x
(n)
1
(s) 95x
(n)
2
(s)
_
ds, (5)
x
(n+1)
2
(t ) = x
(n)
2
(t ) +
_
t
0

2
_
x
(n)
2
(s) +x
(n)
1
(s) +97x
(n)
2
(s)
_
ds, (6)
where
1
and
2
are general Lagrange multipliers, and x
(n)
1
and x
(n)
2
denote restricted variations, i.e. x
(n)
1
= 0,
x
(n)
2
= 0.
Making correction functionals (5) and (6),
x
(n+1)
1
(t ) = x
(n)
1
(t ) +
_
t
0

1
_
x
(n)
1
(s) + x
(n)
1
(s) 95x
(n)
2
(s)
_
ds,
= x
(n)
1
(t ) +
_
t
0

1
_
x
(n)
1
(s) + x
(n)
1
(s)
_
ds,
= x
(n)
1
(t ) +
1
x
(n)
1
(s) |
s=t
+
_
t
0
_

1
_
x
(n)
1
(s)ds = 0,
and
x
(n+1)
2
(t ) = x
(n)
2
(t ) +
_
t
0

2
_
x
(n)
2
(s) +x
(n)
1
(s) +97x
(n)
2
(s)
_
ds,
= x
(n)
2
(t ) +
_
t
0

2
_
x
(n)
2
(s) +97x
(n)
2
(s)
_
ds,
= x
(n)
2
(t ) +
2
x
(n)
2
(s) |
s=t
+
_
t
0
_
97
2

2
_
x
(n)
2
(s)ds = 0
yield the following stationary conditions:
x
(n)
1
:

1
(s)
1
(s) = 0,
x
(n)
1
: 1 +
1
(s) |
s=t
= 0,
(7)
and
x
(n)
2
:

2
(s) 97
2
(s) = 0,
x
(n)
2
: 1 +
2
(s) |
s=t
= 0.
(8)
The general Lagrange multipliers, therefore, can be readily identied by

1
(s) = e
st
, (9)
and

2
(s) = e
97(st )
. (10)
Substituting (9) and (10) into the correction functionals (5) and (6) results in the following iteration formulas:
x
(n+1)
1
(t ) = x
(n)
1
(t )
_
t
0
e
st
_
x
(n)
1
(s) + x
(n)
1
(s) 95x
(n)
2
(s)
_
ds, (11)
x
(n+1)
2
(t ) = x
(n)
2
(t )
_
t
0
e
97(st )
_
x
(n)
2
(s) + x
(n)
1
(s) +97x
(n)
2
(s)
_
ds. (12)
1058 M.T. Darvishi et al. / Computers and Mathematics with Applications 54 (2007) 10551063
Fig. 1. (a) Numerical and exact solutions of x
1
(t ) in Problem 1, (b) numerical and exact solutions of x
2
(t ) in Problem 1.
We start with initial approximations x
(0)
1
= x
1
(0) = 1, x
(0)
2
= x
2
(0) = 1. We can use x
(n+1)
1
obtained by Eq. (11) in
Eq. (12). This increases the convergence rate. By iteration formulas (11) and (12), we can obtain the following results:
x
(1)
1
(t ) = 1
_
t
0
e
st
(0 +1 95) ds = 1 +94(1 e
t
),
x
(1)
2
(t ) = 1
_
t
0
e
97(st )
_
0 +(95 94e
s
) +97
_
ds =
95
97
+
4657
4656
e
97t
+
47
48
e
t
,
x
(2)
1
(t ) =
41587200 442415 e
97t
+97 e
t
(437903 +428640 t )
446976
,
x
(2)
2
(t ) =
1996185600 9409 e
t
(216719 +214320 t ) +e
97t
(2124043727 +2059884240 t )
2081120256
,
and so on, in the same manner the rest of the components of the iteration formulas (11) and (12) can be obtained using
symbolic packages such as Mathematica. To verify the accuracy of our method numerically, we evaluate the numerical
solutions using the nth, for n = 2, approximations. The plotted graphs show the high accuracy of numerical results.
Fig. 1(a) and (b) show the exact and numerical solutions obtained by the variational iteration method.
3.2. Problem 2
We take the stiff system of Rosenbrock and Storey [31]
_
x

1
(t )
x

2
(t )
_
=
_
1000 0
0.909 1
_ _
x
1
(t )
x
2
(t )
_
(13)
with initial condition X
(0)
=
_
1
0.999
_
. The exact solution of this system is
_
_
_
x
1
(t ) = e
1000t
x
2
(t ) =
0.909
999
e
1000t
+
998.91
999
e
t
.
(14)
We can construct the following correction functionals for vector X:
x
(n+1)
1
(t ) = x
(n)
1
(t ) +
_
t
0

1
_
x
(n)
1
(s) +1000x
(n)
1
(s)
_
ds, (15)
x
(n+1)
2
(t ) = x
(n)
2
(t ) +
_
t
0

2
_
x
(n)
2
(s) 0.909x
(n)
1
(s) + x
(n)
2
(s)
_
ds, (16)
M.T. Darvishi et al. / Computers and Mathematics with Applications 54 (2007) 10551063 1059
where
1
and
2
are general Lagrange multipliers, and x
(n)
1
and x
(n)
2
denote restricted variations, i.e. x
(n)
1
= 0,
x
(n)
2
= 0.
Similar to Problem 1, stationary conditions are
x
(n)
1
:

1
(s) 1000
1
(s) = 0,
x
(n)
1
: 1 +
1
(s) |
s=t
= 0,
(17)
and
x
(n)
2
:

2
(s)
2
(s) = 0,
x
(n)
2
: 1 +
2
(s) |
s=t
= 0.
(18)
The general Lagrange multipliers, therefore, can be readily identied as

1
(s) = e
1000(st )
, (19)
and

2
(s) = e
(st )
. (20)
Substituting (19) and (20) into the correction functional (15) and (16) results in the following iteration formulas:
x
(n+1)
1
(t ) = x
(n)
1
(t )
_
t
0
e
1000(st )
_
x
(n)
1
(s) +1000x
(n)
1
(s)
_
ds, (21)
x
(n+1)
2
(t ) = x
(n)
2
(t )
_
t
0
e
(st )
_
x
(n)
2
(s) 0.909x
(n)
1
(s) + x
(n)
2
(s)
_
ds. (22)
We start with initial approximations x
(0)
1
= x
1
(0) = 1 and x
(0)
2
= x
2
(0) = 0.999. By the above iteration formulas, we
can obtain the following results:
x
(1)
1
(t ) = e
1000t
,
x
(1)
2
(t ) =
0.909
999
e
1000t
+
998.91
999
e
t
,
x
(2)
1
(t ) = e
1000t
,
x
(2)
2
(t ) =
0.909
999
e
1000t
+
998.91
999
e
t
.
Note that we used x
(k+1)
1
in computing x
(k+1)
2
, this increases the convergence rate very well. We see that the two
iterations are equal. This means that we obtain the exact solution of the problem. Hence, the solutions of x
1
(t ) and
x
2
(t ) are readily found to be
x
1
(t ) = e
1000t
,
x
2
(t ) =
0.909
999
e
1000t
+
998.91
999
e
t
,
which are the exact solutions. Table 2 shows the obtained numerical results. The behavior of the solution obtained by
VIM and exact solutions are shown in Fig. 2(a) and (b).
3.3. Problem 3
Consider the nonlinear initial value problem [32]
_
x

1
(t ) = 1002x
1
(t ) +1000x
2
2
(t ),
x

2
(t ) = x
1
(t ) x
2
(t ) x
2
2
(t ),
(23)
with initial values x
1
(0) = 1 and x
2
(0) = 1.
1060 M.T. Darvishi et al. / Computers and Mathematics with Applications 54 (2007) 10551063
Table 1
Absolute errors and exact solutions for test problem 1
t Abs. err. of VIM Abs. err. of ADM Exact solution
x
1
(t ) x
2
(t ) x
1
(t ) x
2
(t ) x
1
(t ) x
2
(t )
1.0 2.342 10
18
1.654 10
19
3.473 10
7
2.591 10
8
0.273550 2.8790 10
3
1.5 2.953 10
18
1.984 10
19
4.652 10
7
3.015 10
8
0.100633 1.0590 10
3
2.0 3.103 10
18
2.106 10
19
4.924 10
7
3.483 10
8
0.037021 3.89694 10
4
2.5 2.157 10
15
5.267 10
16
2.546 10
5
4.168 10
6
0.013619 1.43360 10
4
3.0 3.153 10
15
6.319 10
15
3.481 10
3
1.365 10
4
0.005010 5.27394 10
5
Table 2
Absolute errors and exact solutions for test problem 2
t Abs. err. of VIM Abs. err. of ADM Exact solution
x
1
(t ) x
2
(t ) x
1
(t ) x
2
(t ) x
1
(t ) x
2
(t )
1.0 0.000 0.000 5.971 10
8
3.197 10
7
0.000000 3.67846 10
1
2.0 0.000 0.000 6.346 10
8
3.786 10
7
0.000000 1.35323 10
1
10 0.000 0.000 7.315 10
7
5.482 10
6
0.000000 4.53958 10
5
20 0.000 0.000 8.342 10
7
7.847 10
6
0.000000 2.06097 10
9
30 0.000 0.000 7.734 10
6
9.4163 10
6
0.000000 9.35678 10
14
Fig. 2. (a) Numerical and exact solutions of x
1
(t ) in Problem 2, (b) numerical and exact solutions of x
2
(t ) in Problem 2.
The exact solution of (23) is
x
1
(t ) = e
2t
x
2
(t ) = e
t
.
Similar to Problems 1 and 2 we obtain
x
(1)
1
(t ) =
1
501
(500 +e
1002t
),
x
(1)
2
(t ) =
1001 e
1002t
+502503 e
t
501501
,
x
(2)
1
(t ) =
1
126003129753501
_
500 e
2004t
+503508006000 e
1003t
+126507141769509 e
2002t
50350800600 e
t
+501000500
+ 4008 e
1002t
(125876501 +250250t )
_
,
M.T. Darvishi et al. / Computers and Mathematics with Applications 54 (2007) 10551063 1061
Table 3
Absolute errors and exact solutions for test problem 3
t Abs. err. of VIM Abs. err. of ADM Exact solution
x
1
(t ) x
2
(t ) x
1
(t ) x
2
(t ) x
1
(t ) x
2
(t )
1.0 1.785 10
17
1.772 10
16
2.556 10
5
2.895 10
5
0.135335 0.367879
1.5 1.842 10
17
1.975 10
16
3.487 10
5
4.135 10
5
0.049787 0.223130
2.0 2.003 10
17
2.105 10
16
1.483 10
4
1.638 10
4
0.018316 0.135335
2.5 2.416 10
17
2.743 10
16
2.107 10
4
2.417 10
4
0.006738 0.082085
3.0 2.942 10
17
3.013 10
16
1.735 10
3
3.764 10
3
0.002479 0.049787
Fig. 3. (a) Numerical and exact solutions of x
1
(t ) in Problem 3, (b) numerical and exact solutions of x
2
(t ) in Problem 3.
x
(2)
2
(t ) =
1
125751501

e
1002t
501501
+
1003 e
t
1001
+
e
2004t
252132136759503

1003 e
1003t
251252001
+
e
1002t
(1509014511 2002000t )
251754756254001
+
e
t
(1007522037543025 +2015040045018t )
504264776776764003
,
we can obtain the rest of the components with the Mathematica Package. The obtained numerical results are
summarized in Table 3.
The behavior of the solution obtained by VIM and exact solutions are shown in Fig. 3(a) and (b).
4. Numerical results and discussion
In this section, we obtain numerical solutions for some examples of stiff systems of ordinary differential equations.
In order to verify the efciency of the proposed method in comparison with exact solutions and the Adomian
decomposition method, we report the absolute errors for different values of t .
The difference between the 2-iteration solution of VIM and 6-term of ADM with exact solution are shown in
Tables 13 and Figs. 13. For the computational work we select examples 13.
We can see a very good agreement between the results of VIM and exact solutions, which conrms the validity of
the VIM. In comparison with ADM results, one can see the 2-iteration of VIM is more effective than the 6-term of
ADM. The VIM overcomes the difculty arising in calculating Adomian polynomials and also the computation time
is effectively reduced.
1062 M.T. Darvishi et al. / Computers and Mathematics with Applications 54 (2007) 10551063
5. Conclusion
In this paper, we solved some typical stiff systems of linear and nonlinear ordinary differential equations. We
obtained the numerical solutions of these systems, by an excellent and iterative method, that is, Hes variational
iteration method. This method is very simple and so it is better and easier than similar iterative methods such as the
Adomian decomposition method. The variational iteration method does not require small parameters in any equation
in the same manner as the perturbation approach. The results show the following.
(a) A correction functional can be easily constructed by a general Lagrange multiplier, and this multiplier can be
optimally identied by variational theory. The application of restricted variations in correction functional makes
it much easier to determine the multiplier.
(b) The initial approximation can be freely selected with unknown constants, which can be determined via various
methods.
(c) The approximations obtained by this method are valid not only for small parameters, but also for very large
parameters. Furthermore their rst order approximations are extremely accurate.
(d) In comparison with results of Adomians decomposition method, we can see that the approximations obtained by
the variational iteration method converge faster than Adomians decomposition method.
References
[1] J.H. He, A new approach to nonlinear Partial Differential Equations, Commun. Non-Linear Sci. Numer. Simul. 2 (4) (1997) 230235.
[2] J.H. He, Approximate analytical solution for seepage ow with fractional derivatives in porous media, Comput. Methods Appl. Mech. Engrg.
167 (1998) 2768.
[3] J.H. He, Approximate solution of nonlinear Differential Equations with convolution product nonlinearities, Comput. Methods Appl. Mech.
Engrg. 167 (1998) 6973.
[4] J.H. He, Variational iteration methoda kind of non-linear analytical technique: Some examples, Internat. J. Non-Linear Mech. 34 (1999)
699708.
[5] L. Debtnath, Nonlinear Partial Differential Equations for Scientists and Engineers, Birkhauser, Boston, 1997.
[6] A.M. Wazwaz, Partial Differential Equations Methods and Applications, Rotterdam, Balkema, 2002.
[7] R. Hirota, Exact solution of the Kortewegde Vries equation for multiple collisions of solitons, Phys. Rev. Lett. 27 (18) (1971) 11921194.
[8] C.T. Yan, A simple transformation for nonlinear waves, Phys. Lett. A 224 (1996) 7782.
[9] M.L. Wang, Exact solution for a compound KdVBurgers equation, Phys. Lett. A 213 (1996) 279287.
[10] Z.Y. Yan, H.Q. Zhang, Symbolic computation and new families of exact soliton-like solutions to the integrable BroerKaup (BK) equations
in (2 +1)-dimensional spaces, J. Phys. A 34 (2001) 17851792.
[11] Z.Y. Yan, H.Q. Zhang, New explicit solitary wave solutions and periodic wave solutions for WhithamBroerKaup equation in shallow water,
Phys. Lett. A 285 (2001) 355362.
[12] M. El-Shahed, Application of Hes homotopy perturbation method to Volterras integro-differential equation, Internat. J. Nonlinear Sci. Numer.
Simul. 6 (2) (2005) 163168.
[13] J.H. He, Application of homotopy perturbation method to nonlinear wave equations, Appl. Math. Comput. 26 (3) (2005) 695700.
[14] J.H. He, Limit cycle and bifurcation of nonlinear problems, Chaos Soliton Fractals 26 (3) (2005) 827833.
[15] J.H. He, Homotopy perturbation method for bifurcation of nonlinear problems, Internat. J. Nonlinear Sci. Numer. Simul. 6 (2) (2005) 207208.
[16] J.H. He, Homotopy perturbation method for solving boundary value problems, Phys. Lett. A 350 (12) (2006) 8788.
[17] A.M. Seddiqui, R. Mahmood, Q.K. Ghori, Thin lm ow of a third grade uid on a moving belt by Hes homotopy perturbation method,
Internat. J. Nonlinear Sci. Numer. Simul. 7 (1) (2006) 714.
[18] A.M. Seddiqui, M. Ahmed, Q.K. Ghori, Couette and Poiseuille ows for non-Newtonian uids, Internat. J. Nonlinear Sci. Numer. Simul. 7
(1) (2006) 1526.
[19] J.H. He, Variational iteration method for autonomous ordinary differential systems, Appl. Math. Comput. 114 (23) (2000) 115123.
[20] V. Marinca, An approximate solution for one-dimensional weakly nonlinear oscillations, Internat. J. Nonlinear Sci. Numer. Simul. 3 (2002)
107110.
[21] M.A. Abdou, A.A. Soliman, Variational iteration method for solving Burgers and coupled Burgers equations, J. Comput. Appl. Math. 181
(2) (2005) 245251.
[22] M.A. Abdou, A.A. Soliman, New applications of variational iteration method, Physica D 211 (2005) 18.
[23] A.A. Soliman, Numerical simulation of the generalized regularized long wave equation by Hes variational iteration method, Math. Comput.
Simul. 70 (2) (2005) 119124.
[24] A.A. Soliman, A numerical simulation and explicit solutions of KdVBurgers and Laxs seventh-order KdV equations, Chaos Solitons
Fractals 29 (2006) 294302.
[25] Gh.E. Draganescu, V. Capalnasan, Nonlinear relaxation phenomena in polycrystalline solids, Internat. J. Nonlinear Sci. Numer. Simul. 4
(2004) 219226.
[26] A.S. Mahmood, L. Casas us, W. Al-Hayani, The decomposition method for stiff systems of ordinary differential equations, Appl. Math.
Comput. 167 (2005) 964975.
M.T. Darvishi et al. / Computers and Mathematics with Applications 54 (2007) 10551063 1063
[27] M. Inokuti, H. Sekine, T. Mura, General use of the Lagrange multiplier in nonlinear mathematics, in: Nemat-Nassers (Ed.), Variational Method
in the Mechanics of Solids, Pergamon Press, Oxford, 1978, pp. 156162.
[28] J.H. He, Variational iteration method for delay differential equations, Commun. Nonlinear Sci. Numer. Simul. 2 (4) (1997) 235236.
[29] J.H. He, Y.Q. Wan, Q. Gou, An iteration formulation for normalized diode characteristics, Int. J. Circuit Theory Appl. 32 (6) (2004) 629632.
[30] R. Alt, A-stable one-step methods with step-size control for stiff systems of ordinary differential equations, J. Comput. Appl. Math. 4 (1978)
2935.
[31] H.H. Rosenbrock, C. Storey, Computational Techniques for Chemical Engineers, Pergamon Press, New York, 1966.
[32] X.-Y. Wu, J.-L. Xia, Two low accuracy methods for stiff systems, Appl. Math. Comput. 123 (2001) 141153.

S-ar putea să vă placă și