Post Reply 
Finding Min/Max of a function for HP-67
05-22-2016, 07:34 PM (This post was last modified: 05-22-2016 07:36 PM by Dieter.)
Post: #10
RE: Finding Min/Max of a function for HP-67
(05-22-2016 01:26 AM)PedroLeiva Wrote:  It's more complicated than I imagined. Luckily I made the query.

Hmmm... honestly, I do not quite understand the problem.

You simply enter f(x) as a short routine just as you do with any other "classic" HP, be it the 65, the 41, the 67/97 or most others. The argument x can be expected in the X-register, so you simply type what you'd also do in a manual calculation. In this example f(x) is ex–3x², so it's [ex] [LstX] [x²] [3] [x] [–]. This is what you enter at LBL E so that f(x) can be calculated by a simple [E] or GSB E.

Checking for a minimum or maximum is easily done by RCL 3 after the program has finished. If the result is positive it's a minimum, and if it's negative there's a maximum. A value of (or very close to) zero would indicate a possible inflection point, but this should not happen as the program divides by R3 so that it would have stopped with an error before.

You could add these lines:

Code:
...  ...
053  RCL 3
054  ENTER
055  ABS
056  /
057  CHS
058  RCL 1
059  RTN

This calculates –sign(f"(x)). So after the program has finished, a simple X<>Y will show –1 (minimum) or +1 (maximum).

Dieter
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Finding Min/Max of a function for HP-67 - Dieter - 05-22-2016 07:34 PM



User(s) browsing this thread: 1 Guest(s)