AmericanJournalofComputationalMathematics,2015,5,393404
PublishedOnlineSeptember2015inSciRes.http://www.scirp.org/journal/ajcm
http://dx.doi.org/10.4236/ajcm.2015.53034
Howtocitethispaper: Islam,Md.A.(2015)AComparativeStudyonNumericalSolutionsofInitialValueProblems(IVP)for
OrdinaryDifferentialEquations(ODE)withEulerandRungeKuttaMethods.AmericanJournalofComputationalMathe
matics,5,393404.http://dx.doi.org/10.4236/ajcm.2015.53034
AComparativeStudyonNumericalSolutions
ofInitialValueProblems(IVP)forOrdinary
DifferentialEquations(ODE)withEulerand
RungeKuttaMethods
Md.AmirulIslam
DepartmentofMathematics,UttaraUniversity,Dhaka,Bangladesh
Email:amirul.math@gmail.com
Received17August2015;accepted22September2015;published25September2015
Copyright©2015byauthorandScientificResearchPublishingInc.
ThisworkislicensedundertheCreativeCommonsAttributionInternational License(CCBY).
http://creativecommons.org/licenses/by/4.0/
Abstract
ThispapermainlypresentsEulermethodandfourthorderRungeKuttaMethod(RK4)forsolving
initialvalueproblems(IVP)forordinarydifferentialequations(ODE).Thetwoproposedmethods
arequiteefficientandpracticallywellsuitedforsolvingtheseproble ms.Inordertoverifytheac
curacy,wecomparenumericalsolutionswiththeexactsolutions.Thenumericalsolutionsarein
goodagreementwiththeexactsolutions.NumericalcomparisonsbetweenEulermethodand
RungeKuttamethodhavebeenpresented.Alsowecomparetheperformanceandthecomputa
tionaleffortofsuchmethods.Inordertoachievehigheraccuracyinthesolution,thestepsize
needstobeverysmall.Finallyweinvesti g ateandcomputetheerrorsofthetwoproposedmeth
odsfordifferentstepsizestoexaminesuperiority.Severalnumericalexamplesaregiventodem
onstratethereliabilityandefficiency.
Keywords
InitialValueProblem(IVP),EulerMethod,RungeKuttaMethod,ErrorAnalysis
1.Introduction
Differential equations are commonly used for mathematical modeling in science and engineering. Many prob-
lems of mathematical physics can be started in the form of differential equations. These equations also occur as
reformulations of other mathematical problems such as ordinary differential equations and partial differential
equations. In most real life situations, the differential equation that models the problem is too complicated to
Md.A.Islam
394
solve exactly, and one of two approaches is taken to approximate the solution. The first approach is to simplify
the differential equation to one that can be solved exactly and then use the solution of the simplified equation to
approximate the solution to the original equation. The other approach, which we will examine in this paper, uses
methods for approximating the solution of original problem. This is the approach that is most commonly taken
since the approximation methods give more accurate results and realistic error information. Numerical methods
are generally used for solving mathematical problems that are formulated in science and engineering where it is
difficult or even impossible to obtain exact solutions. Only a limited number of differential equations can be
solved analytically. There are many analytical methods for finding the solution of ordinary differential equations.
Even then there exist a large number of ordinary differential equations whose solutions cannot be obtained in
closed form by using well-known analytical methods, where we have to use the numerical methods to get the
approximate solution of a differential equation under the prescribed initial condition or conditions. There are
many types of practical numerical methods for solving initial value problems for ordinary differential equations.
In this paper we present two standard numerical methods Euler and Runge Kutta for solving initial value prob-
lems of ordinary differential equations.
From the literature review we may realize that several works in numerical solutions of initial value problems
using Euler method and Runge Kutta method have been carried out. Many authors have attempted to solve ini-
tial value problems (IVP) to obtain high accuracy rapidly by using numerous methods, such as Euler method and
Runge Kutta method, and also some other methods. In [1] the author discussed accuracy analysis of numerical
solutions of initial value problems (IVP) for ordinary differential equations (ODE), and also in [2] the author
discussed accurate solutions of initial value problems for ordinary differential equations with fourth-order Runge
kutta method. [3] studied on some numerical methods for solving initial value problems in ordinary differential
equations. [4]-[16] also studied numerical solutions of initial value problems for ordinary differential equations
using various numerical methods. In this paper Euler method and Runge Kutta method are applied without any
discretization, transformation or restrictive assumptions for solving ordinary differential equations in initial val-
ue problems. The Euler method is traditionally the first numerical technique. It is very simple to understand and
geometrically easy to articulate but not very practical; the method has limited accuracy for more complicated
functions.
A more robust and intricate numerical technique is the Runge Kutta method. This method is the most widely
used one since it gives reliable starting values and is particularly suitable when the computation of higher de-
rivatives is complicated. The numerical results are very encouraging. Finally, two examples of different kinds of
ordinary differential equations are given to verify the proposed formulae. The results of each numerical example
indicate that the convergence and error analysis which are discussed illustrate the efficiency of the methods. The
use of Euler method to solve the differential equation numerically is less efficient since it requires h to be small
for obtaining reasonable accuracy. It is one of the oldest numerical methods used for solving an ordinary initial
value differential equation, where the solution will be obtained as a set of tabulated values of variables x and y.
It is a simple and single step but a crude numerical method of solving first-order ODE, particularly suitable for
quick programming because of their great simplicity, although their accuracy is not high. But in Runge Kutta
method, the derivatives of higher order are not required and they are designed to give greater accuracy with the
advantage of requiring only the functional values at some selected points on the sub-interval. Runge Kutta me-
thod is a more general and improvised method as compared to that of the Euler method. We observe that in the
Euler method excessively small step size converges to analytical solution. So, large number of computation is
needed. In contrast, Runge Kutta method gives better results and it converges faster to analytical solution and
has less iteration to get accuracy solution. This paper is organized as follows: Section 2: problem formulations;
Section 3: error analysis; Section 4: numerical examples; Section 5: discussion of results; and the last section:
the conclusion of the paper.
2.ProblemFormulation
In this section we consider two numerical methods for finding the approximate solutions of the initial value
problem (IVP) of the first-order ordinary differential equation has the form



