0% found this document useful (0 votes)
43 views7 pages

Lanm PPT

This document presents an overview of the 4th order Runge-Kutta method for solving ordinary differential equations numerically. It derives the 4th order RK formula and provides an example solving the ODE dy/dx = x^2 + y^2 from x=1 to x=1.05 using RK4. The example calculates the values of k1, k2, k3, k4 and uses them to find the solution y(1.05)=1.3326 in 3 sentences.
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)
43 views7 pages

Lanm PPT

This document presents an overview of the 4th order Runge-Kutta method for solving ordinary differential equations numerically. It derives the 4th order RK formula and provides an example solving the ODE dy/dx = x^2 + y^2 from x=1 to x=1.05 using RK4. The example calculates the values of k1, k2, k3, k4 and uses them to find the solution y(1.05)=1.3326 in 3 sentences.
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/ 7

MALLA REDDY ENGINEERING

COLLEGE

LAMN PPT
PRESENTATION

4th Order Runge-Kutta Method


By J.RAMESH
23J41A6786
CSD-B
1
Derivation of 4th Order
Runge-Kutta Methods
Runge-Kutta
Second OrderFourthTaylor Order Method Formula
Series Expansion
The formula for the fourth-order Runge-Kutta
dy
method
Used toissolve
given by::
ODE  f ( x, y )
y1 = y0 + (⅙) (k1 +dx2k2 + 2k3 + k4)
Here, dy h 2 d 2 y 3
 yi  hy0) 
k1 y=i 1hf(x0, 2
 O (h )
dx 2 dx
k2 = hf[x0 + (½)h, y0 + (½)k1]
which is written as :
k3 = hf[x0 + (½)h, y0 + (½)k2]
k4 = hf(x0 + h, y0 + k3) h2 3
yi 1  yi  h f ( xi , yi )  f ' ( xi , yi )  O ( h )
2
2
Runge-Kutta RK4 Method Solved
Examples
Example 1:
Consider an ordinary differential equation
dy/dx = x2 + y2, y(1) = 1.2. Find y(1.05)
using the fourth order Runge-Kutta method.

Solution:
Given,
dy/dx = x2 + y2, y(1) = 1.2
So, f(x, y) = x2 + y2
x0 = 1 and y0 = 1.2
Also, h = 0.05
Let us calculate the values of k1, k2, k3 and
3
Runge-Kutta RK4 Method
Solved Examples
k1 = hf(x0, y0)
= (0.05) [x02 + y02]
= (0.05) [(1)2 + (1.2)2]
= (0.05) (1 + 1.44)
= (0.05)(2.44)
= 0.122
k2 = hf[x0 + (½)h, y0 + (½)k1]
= (0.05) [f(1 + 0.025, 1.2 + 0.061)] {since h/2 =
0.05/2 = 0.025 and k1/2 = 0.122/2 = 0.061}
= (0.05) [f(1.025, 1.261)]
= (0.05) [(1.025)2 + (1.261)2]
= (0.05) (1.051 + 1.590)
= (0.05)(2.641) 4

= 0.1320
Runge-Kutta RK4 Method Solved
Examples
k3 = hf[x0 + (½)h, y0 + (½)k2]
= (0.05) [f(1 + 0.025, 1.2 + 0.066)] {since h/2 =
0.05/2 = 0.025 and k2/2 = 0.132/2 = 0.066}
= (0.05) [f(1.025, 1.266)]
= (0.05) [(1.025)2 + (1.266)2]
= (0.05) (1.051 + 1.602)
= (0.05)(2.653)
= 0.1326
k4 = hf(x0 + h, y0 + k3)
= (0.05) [f(1 + 0.05, 1.2 + 0.1326)]
= (0.05) [f(1.05, 1.3326)]
= (0.05) [(1.05)2 + (1.3326)2]
= (0.05) (1.1025 + 1.7758)
= (0.05)(2.8783) 5
Runge-Kutta RK4 Method Solved
Examples
By RK4 method, we have;
y1 = y0 + (⅙) (k1 + 2k2 + 2k3 + k4)
y1 = y(1.05) = y0 + (⅙) (k1 + 2k2 + 2k3 +
k4)
By substituting the values of y0, k1, k2, k3
and k4, we get;
y(1.05) = 1.2 + (⅙) [0.122 + 2(0.1320) +
2(0.1326) + 0.1439]
= 1.2 + (⅙) (0.122 + 0.264 + 0.2652 +
0.1439)
= 1.2 + (⅙) (0.7951) 6

= 1.2 + 0.1325
THANK YOU
by J.RAMESH
23J41A6786
DS-B

You might also like