Finding $f(x)$ with $\frac{1}{2a}\int_{x-a}^{x+a}f(t)dt=f(x)$
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 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$$