If I need to approximate $f'(x_i), i =0..2$ with precision of $O(h^2)$ should I only use one step calculation using central difference methid?

15 Views Asked by At

Points given: $x = (\frac{1}{2}, 1, \frac{3}{2})^T, \ y = (-8, -5, 0)^T$

My calculation: $$f'(1) = \frac{f(x+h)-f(x-h)}{2h} = \frac{0 + 8}{1} = 8$$

Is this correct or should there be more steps to approximate $f'(x_i)$ with precision $O(h^2)$?

1

There are 1 best solutions below

2
On

This is correct. The central difference formula yields $O(h^2)$ accuracy.