You are on page 1of 8

Int. J. Pure Appl. Sci. Technol., 3(1) (2011), pp.

27-34

International Journal of Pure and Applied Sciences and Technology


ISSN 2229 - 6107
Available online at www.ijopaasat.in
Research Paper

A Numerical Method for Solving Systems of Nonlinear


ODEs
,*

Behzad Ghanbari 1 , Mehdi Gholami Porshokouhi 2 and Bijan Rahimi 3

1, 2, 3

Department of Mathematics, Takestan Branch, Islamic Azad University, Takestan, Iran

* Corresponding author, e-mail: (b.ghanbary@yahoo.com)

(Received: 21-3-2011; Accepted: 28-3-2011)

Abstract: In this article, we present an iterative method for solving systems of nonlinear
ordinary differential equations by converting such a system to a system of nonlinear
algebraic equations. To illustrate the method some examples are presented.
Keywords: Systems of nonlinear ordinary differential equations; Systems of algebraic
equations

1. Introduction
The standard form of a system of ordinary differential equations of the first order with
initial conditions is considered as:
y1 = f1 ( x, y1 ,K , yn ), y1 ( x0 ) = y10,

y2 = f 2 ( x, y1 ,K , yn ), y2 ( x0 ) = y20,

M
yn = f n ( x, y1 ,K , yn ), yn ( x0 ) = yn 0,

(1)

Where each equation represents the first derivative of one of the unknown functions as a
mapping depending on the independent variable x , and n unknown functions y1 , y2 ,K , yn .

28
Int. J. Pure Appl. Sci. Technol., 3(1) (2011), 27-34
For many naturally occurring phenomena, the most appropriate form in which a differential
equation can be seen is a higher order system. For example, an equation might be of the form

y ( n ) = f ( x, y, y, y,K , y ( n 1) ),

(2)

With initial values given for y ( x0 ), y ( x0 ), y ( x0 ),K , y ( n 1) ( x0 ),


By identifying y ( x) = y1 ( x ), y ( x ) = y2 ( x ),K , y ( n 1) ( x ) = yn ( x ), we can rewrite Eq. (2) in the
following form:

dy1
dx = y2 ( x), y10 = y ( x0 ),

dy2 = y ( x), y = y( x ),
3
20
0
dx
M

dyn = f ( x, y , y ,K , y ), y = y ( n 1) ( x ),
n
n0
1
2
0
dx

(3)

Which is a system of first order differential.


Since every ordinary differential equation of order n can be written as a system which
consists of n ordinary differential equation of order one, we restrict our study to first order
systems of differential equations [1].

2. Illustration of the method


We are going to determine the numerical values of the unknown functions; y1 , y2 ,K , yn , at
the points x j = x0 + jh, j = 1, 2, 3,K .
Using backward finite difference scheme, we have:
yi( x j )

yi ( x j ) yi ( x j 1 )
h

, 1 i n, j = 1, 2,3,K

Putting (4) into (1), for each yi , yields:

(4)

29
Int. J. Pure Appl. Sci. Technol., 3(1) (2011), 27-34
y1 ( x j ) y1 ( x j 1 )
= f1 ( x j , y1 ( x j ),K , yn ( x j )),

y2 ( x j ) y2 ( x j 1 )
= f 2 ( x j , y1 ( x j ),K , yn ( x j )),

yn ( x j ) yn ( x j 1 )
= f1 ( x j , y1 ( x j ),K , yn ( x j )).

(5)

Let's denote yi ( x j ) as yij , introduce Gi j ( yi j ) for 1 i n, j = 1, 2,3,K , as the following:


G1 j ( y1 j ) = y1 j h f1 ( x j , y1 j , y2 j 1 ,K , ynj 1 ) y1 j 1 = 0,

G2 j ( y2 j ) = y2 j h f 2 ( x j , y1 j , y2 j , y3 j 1 ,K , yn j 1 ) y2 j 1 = 0,

