The problem is:

> 
> $f : \mathbb{R} \to \mathbb{R}$ is a twice differentiable function such that
> $$ \frac{1}{2y} \int\_{x-y}^{x+y} f(t) \space \mathrm{d}t = f(x) \quad [x \in \mathbb{R}, \space y>0] $$
> Show $f(x) = ax + b$ for some $a, b$ for all $x \in \mathbb{R}$
> 
> 
> 

I have seen various solutions to this problem online, but I found one that does not use the twice-differentiable property, and was wondering if I had made a slip somewhere.

*Solution*

By differentiating w.r.t. $y$, we get

$$\frac{f(x+y) + f(x-y)}{2} = f(x)$$

This means that $f$ has the property that if any two points lie on the graph of $f$, so does their midpoint. As a corollary, if $P\_1, P\_2$ lie on this graph, then if $P\_3$ is a point such that the midpoint of $P\_1P\_3$ is $P\_2$, then $P\_3$ lies on the the graph also.

So now let $A = (0, f(0)), \space B = (1, f(1))$, and the line joining them be given by $y = g(x) = ax+b$. By the property described above, this means that $f(\pm 2^n) = g(\pm 2^n) \space [n \in \mathbb{Z}]$. So by a 'binary search' procedure, we can, for any $k$, construct a sequence $a\_n$ with $\lim a\_n = k$ and $f(a\_n) = g(a\_n)$.

But then, since $f$ and $g$ are both continuous, we wind up with $f(k) = g(k)$, which is what we wanted to prove.