Show that f is periodic if $f(x+a)+f(x+b)=\frac{f(2x)}{2}$? Suppose $a$ and $b$ are distinct real numbers and $f$ is a continuous real function such that $\frac{f(x)}{x^2}$ goes to 0 when $x$ goes to infinity or minus infinity. Suppose that$ f(x+a)+f(x+b)=\frac{f(2x)}{2}$. How show that $f$ is periodic?
 A: There are not so many possibilities for equation transformations, so we go straight forward. For the determinancy assume that $a<b$. 
Let $x$ be an arbitrary real number.  Then 
$$f(2x+a)+f(2x+b)=\frac{f(4x)}{2}.$$
But 
$$f(2x+a)=2\left(f\left(x+a+\frac a2\right)+ f\left(x+b+\frac a2\right)\right),$$
$$f(2x+b)=2\left(f\left(x+a+\frac b2\right)+ f\left(x+b+\frac b2\right)\right).$$
So 
$$f\left(x+a+\frac a2\right)+ f\left(x+b+\frac a2\right)+f\left(x+a+\frac b2\right)+ f\left(x+b+\frac b2\right)=\frac{f(4x)}{4}.$$
Similarly, by induction we can show that for each non-negative integer $n$
$$S_n(x)= \sum_{i=0}^{2^n-1} f\left(x+2a+\frac{ib-(i+1)a}{2^{n-1}}\right)=\frac{f(2^nx)}{2^n}.$$
Indeed, above this equality is already proved for $n\le 2$. Assume that the equality is proved for each real $x$ and a non-negative integer $n$. Then 
$$\frac{f(2^{n+1}x)}{2^{n+1}}=\frac{1}{2^n}\left(f(2^nx+a)+ f(2^nx+b)\right)=$$ $$S_n\left(x+\frac{a}{2^n}\right)+ S_n\left(x+\frac{b}{2^n}\right)=$$
$$\sum_{i=0}^{2^n-1} f\left(x+\frac{a}{2^n}+2a+\frac{ib-(i+1)a}{2^{n-1}}\right)+ f\left(x+\frac{b}{2^n}+2b+\frac{ib-(i+1)a}{2^{n-1}}\right)=$$
$$\sum_{i=0}^{2^n-1} f\left(x+2a+\frac{2ib-(2i+1)a}{2^n}\right)+ f\left(x+2a+\frac{(2i+1)b-(2i+2)a}{2^n}\right)=$$ $$ \sum_{i=0}^{2^{n+1}-1} f\left(x+2a+\frac{ib-(i+1)a}{2^n}\right)=S_{n+1}(x).$$ 
Let  $$\sigma_n(x)=\frac{b-a}{2^n} \sum_{i=0}^{2^n-1} f\left(x+2a+\frac{i(b-a)}{2^{n-1}}\right)$$ be an integral sum for the function $f$ at the segment $[x+2a, x+2b]$. Since the function $f$ is continuous on this segment, it is integrable on it, so for each real $x$ a sequence $\{\sigma_n(x)\}$ converges to an integral $\int^{x+2b}_{x+2a} f(t)dt$. Let $\tau_n(x)=\frac{b-a}{2^n}S_n(x)$. Since the function $f$ is continuous on the segment $I=[x+\min\{0,2a\}, x+\max\{0,2a\}+2(b-a)]$ , it is uniformly continuous on it. Then for each $\varepsilon>0$ there exists natural $N$ such that if $n>N$, $t,t’\in I$, and $|t-t’|<\frac{|a|}{2^{n-1}} $  then $|f(t)-f(t’)|<\varepsilon$. Then 
$$|\tau_n(x)-\sigma_n(x)|=$$ $$\left|\frac{b-a}{2^n}\sum_{i=0}^{2^n-1} f\left(x+2a+\frac{ib-(i+1)a}{2^{n-1}}\right) - \frac{b-a}{2^n} \sum_{i=0}^{2^n-1} f\left(x+2a+\frac{i(b-a)}{2^{n-1}}\right)\right|=$$ 
$$\frac{b-a}{2^n}\left|\sum_{i=0}^{2^n-1} f\left(x+2a+\frac{ib-(i+1)a}{2^{n-1}}\right) -   f\left(x+2a+\frac{i(b-a)}{2^{n-1}}\right)\right|< $$
$$\frac{b-a}{2^n}\sum_{i=0}^{2^n-1}\varepsilon=\frac{(b-a)}{2^n}\cdot 2^n\varepsilon=(b-a)\varepsilon.$$
Thus the sequence  $\{\tau_n(x)\}$ converges to the integral $\int^{x+2b}_{x+2a} f(t)dt$ for each real $x$. 
One the other hand
$$\tau_n(x)=\frac{b-a}{2^n}S_n(x)=\frac{b-a}{2^n}\cdot\frac{f(2^nx)}{2^n}$$
tends to zero when $n$ tends to infinity (the case $x\ne 0$ directly follows from the question condition, in the case $x=0$
it suffices to remark that $f(2^nx)=f(0)$ for all $n$). 
Thus $\int^{x+2b}_{x+2a} f(t)dt=0$ for each real $x$. Differentiating both sides of this equality with respect to $x$ (this is allowed, by instance, by [Fich, 305, 12$^\circ$, p. 116]), we obtain $f(x+2b)-f(x+2a)=0$. Since $a\ne b$, the function $f$ is periodic. Since it is continuous, it is constant or has a minimal period. By Hans Engler’s comment the latter case is impossible and this constant is zero. 
What’s a pity, so much efforts for zero! 
References 
[Fich] Grigorii Fichtenholz, Differential and Integral Calculus, vol. II, 7-th edition, M.: Nauka, 1970 (in Russian).
