AVINT(3)

SYNOPSIS
SUBROUTINE AVINT (X, Y, N, XLO, XUP, ANS, IERR)

NAME
avint - Integrate a function tabulated at arbitrarily spaced abscissas using overlapping parabolas.

LIBRARY
SLATEC

CATEGORY
H2A1B2

TYPE
SINGLE PRECISION (AVINT-S, DAVINT-D)

KEYWORDS
INTEGRATION, QUADRATURE, TABULATED DATA

AUTHOR
Jones, R. E., (SNLA)

DESCRIPTION
Abstract AVINT integrates a function tabulated at arbitrarily spaced abscissas. The limits of integration need not coincide with the tabulated abscissas. A method of overlapping parabolas fitted to the data is used provided that there are at least 3 abscissas between the limits of integration. AVINT also handles two special cases. If the limits of integration are equal, AVINT returns a result of zero regardless of the number of tabulated values. If there are only two function values, AVINT uses the trapezoid rule. Description of Parameters The user must dimension all arrays appearing in the call list X(N), Y(N). Input-- X - real array of abscissas, which must be in increasing order. Y - real array of functional values. i.e., Y(I)=FUNC(X(I)). N - the integer number of function values supplied. N .GE. 2 unless XLO = XUP. XLO - real lower limit of integration. XUP - real upper limit of integration. Must have XLO .LE. XUP. Output-- ANS - computed approximate value of integral IERR - a status code --normal code =1 means the requested integration was performed. --abnormal codes =2 means XUP was less than XLO. =3 means the number of X(I) between XLO and XUP (inclusive) was less than 3 and neither of the two special cases described in the Abstract occurred. No integration was performed. =4 means the restriction X(I+1) .GT. X(I) was violated. =5 means the number N of function values was .LT. 2. ANS is set to zero if IERR=2,3,4,or 5. AVINT is documented completely in SC-M-69-335 Original program from "Numerical Integration" by Davis & Rabinowitz. Adaptation and modifications for Sandia Mathematical Program Library by Rondall E. Jones.

REFERENCES
R. E. Jones, Approximate integrator of functions tabulated at arbitrarily spaced abscissas, Report SC-M-69-335, Sandia Laboratories, 1969.

ROUTINES CALLED
XERMSG

REVISION HISTORY (YYMMDD)
690901 DATE WRITTEN
890831 Modified array declarations. (WRB)
890831 REVISION DATE from Version 3.2
891214 Prologue converted to Version 4.0 format. (BAB)
900315 CALLs to XERROR changed to CALLs to XERMSG. (THJ)
900326 Removed duplicate information from DESCRIPTION section. (WRB)
920501 Reformatted the REFERENCES section. (WRB)