Let's say I've a function $y\colon [0,\infty]\to\mathbb{R}$ and it is periodic with $T$. If we take a look at the average value of this function over the hole region we can write:
$$\lim_{n\to\infty}\frac{1}{n}\int_0^nf(x)\,dx=\frac{1}{T}\int_0^Tf(x)\,dx$$
But how can prove that that is indeed true?
My work:
When $f(x)$ is periodic with T, the integral on the left hand side is infinite. So we can use lhopitals rule:
$$\lim_{n\to\infty}\frac{1}{n}\int_0^nf(x)\,dx=\lim_{n\to\infty}\frac{\frac{d}{dn}\left(\int_0^nf(x)\,dx\right)}{\frac{d}{dn}\left(n\right)}=\lim_{n\to\infty}\frac{f(n)}{1}=\lim_{n\to\infty}f(n)$$
So, we get:
$$\lim_{n\to\infty}f(n)=\frac{1}{T}\int_0^Tf(x)\,dx$$
But because $f(x)$ is periodic $f(\infty)$ does not have a 'value'. So this leads to noting.
Suppose that $n=kT+n'$, where $0\le n'<T$. Then:
$$\frac{1}{n}\int_0^n f(x)dx = \frac{k\int_0^T f(x)dx + \int_{kT}^{kT+n'}f(x)dx}{n}=\frac{k}{kT+n'}\int_0^T f(x)dx+\frac{1}{n}\int_{kT}^{kT+n'}f(x)dx$$
As $n\to\infty$, we have $k\to \infty$, while $n'$ and $\int_{kT}^{kT+n'}f(x)dx$ remain bounded. Hence, in the limit, the first summand approaches $\frac{1}{T}\int_0^T f(x)dx$, while the second summand approaches $0$.