Hi, Les --
Quote:
The question I have is how this band is actually computed.
The uncertainty "band" of the integrand is specified by the user in the variable "ACC". Integrating the half-width of the band over the range of the integral would give the worst-case value of the error.
Now, the "estimate of maximum error" (as I call it) or the "uncertainty of computation" (as it is called in the HP-42S manual, p. 203) is calculated by different means -- quite likely based upon the difference between two successive approximations of the integral. When this difference is less than "ACC" times the estimated integral of the absolute value of the function, it may be reasonable for INTEG to stop -- specifically, if further iterations will not likely obtain additional accuracy that is not already surpassed in magnitude by the specified uncertainty of the integrand over the limits of integration.
This probably illustrates why the integral in the 1980 Kahan article:
f(x) = [sqrt(x)/(x-1) - 1/ln(x)] between 0 and 1 ~= 0.03649
is calculated with an incorrect result of about 0.03662 on the HP-34C (and other models) using FIX 5, but is correctly calculated using FIX 6. At FIX 5, the numerical quadrature proceeds until the difference between successive inaccurate estimates dips below the error estimated from function uncertainty, causing it to stop prematurely. At FIX 6, more samples are taken in order to obtain an extra digit of accuracy, until the "lovers' leap" near x = 0 is clearly identified. This extends the process until an accurate result is ultimately produced.
This problem can trick the HP-42S, too. Try it with "ACC" = 0.0001 (1E-4) and with "ACC" = 0.00001 (1E-5), comparing results and execution times.
More: The slope of the function,
df/dx = 1/[2*sqrt(x)*(x-1)] - sqrt(x)/(x-1)^2 + 1/[x(ln x)^2]
has a root at x = 0.00473774692726, for a peak function value f(x) = 0.117680329836
The slope approaches positive infinity near x = 0.
Best regards,
-- KS
Edited: 22 Feb 2007, 1:39 a.m.