TITLE: Mean value property with fixed radius
QUESTION [10 upvotes]: I will focus on the real line. Let $f$ be a smooth function on $\mathbb{R}$, if
$\forall x\in\mathbb{R}, r>0$,
$$\frac{f(x-r)+f(x+r)}{2}=f(x),$$
we say that f has the spherical mean value property (MVP); if instead
$$\frac{1}{2r}\int_{x-r}^{x+r}f(t)dt=f(x),$$
we say f has the ball MVP. It is easy to see that spherical MVP implies ball MVP.
It is well known, and not hard to prove (though it is much harder in higher dimensions), that ball MVP implies that $f$ is harmonic, i.e. $f$ is of the form $ax+b$, where $a$ and $b$ are constants.
Notice that in the definitions above, we require the radius $r$ to run over all the positive numbers. Out of curiosity, I tried to find non harmonic functions which satisfy the MVPs only for $r=1$. It turns out any $1$-periodic function will satisfy the spherical MVP with $r=1$, which is obvious. But it seems much harder to find one for ball MVP. So here is my question:

Question: Does there exist a function $f$ which is not of the form $ax+b$, such that $\forall x\in\mathbb{R},$
  $$\frac{1}{2}\int_{x-1}^{x+1}f(t)dt=f(x)?$$

Thank you!

REPLY [5 votes]: We can construct many solutions by setting $f(x)=F'(x)$ where
$F$ is smooth and satisfies
$$ 2F'(x)=F(x+1)-F(x-1)$$
for all $x$. For example, $F$ can be generated from this formula by starting with an arbitrary smooth ($C^\infty$) 
function on $[-1,1]$ that vanishes near the points $-1$, $0$, and $1$:
For $x>1$, $$F(x)= F(x-2)+2F'(x-1)$$ defines $F$ successively on $(k,k+1]$ for $k=1,2,\dots$, and for $x<-1$, $$F(x)=F(x+2)-2F'(x+1)$$ does the same trick successively on $[-k-1,-k)$. This yields a function $F$ that vanishes near each integer, and is clearly smooth.