When does a Riemann sum converge uniformly? Consider the series $$f_n=\sum_{k=0}^{n-1}\frac{\sin^2(x+\frac{k}{n})}{n}.$$ Since $\lim_{n\rightarrow\infty}f_n=\int_x^{x+1}\sin^2(y)dy$, we know that $f_n$ converges.
And my question is: will the sequence converge uniformly?
I tried to integrate term by term, and the resulting series does converge to the integral of the limiting function. So the series might converge uniformly, but I do not know how to check this directly. It looks too bizarre to check directly, so I am wondering if there is any theorem that might come in handy.  

In general, is there a criterion telling us when a Riemann sum converges uniformly?  

If something above is wrong, tell me. Thanks in advance.
 A: Here, the key is going to be the $t\mapsto\sin^2(t)$ is uniformly continuous. 
Suppose we're given $\epsilon>0$. Then there exists $\delta>0$ so that $\lvert \sin^2(t)-\sin^2(a)\rvert<\epsilon$ whenever $0<\lvert t-a\rvert<\delta$. 
Choose $N\in\mathbb{N}$ large enough that $0<\frac{1}{N}<\delta$. Use uniform continuity to show that for $n\geq N$, for each $0\leq k\leq n-1$, 
$$
\left\lvert \frac{\sin^2\left(x+\frac{k}{n}\right)}{n}-\int_{x+\frac{k}{n}}^{x+\frac{k+1}{n}}\sin^2(t)\,dt\right\rvert<\frac{\epsilon}{n},
$$
no matter what $x$ you choose. It follows by the triangle inequality that for any $x$, for $n\geq N$ you have
$$
\left\lvert\sum_{k=0}^{n-1}\frac{\sin^2(x+\frac{k}{n})}{n}-\int_{x}^{x+1}\sin^2(t)\,dt\right\rvert<\epsilon.
$$
In general, when you're dealing with Riemann sums, this will be a good place to start; at the least it will help you think about where possible problems could occur.
A: A general argument is the following theorem of Dini : An increasing sequence of continuous functions on a compact space such that its limit is still a continuous function, converges not only pointwise but uniformly. 
