Runge Kutta Method
Runge Kutta Method
1. INTRODUCTION
The Runge-Kutta method is popular method for solving initial value problem. It is most
accurate and stable method.
The Runge-Kutta method of order p>= 2 are nonlinear one step methods. They are nonlinear,
since the function f(x,y) is not involved in the Runge-Kutta formulas as a combination of its
values, but it emerges as itself argument. However, the explicit Euler method is the one step
linear method, and it is also the Runge-Kutta method of order p=1. We shall consider Runge-
Kutta explicit methods in the following general form:
k1 = f(x0,y0)
…………
The Runge–Kutta methods are iterative ways to calculate the solution of a differential
equation. Starting from an initial condition, they calculate the solution forward step by step.
The most common method is the fourth-order Runge–Kutta method, often simply referred to
as the Runge–Kutta method.
Runge- Kutta method is a more general and improvised method than that of the Euler's
method. Methods based on higher order approximations are called Runge-Kutta methods.
Runge-Kutta methods are a class of methods which judiciously uses the information on the
'slope' at more than one point to extrapolate the solution to the future time step.
Fourth Order Runge-Kutta method intends to increase accuracy to get better approximated
solution. This means that the aim of this method is to achieve higher accuracy and to find
explicit method of higher order.
1
Runge-Kutta Method
2. HISTORY
It arise when Leonhard Euler have made improvements on Euler method to produce
Improved Euler method. Then, Runge is realized this method which is similar method with
the second order Runge Kutta method. A few years later in 1989 Runge acquired Fourth
Order of Runge Kutta method and afterwards, it is developed by Heun(1900) and
Kutta(1901).
The idea of generalizing the Euler method, by allowing for a number of evaluations of the
derivative to take place in a step, is generally attributed to Runge (1895). Further
contributions were made by Heun (1900) and Kutta (1901). The latter completely
characterized the set of Runge-Kutta methods of order 4, and proposed the first methods of
order 5. Special methods for second order differential equations were proposed by Nystrom
(1925), who also contributed to the development of methods for first order equations. It was
not until the work of Huta (1956,1957) that sixth order methods were introduced.
Since the advent of digital computers, fresh interest has been focused on Runge-Kutta
methods, and a large number of research workers have contributed to recent extensions to the
theory, and to the development of particular methods. Although early studies were devoted
entirely to explicit Runge-Kutta methods, interest has now moved to include implicit
methods, which have become recognized as appropriate for the solution of stiff differential
equations.
A number of different approaches have been used in the analysis of Runge-Kutta methods.
The methods most commonly employed by scientists to integrate o.d.e.s were first developed
by the German mathematicians C.D.T. Runge and M.W. Kutta in the latter half of the
nineteenth century.
In 1995, regarded as the centenary of the Runge-Kutta method, a conference was held at the
CWI in Amsterdam to celebrate this occasion and, subsequently G. Warner and the author
wrote an account of the of Runge- Kutta methods as we understood it at the time. A more
general history of numerical methods of ordinary differential equations appeared a few years
later as a millennium review. In the light of these existing surveys, it seems appropriate to
aim for something on a smaller scale in the present paper.
2
Runge-Kutta Method
3. TECHNICALITIES OR DERIVATIONS
Runge-Kutta methods are single step methods and are really accurate than the Taylor’s
series method. Runga- Kutta method is a more general and improvised method than that
of the Euler's method. Methods based on higher order approximations are called Runge-
Kutta methods.
Runge-Kutta Method of Order Two: The Runge-Kutta 2nd order method is a
numerical technique used to solve an ordinary differential equation of the form:
3
Runge-Kutta Method
The flow chart associated with the R-K method of order 2 is : Figure 1:
DERIVATION:
Consider the first order differential equation:
4
Runge-Kutta Method
dy
= y=f (x , y ) with y(x0) = y0
dx
where k1 = h f(x0,y0)
k2 = h f(x0 + ah, y0 + bk1) ……….2
and k = w1k1 + w2k2
The parameters w1, w2, a, and b are chosen in order to make (1) as accurate as possible.
By Taylor Series Expansion, we have
Since y = f(x, y)
y = f(x,y) = fx + fy f
y = fxx + 2fxy f + fyy f2 + fx fy +fy2 f
h2
y (x0 + h) = y(x0) + h f(x0 , y0) + [ f +f f ] +
2! x x y (x 0 , y0)
h3 2 2
[f xx +2 f xy f + f yy f + f x f y +f y f ](x0 , y 0) + O(h4)
3!
…………4
where the subscripts on f denote partial derivatives with respect to the indicated
variables.
k2 = h f(x0 + ah , y0 + bk1)
5
Runge-Kutta Method
= y(x0) + h (w1 + w2) f(x0 , y0) + h2w2 [afx +bffy] (x0, y0) +
h3 2 2 2
w 2 [a f xx + 2ab f f xy +b f f yy ](x 0 , y 0) + O(h4) ……..5
2
Comparing equations (4) and (5), to make the corresponding powers of h and h2 agree, we
must have
w1 + w2 = 1
1
a= b =
2 w2
This is a system of nonlinear equations in the four unknowns a, b, w1, w2. There are many
solutions of this depending on the choice of w2. These choices corresponding to some of the
1
standard numerical integration formulas. If we choose w2 = then
2
1
w1 = , a=b=1
2
h
Hence we get y(x0 + h ) = y(x0) + ¿
2
With k1 = h f(x0,y0)
6
Runge-Kutta Method
1
4. Find k = (k1 + k2)
2
5. Obtain y1 = y0 + k, where y1 is at x1 = x0 + h
Alternative Form
k1 f ( xi , yi )
k2 f ( xi h, yi h k1 )
yi 1 yi hw1 k1 w2 k2
1
For example, choosing α =1, then β=1 , w 1=w2 =
2
Second Order Runge-Kutta method becomes:
K 1 =h f ( x i , y i )
K 2 =h f ( x i +h , y i + K 1 )
1 h
y i+1 = y i + ( K 1 +K 2 ) = y i + ( f (x i , y i )+ f ( x i+1 , y 0i+1 ) )
2 2
This is Heun' s Method with a Single Corrector
1 1
Choosing α = then β = , w1 =0 , w 2 =1
2 2
Second Order Runge-Kutta method becomes:
K 1 =h f ( x i , y i )
h K1
K 2 =h f ( x i + , y i + )
2 2
h K1
y i +1 = y i + K 2 = y i + h f ( xi + , y i + )
2 2
This is the Midpoint Method
7
Runge-Kutta Method
k 1 =f ( x i , y i )
1 1
k 2 =f (x i + h , yi+ k1 h )
4 4
1 1 1
k 3 =f (x i + h , yi + k 1 h+ k 2 h )
4 8 8
1 1
k 4 =f ( x i + h , y i − k 2 h+k 3 h )
2 2
3 3 9
k 5 =f (x i + h , yi + k 1 h+ k 4 h )
4 16 16
3 2 12 12 8
k 6 =f ( xi +h , y i− k 1 h+ k 2 h+ k 3 h− k 4 h+ k 5 h )
7 7 7 7 7
h
y i+1 = y i + ( 7 k 1 +32 k 3 +12 k 4 +32 k 5 +7 k 6 )
90
8
Runge-Kutta Method
Note the difference in slope, which increases with the order of the method.
9
Runge-Kutta Method
Examples:
Solve the following system to find x(1.02) using RK2
x (t ) 1 x 2 (t ) t 3 , x(1) 4, h 0.01
Solution:
STEP1:
K1 h f (t , x) 0.01(1 x 2 t 3 ) 0.18
K 2 h f (t h, x K1 ) 0.01(1 ( x 0.18) 2 (t .01)3 ) 0.1662
1 1
x(1 0.01) x(1) K1 K 2 4 (0.18 0.1662) 3.8269
2 2
STEP 2
2 3
K 1 =h f (t , x )=0 .01(1+x +t )=0 . 1668
K 2 =h f (t +h , x+K 1 )=0. 01(1+( x +0 . 1668)2 +(t+. 01 )3 )=0 .1546
1
x (1 . 01+0 .01 )=x (1. 01 )+ ( K 1 +K 2 )
2
1
=−3 .8269+ (0 .1668 +0. 1546 )=−3 . 6662
2
Example
Using RK method of order four find y(0.1) for y' = x - y2, y(0) = 1.
Solution:
Given y' = x-y*y, y[0.00] = 1.0
(Using RK method of order 4) with step-length = 0.1
K1 = -0.10000000149011612
K2 = -0.08525000105425715
K3 = -0.08665669017834754
K4 = -0.07341960110462278
y[0.10] = 0.9137945024900086
10
Runge-Kutta Method
Many numerical methods have been developed for DAEs (Differential algebraic
equations) for mechanics. Historically, DAEs were reduced to underlying ODEs and
solved with a standard Runge-Kutta (RK) or multistep method. Methods where the
constraints are differentiated to obtain lower index constraints are called index reduction
methods.
To demonstrate the use of the Runge-Kutta method, two spreadsheets are included that
solve the classic chemical engineering tank problem. These problems involve
concentration and/or volume varying with time in a tank and require a material balance
to derive a differential equation.
Solution for the first order fuzzy differential equation by Runge –Kutta method of order
two with new parameters and Harmonic mean of ki’s which are used in the main formula
in order to increase the order of accuracy of the solution.
The kinetic electron trapping process in a shallow defect state and its subsequent thermal-
or photo-stimulated pro- motion to a conduction band, followed by recombination in
another defect, was described by Adirovitch using coupled rate differential equations.
The solution for these equations has been frequently computed using the Runge-Kutta
method.
11
Runge-Kutta Method
The scheme of Runge-Kutta fourth order Method for the numerical solution of the system
of six coupled nonlinear ODEs.
The equation of transient flow of an ideal gas through porous media, as an example of a
class of non-linear PDE. has been considered. The solution of the problem has been
-obtained by using two distinct approaches, viz., the Runge-Kutta methods and the finite
difference type methods. As observed by the authors the Runge-Kutta approach yields
better results and to overcome the limitations of this method the area of irregular grid
network should be investigated.
RK method is very efficient in solving second order differential equations. Thus, we can
conclude that by carrying out the transient analysis of a system, we can find out the
response of the system by changing the conditions from one steady state value to
another. This response helps in designing a system which meets our requirements, and
we can further optimize the time domain parameters of the system.
12
Runge-Kutta Method
The time varying currents and voltages resulting from the sudden application of sources,
usually due to switching are called TRANSIENTS. In transient analysis we start by
writing the circuit equations using basic concepts of KCL, KVL, node-voltage analysis
and mesh-current analysis. Due to the involvement of integrals and derivatives in
current-voltage relationships for inductances and capacitances, we obtain integro-
differential equations which are converted to pure differential equations by
differentiating with respect to time. Thus the study of transients requires solving of
differential equations. The order of the differential equation depends on the number of
energy storage elements present in the circuit.
Some Basic Concepts:-
1. Kirchhoff’s Current Law – The sum of currents flowing in and out of a node is zero.
For a node,Σ I =0 .
2. Kirchhoff’s Voltage Law –The sum of voltages across various circuit elements in a
mesh is zero.
In a mesh,Σ v =0.
3. Voltage across a capacitor– V = ( ʃ i dt) /C i.e integral of current flowing through it
over a period of time divided by capacitance
4. Current supplied by capacitor- I = C (dv/dt) i.e product of capacitance and derivative
of voltage across capacitor
with respect to time.
5. Voltage across an inductor- V = L (di/dt) i.e product of inductance and derivative of
current through inductor with respect to time
6. Current stored in an inductor- I=( ʃ v dt) /L i.e integral of voltage across it over a
period of time divided by inductance.
13
Runge-Kutta Method
For the case of the series RLC circuit these two parameters are given by:
14
Runge-Kutta Method
A useful parameter is the damping factor, ζ, which is defined as the ratio of these two,
In the case of the series RLC circuit, the damping factor is given by,
The value of the damping factor determines the type of transient that the circuit will
exhibit.
Some authors do not use ζ and call α the damping factor.
Different conditions for damping factors,
If,
ζ> 1, the system is called over damped.
ζ= 1, the system is called critically damped.
ζ< 1, the system is called under damped.
FORMULATION OF RK METHOD
tk+1=tk+h
Yj+1=Yj+(k1+2k2+2k3+k4)/6 where K=0,1,2….m-1
Where:
k1=h f(tj, Yj)
k2=h f(tj+h/2,Yj+k1/2 )
k3=h f(tj+h/2,Yj+k2/2 )
k4=h f(tj+h,Yj+k3)
k1 is the increment based on the slope at the beginning of the interval, using yn;
k2 is the increment based on the slope at the midpoint of the interval, using yn+k1/2 ;
k3 is again the increment based on the slope at the midpoint, but now using yn+k2/2 ;
k4 is the increment based on the slope at the end of the interval, using yn+k3.
15
Runge-Kutta Method
So,
Now let,
I(t)=x1
Vc(t)=x2
Let,
X(i)=x1
Y(i)=x2
g1=h*g(t,x1,x2)
f2=h*f((t+h/2),(x1+f1/2),(x2+g1/2))
g2=h*g((t+h/2),(x1+f1/2),(x2+g1/2))
f3=h*f((t+h/2),(x2+f2/2),(x2+g2/2))
g3=h*g((t+h/2),(x1+f2/2),(x2+g2/2))
f4=h*f((t+h),(x1+f3),(x2+g3) g4=h*g((t+h),(x1+f3),(x2+g3))
16
Runge-Kutta Method
x1=x1+((f1+f4)+2*(f2+f3))/6.0
x2=x2+((g1+g4)+2*(g2+g3))/6.0
Where,
h=(Tf-T0 )/n
here:
h=step size
Tf=final time
To=initial time
Example: Let’s take an example to get the transient analysis of circuit for an over damped
system.
Let:
R=300, L= 10mH,C=1uF and Vin=10V
Here,
I(0)=0,Vc(0)=0
So, W0 =1000
Now, after dividing the two values we get 1.5, therefore the condition is over damped.
17
Runge-Kutta Method
The voltage here varies parabolic ally with time but it reaches steady state much before 1
millisecond.
18
Runge-Kutta Method
Example:
For illustration, a simple RL-circuit is considered, where we take a constant voltage in
the first example and a sinusoidal voltage source in the second example.
19
Runge-Kutta Method
……….. (1)
According to Kirchhoff’s Second Law, the charge q satisfies the differential equation
…………(2)
As an example, we assume that R =15 ohms, L = 3 henrys, volts and the initial conditions
and when t = 0. We then want to find and for 0 ≤ t ≤ 5 with by using the RK4 method.
The exact solutions for the charge q and the current i are given respectively, by
…………(3)
By comparing the solution obtained by the RK4 method with the exact solution obtained
from equation (3), we can then find the absolute errors for i and q.
20
Runge-Kutta Method
Solution:
Step 1: Write the second-order differential equation (equation (2)) as a system of first
order differential equations by using equation (1).
21
Runge-Kutta Method
Figure 8 shows the current i at a constant voltage of 120 volts for a RL series circuit as
shown in Figure 5. Notice that, the current i reaches the steady state solution at i = 8
amperes as time t goes to infinity.
22
Runge-Kutta Method
23
Runge-Kutta Method
24
Runge-Kutta Method
25
Runge-Kutta Method
7. RESEARCH PAPERS
The research papers which are referred here are more or less concerned with the application
and introduction of Runge-Kutta method. Here in the research paper mostly it is given about
application that uses this method. The first research paper is about Transient Analysis of
Electrical Circuits Using Runge-Kutta Method and its Application1. The RK method is very
efficient in solving second order differential equations. Thus, we can conclude that by
carrying out the transient analysis of a system, we can find out the response of the system by
changing the conditions from one steady state value to another.
26
Runge-Kutta Method
8. CONCLUSION
In this paper, we have discussed numerical methods for solving systems of ordinary
differential equations. Some necessary conditions and definitions are given to examine the
numerical methods. Here we have discussed about Runge- Kutta method. Runge- Kutta
method is a more general and improvised method than that of the Euler's method. Methods
based on higher order approximations are called Runge-Kutta methods. Runge Kutta method
gives better results and it converge faster to analytical solution and has less iteration to get
accuracy solution. Also its application is being discussed. Runge Kutta methods are widely
used methods for the integration of initial value problems for ordinary differential equations.
Two research papers have been discussed based on its application. A Spreadsheet Solution of
a System of Ordinary Differential Equations Using the Fourth-Order Runge-Kutta Method.
And for transient analysis of the system.
27
Runge-Kutta Method
9. REFERENCES
1. Anuj Suhag -Transient Analysis of Electrical Circuits Using Runge-Kutta Method and its
Application. ( International Journal of Scientific and Research Publications, Volume 3, Issue
11, November 2013)
2. Kim Gaik Tay, Sie Long Kek, Rosmila Abdul-Kahar- A Spreadsheet Solution of a System of
Ordinary Differential Equations Using the Fourth-Order Runge-Kutta Method
3. https://www.tu-ilmenau.de/fileadmin/media/simulation/Lehre/div/Lec_Slides3.pdf
4. http://www.cfm.brown.edu/people/sg/AM35odes.pdf
5. http://nm.mathforcollege.com/topics/runge_kutta_4th_method.html
28
Runge-Kutta Method
10.PLAGIARISM REPORT
Plagiarism Detected
Originality: 40%
This paper may be plagiarized. The percentage of original content in this paper is too
low.
The following web pages may contain content matching this document:
http://www.chemecalcs.com/rk.php
http://www.iasj.net/iasj?func=fulltext&aId=40025
http://text.123doc.vn/document/2189612-numerical-methods-for-ordinary-
dierential-equations-episode-4-doc.htm
http://en.wikipedia.org/wiki?curid=20221609
http://en.wikipedia.org/wiki?curid=27174683
A low originality percentage is indicative of plagiarized papers. Sometimes the score is lower
due to long quotations within a document, so please make sure that you use proper citations
if this is the case. For more information on our originality scoring process, click here.
29