0% found this document useful (0 votes)
32 views10 pages

Methods Comparison: Analytical Heun's vs. Analytical Euler vs. Analytical Euler vs. Analytical

The document compares the accuracy of various numerical integration methods including analytical, Euler, Heun's, and midpoint methods. It provides the calculated values of y at different time steps (t) using each method and the percent error compared to the analytical solution. Graphs are also shown comparing the accuracy of some of the methods over time.

Uploaded by

Kurt Bidua
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as XLSX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
32 views10 pages

Methods Comparison: Analytical Heun's vs. Analytical Euler vs. Analytical Euler vs. Analytical

The document compares the accuracy of various numerical integration methods including analytical, Euler, Heun's, and midpoint methods. It provides the calculated values of y at different time steps (t) using each method and the percent error compared to the analytical solution. Graphs are also shown comparing the accuracy of some of the methods over time.

Uploaded by

Kurt Bidua
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as XLSX, PDF, TXT or read online on Scribd
You are on page 1/ 10

Methods Comparison

t = y (analytical) y(euler) y(heun's) y(midpoint)


0.5 1.570000 0.999203 1 1 1
0.6 1.884000 1.183929 1.314499795 1.1882163376
0.7 2.198000 1.040310 1.317514799 1.0268645951
0.8 2.512000 0.626933 0.884451942 0.5891591592
0.9 2.826000 0.187914 0.1861063 0.1676238098
3.140000 0.000005 -0.162461746 0.1252191223

Analytical Euler
Eulervs.
vs.Analytical
Analytical Heun's vs.
1.400000 1.500000
1.500000 1.400000
1.200000 1.200000
1.000000 1.000000
1.000000 1.000000
0.800000 0.800000
0.600000 0.500000
0.500000 0.600000
0.400000 0.400000
0.200000 0.000000
0.000000 0.200000
0.000000 1.000000
1.000000 2.000000
2.000000 3.000000
3.000000 4.000000
4.000000 0.000000
1.000000 2.000000 3.000000 4.000000 -0.500000
-0.500000 1.000000 2.000000

Midpoint vs. Analytical RK-Heun's vs. Analytical


1.400000 1.400000
1.200000 1.200000
1.000000 1.000000
0.800000 0.800000
0.600000 0.600000
0.400000 0.400000
0.200000 0.200000
0.000000 0.000000
1.000000 2.000000 3.000000 4.000000 1.000000 2.000000 3.000000 4.000000

RK-Heun's vs. RK-Midpoint RK-Heun's vs. RK-Ralston's RK-Midpoin


1.4 1.5 1.5
1.2 1 1
1
0.5 0.5
0.8
0.6 0 0
0.4 1.0000001.5000002.0000002.5000003.0000003.500000 1.000000 2.00000
-0.5 -0.5
0.2
0 -1 -1
1.0000001.5000002.0000002.5000003.0000003.500000

Euler vs. Analytical


1.400000
1.200000
1.000000
0.800000
0.600000
0.400000
0.200000
0.000000
1.000000 2.000000 3.000000 4.000000
1.400000
1.200000
1.000000
0.800000
0.600000
0.400000
0.200000
0.000000
1.000000 2.000000 3.000000 4.000000
y(RK-Heun's) y(RK-Midpoint) y(RK-Ralston's) y(C4ORK)
1 1 1 1
1.1587573997 1.1882163376 0.9399896958 1.184547
0.9878089415 1.0268645951 0.5984476795 1.040457
0.5745686018 0.5891591592 0.2227488586 0.626297
0.2257895192 0.1676238098 0.1001295504 0.192693
- 0.1252191223 -0.4284819831 -

Heun's vs. Analytical Euler vs. Heun's


1.400000 1.5
1.200000
1.000000 1
0.800000
0.600000 0.5
0.400000
0.200000 0
1.0000001.5000002.0000002.5000003.0000003.500000
0.000000
1.000000 2.000000 3.000000 4.000000 -0.5

RK-Midpoint vs. Analytical RK-Ralston's vs. Analytical


1.400000 1.500000
1.200000 1.000000
1.000000
0.800000 0.500000
0.600000
0.000000
0.400000 1.000000 2.000000 3.000000 4.000000
0.200000 -0.500000
0.000000
1.000000 2.000000 3.000000 4.000000 -1.000000

RK-Midpoint vs. RK-Ralston RK-Heun's vs. RK-Ralston


1.5
1.5
1
1
0.5
0.5
0
1.000000 2.000000 3.000000 4.000000 0
-0.5 1.000000 2.000000 3.000000 4.000000
-0.5
-1
-1
Analytical Method
t = y (analytical)
0.5 1.570000 0.999203
0.6 1.884000 1.183929
0.7 2.198000 1.040310
0.8 2.512000 0.626933
0.9 2.826000 0.187914
3.140000 0.000005
Euler Method
t = y (analytical) y(Euler)
1 0.5 1.570000 0.999203 1
2 0.6 1.884000 1.183929 1.314500
3 0.7 2.198000 1.040310 1.317515
4 0.8 2.512000 0.626933 0.884452
5 0.9 2.826000 0.187914 0.186106
6 3.140000 0.000005 -0.162462
%error
0.0796960342
9.933146469
21.0399516168
29.116202106
0.9711154409
100.0031226326
Heun's Method
t = yi f(ti, yi)
1 0.5 1.570000 1.000000
2 0.6 1.884000
3 0.7 2.198000
4 0.8 2.512000
5 0.9 2.826000
6 3.140000

0
Midpoint Method

t = y(i+1/2) y'(i+1/2) yi
0.5 1.570000 1
1.727 1.1572498973 0.5994150879
0.6 1.884000 1.1882163376
2.041 1.202566003 -0.5138590527
0.7 2.198000 1.0268645951
2.355 0.8764851338 -1.3939663563
0.8 2.512000 0.5891591592
2.669 0.3672657849 -1.3424692655
0.9 2.826000 0.1676238098
2.983 0.0111143977 -0.1350467754
3.140000 0.1252191223
Heun's Method (w/out Iteration) (a2 = 1/2) a1 = 1/2
p1=q1=1

t = yi K1 K2
0.5 1.570000 1 1.0015917027 0.0096019259
0.6 1.884000 1.1587573997 0.1104804949 -1.199324178
0.7 2.198000 0.9878089415 -0.9012127205 -1.7308913536
0.8 2.512000 0.5745686018 -1.3732766626 -0.8482461568
0.9 2.826000 0.2257895192 -1.3531679886 250.029337402
3.140000 39.267948117 -49311.306824 -95636.259402

Midpoint Method (a2=1) a1 = 0


p1=q1=1/2

t = yi K1 K2
0.5 1.570000 1 1.0015917027 0.5994150879
0.6 1.884000 1.1882163376 0.0913991426 -0.5138590527
0.7 2.198000 1.0268645951 -0.9578309638 -1.3939663563
0.8 2.512000 0.5891591592 -1.4133335938 -1.3424692655
0.9 2.826000 0.1676238098 -0.9968752364 -0.1350467754
3.140000 0.1252191223 -157.24576549 -313.55784381

Ralston's Method (a2=2/3) a1 = 1/3


p1=q1=3/2

t = yi K1 K2
0.5 1.570000 1 1.0015917027 -0.7874692793
0.6 1.884000 0.9399896958 0.2521822641 -1.7576612736
0.7 2.198000 0.5984476795 -0.3367630539 -1.6263580631
0.8 2.512000 0.2227488586 -0.4073903747 -0.3820658392
0.9 2.826000 0.1001295504 -0.5834406597 -2.2334940023
3.140000 -0.4284819831 538.07258978 997.51571372
Classical Fourth-order Runge Kutta

t = yi K1 K2 K3
0.5 1.570000 1 1.0015917027 0.5994150879 0.6193030441
0.6 1.884000 1.184547 0.0937756559 -0.5105089627 -0.4140761626
0.7 2.198000 1.040457 -0.977534907 -1.414913048 -1.2779040151
0.8 2.512000 0.626297 -1.515292706 -1.4251345709 -1.4805099449
0.9 2.826000 0.192693 -1.150434141 -0.1470533267 -2.11697874
3.140000 30.91712 -38824.63251 -77417.8219039 -154766.4574332
K4
0.0873542046
-0.9979332365
-1.5507010815
-0.9588566958
592.7694908504
-300731.719831538

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy