• No results found

Numerical Solution of an Initial Value Problem by an Alternative Runge-Kutta Third Order Method.

N/A
N/A
Protected

Academic year: 2022

Share "Numerical Solution of an Initial Value Problem by an Alternative Runge-Kutta Third Order Method."

Copied!
10
0
0

Loading.... (view fulltext now)

Full text

(1)

M. M. Rahaman

, IJRIT 167

IJRIT International Journal of Research in Information Technology, Volume 1, Issue 12, December, 2013, Pg. 167-176

International Journal of Research in Information Technology (IJRIT)

www.ijrit.com

ISSN 2001-5569

Numerical Solution of an Initial Value Problem by an Alternative Runge-Kutta Third Order Method.

1M. M. Rahaman, 2M.B. Hossain, 3M. M. Rahman

1Muhammad Masudur Rahaman, Assistant Professor, Dept. of Mathematics, Patuakhali Science and Technology University, Bangladesh, Email:[email protected].

2Md. Bellal Hossain, Assistant Professor, Dept. of Mathematics, Patuakhali Science and Technology University, Bangladesh, Email:[email protected].

3Md. Monibor Rahman, Assistant Professor, Dept. of Electrical and Electronics Engineering, Patuakhali Science and Technology University, Bangladesh. Email: [email protected]

Abstract

An Alternative Runge Kutta third order method is established for solving an initial value problem of the form )

, (x y dx f

dy = withy(x0)= y0. Numerical examples are carried out and performance of the new method is compared with the RK third order methods. Besides this, various examples are solved using computer programming based on algorithms of both original and Alternative methods with comparative study.

Keywords: Alternative Runge Kutta Method (ARK), Algorithms, Initial value problem (IVP).

1. Introduction:

Mathematical modeling has been used in many areas such as in Science, engineering, Medicine, Economics and Social Sciences. Differential equations are one of the most important and widely used techniques in mathematical modeling. However, not many differential equations have an analytic solution and even if there is one, usually it is extremely difficult to obtain and it is not very practical, thus numerical methods are truly a crucial part of solving differential equations which can not be neglected. Since the late 18th century, numerical methods for solving differential equations have been developed continuously by many mathematicians. Later on in the 20th century, this subject made great improvement in the context of modern computers.

We consider the first order first degree initial value problem of the form:

y f ( x , y ) dx

dy = ′ =

(1)

(2)

M. M. Rahaman

, IJRIT 168

With

y ( x

0

) = y

0

One of the most common methods for solving numerically (1) is RK method. Many authors have attempted to increase the efficiency of RK methods with a lower number of function evaluations required. As a result, Goeken et.

al (2000) proposed a class of RK method with higher derivatives approximations for the third and fourth order method. Xinyuan (2003) presented a class of RK formulae of order three and four with reduced valuations of function. Rabiei and Ismail (2011) constructed the new improved RK method with reduced number of function evaluations. The method proposed of order three with two stages. Rabiei and Islam (2011) constructed the improved RK method for solving ordinary differential equations. In section 2 we develop the Alternative Runge Kutta third order method. In section 3, an algorithm for the numerical solution is developed and the implementation of the numerical scheme is done by MATLAB 10. In the section 4, numerical examples are carried out and performance of the new method is compared with the RK third order methods. We implement the numerical scheme to estimate the error of the method in section 5.

Let

y (x )

be the solution of (1). Then the original formula of Runge-Kutta third order method for solving the problem of the form (1) is given by

y ( x

i+1

) = y ( x

i

) + K

( 4 )

6 1

3 2

1

k k

k

K = + +

k

1

= hf ( x

i

, y

i

)

)

, 2

( 2

1

2

y k x h

hf

k =

i

+

i

+

, 2 )

( 2

1 2

3

h y k k

x hf

k =

i

+

i

− +

h = x

i+1

x

i ,

i = 0 , 1 , 2 ...

Here

K

is the weighted average of the slopes

k

1

, k

2

, k

3. Analytically to minimize assessment of human brain, I therefore, developed a new third order formula for solving the problem of the form (1) where

K

is the average of the slopes

k

1

, k

2

, k

3.

2. Formulation of Alternative method

If

w

1

, w

2

, w

3 are the weights of the slopes

k

1

, k

2

, k

3 respectively at various points of the solution curve, then the Runge Kutta third order method for

y ( x

i+1

)

with step length

h

is given by

3 3 2 2 1 1

1

) ( )

