Post Reply 
Accuracy of numsolve in TI, CASIO
03-26-2021, 09:55 PM
Post: #2
RE: Accuracy of numsolve in TI, CASIO
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 ?

Example, estimate (ln(x))' at x=2:

lua> function D(x,h) return (log(x+h)-log(x-h))/(2*h) end
lua> for i=4,8 do print(i, D(2, 10^-i)) end
4      0.5000000004168335
5      0.5000000000088269
6      0.5000000000143777
7      0.49999999973682185
8      0.49999999696126407

Interestingly, optimal h for this example is also about 1e-5:

At the cost of more computation, we can use bigger h, and extrapolate for slope.
(similar to Romberg's integration, extrapolate from raw trapezoids, or rectangles)

lua> h = 1e-3
lua> d1 = D(2,h)
lua> d2 = D(2,h/2)
lua> d1, d2, d2+(d2-d1)/3
0.500000041666615       0.5000000104167235       0.5000000000000929
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 - Albert Chan - 03-26-2021 09:55 PM



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