Riemann-Lebesgue lemma for a Riemann sum limit I'm trying to use the Riemann-Lebesgue lemma which states that for any integrate function $f\in L^1[a,b]$,
$$
\lim_{k\to \infty}\int_{a}^bf(x)\exp(ixk)dx=0,
$$
to prove that
$$
\lim_{N\to \infty}\sum_{j=1}^N f(x_j)\exp(i x_j/\Delta x_j)\Delta x_j=0
$$
where $a<x_1<x_2<\ldots<x_N<b$ is a partition of the interval $[a,b]$ in $N$ points and $\Delta x_j=x_{j+1}-x_j$. Since for $N\to\infty$, $\Delta x_j\to 0$, the result almost follows from the Riemann sum, but the key point is that in the second equation the limit which approaches the Riemann sum to the integral is same that takes the imaginary exponent to infinity.
EDIT: After comments pointing that the above limit does not exist, as it depends on the partition, I am reformulating the problem to be more specific in the limiting procedure. Assume $x_1=a$, $x_N=b$ and $\Delta x= (b-a)/N$, the question is then to prove that
$$
\lim_{N\to \infty}\sum_{j=1}^N f(x_j)\exp(i x_j/\Delta x)\Delta x=0.
$$
This kind of limits appear in statistical physics when taking the thermodynamic limit, then $N$ represents the physical volume.
 A: Let me sum up my many comments above into a single answer. For general partitions one can construct counterexamples. However, if one restricts oneself to equidistant partitions and continuous functions, then the OP's statement is indeed true.
