Comparison of different numerical integration techniques
  number of          
  subintervals Left sum Rite sum Trap sum Mid sum Simpson
  n          
  1 1.000000000000000 0.367879441171442 0.683939720585721 0.778800783071405 0.747180428909510
  2 0.889400391535702 0.573340112121424 0.731370251828563 0.754597943772199 0.746855379790987
  4 0.821999167653951 0.663969027946812 0.742984097800381 0.748747131891009 0.746826120527467
  8 0.785373149772480 0.706358079918910 0.745865614845695 0.747303578730748 0.746824257435730
  16 0.766338364251614 0.726830829324829 0.746584596788222 0.746943912516367 0.746824140606985
  32 0.756641138383991 0.736887370920598 0.746764254652294 0.746854072623361 0.746824133299672
  64 0.751747605503676 0.741870721771980 0.746809163637828 0.746831617445408 0.746824132842881
  128 0.749289611474542 0.744351169608694 0.746820390541618 0.746826003950687 0.746824132814330
  256 0.748057807712614 0.745588586779690 0.746823197246152 0.746824600595743 0.746824132812546
  512 0.747441204154178 0.746206593687716 0.746823898920947 0.746824249758177 0.746824132812434
  1,024 0.747132726956178 0.746515421722947 0.746824074339562 0.746824162048860 0.746824132812427
  2,048 0.746978444502519 0.746669791885903 0.746824118194211 0.746824140121534 0.746824132812426
  4,096 0.746901292312026 0.746746966003718 0.746824129157872 0.746824134639701 0.746824132812425
  8,192 0.746862713475864 0.746785550321710 0.746824131898787 0.746824133269247 0.746824132812427
  16,384 0.746843423372555 0.746804841795478 0.746824132584017 0.746824132926631 0.746824132812426
  32,768 0.746833778149593 0.746814487361054 0.746824132755324 0.746824132840976 0.746824132812425
  65,536 0.746828955495285 0.746819310101015 0.746824132798150 0.746824132819563 0.746824132812425
  131,072 0.746826544157424 0.746821721460289 0.746824132808856 0.746824132814204 0.746824132812421
  262,144 0.746825338485814 0.746822927137246 0.746824132811530 0.746824132812877 0.746824132812428
  524,288 0.746824735649345 0.746823529975062 0.746824132812203 0.746824132812558 0.746824132812439
  1,048,576 0.746824434230951 0.746823831393810 0.746824132812381 0.746824132812476 0.746824132812444
             
  Data generated with MATLAB 5.2 by Matt Kawski, int(exp(-x^2),x=0..1)          
             
    Best estimate of the errors -- using as comparison the values of Simpson's for n between 1000 and 65000        
             
  1 0.253175867187575 -0.378944691640983 -0.062884412226704 0.031976650258980 0.000356296097085
  2 0.142576258723277 -0.173484020691001 -0.015453880983862 0.007773810959774 0.000031246978562
  4 0.075175034841526 -0.082855104865613 -0.003840035012044 0.001922999078584 0.000001987715042
  8 0.038549016960055 -0.040466052893515 -0.000958517966730 0.000479445918323 0.000000124623305
  16 0.019514231439189 -0.019993303487596 -0.000239536024203 0.000119779703942 0.000000007794560
  32 0.009817005571566 -0.009936761891827 -0.000059878160131 0.000029939810936 0.000000000487247
  64 0.004923472691251 -0.004953411040445 -0.000014969174597 0.000007484632983 0.000000000030456
  128 0.002465478662117 -0.002472963203731 -0.000003742270807 0.000001871138262 0.000000000001905
  256 0.001233674900189 -0.001235546032735 -0.000000935566273 0.000000467783318 0.000000000000121
  512 0.000617071341753 -0.000617539124709 -0.000000233891478 0.000000116945752 0.000000000000009
  1,024 0.000308594143753 -0.000308711089478 -0.000000058472863 0.000000029236435 0.000000000000002
  2,048 0.000154311690094 -0.000154340926522 -0.000000014618214 0.000000007309109 0.000000000000001
  4,096 0.000077159499601 -0.000077166808707 -0.000000003654553 0.000000001827276 0.000000000000000
  8,192 0.000038580663439 -0.000038582490715 -0.000000000913638 0.000000000456822 0.000000000000002
  16,384 0.000019290560130 -0.000019291016947 -0.000000000228408 0.000000000114206 0.000000000000001
  32,768 0.000009645337168 -0.000009645451371 -0.000000000057101 0.000000000028551 0.000000000000000
  65,536 0.000004822682860 -0.000004822711410 -0.000000000014275 0.000000000007138 0.000000000000000
  131,072 0.000002411344999 -0.000002411352136 -0.000000000003569 0.000000000001779 -0.000000000000004
  262,144 0.000001205673389 -0.000001205675179 -0.000000000000895 0.000000000000452 0.000000000000003
  524,288 0.000000602836920 -0.000000602837363 -0.000000000000222 0.000000000000133 0.000000000000014
  1,048,576 0.000000301418526 -0.000000301418615 -0.000000000000044 0.000000000000051 0.000000000000019
             
    Ratios of the subsequent errors        
from n= to n=          
1 2 1.775722476 2.184320436 4.069166334 4.113381509 11.402577576
2 4 1.896590524 2.093824164 4.024411479 4.042545338 15.720049354
4 8 1.950115483 2.047521291 4.006221214 4.010877985 15.949785972
8 16 1.975430961 2.023980325 4.001560809 4.002730868 15.988497754
16 32 1.987798754 2.012054199 4.000390521 4.000683378 15.997142454
32 64 1.993918965 2.006044282 4.000097650 4.000170884 15.998406987
64 128 1.996964227 2.003026585 4.000024415 4.000042720 15.987120462
128 256 1.998483281 2.001514422 4.000006109 4.000010668 15.742201835
256 512 1.999241930 2.000757496 4.000001544 4.000002652 13.456790123
512 1,024 1.999621037 2.000378819 4.000000444 4.000000403 4.500000000
1,024 2,048 1.999810536 2.000189428 4.000000486 3.999999878 2.000000000
2,048 4,096 1.999905273 2.000094718 4.000000547 4.000002734 #DIV/0!
4,096 8,192 1.999952637 2.000047360 4.000001337 3.999973510 0.000000000
8,192 16,384 1.999976319 2.000023681 4.000026734 3.999983474 2.000000000
16,384 32,768 1.999988159 2.000011840 4.000069995 4.000062217 #DIV/0!
32,768 65,536 1.999994080 2.000005920 4.000062219 3.999891123 #DIV/0!
65,536 131,072 1.999997040 2.000002960 3.999688929 4.012294059 0.000000000
131,072 262,144 1.999998524 2.000001475 3.987966754 3.936133628 -1.333333333
262,144 524,288 1.999999252 2.000000751 4.030500000 3.398163606 0.214285714
524,288 1,048,576 1.999999562 2.000000442 5.050505051 2.610021786 0.736842105



Last Updated on 2/17/99
By Kawski
Email: kawski@asu.edu