|
The value of an integral

is calculated using the Simpson method. An interval [a,b] is divided into n=2m parts x0 =a, x1 =a+h, ..., xn =b with step h=(b-a)/n. The values yi = F(xi ) in points xi are calculated and then the integral value is calculated using the Simpson formula:
S = Sn +Rn ,
where


The number of points of the division is doubled and an accuracy estimation is performed:
Rn = |S2n -Sn |/15
If Rn > e, the number of points of the division is doubled. The value of the sum 2(y1 +y2 +...+y2m-1 ) isn't changed, therefore it is required to calculate the values yi only in the new points.
Report a bug
C#
C# 1.0 source.
simpsonq.csharp.zip - Simpson's method
C++
C++ source.
simpsonq.cpp.zip - Simpson's method
ablas.zip - optimized basic linear algebra subroutines with SSE2 support (for C++ sources only)
Delphi
Delphi source.
Can be compiled under FPC (in Delphi compatibility mode).
simpsonq.delphi.zip - Simpson's method
Visual Basic 6
Visual Basic 6 source.
simpsonq.vb6.zip - Simpson's method
Zonnon beta
Zonnon source.
Zonnon is an experimental language developed at ETH Zurich.
See www.zonnon.ethz.ch for more information.
simpsonq.zonnon.zip - Simpson's method
|