M
G ( y ) = y h f ( x , y , y ,K , y , y ) y
nj
n
j
1j
2j
n 1 j
nj
n j 1 = 0.
nj nj

(6)

The general form of each equation in (6) can be written as Gi j ( yi j ) = 0 , which can be consider
as an equation of one variable yi j that can be solved via Householder iteration [2]:
yi( kj +1) = yi( kj )

Gi j ( yi( kj ) ) Gij ( yi( kj ) )Gi j 2 ( yi( kj ) )

,
Gi j ( yi( kj ) )
2Gi j 3 ( yi( kj ) )

k 0

With initial approximation yi(0)j = yi j 1 .

Solving these equations ( y1 j , y2 j ,K , y2 j ) is obtained that is an approximation of.

( y ( x ), y ( x ),K , y ( x ) ) .
1

3. Numerical examples
In this part, we present four examples. The first and the second examples are considered to
illustrate the method for nonlinear systems of ordinary differential equations of order one. For
applying method to higher orders, in the third example we solve ordinary differential
equations of order three, and in the fourth, a nonlinear system of ordinary differential
equations of order three has been considered. In all examples, we assume h to be equal
with 0.001 .
Example 1. Let's have the following system of nonlinear differential equations, with initial
values of y1 (0) = 1, y2 (0) = 1, y3 (0) = 0 , as:

30
Int. J. Pure Appl. Sci. Technol., 3(1) (2011), 27-34

y1 = 2 y22 ,

x
y2 = e y1 ,
y = y + y ,
2
3
3
With the exact solution; y1 ( x) = e 2 x , y2 ( x ) = e x , y3 ( x ) = xe x ,[3].
According to (6) we have:

G1 j ( y1 j ) = y1 j h y22 j 1 y1 j 1 = 0,

xj
G2 j ( y2 j ) = y2 j h e y1 j y2 j 1 = 0,

G3 j ( y3 j ) = y3 j h ( y2 j + y3 j ) y3 j 1 = 0,
With initial values x0 = 0 and ( y10 , y20 , y30 ) = (1,1, 0) .
Table 1 shows the results that have been obtained by the above-mentioned method.

Table 1
Numerical values of the solution of example 1.

xi

y1 ( xi )

e ( y1 ( xi ) )

y2 ( xi )

e ( y2 ( xi ) )

y3 ( xi )

e ( y3 ( xi ) )

0.1

1.105213709

4.25E-5

1.221190970

2.11E-5

0.110632817

1.15E-5

0.2

1.221475327

7.25E-5

1.491369903

4.54E-5

0.244546023

2.65E-5

0.3

1.349949411

9.06E-5

1.821376239

7.42E-6

0.405411703

4.54E-5

0.4

1.491922167

9.74E-6

2.224448991

1.09E-4

0.597417132

6.87E-5

0.5

1.648814401

9.31E-6

2.716757682

1.52E-4

0.825332457

9.45E-5

0.6

1.822195787

7.69E-6

3.318050780

2.06E-4

1.094586927

1.31E-4

0.7

2.013800596

4.78E-6

4.052447622

2.75E-4

1.411354708

1.72E-4

0.8

2.225545052

4.12E-6

4.949405555

3.62E-4

1.782651503

2.21E-4

0.9

2.459546503

5.66E-6

6.044901029

4.74E-4

2.216443208

2.80E-4

1.0

2.718144582

1.37E-5

7.382872048

6.18E-4

2.721768176

3.48E-4

Example 2. In this example, we solve the following system of non-linear differential


equations, with initial approximations y1 (0) = 0, y2 (0) = 1, y3 (0) = 0 :
y1 = y2 ,

y3

,
y2 =
2 y2

y = 2 ( y 2 y 2 ),
3
2
1

31
Int. J. Pure Appl. Sci. Technol., 3(1) (2011), 27-34

