Putnam 1967 problem, integration I have some problems understanding this solution of this problem:
Given $f,g : \mathbb{R} \rightarrow \mathbb{R}$ - continuous functions with period $1$, prove that
$$\lim _{n \rightarrow \infty} \int_0^1 f(x)g(nx) \, dx = \int_0^1 f(x) \, dx \cdot \int_0^1g(x) \, dx$$
It says there that if we split this integral into $n$ parts to get
$$\int_0^1 f(x)g(nx) \, dx = \sum_{r=0}^{n-1} \int_{\frac{r}{n}}^{\frac{r+1}{n}} f(x)g(nx) \, dx$$
we will have 
$$\int_0^1 f(x)g(nx) \, dx = \sum_{r=0}^{n-1} f\left(\frac{r}{n}\right) \int_{\frac{r}{n}}^{\frac{r+1}{n}}g(nx) \, dx$$
because for large $n$, $f$ is roughly constant over the range.
Could you tell me why $f$ is roughly constant over the range for $n$ large enough?
I would really appreciate all your insight.
 A: It is saying $f$ is roughly constant over $[\frac{r}{n},\frac{r+1}{n}]$.
A: We have
$$\int_0^1 f(x)g(nx)dx = \sum_{r=0}^{n-1} \int_{\frac{r}{n}}^{\frac{r+1}{n}}f(x)g(nx)dx$$
so we change the variable: $t=nx$ we find
$$\int_0^1 f(x)g(nx)dx = \frac{1}{n}\sum_{r=0}^{n-1} \int_{{r}}^{{r+1}}f(\frac{t}{n})g(t)dt$$
Now for large $n$ and by continuity of $f$ we can approximate $f(\frac{t}{n})$ in the interval $[r,r+1]$ by $f(\frac{r}{n})$ since
$$\lim_{n\to\infty} f(\frac{t}{n})-f(\frac{r}{n})=0\quad \forall t\in[r,r+1]$$and since $g$ is with period $1$ we have
$$\int_0^1 f(x)g(nx)dx \approx \int_{{0}}^{{1}}g(t)dt \frac{1}{n}\sum_{r=0}^{n-1}f(\frac{r}{n}) $$
finally we conclude by the Riemann sum.
A: I hesitate to post an answer after an accepted answer is there, but somebody should say this.
$f$ is roughly constant on small intervals because $f$ is uniformly continuous.
The fact that $f$ is continuous means you can make $f$ "roughly contstant" on a small interval about a specified point.  But intervals small enough to make $f$ roughly constant near one point may fail to be small enough to make $f$ roughly constant near other points.  That's where "uniformly" helps: $f$ is continuous on a closed bounded interval $[0,1]$ and that makes it uniformly continuous, so that once you've specified that you want $f$ not to change by more than a certain amount, the intervals that are small enough will be small enough at all points.