0
00
,, ,
n
yfxyxxxx
yx y

(1)
where dd
y
yx
and


,
f
xyx is a given function and
y
x is the solution of the Equation (1). In this
Md.A.Islam
395
paper we determine the solution of this equation on a finite interval
0,n
x
x, starting with the initial point 0
x
.
A continuous approximation to the solution
y
x will not be obtained; instead, approximations to y will be
generated at various values, called mesh points, in the interval
0,n
x. Numerical methods employ the Equa-
tion (1) to obtain approximations to the values of the solution corresponding to various selected values of
0,1,2,3,.
n
xxx nhn  The parameter h is called the step size. The numerical solutions of (1) is given
by a set of points

,:0,1,2,,
nn
x
yn n and each point
,
nn
x
y is an approximation to the corresponding
point
,
nn
x
yx on the solution curve.
2.1.EulerMethod
Euler’s method is the simplest one-step method. It is basic explicit method for numerical integration of ordinary
differential equations. Euler proposed his method for initial value problems (IVP) in 1768. It is first numerical
method for solving IVP and serves to illustrate the concepts involved in the advanced methods. It is important to
study because the error analysis is easier to understand. The general formula for Euler approximation is
 

1,,0,1, 2, 3,
nn nn
yxyxhfxyn
 .
2.2.RungeKuttaMethod
This method was devised by two German mathematicians, Runge about 1894 and extended by Kutta a few years
later. The Runge Kutta method is most popular because it is quite accurate, stable and easy to program. This
method is distinguished by their order in the sense that they agree with Taylor’s series solution up to terms of
r
h where r is the order of the method. It do not demand prior computational of higher derivatives of
y
x as
in Taylor’s series method. The fourth order Runge Kutta method (RK4) is widely used for solving initial value
problems (IVP) for ordinary differential equation (ODE). The general formula for Runge Kutta approximation is
 

11234
122 ,0,1,2,3,
6
nn
yxyxkkkkn

where


12
1234 3
,,, ,,,,
22 22
kk
hh
khfxykhfx ykhfxykhfxhyk



 .
