0% found this document useful (0 votes)
38 views

Solution To Differential Equations

Copyright
© © All Rights Reserved
Available Formats
Download as XLSX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
38 views

Solution To Differential Equations

Copyright
© © All Rights Reserved
Available Formats
Download as XLSX, PDF, TXT or read online on Scribd
You are on page 1/ 5

h= 0.

1
Euler's Method
x y
0 1.0000
0.1 0.8800
0.2 0.7753
0.3 0.6853
0.4 0.6093
0.5 0.5459
0.6 0.4940
0.7 0.4525
0.8 0.4204
0.9 0.3969
1 0.3814
1.1 0.3738
1.2 0.3741
1.3 0.3831
1.4 0.4019
1.5 0.4324
1.6 0.4778
1.7 0.5428
1.8 0.6346
1.9 0.7640
2 0.9481

%error 27.382
uler's Method Midpoint Method Heun's Method
y' Exact Value x y k1 x + h/2 y @ h/2 k2 y k1
-1.2000 1.0000 0 1.0000 -1.2000 0.0500 0.9400 -1.1256 1.0000 -1.2000
-1.0472 0.8872 0.1 0.8874 -1.0560 0.1500 0.8346 -0.9828 0.8876 -1.0563
-0.8993 0.7887 0.2 0.7892 -0.9154 0.2500 0.7434 -0.8456 0.7895 -0.9158
-0.7607 0.7040 0.3 0.7046 -0.7821 0.3500 0.6655 -0.7171 0.7049 -0.7825
-0.6336 0.6321 0.4 0.6329 -0.6582 0.4500 0.6000 -0.5985 0.6332 -0.6586
-0.5186 0.5722 0.5 0.5730 -0.5444 0.5500 0.5458 -0.4899 0.5734 -0.5447
-0.4150 0.5231 0.6 0.5241 -0.4402 0.6500 0.5020 -0.3903 0.5243 -0.4404
-0.3213 0.4840 0.7 0.4850 -0.3444 0.7500 0.4678 -0.2982 0.4853 -0.3445
-0.2354 0.4541 0.8 0.4552 -0.2549 0.8500 0.4425 -0.2113 0.4554 -0.2550
-0.1548 0.4330 0.9 0.4341 -0.1693 0.9500 0.4256 -0.1266 0.4343 -0.1694
-0.0763 0.4204 1 0.4214 -0.0843 1.0500 0.4172 -0.0407 0.4216 -0.0843
0.0037 0.4163 1.1 0.4173 0.0042 1.1500 0.4176 0.0511 0.4176 0.0042
0.0898 0.4215 1.2 0.4225 0.1014 1.2500 0.4275 0.1550 0.4228 0.1015
0.1877 0.4371 1.3 0.4380 0.2146 1.3500 0.4487 0.2793 0.4385 0.2149
0.3054 0.4652 1.4 0.4659 0.3541 1.4500 0.4836 0.4364 0.4668 0.3547
0.4541 0.5092 1.5 0.5095 0.5350 1.5500 0.5363 0.6449 0.5109 0.5364
0.6499 0.5743 1.6 0.5740 0.7807 1.6500 0.6130 0.9334 0.5761 0.7834
0.9174 0.6688 1.7 0.6674 1.1278 1.7500 0.7237 1.3480 0.6705 1.1332
1.2945 0.8057 1.8 0.8022 1.6364 1.8500 0.8840 1.9646 0.8071 1.6466
1.8413 1.0064 1.9 0.9986 2.4067 1.9500 1.1189 2.9121 1.0066 2.4258
2.6548 1.3056 2 1.2898 3.6115 2.0500 1.4704 4.4149 1.3028 3.6477

%error 1.2091 %error 0.2186


