1. Numerical differentiation

Hello,
I'm having "big" issue recalling formula for numerical differentiation... using front differences $\displaystyle (y[n+1]-y[n])$... and can't find any of my old textbooks... so if anyone could guide me a little bit, i would be very grateful

let's say i have function given like :

 xi -2 -1 0 1 2 f(xi) -3 -1 0 -1 0
and i need to get formula for numerical differentiation using front differences (or back)... and get approximate value of derivate at point x=-2....

well...
i assume this...

$\displaystyle f'(x) = \frac{f(x)}{x[i+1]- x[i]}$

it's probably wrong, but even if it's correct i don't know what to do next ... because I think need only two points from this table to determine the value of the derivate?

P.S. i don't see why do i get latex error

edit:
or i have to use table of front differences ?

 $\displaystyle y_1$ $\displaystyle \Delta y_1$ $\displaystyle y_2$ $\displaystyle \Delta^2 y_1$ $\displaystyle \Delta y_2$ $\displaystyle \Delta^3 y_1$ $\displaystyle y_3$ $\displaystyle \Delta^2 y_2$ $\displaystyle \Delta^4 y_1$ $\displaystyle \Delta y_3$ $\displaystyle \Delta^3 y_2$ $\displaystyle y_4$ $\displaystyle \Delta^2 y_3$ $\displaystyle \Delta y_4$ $\displaystyle y_5$

2. Re: Numerical differentiation

First, no, the formula is NOT $\displaystyle \frac{f(x)}{x[i+1]- x[i]}$ because "f(x)" is not a numerical value. The simplest formula is $\displaystyle \frac{f(x[i+1])- f(x[i])}{x[i]- x[i]}$ but that is not very accurate and there is, of course, no way to make it more accurate. My personal preference would be to do as you suggest- use a difference table. By Newton's divided difference formula, that function can be approximated by
$\displaystyle y1+ \Delta y1 (x- x_1)+ \Delta^2 y_1(x- x_1)(x- x_2)/2+ \Delta^3 y_1(x- x_1)(x- x_2)(x- x_3)/6+ \Delta^4 y_1(x- x_1)(x- x_2)(x- x_3)(x- x_4)/24$.

You can then differentiate that polynomial and evaluate the derivative at$\displaystyle x= x_1$.

3. Re: Numerical differentiation

thanks
That interpolated polynomial you wrote there .... would be the same thing if u use back difference, it would be something like this.... (with different table) ?
$\displaystyle \Delta y_5 (x-x_1) + \Delta^2 y_5 (x-x_1)(x-x_2)/2 ....$
and so on and those $\displaystyle \Delta y_i$ are just values that i calculate based on those tables ?

(i know it's silly question but... )