3.ErrorAnalysis
There are two types of errors in numerical solution of ordinary differential equations. Round-off errors and
Truncation errors occur when ordinary differential equations are solved numerically. Rounding errors originate
from the fact that computers can only represent numbers using a fixed and limited number of significant figures.
Thus, such numbers or cannot be represented exactly in computer memory. The discrepancy introduced by this
limitation is call Round-off error. Truncation errors in numerical analysis arise when approximations are used to
estimate some quantity. The accuracy of the solution will depend on how small we make the step size, h. A nu-
merical method is said to be convergent if
01
lim max0
nn
hnNyx y

. Where
n
y
x denotes the approximate
solution and n
y
denotes the exact solution. In this paper we consider two initial value problems to verify ac-
curacy of the proposed methods. The Approximated solution is evaluated by using Mathematica software for two
proposed numerical methods at different step size. The maximum error is defined by


1steps
max
rnn
n
eyxy

.
4.NumericalExamples
In this section we consider two numerical examples to prove which numerical methods converge faster to ana-
lytical solution. Numerical results and errors are computed and the outcomes are represented by graphically.
Example 1: we consider the initial value problem
2
yxx xy
,
01y
on the interval 01
x
. The
exact solution of the given problem is given by

22
22
πeerf e
22
xx
x
y
xx



 . The approximate results and
maximum errors are obtained and shown in Tables 1(a)-(d) and the graphs of the numerical solutions are dis-
played in Figures 1-7.
Md.A.Islam
396
Table 1. (a) Numerical approximations and maximum errors for step size 0.1h
; (b) Numerical approximations and max-
imum errors for step size 0.05h; (c) Numerical approximations and maximum errors for step size 0.025h; (d) Nu-
merical approximations and maximum errors for step size 0.0125h
.
(a)
Euler Method 0.1h Runge Kutta Method 0.1h
n
x
n
yx r
e
n
yx r
e
Exact Solution n
y
0.1 1.0000000000000000 5.34652E03 1.00534648020833344.16045E08 1.0053465218128410
0.2 1.0110000000000000 1.18895E02 1.02288937980373488.26716E08 1.0228894624752929
0.3 1.0352199999999998 1.99720E02 1.05519184073709001.23029E07 1.0551919637660336
0.4 1.0752765999999998 3.00424E02 1.10531878964586851.63325E07 1.1053189529706604
0.5 1.1342876640000000 4.26873E02 1.17697476671444602.05805E07 1.1769749725189769
0.6 1.2160020472000000 5.86769E02 1.27467873635394852.55624E07 1.2746789919776722
0.7 1.3249621700320000 7.90261E02 1.40398799537108883.23030E07 1.4039883184007750
0.8 1.4667095219342400 1.05078E01 1.57178734273440334.26941E07 1.5717877696756601
0.9 1.6480462836889793 1.38620E01 1.78666525285016396.00769E07 1.7866658536190383
1.0 1.8773704492209877 1.82037E01 2.05940650352732529.01815E07 2.059407405342576
(b)
Euler Method 0.05h Runge Kutta Method 0.05h
n
x
n
yx r
e
n
yx r
e
Exact Solution n
y
0.1 1.002625000000000 2.72152E03 1.00534651921539682.59745E09 1.005346521812841
0.2 1.0168241609375002 6.06530E03 1.02288945732110315.15419E09 1.0228894624752929
0.3 1.0449798075787111 1.02122E02 1.05519195611678 7.64925E09 1.0551919637660336
0.4 1.0899197085245087 1.53992E02 1.10531894286095841.01097E08 1.1053189529706604
0.5 1.1550367600056364 2.19382E02 1.17697495985926231.26597E08 1.1769749725189769
0.6 1.244439027678436 3.02400E02 1.27467897637325131.56044E08 1.2746789919776722
0.7 1.3631397949603248 4.08485E02 1.403988298830275 1.95705E08 1.403988318400775
0.8 1.517300301075834 5.44875E02 1.57178774393694592.57387E08 1.5717877696756601
0.9 1.7145419864264193 7.21239E02 1.78666581739444393.62246E08 1.7866658536190383
1.0 1.9643507036668488 9.50567E02 2.059407350645424 5.46971E08 2.059407405342576
(c)
Euler Method 0.025h Runge Kutta Method 0.025h
n
x
n
yx r
e
n
yx r
e
Exact Solution n
y
0.1 1.0039732143920899 1.37331E03 1.00534652165056841.62280E10 1.005346521812841
0.2 1.0198254164252103 3.06405E03 1.02288946215353743.21760E10 1.0228894624752929
0.3 1.050026859341876 5.16510E03 1.05519196328924644.76790E10 1.0551919637660336
0.4 1.097520387412045 7.79857E03 1.105318952342068 6.28600E10 1.1053189529706604
0.5 1.1658497569818174 1.11252E02 1.17697497173462037.84350E10 1.1769749725189769
0.6 1.259321437932899 1.53576E02 1.27467899101515889.62520E10 1.2746789919776722
0.7 1.3832106899613061 2.07776E02 1.40398831719911991.20166E09 1.403988318400775
0.8 1.5440262079869167 2.77616E02 1.57178776810032851.57534E09 1.5717877696756601
0.9 1.7498524246222582 3.68134E02 1.786665851402671 2.21636E09 1.7866658536190383
1.0 2.0107951384702343 4.86123E02 2.05940740198606553.35651E09 2.059407405342576
Md.A.Islam
397
(d)
Euler Method 0.0125h Runge Kutta Method 0.0125h
n
x

