# Using the same limit for a second derivative

I've been trying to answer the same question answered here: Second derivative "formula derivation"

And I'm stuck in a step that is not addressed both in the answer and in the comments of the question over there. In the original question he uses the fact that

$$f''(x) = \lim_{h\to0} \frac{f'(x+h) - f'(x)}{h}$$ $$f''(x) = \lim_{h\to0} \frac{ \frac{ f(x+2h) - f(x+h)}{h} - \frac{ f(x+h) - f(x)}{h} }{h}$$

Which I basically see as taking the derivatives with the same limit 3 times. Shouldn't it be as follow?

$$f''(x) = \lim_{h\to0} \frac{ \lim_{h_1\to0}\frac{ f(x+h+h_1) - f(x+h)}{h_1} - \lim_{h_2\to0}\frac{ f(x+h_2) - f(x)}{h_2} }{h}$$

How do you justify moving to the equation given in the original answer?

## 3 Answers

Simple answer: You are right that by definition of derivative the expression you gave for the second derivative is the correct one. However it turns out that the other one is equal, though not obviously.

Proof by L'Hopital

One way to prove it is to use L'Hopital's rule once to get:

$\lim_{h \to 0} \dfrac{f(x+2h)-2f(x+h)+f(x)}{h^2} = \lim_{h \to 0} \dfrac{2f'(x+2h)-2f'(x+h)}{2h}$

because numerator and denominator are zero when $h = 0$ and are differentiable with respect to $h$. What we get is not quite the definition of the second derivative so we have to manipulate:

$\lim_{h \to 0} \dfrac{f'(x+2h)-f'(x+h)}{h} = \lim_{h \to 0} 2\dfrac{f'(x+2h)-f'(x)}{2h} - \lim_{h \to 0} \dfrac{f'(x+h)-f'(x)}{h}$

which is valid because both limits on the right exist. Note that:

$\lim_{h \to 0} 2\dfrac{f'(x+2h)-f'(x)}{2h} = 2 \lim_{h \to 0} \dfrac{f'(x+h)-f'(x)}{h}$

since $h \to 0$ is equivalent to $2h \to 0$ or just going by the definition of limit, and the $2$ factors out of the limit. Finally we get:

$\lim_{h \to 0} \dfrac{f(x+2h)-2f(x+h)+f(x)}{h^2} = \lim_{h \to 0} \dfrac{f'(x+h)-f'(x)}{h} = f''(x)$

by definition of second derivative.

Note

Notice that $f$ must be differentiable in an open interval around $x$ which was critical for L'Hopital's rule to work. But $f'$ need not be differentiable or even continuous in an open interval around $x$. All that is necessary, as used in the proof, is that $f'$ is differentiable at the single point $x$.

• hmm I understand. Is there a similar proof without L'Hopital? As we haven't learned it yet I'm not sure I can use it.. Thanks anyway :) – Nescio May 25 '15 at 16:14
• I'm writing another completely different proof, but it's at the same level of using L'Hopital in a sense. I'm afraid that any proof of this expression for the second derivative will have to go through a similar route. – user21820 May 25 '15 at 16:21

Another completely different method and arguably more intuitive is to use asymptotic expansions.

Proof by asymptotic expansion

For any differentiable function $f$ such that $f'$ is differentiable at $x$ we have:

$f(x+h) \in f(x) + f'(x) h + \frac{1}{2}f''(x) h^2 + o(h^2)$ as $h \to 0$

This uses Little-O-notation so you may want to look at that if you've not come across it. First let us use it to solve the question:

As $h \to 0$:

$f(x+2h) \in f(x) + f'(x) 2h + \frac{1}{2} f''(x) 4h^2 + o(h^2)$

$f(x+h) \in f(x) + f'(x) h + \frac{1}{2} f''(x) h^2 + o(h^2)$

$f(x+2h)-2f(x+h)+f(x) \in f''(x) h^2 + o(h^2)$

$\dfrac{f(x+2h)-2f(x+h)+f(x)}{h^2} \in f''(x) + o(1)$

Therefore $\dfrac{f(x+2h)-2f(x+h)+f(x)}{h^2} \to f''(x)$ as $h \to 0$.

Proof of the asymptotic expansion $\def\rr{\mathbb{R}}$

Denote $[r] = \{ x : |x| < r \}$ for convenience.

Let $g(h) = f(x) + f'(x) h + \frac{1}{2}f''(x) h^2$ for any $h \in \rr$.

Then $g'(h) = f'(x) + f''(x) h$ for any $h \in \rr$.

Also $f'(x+h) \in f'(x) + f''(x) h + o(h)$ as $h \to 0$ [by definition of derivative of $f'$].

Thus $f'(x+h) - g'(h) \in o(h)$ as $h \to 0$.

$f(x+h) - g(h) = ( f'(x+c) - g'(c) ) h$ for some $c \in [0,h]$ [by the mean value theorem]

$\ \in o(h) h = o(h^2)$ as $h \to 0$.

Notes

The above proof easily extends to higher derivatives, and it is easy to prove any similar expressions for them.

The equation

$$f'(x) = \lim_{h \to 0} \dfrac{f(x+h)-f(x)}{h} \tag{1}$$

is clearly correct: that's indeed the very definition of the derivative (hence, the derivative exists iff the limit exists).

Now consider the equation

$$f''(x) = \lim_{h \to 0} \dfrac{f(x+2h)-2f(x+h) + f(x)}{h^2} \tag{2a}$$

or the "centered" version:

$$f''(x) = \lim_{h \to 0} \dfrac{f(x+h)-2f(x) + f(x-h)}{h^2} \tag{2b}$$

These are not correct in the same sense that $$(1)$$ is. They are true (as other answers have shown) only if the second derivative exists. Hence they are not valid definitions of the second derivative. The correct definition corresponds to the multiple limit you wrote in the question body, and we cannot get from that to $$(2a)$$ or $$(2b)$$. In concrete: it can happen that the limits on the RHS of $$(2a)$$ or $$(2b)$$ exist, but $$f''(x)$$ does not.

The problem is easy to spot in the case of eq. $$(2b)$$. If it were true, then for any odd function we'd have $$f''(0)=0$$ - which of course is not true (take for example $$f(x)=\sqrt{x}$$ ; or any odd function discontinuous at $$x=0$$).

An example for eq $$(2a)$$: take $$f(x)=x$$ for $$x$$ irrational, $$0$$ otherwise. Again, the limit in $$(2a)$$ gives $$0$$, but $$f''(0)$$ does not exist.