a simple functional equation $f\left(\frac{x}2\right)+f\left(\frac{x+1}2\right)=2f(x)$ we have this functional equation
$$\forall x \in [0,1] ,f\left(\frac{x}2\right)+f\left(\frac{x+1}2\right)=2f(x)$$
where $f$ is a continues function on $[0,1]$.
I need to prove that :

*

*$\exists  x_0 \in [0,1] :\forall x \in [0,1],\  f(x)\leq f(x_0)$. let's call $M:=f(x_0)$ which is the maximam of $f$

*$f$ reaches its maximum value $M$  also at $\frac{x_0}2$:$$M=f\left(\frac{x_0}2\right)$$

*$f$ reaches its maximum value $M$  also at $0$ : $$M=f(0)$$

*$f$ also reaches its minimum value at $0$ :
$$\forall x \in [0,1],\  f(0)\leq f(x)$$
if I proved that one can conclude that this function $f$ can not be anything but a constant function
 A: So we have $$f(x)=\frac12\left(f\left(\frac{x}2\right)+f\left(\frac{x+1}2\right)\right).$$
Iterating that, we get
$$f(x)=\frac14\left(f\left(\frac{x}4\right)+f\left(\frac{x+1}4\right)+f\left(\frac{x+2}4\right)+f\left(\frac{x+3}4\right)\right),$$ or more generally,
$$f(x)=\frac1{2^n}\,\sum^{2^n-1}_{k=0}\,f\left(\frac{x+k}{2^n}\right)\tag{mean}.$$ Now the RHS is obviously a Riemann integral sum for $\int^1_0\,f(t)\,dt$, so letting $n\to\infty$, we get $$f(x)=\int^1_0\,f(t)\,dt.$$
Note that we don't need continuity of $f$, it's sufficient that it be Riemann integrable.
EDIT: Of course, it's also possible to prove that with the stronger assumption that $f$ is continuous. If $f(x_0)=M=\max_{x\in[0,1]}f(x)$, we see from (mean) that for $x=x_0$, the sum on the RHS is $\le2^n\,M$, with equality only if $\displaystyle f\left(\frac{x_0+k}{2^n}\right)=M$ for all $k$. So we must have $\displaystyle f\left(\frac{x_0+k}{2^n}\right)=M$ for $k=0,\ldots,2^n-1, n\ge1$, and since that's dense in $[0,1]$, we must have $f\equiv M$.
