Prove $f(x)=ax+b$ Let $f(x)$ be a continuous function in $\mathbb R$ that for all $x\in(-\infty,+\infty)$, satisfies
$$ \lim_{h\rightarrow+\infty}{[f(x+h)-2f(x)+f(x-h)]}=0. $$ 
Prove that $f(x)=ax+b$ for some $a,b\in\mathbb R$.
This is a problem from my exercise book, but I can't figure out the solution of it, I think the solution in my book is wrong. :( Any idea and proof of it are welcome! Thank you in advance.

Given $x\in\mathbb{R}$, the limit can be rewritten as
$$f(x)=\frac{1}{2}\lim_{h\to\infty}[f(x+h)+f(x-h)].\tag{1}$$
Given $y\in\mathbb{R}$, replacing $h$ with $h+y$ or $h-y$  in $(1)$, we have
$$f(x)=\frac{1}{2}\lim_{h\to\infty}[f(x+y+h)+f(x-y-h)],\quad \forall x\in\mathbb{R}.\tag{2}$$
and
$$f(x)=\frac{1}{2}\lim_{h\to\infty}[f(x-y+h)+f(x+y-h)],\quad \forall x\in\mathbb{R}.\tag{3}$$
Replacing $x$ with $x+y$ or $x-y$ in $(1)$ respectively, we have:
$$f(x+y)=\frac{1}{2}\lim_{h\to\infty}[f(x+y+h)+f(x+y-h)]\tag{4}$$
and 
$$f(x-y)=\frac{1}{2}\lim_{h\to\infty}[f(x-y+h)+f(x-y-h)].\tag{5}$$
Comparing $(2)+(3)$ and $(4)+(5)$, we have:
$$2f(x)=f(x+y)+f(x-y),\tag{6}$$
or equivalently, 
$$f(\frac{x+y}{2})=\frac{1}{2}[f(x)+f(y)].\tag{7}$$
$(7)$ together with the continuity of $f$ implies that $f$ is both convex and concave on $\mathbb{R}$, so $f$ must be a linear function.
