Why does forward-difference give a different value than backward-difference

numerical methods

We are given that for $x_0 = 0.5, x_1 = 0.6$ and $x_2 = 0.7$, we have $f(x_0) = 0.4794, f(x_1) = 0.5646$ and $f(x_2) = 0.6442$. Also $h = 1$.

The forward-difference formula is $f'(x) = \dfrac{f(x_i + h) – f(x_i)}{h}$ and the backward-difference formula is $f'(x) = \dfrac{f(x_i) – f(x_i – h)}{h}$ .

Now, using forward-difference for $f'(0.6)$, I get

$\displaystyle f'(0.6) = \frac{f(0.7) – f(0.6)}{0.1} = \frac{0.6442 – 0.5646}{0.1} = 0.796$.

However, when using backward-difference for $f'(0.6)$, I get

$\displaystyle f'(0.6) = \frac{f(0.6) – f(0.5)}{0.1} = \frac{0.5646 – 0.4794}{0.1} = 0.852$.

Clearly, $0.796$ and $0.852$ are not the same value.

So, what is the value for $f'(0.6)$? The answer in the back of the textbook says that it is $0.852$. Why is it $0.852$ and not $0.796$?

Best Answer

Each is only an approximate derivative. The textbook happens to assume you use the backward derivative. While neither of these two options has an inherent advantage over the other, $(f(x+h)-f(x-h))/(2h)$ is typically much more accurate than either of them.

Related Question