QAWOE(3)

SYNOPSIS
SUBROUTINE QAWOE (F, A, B, OMEGA, INTEGR, EPSABS, EPSREL, LIMIT, + ICALL, MAXP1, RESULT, ABSERR, NEVAL, IER, LAST, ALIST, BLIST, + RLIST, ELIST, IORD, NNLOG, MOMCOM, CHEBMO)

NAME
qawoe - Calculate an approximation to a given definite integral I = Integral of F(X)*W(X) over (A,B), where W(X) = COS(OMEGA*X) or W(X) = SIN(OMEGA*X), hopefully satisfying the following claim for accuracy ABS(I-RESULT).LE.MAX(EPSABS,EPSREL*ABS(I)).

LIBRARY
SLATEC (QUADPACK)

CATEGORY
H2A2A1

TYPE
SINGLE PRECISION (QAWOE-S, DQAWOE-D)

KEYWORDS
AUTOMATIC INTEGRATOR, CLENSHAW-CURTIS METHOD, EXTRAPOLATION, GLOBALLY ADAPTIVE, INTEGRAND WITH OSCILLATORY COS OR SIN FACTOR, QUADPACK, QUADRATURE, SPECIAL-PURPOSE

AUTHOR
Piessens, Robert Applied Mathematics and Programming Division K. U. Leuven de Doncker, Elise Applied Mathematics and Programming Division K. U. Leuven

DESCRIPTION
Computation of Oscillatory integrals Standard fortran subroutine Real version PARAMETERS ON ENTRY F - Real Function subprogram defining the integrand function F(X). The actual name for F needs to be declared E X T E R N A L in the driver program. A - Real Lower limit of integration B - Real Upper limit of integration OMEGA - Real Parameter in the integrand weight function INTEGR - Integer Indicates which of the WEIGHT functions is to be used INTEGR = 1 W(X) = COS(OMEGA*X) INTEGR = 2 W(X) = SIN(OMEGA*X) If INTEGR.NE.1 and INTEGR.NE.2, the routine will end with IER = 6. EPSABS - Real Absolute accuracy requested EPSREL - Real Relative accuracy requested If EPSABS.LE.0 and EPSREL.LT.MAX(50*REL.MACH.ACC.,0.5D-28), the routine will end with IER = 6. LIMIT - Integer Gives an upper bound on the number of subdivisions in the partition of (A,B), LIMIT.GE.1. ICALL - Integer If QAWOE is to be used only once, ICALL must be set to 1. Assume that during this call, the Chebyshev moments (for CLENSHAW-CURTIS integration of degree 24) have been computed for intervals of lengths (ABS(B-A))*2**(-L), L=0,1,2,...MOMCOM-1. If ICALL.GT.1 this means that QAWOE has been called twice or more on intervals of the same length ABS(B-A). The Chebyshev moments already computed are then re-used in subsequent calls. If ICALL.LT.1, the routine will end with IER = 6. MAXP1 - Integer Gives an upper bound on the number of Chebyshev moments which can be stored, i.e. for the intervals of lengths ABS(B-A)*2**(-L), L=0,1, ..., MAXP1-2, MAXP1.GE.1. If MAXP1.LT.1, the routine will end with IER = 6. ON RETURN RESULT - Real Approximation to the integral ABSERR - Real Estimate of the modulus of the absolute error, which should equal or exceed ABS(I-RESULT) NEVAL - Integer Number of integrand evaluations IER - Integer IER = 0 Normal and reliable termination of the routine. It is assumed that the requested accuracy has been achieved. - IER.GT.0 Abnormal termination of the routine. The estimates for integral and error are less reliable. It is assumed that the requested accuracy has not been achieved. ERROR MESSAGES IER = 1 Maximum number of subdivisions allowed has been achieved. One can allow more subdivisions by increasing the value of LIMIT (and taking 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. If the position of a local difficulty can be determined (e.g. SINGULARITY, DISCONTINUITY within the interval) one will probably gain from splitting up the interval at this point and calling the integrator on the subranges. If possible, an appropriate special-purpose integrator should be used which is designed for handling the type of difficulty involved. = 2 The occurrence of roundoff error is detected, which prevents the requested tolerance from being achieved. The error may be under-estimated. = 3 Extremely bad integrand behaviour occurs at some points of the integration interval. = 4 The algorithm does not converge. Roundoff error is detected in the extrapolation table. It is presumed that the requested tolerance cannot be achieved due to roundoff in the extrapolation table, and that the returned result is the best which can be obtained. = 5 The integral is probably divergent, or slowly convergent. It must be noted that divergence can occur with any other value of IER.GT.0. = 6 The input is invalid, because (EPSABS.LE.0 and EPSREL.LT.MAX(50*REL.MACH.ACC.,0.5D-28)) or (INTEGR.NE.1 and INTEGR.NE.2) or ICALL.LT.1 or MAXP1.LT.1. RESULT, ABSERR, NEVAL, LAST, RLIST(1), ELIST(1), IORD(1) and NNLOG(1) are set to ZERO. ALIST(1) and BLIST(1) are set to A and B respectively. LAST - Integer On return, LAST equals the number of subintervals produces in the subdivision process, which determines the number of significant elements actually in the WORK ARRAYS. ALIST - Real Vector of dimension at least LIMIT, the first LAST elements of which are the left end points of the subintervals in the partition of the given integration range (A,B) BLIST - Real Vector of dimension at least LIMIT, the first LAST elements of which are the right end points of the subintervals in the partition of the given integration range (A,B) RLIST - Real Vector of dimension at least LIMIT, the first LAST elements of which are the integral approximations on the subintervals ELIST - Real Vector of dimension at least LIMIT, the first LAST elements of which are the moduli of the absolute error estimates on the subintervals IORD - Integer Vector of dimension at least LIMIT, the first K elements of which are pointers to the error estimates over the subintervals, such that ELIST(IORD(1)), ..., ELIST(IORD(K)) form a decreasing sequence, with K = LAST if LAST.LE.(LIMIT/2+2), and K = LIMIT+1-LAST otherwise. NNLOG - Integer Vector of dimension at least LIMIT, containing the subdivision levels of the subintervals, i.e. IWORK(I) = L means that the subinterval numbered I is of length ABS(B-A)*2**(1-L) ON ENTRY AND RETURN MOMCOM - Integer Indicating that the Chebyshev moments have been computed for intervals of lengths (ABS(B-A))*2**(-L), L=0,1,2, ..., MOMCOM-1, MOMCOM.LT.MAXP1 CHEBMO - Real Array of dimension (MAXP1,25) containing the Chebyshev moments

REFERENCES
(NONE)

ROUTINES CALLED
QC25F, QELG, QPSRT, R1MACH

REVISION HISTORY (YYMMDD)
800101 DATE WRITTEN
890531 Changed all specific intrinsics to generic. (WRB)
890831 Modified array declarations. (WRB)
890831 REVISION DATE from Version 3.2
891214 Prologue converted to Version 4.0 format. (BAB)