n
yx r
e
n
yx r
e
Exact Solution n
y
0.1 1.0046566697375803 6.89852E04 1.0053465218027011 1.01399E11 1.005346521812841
0.2 1.0213494287582197 1.54003E03 1.0228894624551952 2.00999E11 1.0228894624752929
0.3 1.0525943319732851 2.59763E03 1.0551919637362754 2.97600E11 1.0551919637660336
0.4 1.1013943547977403 3.92460E03 1.1053189529314784 3.91900E11 1.1053189529706604
0.5 1.1713723532944522 5.60262E03 1.1769749724701777 4.88001E11 1.1769749725189769
0.6 1.2669392048911032 7.73979E03 1.274678991917932 5.97400E11 1.2746789919776722
0.7 1.3935085610750229 1.04798E02 1.403988318326378 7.44000E11 1.403988318400775
0.8 1.5577734062756774 1.40144E02 1.571787769578305 9.73599E11 1.5717877696756601
0.9 1.7680647857193632 1.86011E02 1.786665853482107 1.36930E10 1.7866658536190383
1.0 2.034820184163635 2.45872E02 2.0594074051349014 2.07670E10 2.059407405342576
0.10.2 0.3 0.4 0.50.6 0.7 0.8 0.9 1
1
1. 2
1. 4
1. 6
1. 8
2
2. 2
2. 4
different values of x
Exact values
Exact value
Figure 1. Exact numerical solutions.
0.10.2 0.3 0.4 0.50.6 0.7 0.8 0.91
1
1.2
1.4
1.6
1.8
2
2.2
2.4
different values of x
Approximate values
RK4 approxi m ati on
E ul er approx i m ati on
Figure 2. Numerical approximation for step size h = 0.1.
Md.A.Islam
398
0.10.2 0.3 0.4 0.50.6 0.70.8 0.9 1
1
1. 2
1. 4
1. 6
1. 8
2
2. 2
2
.
4
different values of x
A pproxi m at e v al ues
RK4 approxi m ati on
E uler approx im at i on
Figure 3. Numerical approximation for step size h = 0.05.
0.1 0.2 0.3 0.4 0.50.6 0.7 0.80.9 1
1
1. 2
1. 4
1. 6
1. 8
2
2. 2
2. 4
different values of x
A pproximate va lues
RK4 approx i m ati on
E uler approx i m at i on
Figure 4. Numerical approximation for step size h = 0.025.
0.10.2 0.3 0.4 0.50.6 0.7 0.8 0.9 1
1
1.2
1.4
1.6
1.8
2
2.2
2.4
di fferent values of x
A pproxi m ate values
RK4 approxi m at i on
E uler approxim at i on
Figure 5. Numerical approximation for step size h = 0.0125.
Md.A.Islam
399
0.1 0.2 0.3 0.4 0.5 0.60.7 0.8 0.9 1
0
0. 02
0. 04
0. 06
0. 08
0.1
0. 12
0. 14
0. 16
0. 18
0.2
different values of x
maximum errors
h= 0. 1
h= 0. 0 5
h= 0. 0 25
h= 0. 0 125
Figure 6. Error for different step size using Euler method.
0.10.2 0.3 0.4 0.5 0.6 0.7 0.8 0.91
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1x 10
-6
Figure 1. 6: Errors for differnt s t ep si ze usi ng RK4 m ethod
different values of x
maximums errors
h= 0.1
h= 0.05
h= 0.025
h= 0.0125
Figure 7. Error for different step size using RK4 method.
Example 2: we consider the initial value problem
2
yxxy y
,
01y
on the interval 01
x

