Math Help - central difference scheme

1. central difference scheme

I need a little clarification about how to use this equation.

f'(x)=f(x+h)-f(x-h)/2h + O(h^2)

here is the info
time___ 0 20 40 . . . . . . . . . . . .......................... . . 160 180 200
altitude 60 10170 33835 ........................107892 119626 162095

find the central difference at t=20 and t=180

I know how to find h but how to i put all these x values into the equation?

2. Originally Posted by calculushelptx
I need a little clarification about how to use this equation.

f'(x)=f(x+h)-f(x-h)/2h + O(h^2)

here is the info
time___ 0 20 40 . . . . . . . . . . . .......................... . . 160 180 200
altitude 60 10170 33835 ........................107892 119626 162095

find the central difference at t=20 and t=180

I know how to find h but how to i put all these x values into the equation?
Then presumably you saw that h= 20. So just put the numbers into the equation. With x= 20 and h= 20, x+h= 40 and x- h= 0. f(x-h)= f(0)= 60 while f(x+h)= f(40)= 33835. (f(x+h)- f(x-h))/(2h)= (f(40)- f(0))/(2(20))= (33835- 60)/60.

3. (f(x+h)- f(x-h))/(2h)= (f(40)- f(0))/(2(20))= (33835- 60)/60.
Liitle mistake here, should be (33835 - 60)/(40)

And O(h^2) is the error you make, cause you are calculating a numerical approximation.

4. Originally Posted by jeneverboy
Liitle mistake here, should be (33835 - 60)/(40)

And O(h^2) is the error you make, cause you are calculating a numerical approximation.
Yes, of course. Thank you for the correction.