Central difference formula comparison- Sharp vs. TI nad Casio
11-23-2022, 02:52 PM (This post was last modified: 11-23-2022 02:53 PM by klesl.)
Post: #1
 klesl Member Posts: 142 Joined: Mar 2016
Central difference formula comparison- Sharp vs. TI nad Casio
TI and Casio calcs use formula in usual form:
f′(x) = (f(x + h) – f(x –h))/(2*h)
Sharp uses a slightly modified formula (it seems there is substituion h=h/2)
f′(x) = (f(x + h/2) – f(x –h/2))/h
Is there some differences in terms of calculation speed, accuracy...?
11-23-2022, 05:50 PM
Post: #2
 robve Senior Member Posts: 459 Joined: Sep 2020
RE: Central difference formula comparison- Sharp vs. TI nad Casio
(11-23-2022 02:52 PM)klesl Wrote:  Is there some differences in terms of calculation speed, accuracy...?

The right answer is a long story...

It depends on h, x and the function. But it's all pretty bad, except for textbook cases when the function is nice and smooth. The function may have singularities at $$x \pm h$$ or is not defined at the points or not behave well at all. All bets are off with this simple formula.

h is sometimes picked for stability $$h=|x|\sqrt[3]{\varepsilon}$$ for nonzero x and MachEps $$\varepsilon$$ or $$\sqrt[3]{\varepsilon}$$ for example 1e-3.

With Richardson Extrapolation there is more assurance on the result with an error bound. See for example Numerical Recipes.

I wonder why most calculators do not use Richardson Extrapolation? Computational costs are low these days, so no excuses any longer. I could be mistaken, but I believe some Casios do run a numerical extrapolation method (kept secret?).

Some time ago I've derived a better method than Richardson, one that appears to be more numerically stable empirically.

- Rob

"I count on old friends to remain rational"
 « Next Oldest | Next Newest »

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