. The
exact solution of the given problem is given by

2
2
2e
2πerfi 2
2
x
yx x



. The approximate results and maxi-
mum errors are obtained and shown in Tables 2(a)-(d) and the graphs of the numerical values are displayed in
Figures 8-14.
5.DiscussionofResults
The obtained results are shown in Tables 1(a)-(d) and Tables 2(a)-(d) and graphically representations are
shown in Figures 1-7 and Figures 8-14. The approximated solution is calculated with step sizes 0.1, 0.05, 0.025
and 0.0125 and maximum errors also are calculated at specified step size. From the tables for each method we
say that a numerical solution converges to the exact solution if the step size leads to decreased errors such that in
the limit when the step size to zero the errors go to zero. We see that the Euler approximations using the step
size 0.1 and 0.05 does not converge to exact solution but for step size 0.025 and 0.0125 converge slowly to exact
Md.A.Islam
400
Table 2. (a) Numerical approximations and maximum errors for step; size 0.1h
; (b) Numerical approximations and
maximum errors for step size 0.05h; (c) Numerical approximations and maximum errors for step size 0.025h
; (d)
Numerical approximations and maximum errors for step size 0.0125h
.
(a)
Euler Method 0.1h Rungee Kutta Method 0.1h
n
x

n
yx r
e
n
yx r
e
Exact Solution
n
y
0.1 0.9000000000000000 1.35091E02 0.91350893202045281.95878E07 0.913509127898782
0.2 0.8280000000000001 2.12185E02 0.84921817106045443.47642E07 0.849218518702443
0.3 0.7760016000000001 2.58218E02 0.80182294486182134.53096E07 0.8018233979576023
0.4 0.7390637996797441 2.87198E02 0.76778306212602585.24033E07 0.7677835861595071
0.5 0.7140048216672278 3.06849E02 0.74468912824640225.72232E07 0.7446897004786337
0.6 0.6987247742141842 3.21636E02 0.730887796150559 6.06628E07 0.7308884027785085
0.7 0.691826629656969 3.34247E02 0.725250665872579 6.33400E07 0.7252512992720983
0.8 0.6923920851827047 3.46350E02 0.72702642958216356.56635E07 0.7270270862176577
0.9 0.6998427720349557 3.59008E02 0.73574290958002436.78965E07 0.7357435885449581
1.0 0.7138506309611446 3.72897E02 0.751139649932897 7.02025E07 0.7511403519579868
(b)
Euler Method 0.05h Runge Kutta Method 0.05h
n
x

n
yx r
e
n
yx r
e
Exact Solution
n
y
0.1 0.9072500000000000 6.25913E03 0.9135091213176563 6.58113E09 0.913509127898782
0.2 0.8392609277701965 9.95759E03 0.8492185048488676 1.38536E08 0.849218518702443
0.3 0.7895884571598809 1.22349E02 0.8018233782217195 1.97359E08 0.8018233979576023
0.4 0.7540743267065178 1.37093E02 0.7677835620326319 2.41269E08 0.7677835861595071
0.5 0.7299570754427195 1.47326E02 0.7446896730961782 2.73825E08 0.7446897004786337
0.6 0.7153744093633583 1.55140E02 0.7308883728944706 2.98840E08 0.7308884027785085
0.7 0.7090695033855021 1.61818E02 0.7252512673367656 3.19353E08 0.7252512992720983
0.8 0.7102098229998883 1.68173E02 0.7270270524626191 3.37550E08 0.7270270862176577
0.9 0.7182708868437886 1.74727E02 0.735743553051839 3.54931E08 0.7357435885449581
1.0 0.7329587357703423 1.81816E02 0.7511403147092988 3.72487E08 0.7511403519579868
(c)
Euler Method 0.025h Runge Kutta Method 0.025h
n
x

