8
$\begingroup$

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?

$\endgroup$

3 Answers 3

8
$\begingroup$

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$.

$\endgroup$
12
  • $\begingroup$ 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 :) $\endgroup$
    – Nescio
    Commented May 25, 2015 at 16:14
  • 1
    $\begingroup$ 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. $\endgroup$
    – user21820
    Commented May 25, 2015 at 16:21
  • $\begingroup$ I have a doubt about the last step: there $f'(x)$ represents the derivative with respect to $h$, so the limit of the difference quotient in Leibniz’s notation would be $$\lim_{h \to 0}\frac{\frac{df}{dh}(x+h) - \frac{df}{dh}(x)}{h}.$$ How is this the same as $\frac{d^2f}{dx^2}(x)$? $\endgroup$ Commented Sep 9, 2022 at 15:57
  • $\begingroup$ Or is it perhaps $$\lim_{h \to 0}\frac{\frac{df}{dh}(x+h) - \frac{df}{dx}(x)}{h} ?$$ (Here the second term in the numerator is derived wrt $x$.) Then one could say $\frac{df}{dh}(x + h) = \frac{df}{dx}(h + x)$ (could they, really?) and so the expression would become one I can recognize as the second derivative of $f(x)$. $\endgroup$ Commented Sep 9, 2022 at 16:20
  • $\begingroup$ @ArchStanton: That last step is trivially the definition of derivative of $f'$. If you want to understand what is going on, you need to learn rigorous real analysis. The expression you wrote in your first comment is technically meaningless, and as far as I know not Leibniz notation. And you're plain wrong in saying that "$f'(x)$ represents the derivative with respect to $h$". Please throw away any book that gave you such an idea, and learn from Spivak's "Calculus" instead. $\endgroup$
    – user21820
    Commented Sep 10, 2022 at 10:26
5
$\begingroup$

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[3]{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.

$\endgroup$
2
  • $\begingroup$ Can you please explain how if eq. 2b were true then for any odd function we would have $f''(0) = 0$? $\endgroup$ Commented May 16, 2023 at 19:03
  • $\begingroup$ @AspiringMathlete If $f$ is odd and continuous, then $f(0)=0$, and the numerator of ($2b$), at $x=0$, is $f(h)+f(-h)=0$ $\endgroup$
    – leonbloy
    Commented May 16, 2023 at 19:50
5
$\begingroup$

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}}$

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 ≠ 0$ with $|c|<|h|$ [by the mean value theorem]

$\ \in o(c) h ⊆ o(h) h = o(h^2)$ as $h \to 0$. [since $c → 0$ as $h → 0$]

Notes

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

$\endgroup$
3
  • 1
    $\begingroup$ I am not absolutely sure as to how did you conclude that $f'(x + c) - f'(x) \in o(h).$ But what I think is that instead of thinking of it as a constant, $c$ can better be thought of as a function of $h$ with $c (h) \to 0$ as $h \to 0$ for obvious reasons. In fact we can make $c$ continuous at $0$ by allowing it to take the value $0$ at $h = 0.$ Since $f'(x) - g'(0) = 0,$ we then have $$\frac {f'(x + c) - g'(c)} {h} = \frac {f'(x + c) - g'(c)} {c} \cdot \frac {c} {h}.$$ Since $|c| < |h|,$ the RHS goes to $f''(x) - g''(0) = 0,$ as $h$ approaches zero. Hence $f'(x + c) - g'(c) \in o(h).$ $\endgroup$ Commented Apr 14 at 21:05
  • $\begingroup$ @AnilBagchi.: I didn't say c was a constant. It is under the subcontext "as h → 0", so of course it depends on h. I have edited to clarify a bit. Also, your approach is unfortunately wrong as written, because you didn't guarantee c ≠ 0. This is why the conventional approach (which you seem to be trying to follow) is actually more complicated than the approach I presented here. I suggest that you learn my approach, as it is extremely powerful and used in all professionally designed computer algebra systems. Thanks for your comments! $\endgroup$
    – user21820
    Commented Apr 15 at 5:30
  • $\begingroup$ Upvoted and deleted all my comments except the first one in the view of the fact that if any confusion regarding this arises in future I get back to this post again and never do the same mistake that I did earlier. No other crude intention is going on. $\endgroup$ Commented Apr 15 at 5:32

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .