Second difference $ \to 0$ everywhere $ \implies f $ linear Exercise 20-27 in Spivak's Calculus, 4th ed., asks us to show that if $f$ is a continuous function on $[a,b]$ that has 
$$
\lim_{h\to 0}\frac{f(x+h)+f(x-h)-2f(x)}{h^2}=0\,\,\,\text{for all }x,
$$
then $f$ is linear. We do this by first treating the case  $f(a)=f(b)$, and assuming there is a point $x\in (a,b)$ such that $f(x)>f(a)$. Then we look at $g(x):= f(x)+ \epsilon (x-a)(x-b)$.
Suppose that we abandon the hypothesis of continuity. (The only reason we need continuity is to conclude that $g$ has a maximum on $(a,b)$). What is a counterexample, where the Schwarz second derivative is zero everywhere, and yet the function is not linear? 

counterexample :set $f(x)=-1$ for $0\leq x<1$ , $f(x)=1$ for $1<x\leq 2$ and $f(1)=0$. Clearly that limit is zero on for $x\not=1$ and $\frac{f(1+h)+f(1-h)-2f(1)}{h^2}=0.    $
