Section 1: using _ effectively, Finding roots how _ samples, Using _ effectively – HP 15c User Manual

Page 9: Finding roots, How _ samples

Advertising
background image

9

Section 1:

Using _ Effectively

The _ algorithm provides an effective method for finding a root of an equation. This
section describes the numerical method used by _ and gives practical information
about using _ in various situations.

Finding Roots

In general, no numerical technique can be guaranteed to find a root of every equation that has
one. Because a finite number of digits are used, the calculated function may differ from the
theoretical function in certain intervals of x, it may not be possible to represent the roots
exactly, or it may be impossible to distinguish between zeros and discontinuities of the
function being used. Because the function can be sampled at only a finite number of places,
it's also possible to conclude falsely that the equation has no roots.

Despite these inherent limitations on any numerical method for finding roots, an effective
method—like that used by _—should strive to meet each of the following objectives:

If a real root exists and can be exactly represented by the calculator, it should be
returned. Note that the calculated function may underflow (and be set to zero) for
some values of x other than the true roots.

If a real root exists, but it can't be exactly represented by the calculator, the value
returned should differ from the true root only in the last significant digit.

If no real root exists, an error message should be displayed.

The _ algorithm was designed with these objectives in mind. It is also easy to use and
requires little of the calculator's memory. And because _ in a program can detect the
situation of not finding a root, your programs can remain entirely automatic regardless of
whether _ finds a root.

How

_ Samples

The _ routine uses only five registers of allocatable memory in the HP-15C. The five
registers hold three sample values (a, b, and c) and two previous function values (f(a) and
f(b)) while your function subroutine calculates f(c).

The key to the effectiveness of _ is how the next sample value c is found.

Normally, _ uses the secant method to select the next value. This method uses the
values of a, b, f(a), and f(b) to predict a value c where f(c) might be close to zero.

Advertising