What are the continuous functions $f:\mathbb{R} \to \mathbb{R}$ such that for every $x,y\in \mathbb{R}$
$$f(\frac{x+y}{2})=\frac{1}{2}f(x)+\frac{1}{2}f(y).$$
What are the continuous functions $f:\mathbb{R} \to \mathbb{R}$ such that for every $x,y\in \mathbb{R}$
$$f(\frac{x+y}{2})=\frac{1}{2}f(x)+\frac{1}{2}f(y).$$
Let $$ \begin{align} a &= {f(y)-f(x)\over y-x}\\ b &= f(x) - ax\\ g(x) &= ax + b \end{align} $$
Clearly $g(x) = f(x)$. A bit of math shows also that $g(y) = f(y)$.
Given that $$ f\left({x+y\over 2}\right)=\frac{1}{2}f(x)+\frac{1}{2}f(y) $$ and $$ \begin{align} g\left({x+y\over 2}\right) &= a\left({x+y\over 2}\right) + b\\ &= {ax + b\over 2} + {ay+b\over 2}\\ &= {1\over 2} f(x) + {1\over 2}f(y)\\ &= f\left({x+y\over 2}\right) \end{align} $$
If we define $\delta = y-x$, we can extend this for any rational number $r = p/{2^N}$ where $p,N$ are integers:
$$ f(x+p\delta) = g(x+p\delta) = a(x+p\delta) + b $$
Thus, if $f(x)$ is continuous, it must be linear.