7

Suppose that $f$ has continuous second derivatives. How do I show that

$$\frac{f(x+h) + f(x-h) - 2f(x)}{h^2}$$

and

$$2\frac{f(x+h) - f(x) - f'(x)h}{h^2}$$

both tend to $f''(x)$ as $h \rightarrow 0$?

For the first expression, I can rewrite it as

$$\lim_{h \rightarrow 0} \frac{1}{h}(\frac{f(x+h) - f(x)}{h} - \frac{f(x) - f(x-h)}{h})$$

which I can sort of see should tend to $f''(x)$, but I can't seem to show it rigorously. For the second expression, I can rewrite it as

$$\lim_{h\rightarrow 0} \frac{(f(x+h)-f(x))/h - f'(x)}{h}$$

I'm not sure where the factor of 2 comes in, but I guess it should have to do with the fact that we're trying to take limits "simultaneously" for $f'$ and $f''$. Can anyone help? Thanks.

Chris Taylor
  • 28,955

2 Answers2

7

Apply L'Hospital's rule to differentiate numerator and denominator with respect to $h$: $$ \begin{align*} \lim_{h \to 0} \frac{f(x+h) + f(x-h) - 2f(x)}{h^2} &= \lim_{h \to 0} \frac{f'(x+h) - f'(x-h)}{2h} = f''(x). \end{align*} $$ (Add and subtract $f'(x)$ in the numerator to see the second equality.) Similarly, $$ \begin{align*} \lim_{h \to 0} \frac{f(x+h) - f(x) - f'(x)h}{h^2}\, & = \lim_{h \to 0} \frac{f'(x+h) - f'(x)}{2h} = \frac{1}{2} f''(x). \end{align*} $$

1

A further proof of this finite difference approximation is as follows. This avoids the use of L'Hopital's rule, but relies upon continuity of second derivatives. The trick is to use Taylor's theorem.

$$f(x+h) = f(x) + f'(x)h + f''(\xi) h^2/2$$ $$f(x-h) = f(x) - f'(x)h + f''(\xi) h^2/2$$

for some $\xi$ between $(x, x+h)$. Now take the difference and let $h$ tend to zero. By continuity, we will obtain the second derivative.