Prove that function is constant
Solution 1:
It is not even necessary to assume that $f$ is continuous.
- By letting $y = 2x$, we see that $f(x) = f(2x)$
- Letting $y = -4x$, we get $f(-x) = \frac{f(x) + f(-4x)}{2}$. However, from (1), $f(-4x) = f(-2x) = f(-x)$, so this simplifies to $f(-x) = f(x)$
- Finally, let $y = -x$ and simplifying gives $2f(0) = f(x) + f(-x)$. Substituting in from (2), this becomes $f(0) = f(x)$. Since this holds for all $x \in \mathbb{R}$, we conclude that $f$ must be constant.
Solution 2:
The statement also holds if we only suppose that $f$ is continuous (and not necessarily differentiable).
Suppose that $f(x_0) \neq f(0)$ for some $x_0 \in \Bbb R$. We note that $$ f \left( \frac{x_0 + x_0}{3} \right) = \frac{f(x_0) + f(x_0)}{2} \implies\\ f\left( \frac 23 x_0\right) = f(x_0) $$ Then, consider the sequence $\left( \frac 23\right)^n x_0 \to 0$.