Post Reply 
HP35s and numerical differentiation
10-05-2014, 04:43 PM
Post: #3
RE: HP35s and numerical differentiation
In addition to the user programs suggested, here is one that calculates the numerical derivate, using the Five Stencil Method.

Use the label U, the function is called at step 41.

Start with point to be calculated on the X stack.

Code:

U001 LBL U
U002 1E-3
U003 STO H
U004 2
U005 x
U006 R-down
U007 STO Z
U008 R-up
U009 +
U010 STO X
U011 XEQ U041
U012 +/-
U013 STO D
U014 RCL Z
U015 RCL+ H
U016 STO X
U017 XEQ U041
U018 8 
U019 x
U020 STO+ D
U021 RCL Z
U022 RCL- H
U023 STO X
U024 XEQ U041
U025 8
U026 x
U027 STO- D
U028 RCL Z
U029 RCL H
U030 2
U031 x
U032 -
U033 STO X
U034 XEQ U041
U035 STO+ D
U036 12
U037 RCLx H
U038 STO/ D
U039 VIEW D   // derivative
U040 RTN
U041  *** put f(X) **** here
...
U-last RTN

f'(X) = D = 1/(12H) * ( f(x-2H) - 8*f(x-H) + 8*f(x+H) - f(x+2H)) + H^4/30*f^(5)(o)
(error term omitted in calculation)

Source:
Burden, Richard L. and J. Douglas Faires. "Numerical Analysis 8th Edition" Thomson Brooks/Cole. Belton, CA 2005
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: HP35s and numerical differentiation - Eddie W. Shore - 10-05-2014 04:43 PM



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