qk15i Subroutine

public subroutine qk15i(f, boun, inf, a, b, result, abserr, resabs, resasc)

QK15I applies a 15 point Gauss-Kronrod quadrature on an infinite interval.

Discussion:

The original infinite integration range is mapped onto the interval (0,1) and (a,b) is a part of (0,1). The routine then computes:

i = integral of transformed integrand over (a,b), j = integral of abs(transformed integrand) over (a,b).

Author:

Robert Piessens, Elise de Doncker-Kapenger, Christian Ueberhuber, David Kahaner

Reference:

Robert Piessens, Elise de Doncker-Kapenger, Christian Ueberhuber, David Kahaner, QUADPACK, a Subroutine Package for Automatic Integration, Springer Verlag, 1983

Parameters:

Input, external real F, the name of the function routine, of the form function f ( x ) real f real x which evaluates the integrand function.

Input, real BOUN, the finite bound of the original integration range, or zero if INF is 2.

Input, integer INF, indicates the type of the interval. -1: the original interval is (-infinity,BOUN), +1, the original interval is (BOUN,+infinity), +2, the original interval is (-infinity,+infinity) and the integral is computed as the sum of two integrals, one over (-infinity,0) and one over (0,+infinity).

Input, real A, B, the limits of integration, over a subrange of [0,1].

Output, real RESULT, the estimated value of the integral. RESULT is computed by applying the 15-point Kronrod rule (RESK) obtained by optimal addition of abscissae to the 7-point Gauss rule (RESG).

Output, real ABSERR, an estimate of | I - RESULT |.

Output, real RESABS, approximation to the integral of the absolute value of F.

Output, real RESASC, approximation to the integral of the transformated integrand | F-I/(B-A) | over [A,B].

Local Parameters:

      centr  - mid point of the interval
      hlgth  - half-length of the interval
      absc*  - abscissa
      tabsc* - transformed abscissa
      fval*  - function value
      resg   - result of the 7-point Gauss formula
      resk   - result of the 15-point Kronrod formula
      reskh  - approximation to the mean value of the transformed
               integrand over (a,b), i.e. to i/(b-a)

Arguments

Type IntentOptional Attributes Name
procedure(scalar_func) :: f
real :: boun
integer :: inf
real :: a
real :: b
real :: result
real :: abserr
real :: resabs
real :: resasc

Contents