DQC25F(3)

SYNOPSIS
SUBROUTINE DQC25F (F, A, B, OMEGA, INTEGR, NRMOM, MAXP1, KSAVE, + RESULT, ABSERR, NEVAL, RESABS, RESASC, MOMCOM, CHEBMO)

NAME
dqc25f - To compute the integral I=Integral of F(X) over (A,B) Where W(X) = COS(OMEGA*X) or W(X)=SIN(OMEGA*X) and to compute J = Integral of ABS(F) over (A,B). For small value of OMEGA or small intervals (A,B) the 15-point GAUSS-KRONRO Rule is used. Otherwise a generalized CLENSHAW-CURTIS method is used.

LIBRARY
SLATEC (QUADPACK)

CATEGORY
H2A2A2

TYPE
DOUBLE PRECISION (QC25F-S, DQC25F-D)

KEYWORDS
CLENSHAW-CURTIS METHOD, GAUSS-KRONROD RULES, INTEGRATION RULES FOR FUNCTIONS WITH COS OR SIN FACTOR, QUADPACK, QUADRATURE

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

DESCRIPTION
Integration rules for functions with COS or SIN factor Standard fortran subroutine Double precision version PARAMETERS ON ENTRY F - Double precision 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 calling program. A - Double precision Lower limit of integration B - Double precision Upper limit of integration OMEGA - Double precision Parameter in the WEIGHT function INTEGR - Integer Indicates which WEIGHT function is to be used INTEGR = 1 W(X) = COS(OMEGA*X) INTEGR = 2 W(X) = SIN(OMEGA*X) NRMOM - Integer The length of interval (A,B) is equal to the length of the original integration interval divided by 2**NRMOM (we suppose that the routine is used in an adaptive integration process, otherwise set NRMOM = 0). NRMOM must be zero at the first call. MAXP1 - Integer Gives an upper bound on the number of Chebyshev moments which can be stored, i.e. for the intervals of lengths ABS(BB-AA)*2**(-L), L = 0,1,2, ..., MAXP1-2. KSAVE - Integer Key which is one when the moments for the current interval have been computed ON RETURN RESULT - Double precision Approximation to the integral I ABSERR - Double precision Estimate of the modulus of the absolute error, which should equal or exceed ABS(I-RESULT) NEVAL - Integer Number of integrand evaluations RESABS - Double precision Approximation to the integral J RESASC - Double precision Approximation to the integral of ABS(F-I/(B-A)) ON ENTRY AND RETURN MOMCOM - Integer For each interval length we need to compute the Chebyshev moments. MOMCOM counts the number of intervals for which these moments have already been computed. If NRMOM.LT.MOMCOM or KSAVE = 1, the Chebyshev moments for the interval (A,B) have already been computed and stored, otherwise we compute them and we increase MOMCOM. CHEBMO - Double precision Array of dimension at least (MAXP1,25) containing the modified Chebyshev moments for the first MOMCOM MOMCOM interval lengths

REFERENCES
(NONE)

ROUTINES CALLED
D1MACH, DGTSL, DQCHEB, DQK15W, DQWGTF

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