# Prove that $f(x)=cx+d$

Let $f$ be a continuous function defined on the interval $[0,1]$, such that for each $x \in (0,1)$ there is an $h$ satisfying $0\le x-h \lt x+h\le1$ and $$f(x)=\frac {f(x+h)+f(x-h)}2.$$

Prove that $f(x)=cx+d$ for some choice of real numbrs $c$ and $d$.

• Consider $g(x) = f(x) - f(0) - \bigl(f(1) - f(0)\bigr)\cdot x$. Then $g$ has the same property, and $g(0) = g(1) = 0$. Show that $g\equiv 0$. – Daniel Fischer Aug 14 '15 at 14:29

Because of $$f(x) = f\left(\frac{(x+h) + (x-h)}{2}\right) = \frac{f(x+h)+f(x-h)}{2}$$ the function is neither strictly convex nor strictly concave, so it has to be linear :)