Section 13: finding the roots of an equation, Using – HP 15c User Manual
Page 181
Section 13: Finding the Roots of an Equation 181
The basic rules for using _ are:
1.
In Program mode, key in a subroutine that evaluates the function
f(x) that is to be equated to zero. This subroutine must begin with a
label instruction (´b label) and end up with a result for f(x) in
the X-register.
In Run mode:
2.
Key two initial estimates of the desired root, separated by v,
into the X- and Y-registers. These estimates merely indicate to the
calculator the approximate range of x in which it should initially
seek a root of f(x) = 0.
3.
Press ´ _ followed by the label of your subroutine. The
calculator then searches for the desired zero of your function and
displays the result. If the function that you are analyzing equals zero
at more than one value of x, the routine will stop when it finds any
one of those values. To find additional values, you can key in
different initial estimates and use _ again.
Immediately before _ addresses your subroutine it places a value of x
in the X-, Y-, Z-, and T-registers. This value is then used by your subroutine
to calculate f(x). Because the entire stack is filled with the x-value, this
number is continually available to your subroutine. (The use of this
technique is described on page 41).
Example: Use _ to find the values of x for which
f(x) = x
2
–3x – 10 = 0.
Using Horner's method (refer to page 79), you can rewrite f(x) so that it is
programmed more efficiently:
f(x) = (x – 3)x – 10.
In Program mode, key in the following subroutine to evaluate f(x).
Keystrokes
Display
|¥
000-
Program mode.
´ CLEAR M
000-
Clear program memory.