You are on page 1of 24

Solving Ordinary Differential Equations By :

Second-Order Runge-Kutta

For the Ordinary Differential Equation : y^=4e^0.8x-0.5y

Initial Conditions :
when x = 0.00 Interval : from x0 = 0 to xn = 4
y= 2.00 Step size = 0.25

x y k1 k2
0.000 2.000 3.000 3.511 3.255
0.250 2.814 3.479 4.126 3.802
0.500 3.764 4.085 4.896 4.490
0.750 4.887 4.845 5.853 5.349
1.000 6.224 5.790 7.037 6.414
1.250 7.828 6.959 8.497 7.728
1.500 9.760 8.401 10.291 9.346
1.750 12.096 10.173 12.492 11.333
2.000 14.929 12.348 15.191 13.769
2.250 18.371 15.013 18.494 16.753
2.500 22.560 18.276 22.536 20.406
2.750 27.661 22.269 27.478 24.874
3.000 33.880 27.153 33.521 30.337
3.250 41.464 33.123 40.906 37.015
3.500 50.718 40.420 49.931 45.175
3.750 62.011 49.336 60.957 55.147
4.000 75.798 60.231 74.428 67.330
Solving Ordinary Differential Equations By :
Third-Order Runge-Kutta

For the Ordinary Differential Equation : y^=4e^0.8x-0.5y

Initial Conditions : Interval : from x0 = 0.00 to xn = 4.00


when x = 0.00 Step size = 0.25
y= 2.00
Exact answer y(4)=75.33896
x y k1 k2 k3
0.000 2.000 3.000 3.233 3.452 3.231
0.250 2.808 3.482 3.778 4.054 3.775
0.500 3.751 4.092 4.463 4.808 4.459
0.750 4.866 4.855 5.318 5.746 5.313
1.000 6.194 5.805 6.378 6.907 6.371
1.250 7.787 6.980 7.687 8.338 7.678
1.500 9.706 8.427 9.297 10.097 9.286
1.750 12.028 10.207 11.275 12.255 11.260
2.000 14.843 12.391 13.700 14.901 13.682
2.250 18.263 15.067 16.670 18.140 16.648
2.500 22.425 18.344 20.306 22.104 20.278
2.750 27.495 22.353 24.752 26.951 24.719
3.000 33.675 27.255 30.189 32.877 30.148
3.250 41.212 33.249 36.835 40.120 36.785
3.500 50.408 40.575 44.957 48.971 44.895
3.750 61.632 49.526 54.881 59.785 54.806
4.000 75.333 60.464 67.005 72.997 66.913
Approximate Graph of the Function
3.5

2.5

1.5

0.5

0
0 0.2 0.4 0.6 0.8 1
y ( Euler's)
of the Function

6 0.8 1 1.2
s)
Solving Ordinary Differential Equations By :
Fourth-Order Runge-Kutta

For the Ordinary Differential Equation : y^=4e^0.8x-0.5y

Initial Conditions : Interval : from x0 = 0 to xn =


when x = 0.00 Step size = 0.25
y= 2.00
Exact answer y(4)=75.33896
x y k1 k2 k3 k4
0.00 2.000 3.000 3.233 3.219 3.483 3.231
0.25 2.808 3.482 3.778 3.759 4.093 3.775
0.50 3.752 4.092 4.463 4.440 4.858 4.459
0.75 4.866 4.855 5.318 5.289 5.808 5.313
1.00 6.195 5.805 6.378 6.342 6.983 6.372
1.25 7.788 6.979 7.687 7.642 8.431 7.678
1.50 9.707 8.427 9.297 9.243 10.212 9.286
1.75 12.029 10.206 11.275 11.208 12.397 11.261
2.00 14.844 12.390 13.699 13.618 15.074 13.683
2.25 18.265 15.066 16.670 16.569 18.353 16.649
2.50 22.427 18.343 20.305 20.182 22.364 20.280
2.75 27.497 22.351 24.751 24.601 27.269 24.721
3.00 33.677 27.254 30.188 30.005 33.266 30.151
3.25 41.215 33.247 36.833 36.609 40.595 36.788
3.50 50.412 40.573 44.955 44.681 49.551 44.899
3.75 61.637 49.524 54.878 54.544 60.494 54.810
4.00 75.339 60.460 67.002 66.593 73.863 66.919
Approximate Graph of the Function
3.5

3
4
2.5

1.5

0.5

0 y ( Euler's) y (Heun's)
0 0.2 0.4 0.6 0.8 1
Graph of the Function

eun's)
0.8 1 1.2
Solving Ordinary Differential Equations By :
Runge-Kutta Ralstion Method

For the Ordinary Differential Equation : y^=4e^0.8x-0.5y

Initial Conditions :
when x = 0.00 Interval : from x0 = 0 to xn = 4
y= 2.00 Step size = 0.25

x y k1 k2
0 2.000 3.000 3.366 3.244
0.25 2.811 3.480 3.945 3.790
0.5 3.758 4.088 4.671 4.476
0.75 4.878 4.850 5.575 5.333
1 6.211 5.797 6.694 6.395
1.25 7.810 6.968 8.075 7.706
1.5 9.736 8.412 9.773 9.320
1.75 12.066 10.188 11.858 11.301
2 14.891 12.367 14.413 13.731
2.25 18.324 15.037 17.543 16.708
2.5 22.501 18.306 21.373 20.350
2.75 27.588 22.306 26.057 24.807
3 33.790 27.198 31.784 30.255
3.25 41.354 33.178 38.783 36.915
3.5 50.583 40.487 47.337 45.054
3.75 61.846 49.419 57.788 54.999
4 75.596 60.332 70.557 67.149

You might also like