Which functions $f:\mathbb{R} \to \mathbb{R}$ do satisfy Jensen's functional equation $$f\left(\frac{x+y}{2}\right) = \frac{f(x)+f(y)}{2}$$ for all $x,y \in \mathbb{R}$?
I think the only ones are of type $f(x) = c$ for some constant $c\in \mathbb{R}$ and the solutions of the Cauchy functional equation $f(x+y) = f(x)+f(y)$ and the sums and constant multiples of these functions. Are there other functions which are both midpoint convex and concave?