0% found this document useful (0 votes)
510 views14 pages

Runge-Kutta 4th Order Method

The document discusses the Runge-Kutta method for solving ordinary differential equations (ODEs). It introduces the motivation for using Runge-Kutta methods as accurate techniques for solving ODEs without calculating high-order derivatives. The second-order Runge-Kutta method is derived, along with an example problem solved using this method. Higher-order Runge-Kutta methods like the fourth-order method are also introduced, with another example problem solved using the fourth-order Runge-Kutta method.

Uploaded by

komal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
510 views14 pages

Runge-Kutta 4th Order Method

The document discusses the Runge-Kutta method for solving ordinary differential equations (ODEs). It introduces the motivation for using Runge-Kutta methods as accurate techniques for solving ODEs without calculating high-order derivatives. The second-order Runge-Kutta method is derived, along with an example problem solved using this method. Higher-order Runge-Kutta methods like the fourth-order method are also introduced, with another example problem solved using the fourth-order Runge-Kutta method.

Uploaded by

komal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 14

TOPIC: Runge Kutta method

PRESENTED BY :
JITANTDRA TRIPATHI

STREAM:
M.Sc.(MATHMETICS)
SECOUND SEM
Runge-Kutta 4th Order Method
Learning Objectives

 To understand the motivation for using Runge


Kutta method and the basic idea used in
deriving them.
 To Familiarize with Taylor series for functions of
two variables.
 Use Runge Kutta of order 2 to solve ODEs.
Motivation
 We seek accurate methods to solve ODEs that
do not require calculating high order
derivatives.
 The approach is to use a formula involving
unknown coefficients then determine these
coefficients to match as many terms of the
Taylor series expansion.
Second Order Runge-Kutta Method
K 1  h f ( xi , y i )
K 2  h f ( xi   h, y i   K 1 )
y i 1  y i  w1 K 1  w2 K 2
Problem :
Find  ,  , w1 , w2
such that y i 1 is as accurate as possible.

5 CISE301_Topic8L4&5
Alternative Form
Second Order Rung e Kutta
K1  h f ( xi , yi )
K 2  h f ( xi   h, y i   K1 )
yi 1  yi  w1K1  w2 K 2

Alternativ e Form
k1  f ( xi , yi )
k2  f ( xi   h, yi   h k1 )
yi 1  yi  h w1 k1  w2 k2 
6 CISE301_Topic8L4&5
Second order Runge-Kutta Method
Example
Solve the following system to find x (1.02) using RK2
x (t )  1  x 2  t 3 , x (1)  4, h  0.01,   1

STEP 1 :
K1  h f (t0  1, x0  4)  0.01(1  x02  t03 )  0.18
K 2  h f (t0  h, x0  K1 )
 0.01(1  ( x0  0.18)2  (t0  .01)3 )  0.1662
x (1  0.01)  x (1)  K1  K 2  / 2
 4  (0.18  0.1662) / 2  3.8269

7
Second order Runge-Kutta Method
STEP 2

K1  h f (t1  1.01, x1  3.8269)  0.01(1  x12  t13 )  0.1668


K 2  h f (t1  h, x1  K1 )
 0.01(1  ( x1  0.1668)2  (t1  .01)3 )  0.1546

x (1.01  0.01)  x (1.01)  K1  K 2 


1
2
1
 3.8269  (0.1668  0.1546)  3.6662
2

8
Higher-Order Runge-Kutta

Higher order Runge-Kutta methods are available.

Derived similar to second-order Runge-Kutta.

Higher order methods are more accurate but


require more calculations.

9
3rd Order Runge-Kutta RK3

Know as RK3
k1  f ( x i , y i )
h 1
k 2  f ( x i  , y i  k1 h )
2 2
k 3  f ( xi  h, y i  k1 h  2k 2 h)

 y i  k1  4k 2  k 3 
h
y i 1
6

10 CISE301_Topic8L4&5
Runge-Kutta 4th Order Method

For dy
 f ( x, y ), y (0)  y0
dx
Runge Kutta 4th order method is given by
yi 1  yi  k1  2k2  2k3  k4 h
1
6
where

k1  f xi , yi 
 1 1 
k2  f  xi  h, yi  k1h 
 2 2 
 1 1 
k3  f  xi  h, yi  k2 h 
 2 2 

k4  f xi  h, yi  k3h
11
Example: RK4
Problem : h  0.2
dy
 1 y  x2 , y (0)  0.5 f ( x, y )  1  y  x 2
dx
x0  0, y0  0.5
Use RK 4 to find y (0.2), y (0.4)

k1  f ( x0 , y0 )  (1  y0  x02 )  1.5

h, y0  k1h )  1   y0  0.15   x0  0.12  1.64


1 1
k2  f ( x0 
Step 1

2 2
k3  f ( x0  h, y0  k2h )  1   y0  0.164    x0  0.12  1.654
1 1
2 2
k4  f ( x0  h, y0  k3h )  1   y0  0.16545   x0  0.2 2  1.7908

y1  y0 
h
k1  2k2  2k3  k4   0.8293
6
12
Example: RK4
Problem :
h  0.2
dy
 1 y  x2 , y (0)  0.5 f ( x, y )  1  y  x 2
dx
x1  0.2, y1  0.8293
Use RK 4 to find y (0.2), y (0.4)

k1  f ( x1 , y1 )  1.7893
1 1
k 2  f ( x1  h, y1  k1 h)  1.9182
Step 2

2 2
1 1
k 3  f ( x1  h, y1  k 2 h)  1.9311
2 2
k 4  f ( x1  h, y1  k 3 h)  2.0555

y 2  y1 
0.2
k1  2k 2  2k 3  k 4   1.2141
6
13
Example: RK4
Problem :
dy
 1 y  x2 , y (0)  0.5
dx
Use RK 4 to find y (0.2), y (0.4)

Summary of the solution

14

You might also like