EasyManua.ls Logo

HP HP-32S - 8: Numerical Integration

HP HP-32S
312 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Using
SOLVE
in
a
Program
You
can use the
SOLVE
operation as part of a program. If appropri
ate, include or prompt for initial guesses (into the unknown variable
and
into the X-register) before executing the
SOLVE
variable
instruc
tion. The two instructions for solving an equation for an unknown
variable appear in the program as:
FN=
label
SOLVE
variable
Labeling
Output.
The
programmed
SOLVE
instruction does not pro
duce a labeled display
(variable-value)
since this might not be the
significant output for your program (that is, you might want to do
further calculations with this number before displaying it). If you do
want this result displayed, add a
VIEW
variable
instruction after the
SOLVE
instruction.
Conditional
Execution
if
No
Solution.
If
no
solution
is
found
for
the unknown variable, then the next program line is skipped (in ac
cordance with the
'Do
if
True*
rule, explained in chapter 6). The
program should then handle the case of not finding a root, such as by
choosing new initial estimates or changing an input value.
Example:
Time
Value off Money. The 'Time Value of Money" pro
gram in chapter 14 solves loan and savings problems by solving for
an unknown in the given TVMequation. This equation is defined as a
function in routine T, which relates the variables for present balance,
future balance, payment, interest rate, and number of payments.
124
7:
Solving
ffor
an
Unknown
Variable
in
an
Equation

Table of Contents

Related product manuals