Post Reply 
Higher order derivatives of unequally spaced data
07-07-2021, 05:45 PM
Post: #2
RE: Higher order derivatives of unequally spaced data
For derivatives, we may remove 1 term of Lagrange polynomial.

(f(x))' = (f(x) - c)', for constant c

Example, with 3 points:

\( f(x)
≈ f(x_1)\left({(x-x_2)(x-x_3) \over (x_1-x_2)(x_1-x_3)}\right)
+ f(x_2)\left({(x-x_1)(x-x_3) \over (x_2-x_1)(x_2-x_3)}\right)
+ f(x_3)\left({(x-x_1)(x-x_2) \over (x_3-x_1)(x_3-x_2)}\right)
\)

Let \(c = f(x_2)\), we eliminated middle term:

\( f'(x)
≈ \Big(f(x_1) - f(x_2)\Big) \left({(x-x_2)+(x-x_3) \over (x_1-x_2)(x_1-x_3)}\right)
+ \Big(f(x_3) - f(x_2)\Big) \left({(x-x_1)+(x-x_2) \over (x_3-x_1)(x_3-x_2)}\right)
\)

Simplify with Divided Differences Notation:

\(\begin{align} f'(x)
&≈ {f[x_1,x_2] \over x_3-x_1} (x_2+x_3-2x)
+ {f[x_2,x_3] \over x_3-x_1} (2x-x_1-x_2) \\
&= {f[x_1,x_2] \over x_3-x_1} (x_2+x_3-2x)
+ \left(f[x_1,x_2,x_3] + {f[x_1,x_2] \over x_3-x_1}\right) (2x-x_1-x_2) \\
&= f[x_1,x_2] + f[x_1,x_2,x_3] \, (2x-x_1-x_2)
\end{align}\)

We can confirm above, with 3-points Divided-difference formula

\(f(x) ≈ f(x_1) + (x-x_1) \Big(f[x_1,x_2] + (x-x_2)\,f[x_1,x_2,x_3] \Big) \)

Differentiate with respect to x, we get back the same f'(x)
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Higher order derivatives of unequally spaced data - Albert Chan - 07-07-2021 05:45 PM



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