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
 Dieter Senior Member Posts: 2,397 Joined: Dec 2013
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.

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
 « Next Oldest | Next Newest »

 Messages In This Thread Finding Min/Max of a function for HP-67 - Namir - 03-10-2014, 05:48 PM RE: Finding Min/Max of a function for HP-67 - Matt Agajanian - 04-26-2014, 12:30 AM RE: Finding Min/Max of a function for HP-67 - Willy R. Kunz - 05-26-2014, 12:14 PM RE: Finding Min/Max of a function for HP-67 - Thomas Klemm - 05-26-2014, 10:13 PM RE: Finding Min/Max of a function for HP-67 - Willy R. Kunz - 06-08-2014, 04:08 PM RE: Finding Min/Max of a function for HP-67 - PedroLeiva - 05-21-2016, 10:50 PM RE: Finding Min/Max of a function for HP-67 - Dieter - 05-22-2016, 01:11 AM RE: Finding Min/Max of a function for HP-67 - PedroLeiva - 05-22-2016, 01:26 AM RE: Finding Min/Max of a function for HP-67 - Dieter - 05-22-2016 07:34 PM RE: Finding Min/Max of a function for HP-67 - PedroLeiva - 05-22-2016, 10:35 PM RE: Finding Min/Max of a function for HP-67 - Dieter - 05-23-2016, 01:08 PM RE: Finding Min/Max of a function for HP-67 - PedroLeiva - 05-23-2016, 07:37 PM RE: Finding Min/Max of a function for HP-67 - bshoring - 05-23-2016, 08:00 PM RE: Finding Min/Max of a function for HP-67 - rprosperi - 05-26-2014, 10:13 PM RE: Finding Min/Max of a function for HP-67 - bshoring - 05-24-2016, 06:47 AM RE: Finding Min/Max of a function for HP-67 - bshoring - 05-28-2016, 08:09 PM RE: Finding Min/Max of a function for HP-67 - PedroLeiva - 05-28-2016, 09:43 PM

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