qk51 Subroutine

public subroutine qk51(f, a, b, result, abserr, resabs, resasc)

QK51 carries out a 51 point Gauss-Kronrod quadrature rule.

Discussion:

This routine approximates I = integral ( A <= X <= B ) F(X) dx with an error estimate, and J = integral ( A <= X <= B ) | F(X) | dx

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 A, B, the limits of integration.

Output, real RESULT, the estimated value of the integral. result is computed by applying the 51-point Kronrod rule (resk) obtained by optimal addition of abscissae to the 25-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 | F-I/(B-A) | over [A,B].

Local Parameters:

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

Arguments

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

Contents