Appendix E: A Detailed Look at f 249
Conditions That Could Cause Incorrect Results
Although the f algorithm in the HP 15c is one of the best available, in
certain situations it—like nearly all algorithms for numerical
integration—might give you an incorrect answer. The possibility of this
occurring is extremely remote. The f algorithm has been designed to
give accurate results with almost any smooth function. Only for functions
that exhibit extremely erratic behavior is there any substantial risk of
obtaining an inaccurate answer. Such functions rarely occur in problems
related to actual physical situations; when they do, they usually can be
recognized and dealt with in a straightforward manner.
As discussed on page 240, the f algorithm samples the function f(x) at
various values of x within the interval of integration. By calculating a
weighted average of the function’s values at the sample points, the
algorithm approximates the integral of f(x).
Unfortunately, since all that the algorithm knows about f(x) are its values
at the sample points, it cannot distinguish between f (x) and any other
function that agrees with f (x) at all the sample points. This situation is
depicted in the illustration on the next page, which shows (over a portion
of the interval of integration) three of the infinitely many functions whose
graphs include the finitely many sample points.