TITLE: Let $f(x)=\frac{f(x+e)+f(x-e)}2$. Show that $f$ is affine
QUESTION [5 upvotes]: Let $f:[a,b] \rightarrow \mathbb{R}$, continuous and  and satisfying for all $x\in (a,b)$ there exists $e>0$ such that $$f(x)=\frac{f(x+e)+f(x-e)}2$$
Show that $f$ is affine

$f$ is continuous on $[a,b]$ then I know that $f$ is bounded,
I tried to use $(\varepsilon,\eta$) method to see something, but I did not succeed.
Thank you in advance for your help.

REPLY [5 votes]: Let $$g(x)=f(x)-\frac{f(b)-f(a)}{b-a}x.$$
Then $g$ is also continuous and $f(x)=\frac{f(x+e)+f(x-e)}{2}$ implies $g(x)=\frac{g(x+e)+g(x-e)}{2}$. We have $g(a)=g(b)$.
Let $M=\sup\{\,g(x)\mid x\in[a,b]\,\}$ and $A=\{\,x\in[a,b]\mid g(x)=M\,\}$. Then $A$ nonempty (because $g$ is continuous). Let $c=\inf A$. Then $g(c)=M$ by continuity.
If $c\in (a,b)$, there exists $e>0$ with $g(c)=\frac{g(c+e)+g(c-e)}{2}$. But then $g(c-e)=2g(c)-g(c+e)\ge 2M-M=M$ and hence $g(c-e)=M$ and $c-e\in A$ contradicitng the choice of $c$.
Therefore $c=a$ or $c=b$ and at any rate $M=g(a)=g(b)$ and hence $g(x)\le g(a)$ for all $x\in[a,b]$.
The same argument works with minimum instead of maximum, showing $g(x)\ge g(a)$ for all $x\in[a,b]$. We conclude that $g$ is constant, hence $f$ is affine.