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-5569Numerical 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)M. M. Rahaman
, IJRIT 168
Withy ( x
0) = y
0One 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
12
y k x h
hf
k =
i+
i+
, 2 )
( 2
1 23
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 slopesk
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) whereK
is the average of the slopesk
1, k
2, k
3.2. Formulation of Alternative method
If
w
1, w
2, w
3 are the weights of the slopesk
1, k
2, k
3 respectively at various points of the solution curve, then the Runge Kutta third order method fory ( x
i+1)
with step lengthh
is given by3 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)
M. M. Rahaman
, IJRIT 169
k
2= hf ( x
i+ α
2h , y
i+ β
21k
1)
k
3= hf ( x
i+ α
3h , y
i+ β
31k
1+ β
32k
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)
M. M. Rahaman
, IJRIT 170
)
, 2
( 2
12
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
andb
are the left and right endpoints.y
a is the initial conditiony (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 / ) (
(
12
hf x i h y i k
k = + +
) ) ( , ) (
(
23
hf x i h y i k
k = + +
3 / ) (
) ( ) 1
( i y i k
1k
2k
3y + = + + +
End
Step2: output
y (x )
Step3: Figure presentation Step4: stop
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
wherey ( 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
ix
iRunge 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
M. M. Rahaman
, IJRIT 172
Figure1. Numerical solution of IVP by RK third order method And Alternative RK third order method5. 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 ofy
iOriginal method
Alternative method
Exact
E
oriE
Alt1.
x dx y
dy = −
where
2 ) 0 ( =
y
,1 .
= 0 h
1 0.1 2.2052 2.2052 2.2052
0 . 0425 × 10
−40 . 0425 × 10
−42 0.2 2.4214 2.4214 2.4214
0 . 0940 × 10
−40 . 0940 × 10
−43 0.3 2.6498 2.6498 2.6499
0 . 1558 × 10
−40 . 1558 × 10
−44 0.4 2.8918 2.8918 2.8918
0 . 2296 × 10
−40 . 2296 × 10
−45 0.5 3.1487 3.1487 3.1487
0 . 3171 × 10
−40 . 3171 × 10
−42. 1 0.05 0.0500 0.0501 0.0500
0 . 0010 × 10
−50 . 0104 × 10
−32 0.1 0.1003 0.1004 0.1003
0 . 0073 × 10
−50 . 0210 × 10
−3M. M. Rahaman
, IJRIT 173 1 y
2dx dy = +
where
0 ) 0 ( =
y
,05 .
= 0 h
3 0.15 0.1511 0.1512 0.1511
0 . 0189 × 10
−50 . 0320 × 10
−34 0.2 0.2027 0.2028 0.2027
0 . 0360 × 10
−50 . 0437 × 10
−35 0.25 0.2553 0.2554 0.2553
0 . 0590 × 10
−50 . 0562 × 10
−33.
dx y dy = −
where
1 ) 0 ( =
y
,01 .
= 0 h
1 0.01 0.9900 0.9900 0.9900
0 . 0416 × 10
−80 . 0416 × 10
−82 0.02 0.9802 0.9802 0.9802
0 . 0823 × 10
−80 . 0823 × 10
−83 0.03 0.9704 0.9704 0.9704
0 . 1223 × 10
−80 . 1223 × 10
−84 0.04 0.9608 0.9608 0.9608
0 . 1614 × 10
−80 . 1614 × 10
−85 0.05 0.9512 0.9512 0.9512
0 . 1998 × 10
−80 . 1998 × 10
−8Figure2. 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.
M. M. Rahaman
, IJRIT 174
Figure3. Error of RK third order and ARK third orderIn 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
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.
M. M. Rahaman
, IJRIT 176
Figure6. Error of RK third order and ARK third order methodIn 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