Problem based on $f(\frac{x+y}{2})=\frac{f(x)+f(y)}{2}$ 
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?
 A: by using partial differentiation with respect to $x$ we can say that $$ f '\left(\frac{x+y}{2}\right).\frac{1}{2}=\frac{f '(x) + 0}{2} $$
now put $x=0$ and $ f'(0)=-1$       $$f '\left(\frac{y}{2}\right)\frac{1}{2}=\frac{-1}{2} $$  $$\Rightarrow f '\left(\frac{y}{2}\right)={-1}$$ this implies $f(x)$ is a linear function with slope "$-1$" for all real value of $x$ $\Rightarrow f(x)=-x+c $ further $f(0)=1 \Rightarrow c=1$ 
now $f(2)=-2+1=-1$
A: 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})$.
A: Partial differentiation with respect to $x$ yields
$$
\frac12\,f'\left(\frac{x+y}2\right)=\frac12\,f'(x)\tag{1}
$$
Setting $x=0$ and multiplying by $2$ yields
$$
f'\left(\frac y2\right)=f'(0)\tag{2}
$$
Thus, $f'$ is a constant. Therefore, the Mean Value Theorem says
$$
f(x)=f(0)+xf'(0)\tag{3}
$$
Equation $(3)$ and the information given implies
$$
f(x)=1-x\tag{4}
$$
