Proving $f(x) = 0$ everywhere I'm stuck on this problem, I've given it considerable effort and tried using the bounded nature of continuous functions on closed, bounded intervals but I just can't solve it. I think I might need to pick a clever sequence somewhere but I can't see exactly what to do. 

Suppose that $f:[0,1] \to\mathbb{R}$ is continuous and $f(0) = f(1) = 0$. Also, suppose further that for all $x \in (0,1)$ there exists a $0 < d < \min\{x,1-x\}$ such that: $$f(x) = \frac12\Big(f(x-d) + f(x+d)\Big)\;.$$ Prove that $f(x)=0$ everywhere.

Thank You. 
 A: Suppose that $f$ is not identically $0$. Then $f$ attains a non-zero extremum at some point $c\in(0,1)$. Let $A=\{x\in[0,1]:f(x)=f(c)\}$; since $f$ is continuous, $A$ is closed and has a least element $a$; clearly $a>0$. There is a positive $d<\min\{a,1-a\}$ such that $$f(a)=\frac12\Big(f(a-d)+f(a+d)\Big)\;,$$ and since $f$ attains its maximum at $a$, $f(a)=f(a-d)$, which is impossible.

HINT for an earlier version of the problem in which $d=\min\{x,1-x\}$: 
$\quad1.$ Given $f(0)$ and $f(1)$, what is $f\left(\frac12\right)$? 
$\quad2.$ Given $f\left(\frac12\right)$ and the earlier points, what are $f\left(\frac14\right)$ and $f\left(\frac34\right)$?
$\quad3.$ Given $f\left(\frac14\right)$ and $f\left(\frac34\right)$ and the earlier points, what are $f\left(\frac18\right),f\left(\frac38\right),f\left(\frac58\right)$, and $f\left(\frac78\right)$?
$\quad4,5,\dots$
$\quad\omega.$ A continuous function is completely determined by its values on a dense set.
A: For the current case
Suppose $f$ attains the maximum value $M \gt 0$, at $c$.
Now consider the set $S = \{ x: f(x) = M\}$.
Since $2f(c) = f(c-d) + f(c+d)$, we must have that $f(c-d) = f(c+d) = M$.
This implies that $\inf S = 0$.
Thus there is a sequence $c_n \to 0$ such that $f(c_n) = M$. Thus $M=0$.
Similarly, we can show that the minimum value is $0$.
For the earlier case
(Though the above proof still carries over, just having this here because of the curious sequence we get).
You basically get the sequence:
$x_{n+1} = 2x_n$ if  $\ 0 \le x_n \le \frac{1}{2}$ and
$x_{n+1} = 2x_n - 1$ if $ \frac{1}{2} \le x_n \le 1$ 
Consider $x$ which has a finite decimal representation in base $2$.
For $x_1 = x$, for such $x$, we can show that the sequence converges to $0$ or $1$ (see what happens to the digits before and after the decimal point).
Since such $x$ are dense, and $f$ is continuous, you are done.
A: Suppose that $f$ is not identically $0$. Without loss of generality, we may assume that
$M:=\max\{f(x):0<x<1\}>0$. Define $x_0:=\inf\{x\in(0,1): f(x) =M\}$. Then $x_0\in(0,1)$ and $f(x_0)=M$, but the averaging property hypothesized will yield another point $x_1\in(0,x_0)$ with $f(x_1)=M$, and a contradiction.
A: I have not worked it out completely, but I think that if you look at the numbers $x = 0/k, 1/k, \ldots, k/k$ for some positive integer $k$ and use the aforementioned property of $f$, you get equations implying $f(i/k) = 0$ for all $i = 0, \ldots, k$. Doing this for every $k$ then implies that $f(x) = 0$ for all $x \in (0,1) \cap \mathbb{Q}$, and since $f$ is continuous this should imply $f(x) = 0$ for all $x \in (0,1)$.
