Question 46
Given a continuous function $f: \mathbb{R} \to \mathbb{R}$, denote, for each interval $[a, b]$, $m_{ab} = \min_{x \in [a, b]} f(x)$ and $M_{ab} = \max_{x \in [a, b]} f(x)$. Find all the continuous functions $f: \mathbb{R} \to \mathbb{R}$ such that, for every $a \lt b$, $f(\frac{a+b}{2}) = \frac{m_{ab} + M_{ab}}{2}$.