A Case Study On Runge Kutta 4 TH Order Differential Equations and Its Application
A Case Study On Runge Kutta 4 TH Order Differential Equations and Its Application
A Case Study On Runge Kutta 4 TH Order Differential Equations and Its Application
net/publication/320124650
CITATIONS READS
0 4,077
1 author:
Gowri Palanisamy
Sri Krishna Arts and Science College, Coimatore
7 PUBLICATIONS 6 CITATIONS
SEE PROFILE
All content following this page was uploaded by Gowri Palanisamy on 30 September 2017.
k3=f(xi+h/2,yi+k2/2) =0.1360
Δy=1/6[0.1+0.2310+0.2344+0.1366]
k4=f(xi+h,yi+k3 h =0.1169
Y1=y0+ Δy
3. Problems =1+0.1169
=1.1169
1. Using fourth order runge-kutta method. y(0.1)=1.1169
Evaluate the value of y when x=1.1 given that For the second approximation we have x1=0.1
dy/dx+y/x=1/x2 y(1) =1 K1=0.1[0.1*(1.1169)+(1.1169)2 ]
=0.1359
Solution : K2=0.1[0.15(1.1849)+(1.1849)2]
The formula for the fourth order Runge-kutta =0.1582
method of the differential equation dy/dx=f(x,y) is K3=0.1[0.15(1.196)+(1.196)2]
given by =0.1610
k1=h *f (x0,y0) K4=0.1[0.2(1.2779)+(1.2779)2]
k2=h*f(x0+h/2,y0+k1/2) =0.1889
k3=h*f(x0+h/2,y0+k2/2) Δy=1/6[0.1359+0.3164+0.3220+0.1889]
k4=h*f(x0+h,y0+k3) =0.1605
Δy=1/6(k1+2k2+2k3+k4) Y2=y1+ Δy
Where h is the interval of differencing and (x0,y0) is =1.1169+0.605
the initial value =1.2774
Hence f (x,y)=1/x2-y/x; x0 =1 y0=1 h=0.1 Y(0.2)=1.2774
K1=(0.1)*(1/12-1/1) 3. Use the classical RK method to estimate
=0
y(0.4) when y' ( x) x y 2 with y(0)=0
2
K2=(0.1) [(1/(x0+h/2)2-(y0+k1/2/x0+h/2))]
=(0.1)[(1/(1+0.1/2)2)-(1/1+0.1/2)] assume h=0.2
=-0.00454 SOLUTION :
K3=(0.1)[(0.9070)-(1+(-0.00454/2)/1.05)] f ( x, y) x 2 y 2
=0.1(0.9070-0.9502)
=-0.00432 m1 f ( x0 , y 0 ) 0
K4=(0.1)[(1/(1.1)2)-(1-0.00432/1.1) h mh
=(0.1)(0.8264-0.9052) m2 f ( x 0 , y0 1 )
=-0.00788 2 2
Δy=1/6(0-0.00908-0.00864-0.00788) f (0.1,0) 0.01
=-0.0042667
h mh
Y1=y(1.1) m3 f ( x0 , y 0 2 )
=y0+ Δy 2 2
=1+(-0.0042667) 0.2 0.01 0.2
=0.9957 = f ( , )
2. Compute y(0.1) and y(0.2) by runge kutta 2 2
method of fourth order differential equation =0.01
dy/dx=xy+y2 ,y(0) =1 m4 f ( x0 h, y 0 m3 h)
Solution:
f (0.2,0.01 0.2)
The formula for the fourth order runge kutta
method are =0.04
k1=h *f (x0,y0) 0 2 0.01 2 0.01 0.04
k2=h*f(x0+h/2,y0+k1/2)
y(0.2) 0 0.2
6
k3=h*f(x0+h/2,y0+k2/2)
k4=h*f(x0+h,y0+k3) =0.002667
Δy=1/6(k1+2k2+2k3+k4) ITERATION 2
Where h is the interval of differencing and (x0,y0) is X1 =0.2
the initial value Y1 =0.002667
Hence f (x,y)=xy/y2; x0 =1 y0=1 h=0.1
K1=(0.1)(0+1)=0.1
4. Application Problem
K2=(0.1)[(0.05(1.05)+(1.05)2)]
1. In this program for Runge Kutta method in
=0.1155
C, a function f(x,y) is defined to calculate slope
K3=(0.1)[0.05(1.05775)+(1.05775)2
whenever it is called. f(x,y) = (x-y)/(x+y)
=0.1172
SOLUTION:
K4=(0.1)[(0.1)(1.1172)+(1.1172)2]
#include<studio.h>
k 4 f (t 0 h, c0 k3 h)
f (5.25,7344100)
f (0 3.5,10 (543620)3.5)
7
0.06(7444100)
f (3.5,8097300)
440648
0.06(8097300)
k 4 f (t1 h, c1 k 3 h)
485840
f (3.5 3.5,8105900 (440648)3.5)
c1 c0 1/ 6(k1 2k 2 2k3 k 4 )h
= f (7,6563600)
10 7 1 / 6(600000 2(537000) 2(543620)
0.06(6563600)
(485840))3.5
10 7 1 / 6(3247100)3.5 393820
#include<conio.h>
#include<iostream.h>
f (3.5 1 / 2 3.5,8105900 1 / 2(486350)3.5) Void main()
{
float c[10], f ,t[10],h , n;
f (5.25,7254800) cout<<”Enter the initial values of concentration of
bacteria:”;
int i;
0.06(7254800) cin>>c[0];
cout<<”Enter the initial value of time:”;cin>>t[0];
435290 cout<<”Enter the value of time in weeks at which
we want to see the concentration:”;cin>>f;
k3 f (t1 1 / 2 h, c1 1 / 2k 2 h) cout<<”Enter the difference: “;cin>>h;
n=(f-c[0])/h;
for(i=1;i<=n;i++)
=1200+(-2.1848) 240
f(t, )= 2.2067 10 12 ( 4 81 108 )
=675.65K
i 1 i 1 / 6(k1 2k 2 2k3 k 4 )h
1 is the approximate temperature at
For i=0, t0=0, 0 =1200k
t = t1
k1 f (t 0 , 0 ) =t0+h
=f(0,1200) =0+240
=240
2.2067 10 12 (1200 4 81 108 )
=-4.5579 1 = (240)
=f(120,653.05) = f (240,675.65)
=-0.44199 =480
= 0.34775
[5] John.H.Mathews , KurtisD.Fink , Numerical
Method Using MATLAB, ISBN 978-81-203-2765-
8.
k 4 f (t1 h,1 k 3 h)
= f (240 240,675.65 (0.34775) 240) [6] Laurene V Fausett , Applied Numerical
Analysis Using MATLAB ,2009 ,ISBN 978-81-
= f (480,592.19) 317-2853-6
=
675.65 1/ 6(0.31372) 2(0.34775) (0.25351)) 240
=675.65+1/6(-2.0184) 240
=594.91K
t t2
=t1+h