Prove $f(x)=ax+b$

Solution 1:

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.

Solution 2:

We can assume that $f(-1)=0$ and $f(1)=0$ (because if not then replace $f(x)$ by $f(x)-\frac{f(1)-f(-1)}{2}(x+1) -f(-1)$). We prove that $f=0$, hence for general $f$ we will have $f(x) = \frac{f(1)-f(-1)}{2}(x+1) -f(-1)$.

The hypothesis for $x=1$ and $x=-1$ gives : $$f(h)=-f(2-h)+o(1),$$ $$f(h)=-f(-2-h)=o(1),$$ when $h$ goes to $+\infty$.

Lemma : $f$ is periodic.

Proof. Take $x \in \mathbb{R}$. Then : \begin{eqnarray*} f(x+h)+f(x-h) &=& 2 f(x) + o(1) \\ &=& -f(2-x-h) - f(2-x+h) + o(1) = -2f(2-x) +o(1) \\ &=& -f(2-x-h) - f(-2-x+h) + o(1) = -2f(-x) +o(1) \\ &=& -f(-2-x-h) - f(-2-x+h) + o(1) = -2f(-2-x) +o(1) \\ \end{eqnarray*} Hence $f(x)=-f(-x)=-f(2-x)=-f(-2-x)$. This implies that $f$ is $2$-periodic. QED

Let $T$ be the group of periods of $f$ and $t \in T$. Then \begin{eqnarray*} \forall x, \ f(x+h)+f(x-h) &=& 2 f(x) + o(1) \\ &=& f(x+h)+f(t+x-h) = 2 f(t/2+x) +o(1) \\ \end{eqnarray*} Hence $\frac{t}{2} \in T$. So $T$ is non discrete and since $f$ is continuous, $T=\mathbb{R}$.

Solution 3:

For $t,x\in\mathbb R$, let $h_t(x) = f(t+x)-f(t-x)$. For $a,t,x\in\mathbb R$, let $g_{a,t}(x)=h_{x+t}(2a)$. Then $$\begin{align}g_{a,t}(x)&=f(x+2a+t)-f(x-2a+t)\\&=2(f(a+t)-f(t-a))\\&\quad{}+[f(x+2a+t)-2f(a+t)+f(t-x)]\\&\quad{}-[f(x-2a+t)-2f(t-a)+f(t-x)]\\ &\to2(f(a+t)-f(t-a))= 2h_t(a)&\text{as }x\to\pm\infty.\end{align} $$ Because $g_{a,t}(x)=g_{a,0}(x+t)$, we conclude that the limit does not depend on $t$, i.e. $h_t(a)=h_0(a)$. For $a,b\in\mathbb R$, we have $$\begin{align}g_{a,0}(x)+g_{b,0}(-x)&=f(x+2a)-f(x-2a)+f(-x+2b)-f(-x-2b)\\ &=2f(a+b)-2f(-a-b)\\&\quad{}+[f(x+2a)-2f(a+b)+f(-x+2b)]\\&\quad{}-[f(x-2a)-2f(-a-b)+f(-x-2b)]\\&\to 2h_0(a+b)&\text{as }x\to\pm\infty. \end{align}$$ Thus $h_0(a+b)=h_0(a)+h_0(b)$. Since $h_0$ is continuous, this implies that $h_0(x)=\alpha x$ for some $\alpha\in\mathbb R$. (Without continuity, $h_0$ might be an ugly endomorphism of the $\mathbb Q$-vector space $\mathbb R$). We conclude $$ f(x) = f(0)+2h_{\frac x2}\bigl(\tfrac x2\bigr) = f(0)+2h_0\bigl(\tfrac x2\bigr)=f(0)+\alpha x.$$