n
yx r
e
n
yx r
e
Exact Solution
n
y
0.1 0.9104875290532907 3.02160E03 0.91350912763975322.59029E10 0.913509127898782
0.2 0.8443847744779372 4.83374E03 0.84921851805097496.51469E10 0.849218518702443
0.3 0.7958587285640485 5.96467E03 0.80182339695981829.97784E10 0.8018233979576023
0.4 0.7610777171130718 6.70587E03 0.76778358488996291.26955E09 0.7677835861595071
0.5 0.7374639944962212 7.22571E03 0.74468969899997651.47866E09 0.7446897004786337
0.6 0.7232631491061028 7.62525E03 0.73088840113449371.64401E09 0.7308884027785085
0.7 0.7172840690076906 7.96723E03 0.72525129748986841.78223E09 0.7252512992720983
0.8 0.7187354764318908 8.29161E03 0.72702708431178281.90588E09 0.7270270862176577
0.9 0.7271193149751998 8.62427E03 0.73574358652108942.02387E09 0.7357435885449581
1.0 0.7421585135282368 8.98184E03 0.75114034981571032.14228E09 0.7511403519579868
Md.A.Islam
401
(d)
Euler Method 0.0125h Runge Kutta Method 0.0125h
n
x

n
yx r
e
n
yx r
e
Exact Solution n
y
0.1 0.9120236443372686 1.48548E03 0.9135091278869912 1.17910E11 0.913509127898782
0.2 0.846835976864134 2.38254E03 0.8492185186679586 3.44851E11 0.849218518702443
0.3 0.7988774812685904 2.94592E03 0.8018233979021255 5.54771E11 0.8018233979576023
0.4 0.7644662941812183 3.31729E03 0.7677835860871474 7.23600E11 0.7677835861595071
0.5 0.7411106710960523 3.57903E03 0.7446897003930565 8.55770E11 0.7446897004786337
0.6 0.7271075635837666 3.78084E03 0.7308884026823441 9.61640E11 0.7308884027785085
0.7 0.721297592738653 3.95371E03 0.7252512991670091 1.05089E10 0.7252512992720983
0.8 0.722909634547887 4.11745E03 0.7270270861045542 1.13103E10 0.7270270862176577
0.9 0.7314586485260627 4.28494E03 0.7357435884242071 1.20751E10 0.7357435885449581
1.0 0.7466759122017882 4.46444E03 0.751140351829581 1.28405E10 0.7511403519579868
0.10.2 0.3 0.4 0.50.6 0.7 0.8 0.91
0.72
0.74
0.76
0.78
0.8
0.82
0.84
0.86
0.88
0.9
0
.
92
different values of x
Exact values
Exact value
Figure 8. Exact numerical solutions.
0.10.2 0.3 0.4 0.5 0.6 0.7 0.8 0.91
0. 65
0.7
0. 75
0.8
0. 85
0.9
0. 95
1
different values of x
Approx i m at e values
RK4 approx i m at i on
E uler approxim at i on
Figure 9. Numerical approximation for step size h = 0.1.
Md.A.Islam
402
0.10.2 0.3 0.4 0.50.6 0.7 0.8 0.91
0.7
0. 75
0.8
0. 85
0.9
0. 95
different values of x
A pproximat e values
RK4 approx i m at i on
E uler approxim at i on
Figure 10. Numerical approximation for step size h = 0.05.
0.1 0.2 0.3 0.4 0.50.6 0.7 0.8 0.91
0.7
0.75
0.8
0.85
0.9
0
.
9
5
different values of x
Appr oximate values
RK4 approx i m at i on
Euler approximation
Figure 11. Numerical approximation for step size h = 0.025.
0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
0. 72
0. 74
0. 76
0. 78
0.8
0. 82
0. 84
0. 86
0. 88
0.9
0. 92
different values of x
Approxi m ate val ues
RK4 approxi m a t i on
E ul er approximat i on
Figure 12. Numerical approximation for step size h = 0.0125.
Md.A.Islam
403
0.10.2 0.3 0.4 0.50.6 0.7 0.80.91
0
0.005
0. 01
0.015
0. 02
0.025
0. 03
0.035
0. 04
different values of x
maxi m um errors
h= 0.1
h= 0.05
h= 0.02 5
h= 0.01 25
Figure 13. Error for different step size using Euler method.
0.1 0.2 0.3 0.40.50.6 0.7 0.8 0.91
0
1
2
3
4
5
6
7
8x 10
-7
Fi gure 2.6:E rrors for di ffernt step s ize us i ng RK4 m et ho d
different values of x
maximums errors
h=0.1
h= 0.05
h= 0.025
h= 0.012 5
Figure 14. Error for different step size using RK4 method.
solution. Also we see that the Runge Kutta approximations for same step size converge firstly to exact solution.
This shows that the small step size provides the better approximation. The Runge Kutta method of order four
requires four evaluations per step, so it should give more accurate results than Euler method with one-fourth the
step size if it is to be superior. Finally we observe that the fourth order Runge Kutta method is converging faster
than the Euler method and it is the most effective method for solving initial value problems for ordinary differ-
ential equations.
6.Conclusion
In this paper, Euler method and Runge Kutta method are used for solving ordinary differential equation (ODE)
in initial value problems (IVP). Finding more accurate results needs the step size smaller for all methods. From
the figures we can see the accuracy of the methods for decreasing the step size h and the graph of the approxi-
mate solution approaches to the graph of the exact solution. The numerical solutions obtained by the two pro-
posed methods are in good agreement with exact solutions. Comparing the results of the two methods under in-
vestigation, we observed that the rate of convergence of Euler’s method is
Oh and the rate of convergence
of fourth-order Runge Kutta method is
4
Oh . The Euler method was found to be less accurate due to the in-
accurate numerical results that were obtained from the approximate solution in comparison to the exact solution.
Md.A.Islam
404
From the study the Runge Kutta method was found to be generally more accurate and also the approximate solu-
tion converged faster to the exact solution when compared to the Euler method. It may be concluded that the
Runge Kutta method is powerful and more efficient in finding numerical solutions of initial value problems
(IVP).
References
[1] Islam, Md.A. (2015) Accuracy Analysis of Numerical solutions of Initial Value Problems (IVP) for Ordinary Differen-
tial Equations (ODE). IOSR Journal of Mathematics, 11, 18-23.
[2] Islam, Md.A. (2015) Accurate Solutions of Initial Value Problems for Ordinary Differential Equations with Fourth
Order Runge Kutta Method. Journal of Mathematics Research, 7, 41-45. http://dx.doi.org/10.5539/jmr.v7n3p41
[3] Ogunrinde, R.B., Fadugba, S.E. and Okunlola, J.T. (2012) On Some Numerical Methods for Solving Initial Value
Problems in Ordinary Differential Equations. IOSR Journal of Mathematics, 1, 25-31.
http://dx.doi.org/10.9790/5728-0132531
[4] Shampine, L.F. and Watts, H.A. (1971) Comparing Error Estimators for Runge-Kutta Methods. Mathematics of Com-
putation, 25, 445-455. http://dx.doi.org/10.1090/S0025-5718-1971-0297138-9
[5] Eaqub Ali, S.M. (2006) A Text Book of Numerical Methods with Computer Programming. Beauty Publication, Khul-
na.
[6] Akanbi, M.A. (2010) Propagation of Errors in Euler Method, Scholars Research Library. Archives of Applied Science
Research, 2, 457-469.
[7] Kockler, N. (1994) Numerical Method for Ordinary Systems of Initial value Problems. John Wiley and Sons, New
York.
[8] Lambert, J.D. (1973) Computational Methods in Ordinary Differential Equations. Wiley, New York.
[9] Gear, C.W. (1971) Numerical Initial Value Problems in Ordinary Differential Equations. Prentice-Hall, Upper Saddle
River.
[10] Hall, G. and Watt, J.M. (1976) Modern Numerical Methods for Ordinary Differential Equations. Oxford University
Press, Oxford.
[11] Hossain, Md.S., Bhattacharjee, P.K. and Hossain, Md.E. (2013) Numerical Analysis. Titas Publications, Dhaka.
[12] Balagurusamy, E. (2006) Numerical Methods. Tata McGraw-Hill, New Delhi.
[13] Sastry, S.S. (2000) Introductory Methods of Numerical Analysis. Prentice-Hall, India.
[14] Burden, R.L. and Faires, J.D. (2002) Numerical Analysis. Bangalore, India.
[15] Gerald, C.F. and Wheatley, P.O. (2002) Applied Numerical Analysis. Pearson Education, India.
[16] Mathews, J.H. (2005) Numerical Methods for Mathematics, Science and Engineering. Prentice-Hall, India.