# Approximating derivatives between gridpoints

Hi,

Suppose we have a grid (possibly irregular) of N function/value pairs, $(x_i, f_i)$, $i=1...N$. The function is differentiable everywhere at least twice (perhaps more).

What would be a good way to find, for example, a polynomial (or other) approximation for the derivative of the function in an interval $(x_j, x_{j+1})$, or perhaps $(x_{j-1}, x_{j+1})$, for a given $j$?

Say, cubic splines would provide the derivative, but it seems too wasteful to compute a spline approximation over all $N$ points, when all is needed is a neighborhood of just one point $j$. On the other hand, piecewise linear approximation only needs two points, but is rather imprecise, since we know that there are no jumps in the true derivative. What would be good alternatives that would need only a small number of points around $j$?

• Please forgive my stupid comment, but you say: "What would be good alternatives that would need only a small number of points around j?" Why don't you just throw away the data for faraway points?! Such data is irrelevant to the derivative anyway! – Zen Harper Feb 22 '11 at 7:59
• Basically the question was, how to determine how many, and which exactly, points to throw away, how to adjust the algorithm near ends of sample, etc. -- eg. Kruger's paper cited by JJ Green below gives a well defined procedure. – laxxy Feb 25 '11 at 21:56