Vous êtes sur la page 1sur 102

Runge Kutta Method 3rd order

Find the solution of 𝑑𝑦/𝑑𝑥=4𝑒^0.8𝑥−0.5𝑦 from 𝑥=0 to 𝑥=4 given that 𝑦(0)=2 compare the
reslt at 𝑥=4 based on the exact answer 𝑦(4)=75.33896.

Initial Conditions boundary(x1) boundary (x2) x(y1) y(x1)


0 4 0 2

Adjustable value h note: choose a value of (h) that will result in a whole numbe
0.2

Acquired Values n calculated y(4) acquired (y4) accuracy(%)


20 75.33896 75.3359593426 0.003982876

Program iterations x y k1
0 0 2 3
1 0.2 2.6363335638 3.3758767021
2 0.4 3.3555450767 3.830738519
3 0.6 4.1746349727 4.3769801224
4 0.8 5.1133040893 5.0292714725
5 1 6.1944459474 5.8049407403
6 1.2 7.4447221884 6.7244247995
7 1.4 8.8952358133 7.8117989065
8 1.6 10.582319386 9.0953992093
9 1.8 12.5484583263 10.6085541048
10 2 14.8433728902 12.3904432525
11 2.2 17.5252865156 14.4871063198
12 2.4 20.6624130009 16.9526273767
13 2.6 24.3347006033 19.8505253556
14 2.8 28.6358777427 23.2553862784
15 3 33.6758527396 27.2547791528
16 3.2 39.5835291018 31.9515047113
17 3.4 46.5101085438 37.4662347079
18 3.6 54.6329664344 43.9406095012
19 3.8 64.160199062 51.5408734094
20 4 75.3359593426 60.4621411171
od 3rd order
hat 𝑦(0)=2 compare the accuracy of the accuracy of the

will result in a whole number for (n) for more accurate results

k2 k3 Æ
3.1831482707 3.3574138298 3.1816678188
3.5980359843 3.8083247488 3.5960575647
4.0979893263 4.3500010571 4.0954494802
4.6965235087 4.9969993414 4.6933455831
5.4096172243 5.7665153717 5.4057092902
6.256128815 6.678831231 6.2513812052
7.2582857232 7.7578410543 7.2525681244
8.442259839 9.0316689185 8.4354178635
9.8388435537 10.5333947852 9.8306947015
11.4842439122 12.3019071625 11.4745728193
13.4210152768 14.3829044024 13.409568127
15.6991544703 16.8300703573 15.6856324264
18.3773865265 19.7064545891 18.3614380119
21.5246740644 23.0860925708 21.5058856974
25.221989039 27.0559074712 25.1998749843
29.564392344 31.7179423389 29.5383818113
34.6634746445 37.1919799711 34.63289721
40.6502210771 43.6186177019 40.614289453
47.6783733297 51.1628760073 47.6361631379
55.9283753712 60.0184335241 55.8788014031
65.6120040723 70.4125971429 65.5537924249

Vous aimerez peut-être aussi