Post Reply 
Accuracy of numsolve in TI, CASIO
03-26-2021, 10:23 PM (This post was last modified: 03-26-2021 10:34 PM by robve.)
Post: #3
RE: Accuracy of numsolve in TI, CASIO
(03-26-2021 09:55 PM)Albert Chan Wrote:  Assuming calculator use central-difference derivative formula, this might answer your question.

Is there a general formula for estimating the step size h in numerical differentiation formulas ?

Just my 2c.

This is a very good question. With numerical differentiation and finite difference stencils I've always used the cube-root of machine epsilon (MachEps). On 12 digit machines, this is 1E-4 and for 15 digit machines (no surprise) this is 1E-5.

As Albert says, 1E-5 should be about optimal.

See also step size that explains the difficulty of choosing a step size. Let me add that an approximate to the optimal step can be empirically established.

- Rob

PS. (edit) you may also want to scale h with the magnitude of the point(s) you're differentiating, otherwise you will end up with a slope that is closer to zero. For a 10 digit machine, let's take 1E-3, then what you want to do when differentiating at point A is something like this:

h=1E-3
IF abs(A)>1 THEN h=h*abs(A)

The points X are at \( A\pm h \), but due to rounding you may want to do the following to get to X-A and then adjust H so it is exact:

X=A-h, h=A-X

"I count on old friends to remain rational"
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Accuracy of numsolve in TI, CASIO - robve - 03-26-2021 10:23 PM



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