Finding Min/Max of a function for HP-41C - Printable Version +- HP Forums (https://www.hpmuseum.org/forum) +-- Forum: HP Software Libraries (/forum-10.html) +--- Forum: HP-41C Software Library (/forum-11.html) +--- Thread: Finding Min/Max of a function for HP-41C (/thread-879.html) |
Finding Min/Max of a function for HP-41C - Namir - 03-10-2014 05:56 PM Finding the minimum/maximum of a function using Newton's method. Memory Map R00 = tolerance R01 = x R02 = h R03 = f(x), f''(x) R04 = f(x+h) R05 = f(x-h) HP-41C Implementation Code: 1 LBL "MINMAX" Usage LBL E has the code for the function whose minimum or maximum you seek. 1) Start the program by pressing [A]. 2) The program prompts you for a guess using "X?". Enter a guess for the minimum/maximum and press [R/S]. 3) The program prompts you for he tolerance using "TOLER?". Enter the tolerance and press [R/S]. 4) The program pauses showing intermediate values for the refined min/max values. When the program has reached the tolerance level it displays the value of the X for the min/max value. |