d01bd calculates an approximation to the integral of a function over a finite interval :
It is non-adaptive and as such is recommended for the integration of ‘smooth’ functions. These exclude integrands with singularities, derivative singularities or high peaks on , or which oscillate too strongly on .
Syntax
C# |
---|
public static void d01bd( D01..::..D01BD_F f, double a, double b, double epsabs, double epsrel, out double result, out double abserr, out int ifail ) |
Visual Basic |
---|
Public Shared Sub d01bd ( _ f As D01..::..D01BD_F, _ a As Double, _ b As Double, _ epsabs As Double, _ epsrel As Double, _ <OutAttribute> ByRef result As Double, _ <OutAttribute> ByRef abserr As Double, _ <OutAttribute> ByRef ifail As Integer _ ) |
Visual C++ |
---|
public: static void d01bd( D01..::..D01BD_F^ f, double a, double b, double epsabs, double epsrel, [OutAttribute] double% result, [OutAttribute] double% abserr, [OutAttribute] int% ifail ) |
F# |
---|
static member d01bd : f : D01..::..D01BD_F * a : float * b : float * epsabs : float * epsrel : float * result : float byref * abserr : float byref * ifail : int byref -> unit |
Parameters
- f
- Type: NagLibrary..::..D01..::..D01BD_Ff must return the value of the integrand at a given point.
A delegate of type D01BD_F.
- a
- Type: System..::..DoubleOn entry: , the lower limit of integration.
- b
- Type: System..::..DoubleOn entry: , the upper limit of integration. It is not necessary that .
- epsabs
- Type: System..::..DoubleOn entry: the absolute accuracy required. If epsabs is negative, the absolute value is used. See [Accuracy].
- epsrel
- Type: System..::..DoubleOn entry: the relative accuracy required. If epsrel is negative, the absolute value is used. See [Accuracy].
- result
- Type: System..::..Double%On exit: the approximation to the integral .
- abserr
- Type: System..::..Double%On exit: an estimate of the modulus of the absolute error, which should be an upper bound for .
- ifail
- Type: System..::..Int32%On exit: unless the method detects an error (see [Error Indicators and Warnings]).
Description
d01bd is based on the QUADPACK routine QNG (see Piessens et al. (1983)). It is a non-adaptive method which uses as its basic rules, the Gauss -point and -point formulae. If the accuracy criterion is not met, formulae using and points are used successively, stopping whenever the accuracy criterion is satisfied.
This method is designed for smooth integrands only.
References
Patterson T N L (1968) The Optimum addition of points to quadrature formulae Math. Comput. 22 847–856
Piessens R, de Doncker–Kapenga E, Überhuber C and Kahaner D (1983) QUADPACK, A Subroutine Package for Automatic Integration Springer–Verlag
Error Indicators and Warnings
Accuracy
d01bd attempts to compute an approximation, result, such that:
where
and epsabs and epsrel are user-specified absolute and relative error tolerances. There can be no guarantee that this is achieved, and you are advised to subdivide the interval if you have any doubts about the accuracy obtained. Note that abserr contains an estimated bound on .
Parallelism and Performance
None.
Further Comments
The time taken by d01bd depends on the integrand and the accuracy required.