( x y x w k w k w k

y

i+

=

i

+ + +

.

Where

k

1

= hf ( x

i

, y

i

)

(3)

M. M. Rahaman

, IJRIT 169

k

2

= hf ( x

i

+ α

2

h , y

i

+ β

21

k

1

)

k

3

= hf ( x

i

+ α

3

h , y

i

+ β

31

k

1

+ β

32

k

2

)

h = x

i+1

x

i ,

i = 0 , 1 , 2

3 3 2 2 1

1

k w k w k

w

K = + +

.

According to Runge Kutta third order method, we have

2 1

2

=

α

,

2 1

21

= β

3

= 1

α

,

β

31

= − 1

,

β

32

= 2

And

6

1

1

=

w

,

6 4

2

=

w

,

6 1

3

= w

Therefore

( 4 )

6 1

3 2

1

k k

k

K = + +

.

I developed the Alternative Runge Kutta third order method on the basis of

2 1

2

=

α

,

2 1

21

= β

3

= 1

α

,

β

31

= 0

,

β

32

= 1

And

3

1

1

=

w

,

3 1

2

=

w

,

3 1

3

= w

Hence

( )

3 1

3 2

1

k k

k

K = + +

.

Therefore, the Alternative Runge Kutta third order method for solving the initial value problem (1) is given by

y ( x

i+1

) = y ( x

i

) + K

( )

3 1

3 2

1

k k

k

K = + +

k

1

= hf ( x

i

, y

i

)

(4)

M. M. Rahaman

, IJRIT 170

)

, 2

