AVINT estimates the integral of unevenly spaced data.
Discussion:
The method uses overlapping parabolas and smoothing.
Modified:
30 October 2000
4 January 2008, A. Bodas-Salcedo. Error control for XTAB taken out of
loop to allow vectorization.
Reference:
Philip Davis and Philip Rabinowitz,
Methods of Numerical Integration,
Blaisdell Publishing, 1967.
P E Hennion,
Algorithm 77,
Interpolation, Differentiation and Integration,
Communications of the Association for Computing Machinery,
Volume 5, page 96, 1962.
Parameters:
Input, real ( kind = 8 ) FTAB(NTAB), the function values,
FTAB(I) = F(XTAB(I)).
Input, real ( kind = 8 ) XTAB(NTAB), the abscissas at which the
function values are given. The XTAB's must be distinct
and in ascending order.
Input, integer NTAB, the number of entries in FTAB and
XTAB. NTAB must be at least 3.
Input, real ( kind = 8 ) A, the lower limit of integration. A should
be, but need not be, near one endpoint of the interval
(X(1), X(NTAB)).
Input, real ( kind = 8 ) B, the upper limit of integration. B should
be, but need not be, near one endpoint of the interval
(X(1), X(NTAB)).
Output, real ( kind = 8 ) RESULT, the approximate value of the integral.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=KR8), | intent(in) | :: | ftab(ntab) | |||
| real(kind=KR8), | intent(in) | :: | xtab(ntab) | |||
| integer, | intent(in) | :: | ntab | |||
| real(kind=KR8), | intent(in) | :: | a_in | |||
| real(kind=KR8), | intent(in) | :: | b_in | |||
| real(kind=KR8), | intent(out) | :: | result |