naginterfaces.library.quad.dim1_fin_brkpts¶
- naginterfaces.library.quad.dim1_fin_brkpts(f, a, b, points, epsabs, epsrel, maxsub, data=None)[source]¶
dim1_fin_brkpts
is a general purpose integrator which calculates an approximation to the integral of a function over a finite interval :where the integrand may have local singular behaviour at a finite number of points within the integration interval.
For full information please refer to the NAG Library document for d01rl
https://support.nag.com/numeric/nl/nagdoc_30.3/flhtml/d01/d01rlf.html
- Parameters
- fcallable (fv, iflag) = f(x, iflag, data=None)
must return the values of the integrand at a set of points.
- Parameters
- xfloat, ndarray, shape
The abscissae, , for , at which function values are required.
- iflagint
.
- dataarbitrary, optional, modifiable in place
User-communication data for callback functions.
- Returns
- fvfloat, array-like, shape
must contain the values of the integrand . for all .
- iflagint
Set to force an immediate exit with = -1.
- afloat
, the lower limit of integration.
- bfloat
, the upper limit of integration. It is not necessary that .
Note: if , the function will immediately return with , , and .
- pointsfloat, array-like, shape
The user-specified break-points.
- epsabsfloat
, the absolute accuracy required. If is negative, . See Accuracy.
- epsrelfloat
, the relative accuracy required. If is negative, . See Accuracy.
- maxsubint
, the upper bound on the total number of subdivisions
dim1_fin_brkpts
may use to generate new segments. This does not include the initial segments of the interval generated from the supplied break-points. If , only the initial segments will be evaluated.Suggested value: a value in the range to is adequate for most problems.
- dataarbitrary, optional
User-communication data for callback functions.
- Returns
- resultfloat
The approximation to the integral .
- abserrfloat
An estimate of the modulus of the absolute error, which should be an upper bound for .
- rinfofloat, ndarray, shape
Details of the computation. See Further Comments for more information.
- iinfoint, ndarray, shape
Details of the computation. See Further Comments for more information.
- Raises
- NagValueError
- (errno )
On entry, .
Constraint: .
- (errno )
On entry, break-points are specified outside : and .
- (errno )
On entry, .
Constraint: .
- Warns
- NagAlgorithmicWarning
- (errno )
Exit from with .
- (errno )
The maximum number of subdivisions () has been reached: .
- (errno )
Round-off error prevents the requested tolerance from being achieved: and .
- (errno )
Extremely bad integrand behaviour occurs around the sub-interval .
- (errno )
Round-off error is detected in the extrapolation table.
- (errno )
The integral is probably divergent or slowly convergent.
- Notes
dim1_fin_brkpts
is based on the QUADPACK routine QAGP (see Piessens et al. (1983)). It is very similar todim1_fin_general()
, but allows you to supply ‘break-points’, points at which the integrand is known to be difficult. It employs an adaptive algorithm, using the Gauss -point and Kronrod -point rules. The algorithm, described in de Doncker (1978), incorporates a global acceptance criterion (as defined by Malcolm and Simpson (1976)) together with the -algorithm (see Wynn (1956)) to perform extrapolation. The user-supplied ‘break-points’ always occur as the end points of some sub-interval during the adaptive process. The local error estimation is described in Piessens et al. (1983).dim1_fin_brkpts
requires you to supply a function to evaluate the integrand at an array of points.
- References
de Doncker, E, 1978, An adaptive extrapolation algorithm for automatic integration, ACM SIGNUM Newsl. (13(2)), 12–18
Malcolm, M A and Simpson, R B, 1976, Local versus global strategies for adaptive quadrature, ACM Trans. Math. Software (1), 129–146
Piessens, R, de Doncker–Kapenga, E, Überhuber, C and Kahaner, D, 1983, QUADPACK, A Subroutine Package for Automatic Integration, Springer–Verlag
Wynn, P, 1956, On a device for computing the transformation, Math. Tables Aids Comput. (10), 91–96