Professional Documents
Culture Documents
Runge Kutta PDF
Runge Kutta PDF
Q
Q3
DEIC
roll no 65
MATLAB code :
Runge-Kutta Method :
F = @(y, x) (1 + x * y); % Function representing the right-hand side
of the ODE y' = F(x, y)
% Initial condition
a = 0; % Initial value of x
y0 = 0; % Initial value of y(a)
y(i+1));
end
Output :
Runge_Kutta Approximate value of y at
x=0.10: 0.100334 Approximate value of y at
x=0.20: 0.202688 Approximate value of y at
x=0.30: 0.309164 Approximate value of y at
x=0.40: 0.422032 Approximate value of y at
x=0.50: 0.543826 Approximate value of y at
x=0.60: 0.677461 Approximate value of y at
x=0.70: 0.826367 Approximate value of y at
x=0.80: 0.994660 Approximate value of y at
x=0.90: 1.187363 Approximate value of y at
x=1.00: 1.410685