Click or drag to resize
Quadrature Class
Quadrature is a general-purpose integrator that uses a globally adaptive scheme in order to reduce the absolute error.
Inheritance Hierarchy
SystemObject
  Imsl.MathQuadrature

Namespace: Imsl.Math
Assembly: ImslCS (in ImslCS.dll) Version: 6.5.2.0
Syntax
[SerializableAttribute]
public class Quadrature

The Quadrature type exposes the following members.

Constructors
  NameDescription
Public methodQuadrature
Constructs a Quadrature object.
Top
Methods
  NameDescription
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Public methodEval
Returns the value of the integral from a to b.
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Properties
  NameDescription
Public propertyAbsoluteError
The absolute error tolerance.
Public propertyErrorEstimate
Returns an estimate of the relative error in the computed result.
Public propertyErrorStatus
Returns the non-fatal error status.
Public propertyExtrapolation
If true, the epsilon-algorithm for extrapolation is enabled.
Public propertyMaxSubintervals
The maximum number of subintervals allowed.
Public propertyNumberOfProcessors
Perform the parallel calculations with the maximum possible number of processors set to NumberOfProcessors.
Public propertyParallel
Enable or disable performing Quadrature.IFunction.F in parallel.
Public propertyRelativeError
The relative error tolerance.
Public propertyRule
The Gauss-Kronrod rule.
Top
Remarks

Quadrature subdivides the interval [A, B] and uses a (2k+1)-point Gauss-Kronrod rule to estimate the integral over each subinterval. The error for each subinterval is estimated by comparison with the k-point Gauss quadrature rule. The subinterval with the largest estimated error is then bisected and the same procedure is applied to both halves. The bisection process is continued until either the error criterion is satisfied, roundoff error is detected, the subintervals become too small, or the maximum number of subintervals allowed is reached. The Class Quadrature is based on the subroutine QAG by Piessens et al. (1983).

If the function to be integrated has endpoint singularities then extrapolation should be enabled. As described above, the integral's value is approximated by applying a quadrature rule to a series of subdivisions of the interval. The sequence of approximate values converges to the integral's value. The \epsilon-algorithm can be used to extrapolate from the initial terms of the sequence to its limit. Without extrapolation, the quadrature approximation sequence converges slowly if the function being integrated has endpoint singularities. The \epsilon-algorithm accelerates convergence of the sequence in this case. The class EpsilonAlgorithm implements the \epsilon-algorithm. With extrapolation, this class is similar to the subroutine QAGS by Piessens et al. (1983).

The desired absolute error, \epsilon, can be set using AbsoluteError property. The desired relative error, \rho, can be set using RelativeError property. The method Eval computes the approximate integral value R \approx \int_a^b f(x) dx. It also computes an error estimate E, which can be retrieved using ErrorEstimate property. These are related by the following equation:


                 \left| \int_a^b f(x) dx -R \right| \le E \le \max\left\{\epsilon,\rho \left| \int_a^b f(x) dx \right|  \right\}

See Also