A proof for this result (Edited: A missing integral sign has been supplied.)
Can somebody give me a proof for the following result?
Let $g:\mathbb{R}\to \mathbb{R} $ be a (Riemann) integrable function and periodic, of period T, and $f:[0,T]\to \mathbb{R}$ an integrable function. Prove that  $$ \lim_{n\to\infty}\int_0^Tf\left(x\right)g\left(nx\right)\mathrm{dx}=\frac{1}{T}\cdot\int_{0}^{T}f\left(x\right)\mathrm{dx}\cdot\int_{0}^{T}g\left(x\right)\mathrm{dx}
 $$
 A: Take $\,T=2\pi\;,\;g(x)=\cos x\;,\;f(x)=1\,$ for a straightforward contradiction:
$$\lim_{n\to\infty}f(x)g(nx)=\lim_{n\to\infty}\cos nx\neq\frac{1}{2\pi}\int\limits_0^{2\pi}dx\int\limits_0^{2\pi}\cos x\,dx=\left.\frac{1}{2\pi}(2\pi)\sin x\right|_0^{2\pi}=0$$
A: Assume for simplicity that $f$ is continuous and whence uniformly continuous on $[0,T]$. Let an $\epsilon>0$ be given. Then for all large enough $n$ we know that
$|f(x)-f(x')|\leq\epsilon$ as soon as $|x-x'|\leq{T\over n}$.
Put ${1\over T}\int_0^T g(x)\ dx=:\bar g$. 
Partition $[0,T]$ into $n$ intervals $I_k:=[x_{k-1},x_k]$ $\ (1\leq k\leq n)$ of equal length. Then
$$\int_{I_k} g(nx)\ dx=\int_{I_k}\bar g\ dx\ .\tag{1}$$
Therefore we can write
$$\int_{I_k} f(x) g(nx)\ dx=\bar g\int_{I_k} f(x)\ dx + \int_{I_k} \bigl(f(x)-f(x_k)\bigr)\bigl( g(nx)-\bar g\bigr)\ dx$$
(note that because of $(1)$  the introduction of the term $-f(x_k)$ changes nothing), and we obtain
$$\int_{I_k} f(x) g(nx)\ dx- \bar g\int_{I_k} f(x)\ dx =\epsilon\ \int_{I_k} \Theta \ \bigl(|g(nx)|+|\bar g|\bigr)\ dx\ ,\tag{2}$$
where $\Theta$ absorbs  quantities of absolute value $\leq1$.
Summing the $n$ equations $(2)$ up we get
$$\int_0^T f(x)g(nx)\ dx -\bar g\int_0^T f(x)\ dx=\epsilon\ 2\Theta\int_0^T|g(x)|\ dx\ .$$
As $\epsilon>0$ was arbitrary the claim follows.