Heun's Method Runge Kutta (4th Order)
y2 k2 ave. slope y k1 x + h/2 Yi + h/2*k1 k2 x + h/2 Yi + h/2*k2
0.8800 -1.0472 -1.1236 1.0000 -1.2000 0.0500 0.9400 -1.1256 0.0500 0.9437
0.7820 -0.9071 -0.9817 0.8872 -1.0558 0.1500 0.8344 -0.9825 0.1500 0.8381
0.6979 -0.7747 -0.8452 0.7887 -0.9149 0.2500 0.7430 -0.8451 0.2500 0.7465
0.6267 -0.6518 -0.7171 0.7040 -0.7814 0.3500 0.6649 -0.7164 0.3500 0.6682
0.5674 -0.5390 -0.5988 0.6321 -0.6574 0.4500 0.5993 -0.5978 0.4500 0.6022
0.5189 -0.4359 -0.4903 0.5722 -0.5436 0.5500 0.5450 -0.4891 0.5500 0.5477
0.4803 -0.3410 -0.3907 0.5231 -0.4394 0.6500 0.5011 -0.3896 0.6500 0.5036
0.4508 -0.2524 -0.2985 0.4840 -0.3436 0.7500 0.4668 -0.2976 0.7500 0.4691
0.4299 -0.1677 -0.2113 0.4541 -0.2543 0.8500 0.4414 -0.2108 0.8500 0.4436
0.4173 -0.0835 -0.1264 0.4330 -0.1689 0.9500 0.4246 -0.1263 0.9500 0.4267
0.4132 0.0041 -0.0401 0.4204 -0.0841 1.0500 0.4161 -0.0406 1.0500 0.4183
0.4180 0.1003 0.0523 0.4163 0.0042 1.1500 0.4165 0.0510 1.1500 0.4189
0.4330 0.2122 0.1568 0.4215 0.1012 1.2500 0.4265 0.1546 1.2500 0.4292
0.4600 0.3496 0.2822 0.4371 0.2142 1.3500 0.4478 0.2787 1.3500 0.4510
0.5022 0.5273 0.4410 0.4652 0.3535 1.4500 0.4829 0.4358 1.4500 0.4870
0.5645 0.7677 0.6521 0.5092 0.5346 1.5500 0.5359 0.6444 1.5500 0.5414
0.6544 1.1059 0.9447 0.5743 0.7810 1.6500 0.6133 0.9338 1.6500 0.6210
0.7839 1.5991 1.3661 0.6688 1.1302 1.7500 0.7253 1.3508 1.7500 0.7363
0.9718 2.3420 1.9943 0.8057 1.6437 1.8500 0.8879 1.9734 1.8500 0.9044
1.2492 3.4977 2.9617 1.0063 2.4253 1.9500 1.1276 2.9346 1.9500 1.1531
1.6675 -2.0010 0.8233 1.3056 3.6556 2.0500 1.4884 4.4688 2.0500 1.5290
Order)
k3 Yi + h*k3 k4 slope
-1.1301 0.8870 -1.0555 -1.1278
-0.9869 0.7885 -0.9147 -0.9849
-0.8491 0.7038 -0.7812 -0.8474 1.4000
-0.7199 0.6320 -0.6573 -0.7186
-0.6007 0.5721 -0.5435 -0.5996 1.2000
-0.4916 0.5230 -0.4393 -0.4907
-0.3916 0.4839 -0.3436 -0.3909 1.0000
-0.2991 0.4541 -0.2543 -0.2985
Eu
-0.2118 0.4330 -0.1689 -0.2114 0.8000
Ex
-0.1269 0.4203 -0.0841 -0.1266 M
-0.0408 0.4163 0.0042 -0.0404 0.6000 H
0.0513 0.4214 0.1011 0.0517 R
0.1556 0.4370 0.2141 0.1560 0.4000
0.2808 0.4651 0.3535 0.2811
0.4395 0.5091 0.5346 0.4398 0.2000
0.6510 0.5743 0.7810 0.6511
0.9454 0.6688 1.1303 0.9449 0.0000
0 0.5 1 1.5 2 2.5
1.3714 0.8059 1.6440 1.3698
2.0100 1.0067 2.4262 2.0061
3.0009 1.3064 3.6580 2.9924
4.5909 1.7647 -2.1176 3.2762
Euler's
Exact
Midpoint
Heun's
Runge Kutta 4th

5 2 2.5

You might also like