Lanm PPT
Lanm PPT
COLLEGE
LAMN PPT
PRESENTATION
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