Limit of the integral of a measurable periodic function Let $f: \mathbb{R} \mapsto \mathbb{R}$ be a measurable periodic function with period $T>0.$ Show that if $f \in L^1 ([0,T]),$ then
$$\lim_{x \to \infty} \frac{1}{x}\int_{[0,x]}^{}f(t) \ d m(t)$$
exists. I am trying to prove this and have been getting nowhere. Since we are letting $x$ get large, I am thinking we can split the integral up into intervals of its period. However, just because $f$ is integrable on $[0,T]$ does not mean that the integral on its whole domain will be finite.
Does anyone know how to approach this?
 A: Let $x > 0$ be arbitrary. Write $x = nT + r$ where $r = x \bmod T \in [0, T)$. We have
\begin{align}
\frac{1}{x}\int_{[0, x]}f(t)\,dm(t) &= \frac{1}{nT + r}\left(n\int_{[0, T]}f(t)\,dm(t) + \int_{[0, r]}f(t)\,dm(t)\right) \\
&= \frac{n}{nT + r}\int_{[0, T]}f(t)\,dm(t) + \frac{1}{nT + r}\int_{[0, r]}f(t)\,dm(t).
\end{align}
I leave to you to show that $\frac{n}{nT + r} \to \frac{1}{T}$ and $|\frac{1}{nT + r}\int_{[0, r]}f(t)\,dm(t)| \to 0$ as $x \to \infty$. Hence
$$\lim_{x \to \infty}\frac{1}{x}\int_{[0, x]}f(t)\,dm(t) = \frac{1}{T}\int_{[0, T]}f(t)\,dm(t).$$
A: I claim that infact
$$\lim_{x\to \infty}\frac{1}{x}\int_0^xf(t)dt=\frac{1}{T}\int_0^Tf(t)dt.$$
Because $f$ is periodic, you know that for $i\in \mathbb{N}$,$$\int_{Ti}^{T(i+1)}f(t)dt=\int_0^Tf(t)dt.$$
In particular, for any $x\in (Tk,T(k+1))$, we have that
$$\int_0^xf(t)dt=\sum_{i=0}^{k-1}\int_{Ti}^{T(i+1)}f(t)dt+\int_{Tk}^{x}f(t)dt=k\int_0^Tf(t)dt+\int_{0}^{x-Tk}f(t)dt.$$
Thus we have that
$$|\frac{1}{x}\int_0^xf(t)dt-\frac{1}{T}\int_0^Tf(t)dt|\le (\frac{1}{T}-\frac{k}{x})|\int_0^Tf(t)dt|+\frac{1}{x}|\int_0^{x-Tk}f(t)dt|\le $$$$(\frac{1}{T}-\frac{k}{x})|\int_0^Tf(t)dt|+\frac{1}{x}\int_0^{T}|f(t)|dt.$$
As $x\to \infty$, we see that $\lim_{x\to \infty}\frac{k}{x}=\lim_{x\to \infty}\frac{[x/T]}{x}=\frac{1}{T}$ where $[y]$ denotes the floor of $y$. From this we see that
$$\lim_{x\to \infty}|\frac{1}{x}\int_0^xf(t)dt-\frac{1}{T}\int_0^Tf(t)dt|=0,$$
which establishes the desired claim.
