Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Give an example of a function f that is defined in a neighborhood of a s.t. $\lim_{h\to 0}(f(a+h)+f(a-h)-2f(a))/h^2$ exists, but is not twice differentiable.

Note: this follows a problem where I prove that the limit above $= f''(a)$ if $f$ is twice differentiable at $a$.

share|improve this question

2 Answers 2

up vote 7 down vote accepted

Take $f(x)=x^2\sin(x^{-1})$ on $\mathbb{R}-\{0\}$ and set $f(0)=0$. You can prove this is differentiable at zero, but not twice differentiable there. That said, $f(-h)=-f(h)$ and $f(0)=0$ so that $f(h)+f(-h)-2f(0)=0$.

share|improve this answer
how did you find this? edit: what was the motivation? –  MathMathCookie Nov 4 '11 at 2:27
What made me think of it? I had to do it as a problem from Rudin a long time ago, it didn't take me so little time then. How I originally thought of it was to find an odd function which takes $0$ at $0$ so that the top is simultaneously zero--but cook up that the function was not twice differentiable. I then happened to remember the function I gave you as being a classic example of a once but not twice differentiable function, and since it's odd, I was jubilant. –  Alex Youcis Nov 4 '11 at 2:29
I think the important part here is that the function $x\mapsto \sin(x^{-1})$ has discontinuity at 0 but is bounded there. Taking one derivative make the function grow at 0 like $x^{-1}$. Combining this with polynomial prefactors leads to differentiability at 0 and to a similar behavior of the original function after differentiation. –  Dirk Nov 4 '11 at 8:04

You can also integrate $|x|$. Since $|x|$ doesn't have a derivative at zero, its antiderivative (which is $-x^2/2$ for $x\le0$ and $x^2/2$ for positive $x$) should work: it's an odd function, so $f(0+h) + f(0-h)$ is zero, and $f(0)= 0$, so the limit exists, but the second derivative doesn't.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.