TITLE: Problem based on $f(\frac{x+y}{2})=\frac{f(x)+f(y)}{2}$
QUESTION [7 upvotes]: Let
  $$f\left(\frac{x+y}{2}\right)=\frac{f(x)+f(y)}{2}$$
  for all real $x$ and $y$. Also, $f'(0) = -1$ and $f(0)=1$. What is then the value of $f(2)$?

I got it as $-1$ by using some algebraic manipulations (of course used derivatives). But I want more of a geometrical approach to the problem. I feel that the given equations are related to the bisection formula of a line. Is it possible to approach the problem geometrically?

REPLY [2 votes]: We don't have to assume that $f$ is differentiable on all of ${\mathbb R}$. Consider the function $g(x):=f(x)+x-1$. Then $g(0)=g'(0)=0$, and $g$ satisfies the same functional equation as $f$. In particular $g({x\over2})={1\over 2}g(x)$ for all $x$. Choose an $x\ne0$. Then we have
$$g(x)=2^n\> g\bigl(2^{-n}x\bigr)=x\>{g(x/2^n)\over x/2^n}\to\> x g'(0)=0\qquad (n\to\infty)\ ,$$
which allows to conclude that in fact $g(x)=0$. Since $x\ne0$ was arbitrary this proves that $f(x)=1-x$ $(x\in{\mathbb R})$.