Riemann sum of infinite series Let $f$ be a non-negative, bounded and continuous function such that $\int_\mathbb{R} f(x)\, \mathrm{d}x < \infty$.
Does it hold that
$$
\lim_{n \rightarrow \infty} \sum_{j \in \mathbb{Z}} \frac{1}{n} \sum_{k = 1}^n f\bigg(j + \frac{k}{n} \bigg)
=
\int_\mathbb{R} f(x)\, \mathrm{d}x
$$
Current approach
Due to $f \geq 0$ we can use Fubini's theorem to show that
$$
 \sum_{j \in \mathbb{Z}} \frac{1}{n} \sum_{k = 1}^n f\bigg(j + \frac{k}{n} \bigg)
=
 \frac{1}{n} \sum_{k = 1}^n \sum_{j \in \mathbb{Z}} f\bigg(j + \frac{k}{n} \bigg).
$$
Thus, the question boils down to whether the Riemann sum converges when the function that is being integrated is an infinite series, i.e. does it hold that
$$
 \frac{1}{n} \sum_{k = 1}^n \sum_{j \in \mathbb{Z}} f\bigg(j + \frac{k}{n} \bigg)
\rightarrow 
\int_0^1  \sum_{j \in \mathbb{Z}} f(j + x) \, \mathrm{d}x
$$
as $n \rightarrow \infty$?
My current approach to show this looks as follows:
$$
\bigg\vert 
    \frac{1}{n} \sum_{k = 1}^n \sum_{j \in \mathbb{Z}} f\bigg(j + \frac{k}{n} \bigg)
    -
    \int_0^1  \sum_{j \in \mathbb{Z}} f(j + x) \, \mathrm{d}x
\bigg\vert
\leq
 \sum_{j \in \mathbb{Z}} \bigg\vert
    \frac{1}{n} \sum_{k = 1}^n f\bigg(j + \frac{k}{n} \bigg) 
    -
    \int_0^1 f(j + x) \, \mathrm{d}x
\bigg\vert
$$
Here, I can't figure out how to bound the absolute value such that the limit of the series converges to zero.
 A: Define $f$ (continuous nonnegative integrable) like this.  Let $f(x) = 0$ on $(-\infty,1]$.
For each $m \in \mathbb N$, on the interval $[m,m+1]$ the function has
$f\left(m+\frac{k}{m}\right) = 1$ for $k=1,2,\dots,m-1$,
$f(m)= f(m+1) = 0$,
$0\le f(x) \le 1$,
$\int_m^{m+1} f = \frac{1}{m^2}$.
For example, on $[4,5]$ it could look like this:  
where the three triangles have height $1$ and width $1/24$.
Let
$$
S_n = \sum_{j \in \mathbb{Z}} \frac{1}{n} \sum_{k = 1}^n f\bigg(j + \frac{k}{n} \bigg) .
$$
We claim $S_n$ does not converge to $\int_{-\infty}^\infty f$.
Choose $j_1 \in \mathbb N$ so that
$$
\sum_{j=j_1}^\infty \frac{1}{j^2} < \frac14
\quad\text{and thus}\quad
\int_{j_1}^\infty f < \frac14 .
$$
Then choose $n_1 \ge 4$ so that, for each $j$ with $1 \le j \le j_1$,
and for each $n \ge n_1$,
$$
\left|\frac{1}{n}\sum_{k=1}^{n} f\left(j+\frac{k}{n}\right) - \int_{j}^{j+1} f\right| < \frac{1}{4j_1} 
\quad\text{and thus} \quad
\sum_{j=1}^{j_1} \left|\frac{1}{n}\sum_{k=1}^{n} f\left(j+\frac{k}{n}\right) - \int_{j}^{j+1} f\right| < \frac{1}{4}.
$$
We claim that, for all $n > n_1$, we have
$$
\left|S_n - \int_{-\infty}^\infty f\right| > \frac{1}{4}
$$
[and thus $S_n$ does not converge to $\int_{-\infty}^\infty f$].
To prove this:  Fix $n > n_1$.  Then
$$
S_n = \sum_{j \in \mathbb{Z}} \frac{1}{n} \sum_{k = 1}^n f\bigg(j + \frac{k}{n} \bigg) = A_n+B_n,\quad\text{where}\\
A_n=\sum_{j=1}^{j_1}\frac{1}{n} \sum_{k = 1}^n f\bigg(j + \frac{k}{n} \bigg)\\
B_n=\sum_{j=j_1+1}^{\infty}\frac{1}{n} \sum_{k = 1}^n f\bigg(j + \frac{k}{n} \bigg) .
$$
Compute:
\begin{align}
A_n - \int_1^{j_1+1} f
&=
\sum_{j=1}^{j_1}\left[\frac{1}{n} \sum_{k = 1}^n f\bigg(j + \frac{k}{n} \bigg) - \int_j^{j+1} f\right]
\\ &
\ge -\sum_{j=1}^{j_1} \left|\frac{1}{n}\sum_{k=1}^{n} f\left(j+\frac{k}{n}\right) - \int_{j}^{j+1} f\right| 
> -\frac{1}{4} ,
\\
B_n& \ge
\frac{1}{n} \sum_{k = 1}^n f\bigg(n + \frac{k}{n} \bigg) 
=\frac{n-1}{n} \ge \frac34 ,
\\
- \int_{j_1+1}^\infty f & \ge - \frac{1}{4}.
\end{align}
Add to get
$$
S_n - \int_1^\infty f > \frac14 .
$$
A: To simplify a little, we can suppose WLOG that we are looking at $\int_{\mathbb{R}_+} f(x)\mathrm{d}x$ ($f$ being positive allows that).
You can rewrite the LHS of the equation we want to hold as:
$$\lim_{n \to +\infty} \lim_{j \to +\infty} a_{n,j}$$
where $a_{n,j} := \displaystyle\sum_{s=0}^j \frac{1}{n} \sum_{k = 1}^n f\bigg(s + \frac{k}{n} \bigg)$.
Due to $f$ being positive, each $(a_{n,j})_j$ is increasing, and so we're in a situation where we can make an interversion (see my comments under this
question, though I should probably write a full answer there or find a better link for here...inbefore I'm wrong...) however I was wrong in assuming that it would be the desired result. Instead, we get this, with $\sup$s and not $\lim$s:
$$\sup_n \sup_j a_{n,j} = \sup_j \sup_n a_{n,j}$$
which becomes the (not-that-beautiful) formula below:
$$\sup_n \sum_{j\in \mathbb{N}} \frac{1}{n} \sum_{k = 1}^n f\bigg(j + \frac{k}{n}\bigg) = \sup_j \sup_n \sum_{s=0}^j \frac{1}{n} \sum_{k = 1}^n f\bigg(s + \frac{k}{n}\bigg)$$
(This formula is always valid actually: what the increasingness brings is that the sequence $(\sup_j a_{n,j})_n$ is also increasing, and thus the $\sup$ on the left is also the limit of that sequence. Sorry for the possible confusion.)
Meaning my "answer" doesn't answer anything probably (for what functions would Riemann sums be a monotonic sequence in $n$? My answer might apply to those I think but there must not be that many, surely?) and should be looked at as an extensive comment I guess... Sorry.
(Unless this inspires someone? I mean, I kinda wonder if some interversion can be gotten like this with $\limsup$s or $\liminf$s?)
