The SDL Component Suite is an industry leading collection of components supporting scientific and engineering computing. Please visit the SDL Web site for more information....


Unit: SDL_vector
Class: TVector
Declaration: function Integrate (BoundLow,BoundHigh: double; Method: TIntegMethod): double;

The method Integrate calculates the definite integral of a signal represented by an equidistant series of values which are stored in the vector. The parameters BoundLow and BoundHigh specify the boundaries of the integration and may be fractional within a valid range of 1.0 and TVector.NrOfElem. The integration method has to specified by the parameter Method and provides the following approximations:

imSimple calculates the sum of the reference points within the boundaries
imTrapezoidal uses the linear trapezoidal method to estimate the integral
imSimpson uses a parabolic interpolation to estimate the integral

Please note that all parts of the signal outside the array of reference points (which are, by definition, all vector elements between the boundaries) are linearly interpolated (irrespective of the type of integration).

Hint 1: The method imSimple is only implemented for reference purposes and should not used with fractional boundaries (in fact, it never should be used, anyway). Best results are obtained by Simpson's rule (Method = imSimpson).

Hint 2: The integration according to Simpson defaults to the trapezoidal scheme if less than 3 reference points fall within the boundaries.

For mathematical details on Simpson's rule please see the following literature:

  • Press et al., Numerical Recipes in Fortran 77, 1997, p. 126-128
  • G. Boole, A Treatise on the Calculus of Finite Differences, 1860, p. 38

Last Update: 2020-Jul-17