Original question (general partition):
Let's consider first the original question. There we were allowed to pick any partition and in that case the limit does not tend to zero. The idea is to consider a partition such that $x_j/\Delta x_j \in 2\pi \mathbb{Z}$ and therefore, we are left with
$$ \sum_{j=1}^N f(x_j) e^{i x_j/\Delta x_j} \Delta x_j = \sum_{j=1}^N f(x_j) \Delta x_j \rightarrow \int_a^b f(x) dx, \quad \text{as } N \rightarrow \infty. $$
Thus, in general, the limit would not be zero. Let us consider the case $[a,b]=[0,1]$. Then we want to satisfy
$$ \frac{x_j}{\Delta x_j} = 2\pi n, $$
for some $n \in \mathbb{N}$ that we will choose later. This readily implies
$$ \frac{x_j}{x_{j+1}-x_j} = 2\pi n \Longleftrightarrow  x_{j+1} = \frac{1+2\pi n}{2\pi n} x_j.$$
This gives us
$$ x_j = \left(\frac{1+2\pi n}{2\pi n} \right)^{j-1} x_1. $$
Now we have $x_{N+1}=1$ and thus, we get
$$ x_1 = \left(\frac{1+2\pi n}{2\pi n} \right)^{-N}.$$
Now we need to show that we can choose $n,N$ in such a way that the partition is fine enough. Namely, we want $\max \Delta x_j \leq \delta$. Then we need (for $j\in \{ 1, \dots, N \}$)
$$ \Delta x_j = \frac{x_j}{2\pi n} \leq \delta. $$
As $\vert x_j \vert \leq 1$, we can choose $n= \lceil \frac{1}{2\pi \delta} \rceil$. In order to get $\Delta x_0 = x_1 \leq \delta$, we just choose $N$ sufficiently large. A possible choice would be
$$ N = \lceil \frac{\ln(\delta^{-1})}{\ln(\frac{1+2\pi n}{2\pi n})} \rceil.$$
Refined question:
Next we are dealing with the refined question. Here we are considering only equidistant partitions and give ourself some more regularity. In this setting we try to see the cancellations "by hand". We are regrouping the sum into pairs that - morally - should cancel each other. In order for this to work, we will assume that $f$ is continuous (with the same argument one could allow for piecewise uniformly continuous $f$ with finitely many discontinuities). In this setting we have
$$ x_j = a+ \frac{b-a}{N} j, \quad \Delta x_j = \frac{b-a}{N}. $$
To make the idea more transparent, we will only consider $[a,b]=[0,1]$ and so $x_j=\frac{j}{N}, \Delta x_j= \frac{1}{N}$.
Let $K\in \mathbb{N}$ and choose $M\in \mathbb{N}$ such that $2KM \leq N < 2K(M+1)$. We write
\begin{align*}
&\sum_{j=1}^N f(x_j) e^{ix_j/\Delta x_j} \Delta x_j
= \frac{1}{N} \sum_{j=1}^N f(x_j) e^{i j}  \\
&= \frac{1}{N}\sum_{\ell=0}^{M-1}\sum_{j=2K\ell+1}^{2K\ell +K} \left( f(x_j) e^{i j} + f(x_{j+K}) e^{i (j+K)} \right) \\& \quad+ \frac{1}{N} \sum_{j=2KM +1}^N f(x_j) e^{i j}.
\end{align*}
The last term can be bounded by
$$ \lvert \frac{1}{N} \sum_{j=2KM +1}^N f(x_j) e^{i j} \rvert
\leq \frac{2K}{N} \Vert f \Vert_\infty. $$
Next we consider the blocks that we arrange in pairs. For this we notice that
\begin{align*}
&\lvert f(x_j) e^{i j} + f(x_{j+K}) e^{i (j+K)} \rvert \\
&\leq \vert f(x_j)-f(x_{j+K})\vert + \vert f(x_{j+K}) \vert \cdot \vert e^{ij}+e^{i(j+K)}\vert \\
&\leq \left(\sup_{x,y\in [0,1] \ : \ \vert x -y \vert \leq K/N} \vert f(x) -f(y) \vert \right) + \Vert f \Vert_\infty \vert 1+ e^{iK} \vert.
\end{align*}
Thus, we get
\begin{align*}
&\lvert \frac{1}{N}\sum_{\ell=0}^{M-1}\sum_{j=2K\ell+1}^{2K\ell +K} \left( f(x_j) e^{i j} + f(x_{j+K}) e^{i (j+K)} \right) \rvert \\
&\leq \frac{1}{N}\sum_{\ell=0}^{M-1}\sum_{j=2K\ell+1}^{2K\ell +K} \left( \left(\sup_{x,y\in [0,1] \ : \ \vert x -y \vert \leq K/N} \vert f(x) -f(y) \vert \right) + \Vert f \Vert_\infty \vert 1+ e^{iK} \vert \right) \\
&= \frac{KM}{N} \left( \left(\sup_{x,y\in [0,1] \ : \ \vert x -y \vert \leq K/N} \vert f(x) -f(y) \vert \right) + \Vert f \Vert_\infty \vert 1+ e^{iK} \vert \right) \\
&\leq \left(\sup_{x,y\in [0,1] \ : \ \vert x -y \vert \leq K/N} \vert f(x) -f(y) \vert \right) + \Vert f \Vert_\infty \vert 1+ e^{iK} \vert.
\end{align*}
Hence, we obtain
\begin{align*}
\lvert \sum_{j=1}^N f(x_j) e^{ix_j/\Delta x_j} \Delta x_j \rvert
\leq \left(\sup_{x,y\in [0,1] \ : \ \vert x -y \vert \leq K/N} \vert f(x) -f(y) \vert \right) + \Vert f \Vert_\infty \vert 1+ e^{iK} \vert + \frac{2K}{N} \Vert f \Vert_\infty.
\end{align*}
The first and the third term go to zero if we choose $K=o(N)$ (for the first term we use the uniform continuity of $f$ as we are on a compact interval). This leaves us to pick $K$ in such a manner that $\vert 1+ e^{iK} \vert =o(1)$. For this we notice that
$$ \vert 1+ e^{iK} \vert = \vert e^{iK} - e^{i\pi} \vert. $$
Hence, we only need to make sure that $K-\pi$ is small modulo $2\pi$. This is certainly true if we choose $K\in \mathbb{N} \cap [0,\sqrt{N}]$ such that
$$ \min_{n\in \mathbb{N}} \vert K - \pi - 2\pi n \vert $$
is minimized.
To adapt the argument for piecewise uniformly continuous $f$ with $S$ (finite number) discontinuities, one needs to consider the blocks that hit a singularity separately. However, there are at most $2KS$ terms that get affected and so we discard these terms making only an error that is bounded by $2\frac{KS}{N} \Vert f \Vert_\infty$ (again small if $K=o(N)$). To deal with general intervals of the form $[a,b]$, one only needs to replace all factors of $\frac{1}{N}$ by factors of $\frac{b-a}{N}$.
Update: In fact, we can also show it for $f$ Riemann integrable (as the OP suggested to begin with). For this we only need a density argument. Let $h: [a,b] \rightarrow \mathbb{R}$ be a step function. In particular, we know that (for equidistant partitions)
\begin{align*}
\lim_{N\rightarrow \infty} \sum_{j=1}^N h(x_j) e^{ix_j/\Delta x_j} \Delta x_j =0.
\end{align*}
Then we get
\begin{align*}
&\lvert \sum_{j=1}^N f(x_j) e^{ix_j/\Delta x_j} \Delta x_j \rvert \\
&\leq \lvert \sum_{j=1}^N h(x_j) e^{ix_j/\Delta x_j} \Delta x_j \rvert + \lvert \sum_{j=1}^N (f(x_j)-h(x_j)) e^{ix_j/\Delta x_j} \Delta x_j \rvert \\
&\leq \lvert \sum_{j=1}^N h(x_j) e^{ix_j/\Delta x_j} \Delta x_j \rvert + \sum_{j=1}^N \vert f(x_j) - h(x_j)\vert \Delta x_j.
\end{align*}
Taking $N \rightarrow \infty$ the first term vanishes and the second one converges to the corresponding Riemann integral (as both $f,h$ are Riemann integrable)
\begin{align*}
 \limsup_{N\rightarrow \infty} \lvert \sum_{j=1}^N f(x_j) e^{ix_j/\Delta x_j} \Delta x_j \rvert 
\leq \Vert f - h \Vert_{L^1([a,b])}.
\end{align*}
As $f$ is Riemann integrable, we can for every $\varepsilon >0$ find some step function $h_\varepsilon$ such that $\Vert f-h_\varepsilon \Vert_{L^1([a,b])}\leq \varepsilon$ (pick left Riemann sums for $h_\varepsilon$ and go through the construction of the Riemann integral). As the LHS does not depend on $h$, we get
$$ \limsup_{N\rightarrow \infty} \lvert \sum_{j=1}^N f(x_j) e^{ix_j/\Delta x_j} \Delta x_j \rvert =0, $$
which proves the claim.
