Example of a function that is not twice differentiable 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&#39;&#39;(a)$ if $f$ is twice differentiable at $a$.
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$.
Consider the function $f(x) = \sum_{i=0}^{n}|x-i|$. This function is continuous everywhere but not differentiable at exactly n points. Consider the function 
$G(x) = \int_{0}^{x} f(t) dt$. This function is differentiable, since $f(t)$ is continuous due to FTC II. Now $G'(x) = f(x)$, which is not differentiable at $n$ points.