Finding $f(x)$ with $\frac{1}{2a}\int_{x-a}^{x+a}f(t)dt=f(x)$ Problem
Let $f(x)$ be a differentiable function with $f(0)=1$ and $f(1)=2$. For any $a,x$ where $a \neq 0$, it holds $$\frac{1}{2a}\int_{x-a}^{x+a}f(t)dt=f(x).$$
Find $f(x)$.
Attempt
Since
$$f(x)=\frac{\displaystyle\int_{x-a}^{x+a}f(t)dt}{2a}$$
holds for all $x \in \mathbb{R}$ and $a \neq 0$. One can fix $x$ and take the limit as $a \to 0$. Thus
$$\lim_{a \to 0}f(x)=\lim_{a \to 0}\frac{\displaystyle\int_{x-a}^{x+a}f(t)dt}{2a}=\frac{f(x+a)+f(x-a)}{2},$$
where we applied L'Hopital's rule. Thus
$$f(x)=\frac{f(x+a)+f(x-a)}{2}.$$
How to go on from here?
 A: A bit late this answer but I think it is worth mentioning it:
Applying differentiation with respect to $a$ to 


*

*$\int_{x-a}^{x+a}f(t)dt=2af(x)$
gives
$$2f(x) = f(x+a) + f(x-a)$$
$f$ is differentiable, so differentiating wrt. $a$ again gives
$$0 = f'(x+a) - f'(x-a)$$
Since this holds true for all $a,x \in \mathbb{R}$, it is also true for $a = x$:
$$f'(2x) = f'(0) \Rightarrow f' = const. \stackrel{f(0)=1,f(1)=2}{\Longrightarrow} f(x) = 1+x$$
A: The answer is that $f(x)=1+x$.
By differentiating both sides you get
$$\frac{f(x+a)-f(x-a)}{2a}=f'(x)$$
and this holds for every $a$, so differentiating by $a$:
$$(f'(x+a)+f'(x-a))2a-2(f(x+a)-f(x-a))=0$$
Dividing by $a$ you get:
$$f'(x+a)+f'(x-a)=\frac{f(x+a)-f(x-a)}{a}=2f'(x)$$
Differentiating by $a$ again gives
$$f''(x+a)-f''(x-a)=0$$
and since $x,a$ are arbitrary, this implies that $f''(x)$ is constant. Therefore, $f(x)=\alpha+\beta x+\gamma x^2$ for some $\alpha,\beta,\gamma$. Invoking the initial data we deduce that $f(x)=1+\beta x+(1-\beta)x^2$ for some $\beta$. Integrating around zero, we get
$$1=f(0)=\frac{1}{2a}\int_{-a}^a(1+\beta t+(1-\beta)t^2)\,dt=1-\frac{a^2}{3}(\beta-1)$$
which implies that $\beta=1$, and so the function $f(x)$ must be equal to $1+x$.
A: Differentiate to get $f'(x)=\frac {f(x+a)-f(x-a)} {2a}$ for all $x$ and $a$. Conclude from this that $f(b)-f(a)=(b-a)f'(\frac {a+b} 2)$ for all $a$ and $b$. Use the following to complete the solution: If $f(b)-f(a)=(b-a)f'(\frac{a+b}{2})$ prove that any such function is a polynomial of degree $2$
