qaws Subroutine

public subroutine qaws(f, a, b, alfa, beta, integr, epsabs, epsrel, result, abserr, neval, ier)

QAWS estimates integrals with algebraico-logarithmic endpoint singularities.

Discussion:

This routine calculates an approximation RESULT to a given definite integral
I = integral of fw over (a,b) where w shows a singular behavior at the end points, see parameter integr, hopefully satisfying following claim for accuracy abs(i-result) <= max(epsabs,epsrelabs(i)).

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 ALFA, BETA, parameters used in the weight function. ALFA and BETA should be greater than -1.

Input, integer INTEGR, indicates which weight function is to be used = 1 (x-a)alfa*(b-x)beta = 2 (x-a)alfa*(b-x)betalog(x-a) = 3 (x-a)alfa(b-x)beta*log(b-x) = 4 (x-a)alfa(b-x)betalog(x-a)*log(b-x)

Input, real EPSABS, EPSREL, the absolute and relative accuracy requested.

Output, real RESULT, the estimated value of the integral.

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

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

       ier    - integer
                ier = 0 normal and reliable termination of the
                        routine. it is assumed that the requested
                        accuracy has been achieved.
                ier > 0 abnormal termination of the routine
                        the estimates for the integral and error
                        are less reliable. it is assumed that the
                        requested accuracy has not been achieved.
                ier = 1 maximum number of subdivisions allowed
                        has been achieved. one can allow more
                        subdivisions by increasing the data value
                        of limit in qaws (and taking the according
                        dimension adjustments into account).
                        however, if this yields no improvement it
                        is advised to analyze the integrand, in
                        order to determine the integration
                        difficulties which prevent the requested
                        tolerance from being achieved. in case of
                        a jump discontinuity or a local
                        singularity of algebraico-logarithmic type
                        at one or more interior points of the
                        integration range, one should proceed by
                        splitting up the interval at these points
                        and calling the integrator on the
                        subranges.
                    = 2 the occurrence of roundoff error is
                        detected, which prevents the requested
                        tolerance from being achieved.
                    = 3 extremely bad integrand behavior occurs
                        at some points of the integration
                        interval.
                    = 6 the input is invalid, because
                        b <= a or alfa <= (-1) or beta <= (-1) or
                        integr < 1 or integr > 4 or
                        epsabs < 0 and epsrel < 0,
                        result, abserr, neval are set to zero.

Local parameters:

LIMIT is the maximum number of subintervals allowed in the subdivision process of qawse. take care that limit >= 2.

Arguments

Type IntentOptional Attributes Name
procedure(scalar_func) :: f
real :: a
real :: b
real :: alfa
real :: beta
integer :: integr
real :: epsabs
real :: epsrel
real :: result
real :: abserr
integer :: neval
integer :: ier

Contents