With the exact solutions y1 ( x) = sin( x), y2 ( x) = cos( x), y3 ( x) = sin(2 x).
According to (6) we have
G1 j ( y1 j ) = y1 j h y2 j 1 y1 j 1 = 0,

h y3 j 1

y2 j 1 = 0,
G2 j ( y2 j ) = y2 j
2 y2 j

G ( y ) = y h ( y 2 y 2 ) y
3j
2j
1j
3 j 1 = 0,
3j 3j
With initial values x0 = 0, ( y10 , y20 , y30 ) = (0,1, 0) .The results are brought in table 2.

Table 2
Numerical values of the solution of example 2.

xi

y1 ( xi )

e ( y1 ( xi ) )

y2 ( xi )

e ( y2 ( xi ) )

y3 ( xi )

e ( y3 ( xi ) )

0.1

0.099838379

4.96E-6

0.995054082

4.99E-5

0.198659347

9.98E-6

0.2

0.198689199

1.98E-6

0.980165927

9.93E-6

0.389378142

4.02E-6

0.3

0.295564778

4.45E-6

0.955484372

1.47E-5

0.564551258

9.12E-6

0.4

0.389497186

7.88E-6

0.921256238

1.95E-5

0.717192207

1.63E-5

0.5

0.479547933

1.22E-5

0.877823969

2.41E-5

0.841211742

2.59E-5

0.6

0.564817373

1.74E-5

0.825622351

2.86E-5

0.931660735

3.78E-5

0.7

0.644453744

2.36E-5

0.765174392

3.32E-5

0.984927588

5.22E-5

0.8

0.717661756

3.05E-5

0.697086495

3.79E-5

0.998882340

6.91E-5

0.9

0.783710668

3.83E-5

0.622043138

4.33E-5

0.972961670

8.85E-5

1.0

0.841941831

4.70E-5

0.540801536

4.99E-5

0.908191382

1.10E-4

Example 3. Consider the following nonlinear differential equations, with initial values
y (0) = 0, y(0) = 0, y (0) = 2 :
y 2
= y,
2
(7)
2
With exact solution y ( x) = x .
Considering three functions, y1 ( x) = y ( x), y2 ( x) = y( x), and y3 ( x) = y( x) , (7) can be
yy

converted into the following nonlinear system of three differential equation of order one as:

32
Int. J. Pure Appl. Sci. Technol., 3(1) (2011), 27-34
y1 = y2 ,

y2 = y3 ,

2
y3 = y1 y3 y2 / 2,

(8)

With initial values y1 (0) = 0, y2 (0) = 0, y3 (0) = 2 .


By (6) we have:

G ( y ) = y h y y = 0,
1j
2 j 1
1 j 1
1 j 1 j
G2 j ( y2 j ) = y2 j h y3 j 1 y2 j 1 = 0,

2
G3 j ( y3 j ) = y3 j h ( y1 j y3 j + y2 j / 2 ) y3 j 1 = 0,
Table 3 shows the results corresponding to y1 ( x) = y ( x) via applying the method with initial
values x0 = 0, ( y10 , y20 , y30 ) = (0, 0, 2) .

Table 3
Numerical values of the solution of example 3.

xi

y1 ( xi )

y ( xi )

e( y1 ( xi ))

0.1

0.0098999918

0.01

1.00E-5

0.2

0.0397998679

0.04

2.00E-4

0.3

0.0896993289

0.09

3.00E-5

0.4

0.1595978738

0.16

4.02E-5

0.5

0.2494947947

0.25

5.05E-5

0.6

0.3593891706

0.36

6.10E-5

0.7

0.4892798536

0.49

7.20E-5

0.8

0.6391654492

0.64

8.34E-5

0.9

0.8090442847

0.81

9.55E-5

1.0

0.9989143701

1.00

1.08E-4

Example 4. As the last example, consider the following system of nonlinear differential
equations, with exact solutions y1 ( x ) = x 2 , y2 ( x ) = x 3 and initial values