( 2

1

2

y k x h

hf

k =

i

+

i

+

k

3

= hf ( x

i

+ h , y

i

+ k

2

)

h = x

i+1

x

i ,

i = 0 , 1 , 2 ...

3. Algorithm of the Alternative method

Input

Define function

f ( x , y )

a

and

b

are the left and right endpoints.

y

a is the initial condition

y (a ) M

is the number of steps.

Output:

y (x )

Initialization:

M a h = b

Step1: Calculation for solution of initial value problem by ARK third order method For

i = 1 : M

)) ( ), (

1

hf ( x i y i k =

) 2 / ) ( , 2 / ) (

(

1

2

hf x i h y i k

k = + +

) ) ( , ) (

(

2

3

hf x i h y i k

k = + +

3 / ) (

) ( ) 1

( i y i k

1

k

2

k

3

y + = + + +

End

Step2: output

y (x )

Step3: Figure presentation Step4: stop

(5)

M. M. Rahaman

, IJRIT 171 4. Illustration by a numerical example

We are to solve the following initial value problem for

x = 2 . 5

x y dx dy

+

= −

1

where

y ( 2 ) = 1 . 0

,

h = 0 . 05

Then computations of successive steps for both (original and Alternative) methods are presented in Table1:

Method

i K y

i

x

i

Runge Kutta third order method

1 -0.0164 0.9836 2.05

2 -0.0156 0.9677 2.1

3 -0.0154 0.9524 2.15

4 -0.0149 0.9375 2.2

5 -0.0144 0.9231 2.25

6 -0.0140 0.9091 2.3

7 -0.0136 0.8955 2.35

8 -0.0132 0.8824 2.4

9 -0.0128 0.8696 2.45

10 -0.0124 0.8571 2.5

Alternative Runge Kutta third order method

1 -0.0164 0.9836 2.05

2 -0.0156 0.9677 2.1

3 -0.0154 0.9524 2.15

4 -0.0149 0.9375 2.2

5 -0.0144 0.9231 2.25

6 -0.0140 0.9091 2.3

7 -0.0136 0.8955 2.35

8 -0.0132 0.8824 2.4

9 -0.0128 0.8696 2.45

10 -0.0124 0.8571 2.5

(6)

M. M. Rahaman

, IJRIT 172

Figure1. Numerical solution of IVP by RK third order method And Alternative RK third order method

5. Error estimation

The Proposed method for finding solution is illustrated by the following examples. A comparative study with three numerical examples in five steps of the Alternative RK and RK third order methods is made in Table-2 as follows:

Numerical examples

i x

i Values of

y

i

Original method

Alternative method

Exact

E

ori

E

Alt

1.

x dx y

dy = −

where

2 ) 0 ( =

y

,

1 .

= 0 h

1 0.1 2.2052 2.2052 2.2052

0 . 0425 × 10

4

0 . 0425 × 10

4

2 0.2 2.4214 2.4214 2.4214

0 . 0940 × 10

4

0 . 0940 × 10

4

3 0.3 2.6498 2.6498 2.6499

0 . 1558 × 10

4

0 . 1558 × 10

4

4 0.4 2.8918 2.8918 2.8918

0 . 2296 × 10

4

0 . 2296 × 10

4

5 0.5 3.1487 3.1487 3.1487

0 . 3171 × 10

4

0 . 3171 × 10

4

2. 1 0.05 0.0500 0.0501 0.0500

0 . 0010 × 10

5

0 . 0104 × 10

3

2 0.1 0.1003 0.1004 0.1003

0 . 0073 × 10

5

0 . 0210 × 10

3

(7)

M. M. Rahaman

, IJRIT 173 1 y

2

dx dy = +

where

0 ) 0 ( =

y

,

05 .

= 0 h

3 0.15 0.1511 0.1512 0.1511

0 . 0189 × 10

5

0 . 0320 × 10

3

4 0.2 0.2027 0.2028 0.2027

0 . 0360 × 10

5

0 . 0437 × 10

3

5 0.25 0.2553 0.2554 0.2553

0 . 0590 × 10

5

0 . 0562 × 10

3

3.

dx y dy = −

where

1 ) 0 ( =

y

,

01 .

= 0 h

1 0.01 0.9900 0.9900 0.9900

0 . 0416 × 10

8

0 . 0416 × 10

8

2 0.02 0.9802 0.9802 0.9802

0 . 0823 × 10

8

0 . 0823 × 10

8

3 0.03 0.9704 0.9704 0.9704

0 . 1223 × 10

8

0 . 1223 × 10

8

4 0.04 0.9608 0.9608 0.9608

0 . 1614 × 10

8

0 . 1614 × 10

8

5 0.05 0.9512 0.9512 0.9512

0 . 1998 × 10

8

0 . 1998 × 10

8

Figure2. Comparison between exact solution and numerical solution

Exact solution of initial value problem is compared with the numerical solution for example1 in figure-2. The circle marked curve shows the numerical solution by RK method, the curve visible by “star” represents numerical solution by ARK method and the solid line also represents the exact solution. The results are very close.

(8)

M. M. Rahaman

, IJRIT 174

Figure3. Error of RK third order and ARK third order

In figure3, the rectangle marked curve shows the error of RK method and the curve visible by “cross” represents the error of ARK method for Numerical example1. Both RK and ARK provide identical result.

Figure4. Comparison between exact solution and numerical solution

(9)

M. M. Rahaman

, IJRIT 175

Exact solution of initial value problem is compared with the numerical solution for example 2 in figure-4. The circle marked curve shows the numerical solution by RK method, the curve visible by “cross” represents numerical solution by ARK method and the solid line also represents the exact solution. The results are close.

Figure5. Comparison between exact solution and numerical solution

Exact solution of initial value problem is compared with the numerical solution for example3 in figure-5. The circle marked curve shows the numerical solution by RK method, the curve visible by “cross” represents numerical solution by ARK method and the solid line also represents the exact solution. The results are very close.

(10)

M. M. Rahaman

, IJRIT 176

Figure6. Error of RK third order and ARK third order method

In figure6, the rectangle marked curve shows the error of RK method and the curve visible by “cross” represents the error of ARK method for Numerical example3. Both RK and ARK provide identical result.

6. Conclusion:

In this paper the formula of Runge Kutta third order method for solving an initial value problem is customized. In order to execute the numerical method we have developed a computer program in the language of scientific computing that is a very good agreement of ARK third order method for initial value problem. A numerical example is illustrated in both methods and presented in table-1. A comparative study of both methods is then carried out for three numerical problems in five steps and presented in table-2. In all cases, the results become visible to be same for both methods. But the fact is that the analysis by this method is less protracted than the original one.

7. References

[1]. S.S. Sastry, Introductory Methods of Numerical Analysis, Prentice-Hall of India Private Limited, Fourth Edition, 2007.

[2]. John H. Mathews, Kurtis D. Fink, Numerical Methods Using Matlab, Prentice-Hall of India Private Limited, Fourth Edition, 2005.

[3]. V.Rajaraman, Computer Oriented Numerical Methods (Prentice-Hall of India Private Limited, Third Edition, 1994), pp. 168-175.

[4]. D.Goeken and O. Johnson, Runge Kutta with higher order derivative approximation, Appl. Numer. Math., Vol. 34, pp.207-218,200

[5]. W. Xinyuan, A class of Runge Kutta formulae of order three and four with reduced evaluations of function, Appl. Math. Comput., Vol.146, pp.417-432, 2003.

[6]. F. Rabiei and F. Islam, New Improved RK method with reducing number of function evaluation, ASME press (2011), ISSN: 9780791859797.

[7]. Rabiei and Islam, Third order Improved RK method for solving ordinary differential equation, International journal of Applied physics and Mathematics, Vol. 1, No. 3, Nov. 2011

References

Related documents

This paper discusses the causal relationship between urbanization and women’s access to tertiary education in 11 Middle East countries.The study obtained and analyzed data from

Jun 2018 Page: 36 logic controller is very effective to suppress the frequency oscillations caused by load disturbances. in the study, the power systems with three

Loss of Identity, Radicalization, and Terrorism: Case studies in France and Belgium.. A Research Thesis

Perfectionistic strivings global scores only differed between veterans and sub‑elite groups (F (2,115)  = 7.08; p = 0.001; η²p = 0.11), specific analyses of the personal

The research hypothesis of the paper is multi-criteria decision analysis has capabilities for combining the geographical information system data and confusion matrix into

This study deals with analysing the signal behaviour between time domain and frequency domain when the shaft rotating at whirl speed and also indicating the filter specifications

In the proposed scheme, the algorithm first selects the protected points from the user’s trajectory data; secondly, the algorithm builds the polygons according to the protected