beautypg.com

Solve, E<

Page 95: L1:hl1

background image

Programming 87

Solve

The solve key is not programmable, but it is a powerful addition to the calculator functionality.

The solve function utilizes HP Solve, a feature unique to HP calculators, which allows you to

find a number for a variable that will cause a program to return a 0. This can be used to solve

complex equations.

For example, if you want to solve x

x

-y=0.

1.

:E<

(select and edit program 2)

2.

L1:hL1-L2=

(HOLD)

(enter program var1

var1

-var2=)

3. Press

O

to exit. Store 3 into variable 2 by pressing

3:$1

. Press

:E

and

note that Prgrm 2 is selected, as the calculator displays the program

that was last edited. For verification, this program has 11 bytes, and the checksum, 199.

4. Press

:

(HOLD)

2

to solve for variable 2. The calculator will attempt to

find what value in variable 2 would cause the program to result in 0. In this case, the

result is 27.

5. Now store 10 into variable 2:

10:$2

. Since Prgrm 2 was the last

program selected in the program menu, you can use the SOLVE feature directly. Press

:

(HOLD)

1

to solve for variable 1, such that the result of the program is

0. The result this time is 2.506184..., since you stored 10 into variable 2.

6. You can verify this is correct by pressing

L1:hL1=

and

see that 10 is returned.