y1 (0) = 0, y1 (0) = 0, y1 (0) = 2,


y2 (0) = 0, y2 (0) = 0, y2 (0) = 0.

33
Int. J. Pure Appl. Sci. Technol., 3(1) (2011), 27-34

3 y1 y1 2 y2 = y1,

2 y1 y2 y2 y1 = y2 3 y1,

(9)

Considering the functions, y1 ( x) = w4 ( x), y2 ( x) = w1 ( x), (9) can be converted into the
following non-linear system of three differential equation of order one.

w = w ,
2
1
w2 = w3 ,

w3 = 2w2 w6 w3 w5 + 3w6 ,

w4 = w5 ,

w5 = w6 ,

w6 = 3w5 w6 2w3 ,

With initial values w1 (0) = 0, w2 (0) = 0, w3 (0) = 0, w4 (0) = 0, w5 (0) = 0, w6 (0) = 0. Now by (6)
and using wi ( x j ) = wij , for 1 i n, j 1 , we have
G1 j ( w1 j ) = w1 j hw2 j 1 w1 j 1 = 0,

G2 j ( w2 j ) = w2 j h w3 j 1 w2 j = 0,
G ( w ) = w h (2 w w w w 3w ) w = 0,
3j
2 j 6 j 1
3 j 5 j 1
6 j 1
3 j 1
3j 3j

G4 j ( w4 j ) = w4 j h w5 j 1 w4 j 1 = 0,
G ( w ) = w h w w = 0,
5j
6 j 1
5 j 1
5j 5j
G6 j ( w6 j ) = w6 j h (3w5 j w6 j 2 w3 j ) w6 j 1 = 0,
With initial values x0 = 0 and ( w10 , w20 , w30 , w40 , w50 , w60 ) = (0, 0, 0, 0, 0, 2) .
Table 4 shows only results that correspond to y1 ( x) = w4 ( x), y2 ( x) = w1 ( x) .
Table 4
Numerical values of the solution of example 4.

34
Int. J. Pure Appl. Sci. Technol., 3(1) (2011), 27-34
xi

w4 ( xi )

e ( w4 ( xi ) )

w1 ( xi )

e ( w1 ( xi ) )

0.1

0.0098999980

1.00E-5

0.00097024693

2.97E-5

0.2

0.0397999362

2.00E-5

0.00788116793

1.18E-5

0.3

0.0896994988

3.00E-5

0.0267344704

2.65E-5

0.4

0.1595977978

4.02E-5

0.0635328228

4.67E-5

0.5

0.2494929170

5.07E-5

0.1242794987

7.20E-5

0.6

0.3593811983

6.18E-5

0.2149777063

1.02E-4

0.7

0.4892560454

7.43E-5

0.3416293402

1.37E-4

0.8

0.6391058605

8.94E-5

0.5102326357

1.76E-4

0.9

0.8089103689

1.08E-4

0.7267776907

2.22E-4

1.0

0.9986338809

1.36E-4

0.9972377204

2.76E-4

4. Conclusions
In this work, an efficient iterative method was presented for solving systems of nonlinear
ordinary differential equations. The proposed method was tested by various kinds of
examples. As it can be seen in the above tables, this method gives good results considering
the amount of calculations needed. The other advantages of this method are its simplicity and
easy computation. It seems to be very easy to employ together with reliable results. The
computations associated with the examples were performed by using Maple 10.

References
[1] J. Biazar, H. Ghazvini, Hes variational iteration method for solving linear and non-linear
systems of ordinary differential equations, Applied Mathematics and Computation,191
(2007) 287-297.
[2] A.S. Housholder, The Numerical Treatment of a Single Nonlinear Equation, McGraw-Hill,
New York, 1970.

[3] J. Biazar , E. Babolian ,R. Islam , Solution of a system of ordinary differential equations by
Adomian decomposition method, Applied Mathematics and Computation, 147 (2004) 713719.

You might also like