# How to prove that such a function is linear?

Let $f:(a.b)\rightarrow \mathbb R$ be a continuous function. How to prove that if for $\varepsilon >0$ there is a $\delta >0$ such that for $x\in (a,b)$, $|h|< \delta$ such that $x+2h \in (a,b)$

$$\left|\frac{f(x+2h)-2f(x+h)+f(x)}{h^2}\right|<\epsilon,$$

then $f$ is of the form $f(x)=\alpha x+\beta$, where $\alpha,\beta$ are constants ?

-
Not terribly important, but I suppose you want $x+2h \in (a,b)$. –  Lukas Geyer Nov 17 '12 at 16:21
Yes, obviously. –  R.S Nov 17 '12 at 16:36
The LHS is the absolute value of the forward estimate of the 2nd derivative of f at x. (en.wikipedia.org/wiki/Finite_difference) If the 2nd derivative is zero for all values of x in (a,b) then the function has to be of the form $$C_1x+C_2$$ –  peterm Nov 17 '12 at 16:47

Given $a<c<d<b$, it suffices to show that $f(x)=\alpha x+\beta$ on $[c,d]$ for some $\alpha,\beta$. Firstly, we can choose $\alpha,\beta$, such that for $g(x)=f(x)-\alpha x-\beta$, $g(c)=g(d)=0$. Since $g$ satisfies the same property with $f$, it suffices to show that $g=0$ on $[c,d]$.
Given $\lambda>0$, let $g_\lambda(x)=g(x)+\lambda(x-c)(x-d)$. Then $g_\lambda(c)=g_\lambda(d)=0$, and
$$g_\lambda(x+2h)-2g_\lambda(x+h)+g_\lambda(x)=g(x+2h)-2g(x+h)+g(x)+2\lambda h^2.$$ Then for $\epsilon=\lambda$, there exists $\delta>0$, such that when $|h|<\delta$, for any $x\in[c,d]$,
$$g_\lambda(x+h)<\frac{1}{2}(g_\lambda(x)+g_\lambda(x+2h)).$$ It implies that the maximum of $g_\lambda$ on $[c,d]$ cannot be attained in the interior $(c,d)$, i.e. $g_\lambda(x)\le 0$ on $[c,d]$. Since $\lambda$ is arbitrary, it follows that $g\le 0$ on $[c,d]$. Since the same argument works when $g$ is replaced by $-g$, $g=0$ on $[c,d]$.
In an earlier version of my answer, I mistakenly thought that in the statement of the question, it was not necessary to require that $\delta$ is independent of $x$. However, WimC's counter-example in answering this question helps me to realize my mistake. Nevertheless, if the condition is changed to $|\frac{f(x+h)-2f(x)+f(x-h)}{h^2}|<\epsilon$, then $\delta$ could be dependent on $x$. –  23rd Dec 4 '12 at 20:57