qc25c Subroutine

public subroutine qc25c(f, a, b, c, result, abserr, krul, neval)

QC25C returns integration rules for Cauchy Principal Value integrals.

Discussion:

This routine estimates I = integral of F(X) * W(X) over (a,b) with error estimate, where w(x) = 1/(x-c)

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.

Input, real C, the parameter in the weight function.

Output, real RESULT, the estimated value of the integral. RESULT is computed by using a generalized Clenshaw-Curtis method if C lies within ten percent of the integration interval. In the other case the 15-point Kronrod rule obtained by optimal addition of abscissae to the 7-point Gauss rule, is applied.

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

      krul   - integer
               key which is decreased by 1 if the 15-point
               Gauss-Kronrod scheme has been used

Output, integer NEVAL, the number of times the integral was evaluated.

Local parameters:

      fval   - value of the function f at the points
               cos(k*pi/24),  k = 0, ..., 24
      cheb12 - Chebyshev series expansion coefficients, for the
               function f, of degree 12
      cheb24 - Chebyshev series expansion coefficients, for the
               function f, of degree 24
      res12  - approximation to the integral corresponding to the
               use of cheb12
      res24  - approximation to the integral corresponding to the
               use of cheb24
      qwgtc  - external function subprogram defining the weight
               function
      hlgth  - half-length of the interval
      centr  - mid point of the interval

Arguments

Type IntentOptional Attributes Name
procedure(scalar_func) :: f
real :: a
real :: b
real :: c
real :: result
real :: abserr
integer :: krul
integer :: neval

Contents