|
|
◆ qk15i_r()
| void qk15i_r |
( |
double |
bound, |
|
|
int |
inf, |
|
|
double |
a, |
|
|
double |
b, |
|
|
double * |
result, |
|
|
double * |
abserr, |
|
|
double * |
resabs, |
|
|
double * |
resasc, |
|
|
double * |
xx, |
|
|
double |
yy, |
|
|
int * |
irev |
|
) |
| |
Semi-infinite/infinite interval quadrature (15-point Gauss-Kronrod rule) (reverse communication version)
- Purpose
- The routine computes an approximation to the integral of function f(x) over a semi-infinite or infinite interval with the 15 point Gauss-Kronrod rule. The integrand f(x) is computed and provided by the user in accordance with irev.
The function f(x) is transformed to the function f01(t) so that the semi-infinite integration is obtained by computing the finite integration over [0, 1]. ∫ f(x)dx [bound, +∞] = ∫ f01(t)dt [0, 1] where f01(t) = f(bound + (1 - t)/t)/t^2
The infinite integral is computed as the sum of two semi-infinite integrals. ∫ f(x)dx [-∞, +∞] = ∫ (f(x) + f(-x)) dx [0, +∞]
This routine computes
I = integral of f01 over [a, b] with error estimate, and
J = integral of abs(f01) over [a, b],
where [a, b] is a part of [0, 1].
- Parameters
-
| [in] | bound | The finite bound of original integration range. (Not referenced if interval is doubly infinite (inf = 2)) |
| [in] | inf | The kind of original integration range.
= 1: Semi-infinite integral [bound, +∞]
= -1: Semi-infinite integral [-∞, bound]
= 2: Infinite integral [-∞, +∞]
(If other value is specified, inf = 2 is assumed) |
| [in] | a | Lower limit of transformed interval. (0 <= a <= 1) |
| [in] | b | Upper limit of transformed interval. (0 <= b <= 1) |
| [out] | result | Approximation to I = integral of f01 over [a, b]. |
| [out] | abserr | Estimate of the modulus of the absolute error, which should equal or exceed the true error. |
| [out] | resabs | Approximation to J = integral of abs(f01) over [a, b]. |
| [out] | resasc | Approximation to the integral of abs(f01 - I/(b - a)) over [a, b]. |
| [out] | xx | irev = 1 to 6: xx contains the abscissa where the function value should be evaluated and given in the next call. |
| [in] | yy | irev = 1 to 6: The function value f(xx) should be given in yy in the next call. |
| [in,out] | irev | Control variable for reverse communication.
[in] Before first call, irev should be initialized to zero. On succeeding calls, irev should not be altered.
[out] If irev is not zero, complete the following tasks and call this routine again without changing irev.
= 0: Computation finished.
= 1 to 6: User should set the function value at xx in yy. Do not alter any variables other than yy. |
- Reference
- SLATEC (QUADPACK)
|