|Numerical integration: Casio fx-115ES, TI-82, HP-42S, and HP-32SII|
Message #28 Posted by Karl Schneider on 4 Dec 2009, 3:03 a.m.,
in response to message #26 by Mike Morrow
The evidence shows that fx-991ES/115ES quadrature is blazingly fast (more than two orders of magnitude for this example!) compared to that of any HP handheld.
I don't know much about the Gauss-Kronrod quadrature method, but it would be a most welcome replacement (or better, a selectable option) for the methodolgy traditionally implemented for the last third of a century on HP calculators.
Ya learn something every day! I was puzzled about what you were doing in this thread, because I have the predecessor fx-115MS, which looks almost identical. It uses Simpson's Rule for integration, just like the 1981 Casio fx-3600P of mine.
A on-line review for the fx-115ES confirms that the new model upgraded to Gauss-Kronrod. Maybe there was more to the fx-115 replacement than met the eye.
Upscale TI models have used Gauss-Kronrod for many years. My 1993 TI-82 generally outperforms my HP models on integration, other than that the user must ensure that the integrand function is defined at the endpoints:
.036489974 (displayed in 54 seconds)
I tried to get a 10-digit result for integration of the original function f(x)=(sqrt(x)/(x-1)-1/ln(x)) (for 0 <= x <= 1) on my HP42S with ACC set to 10^-10. After more than two hours of run time, I gave up.
It should be noted that the ACC parameter on the HP-42S is not the same as FIX on the "lesser" RPN models (prior to the HP-33s) -- or even the accuracy factor on non-HP calcuators using Gauss-Kronrod. ACC is a multiplicative (not absolute) uncertainty factor applied to the integrand function. With the value of the function f(x) well below 0.1 for 0 < x < 1, the uncertainty of the function at almost all points for ACC = 1E-10 is well below 1E-11. This tight tolerance drives a large number of function evalulations, in order to achieve calculated estimates of the integral that do not change by more than the small total-integral uncertainty as ever-more evaluations are taken.
On my -- er, perhaps loathsome -- HP-32SII, I got 0.0364899740909 in 605 seconds with a FIX 9 setting. The deviation from the correct answer of 0.036489973978576 is 1.123E-10 -- well within the maximum error of 0.5 * 1E-9 * (1-0) = 5E-10 estimated for FIX 9.
In order to get a corresponding answer on the HP-42S, I set ACC to a value such that the mean value of the function times ACC approximately equaled the FIX 9 uncertainty: ACC = 5.00E-10 / 0.0365 = 1.37E-08. This yielded an integral of 0.036489974091, with an estimated error of 4.99963E-10, in about 1000 seconds.
Please see my sole contribution to the HP Articles Forum (#556) for more information.
Edited: 5 Dec 2009, 11:54 p.m. after one or more responses were posted