(20S) and (21S) Numerical Derivative - Printable Version +- HP Forums (https://www.hpmuseum.org/forum) +-- Forum: HP Software Libraries (/forum-10.html) +--- Forum: General Software Library (/forum-13.html) +--- Thread: (20S) and (21S) Numerical Derivative (/thread-13000.html) |
(20S) and (21S) Numerical Derivative - Eddie W. Shore - 05-20-2019 12:58 PM Numerical Derivative f'(x0) ≈ ( f(x0 + h) - f(x0 - h) ) / ( 2*h ) x = point h = small change of x, example h = 0.0001 LBL A: Main Progam LBL F: f(X), where R0 acts as X Input variables: R1 = h R2 = point x0 Used variables: R0 = x (use R0 for f(x), LBL F) Calculated Variables: R3 = f'(x) Radians mode will be set. Program: Code:
Example: e^x * sin x LBL F RCL 0 e^x * RCL 0 SIN = RTN R1 = 0.0001 R2 = x0 = 0.03 Result: 1.060899867 R1 = 0.0001 R2 = x0 = 1.47 Result: 4.7648049 |