RK Simultaneous 2nd ORDER
-
Upload
surajsingh -
Category
Documents
-
view
212 -
download
0
Transcript of RK Simultaneous 2nd ORDER
8/18/2019 RK Simultaneous 2nd ORDER
http://slidepdf.com/reader/full/rk-simultaneous-2nd-order 1/3
PROGRAM NO. 25
NAME : HARSHVARDHAN S PATIL
CLASS : T.E. ‘B’
ROLL NO. : 28
TITLE : Program on ODE ! R"ng# $ %"&&a 2nd
Or'#r M#&(o' )or Simultaneous '*+#r#n&*a, #-"a&*on
INPUT :-
fprintf ('Program on R-K 2nd Order Method for
simultaneous differential equations :');
f = input ('n n !nter the fun"tion d#$d% = ');
g = input (' !nter the fun"tion d&$d% = ');
% = input ('n !nter the alue of % = ');
# = input (' !nter the alue of # = ');
& = input (' !nter the alue of & = ');
%g = input (' !nter the alue of %g = ');
h = input (' !nter the alue of step si&e h = ');
n = (%g - %)$h;
for i=:n
* = h + f(%,#,&);
l = h + g(%,#,&);
*2 = h + f((% h),(# *),(& l));
l2 = h + g((% h),(# *),(& l));
8/18/2019 RK Simultaneous 2nd ORDER
http://slidepdf.com/reader/full/rk-simultaneous-2nd-order 2/3
* = (* *2)$2;
l = (l l2)$2;
% = % h;
# = # *;
& = & l;
#g = #;
&g = &;
end;
fprintf ('n .he final alue of #g = /f', #);
fprintf ('n .he final alue of &g = /f', &);
OUTPUT :-
Program on R-K 2nd Order Method for simultaneous
differential equations :
!nter the fun"tion d#$d% = 0(%,#,&)(&)
!nter the fun"tion d&$d% = 0(%,#,&)((1-1+#+%+&)$2)
!nter the alue of % =
!nter the alue of # =
!nter the alue of & = -2
!nter the alue of %g = 3
!nter the alue of step si&e h = 3
.he final alue of #g = 34
8/18/2019 RK Simultaneous 2nd ORDER
http://slidepdf.com/reader/full/rk-simultaneous-2nd-order 3/3
.he final alue of &g = -315