A property of a Riemann Integrable function It was posted in an answer to my previous question that

If a function $f$ is Riemann-integrable on $[0,\infty)$, then,
$$\int_0^\infty f(x)\,dx = \lim_{h\rightarrow 0}\,h\sum_{n=0}^\infty f(nh)$$

How can we prove this proposition? I only know of the standard definition of Riemann Sums involving lim sup and lim inf.
 A: This is false.
Strictly speaking it's meaningless, because there's no such thing as "Riemann integrable on $[0,\infty)$"; the Riemann integral is defined for functions that have a compact interval for their domain. Presumably here $\int_0^\infty$ is supposed to be an improper Riemann integral, which is to say the reasonable interpretation of the proposition in question is

If a function $f$ is Riemann integrable on $[0,A]$ for every $A>0$ and $\int_0^\infty f=\lim_{A\to\infty}\int_0^A  f$ exists then
$$\int_0^\infty f(x)\,dx = \lim_{h\rightarrow 0}\,h\sum_{n=0}^\infty f(nh).$$

That is false.
Choose $A_n$ increasing to infinity such that $A_1=0$ and $A_{n+1}-A_n$ decreases to $0$ (for example, $A_n=\log(n)$).  Let $f(t)=(-1)^n$ for $A_n\le t<A_{n+1}$. Then $\int_0^\infty f$ exists, more or less by the proof of the alternating series test for sums, but $\sum_nf(nh)$ does not exist, since the terms do not even tend to $0$.
Details: Regarding existence of $\int_0^\infty f$: First, the alternating series test for sums shows that $$\lim_{n\to\infty}\int_0^{A_n}f$$exists. And it's clear that $$\left|\int_0^Af-\int_0^{A_n}f\right|\le A_{n+1}-A_n\quad(A_n\le A\le A_{n+1}).$$Since $A_{n+1}-A_n\to0$ this shows that $\lim_{A\to\infty}\int_0^A$ exists.
