I am currently working with Wheeden Zygmund's Measure and Integral. I got stuck on one of the exercises (Ch. 6, Ex. 13).
Let $f \in L(-\infty,\infty)$ (Lebesgue integrable), and let $h > 0$ be fixed. Prove that $$ \int_{-\infty}^\infty (\frac{1}{2h} \int_{x-h}^{x+h} f(y) \, dy) \, dx = \int_{-\infty}^\infty f(x) \, dx $$
I believe it suffices to prove that $ \frac{1}{2h} \int_{x-h}^{x+h} f(y) \, dy = f(x) $ using the mean value theorem, but I am not entirely sure. Can anyone give me a hint on this problem? Thanks in advance!