Show $ \lim\limits_{h\to 0^+}h \sum_{n=1}^{\infty}f(nh)=\int_0^{\infty}f(x)dx$ This problem is motivated by a solution to exercise 5 in this set of problems.
The result they use is

If $f$ is a monotonous function over $[0,+\infty)$ for which the improper integral converges, then
\begin{equation}
\lim\limits_{h\to 0^+}h \sum_{n=1}^{\infty}f(nh)=\int_0^{\infty}f(x)dx.
\end{equation}

Why we need a monotonous function? Can I use this for $f(t)=\frac{t}{(1+t^2)^2}$?
 A: Assume $f:[0,\infty)\rightarrow[0,\infty)$ is bounded (say $f(x)\leq A$ for all $x\geq0$),  Riemann integrable over any finite closed interval, that $f$ is monotone nonincreasing on $[a,\infty)$ for some $a>0$,  that $f(x)\xrightarrow{x\rightarrow\infty}0$, and that the improper integral $\int^\infty_af(t)\,dx$ exists and is finite.

*

*Notice that the function $f(t)=\frac{1}{(1+t^2)^2}$ mentioned in the OP satisfies these properties

To every $0<h<1$, there is $n_h\in\mathbb{N}$ such that $n_hh\leq a<(n_h+1)h$. Notice that
\begin{align}
\Big|\int^a_0f-\int^{n_hh}_0f\Big|&\leq Ah\xrightarrow{h\rightarrow0}0\\
\Big|\int^\infty_{n_hh}f-\int^\infty_af\Big|&\leq Ah\xrightarrow{h\rightarrow0}0
\end{align}
The monotonicity of $f$ over $[a,\infty)$ implies that
\begin{align}
0\leq h\sum^\infty_{k=n_h}f(kh) -\int^\infty_{n_hh}f\leq hf(n_hh)\leq hA\xrightarrow{h\rightarrow0}0
\end{align}
The Riemann integrability if $f$ over $[0,a]$ implies that
$$\Big|\int^a_0 f-\sum^{n_h-1}_{k=0}hf(kh)\Big|\leq \Big|\int^a_0f- S(f,\mathcal{P},\mathbf{t})\Big|+hA\xrightarrow{h\rightarrow0}0$$
where $\mathcal{P}=\{kh:0\leq n_h\}\cup\{a\}$ (a partition of $[0,a]$), $\mathbf{t})$, $\mathbf{t}=\{kh:0\leq n_h\}$, and  $S(f,\mathcal{P},\mathbf{t})$ is the Riemann sum corresponding to the partition $\mathcal{P}$ and tags $\mathbf{t}$, that is
$$S(f,\mathcal{P},\mathbf{t})=\sum^{n_h-1}_{k=1}h f(kh)+f(n_hh)(a-n_hh)$$
Putting things together, one gets that
$$\lim_{h\rightarrow0}\Big|\int^\infty_0f -h\sum^\infty_{n=0}f(nh)\Big|=0$$
A: Here is another approach:

Lemma. Let $f : [0, \infty) \to \mathbb{R}$ be continuously differentiable, and suppose that both $f$ and $f'$ are integrable on $[0, \infty)$. Also, define
$$\|f\| := \frac{1}{2}\left( \sup_{x \geq 0} |f(x)| + \int_{0}^{\infty} |f'(x)| \, \mathrm{d}x \right).$$
Then $\sum_{n=1}^{\infty} f(n)$ converges, and
$$ \left| \int_{0}^{\infty} f(x) \, \mathrm{d}x - \sum_{n=1}^{\infty} f(n) \right| \leq \|f\|. $$

The proof is quite short, but we will postpone it to the end and show first that this lemma implies the desired result. Let $ f(t) = t/(1+t^2)^2 $ be as in OP. Then $t \mapsto h f(ht)$ clearly satisfies the hypotheses of the lemma. Moreover, applying the the substitution $x = ht$ yields
$$\int_{0}^{\infty} h f(ht) \, \mathrm{d}t = \int_{0}^{\infty} f(x) \, \mathrm{d}x.$$
So, by the lemma,
$$ \left| \int_{0}^{\infty} f(x) \, \mathrm{d}x - \sum_{n=1}^{\infty} h f(nh) \right| \leq \| h f(h \, \cdot \,) \| = h \| f\|. $$
Letting $h \to 0^+$, the desired claim follows.

Proof of Lemma. Let $\tilde{B}(x) = x - \lfloor x \rfloor - \frac{1}{2}$. Then using the Riemann-Stieltjes integral and performing integration by parts, fof $0 \leq a < b < \infty$,
\begin{align*}
\int_{a}^{b} f(x) \, \mathrm{d}x - \sum_{n \in (a, b]\cap\mathbb{Z}} f(n)
&= \int_{(a, b]} f(x) \, \mathrm{d}\tilde{B}(x) \\
&= [f(x)\tilde{B}(x)]_{a^+}^{b} - \int_{a}^{b} \tilde{B}(x) f'(x) \, \mathrm{d}x.
\end{align*}
Using the fact that $|\tilde{B}(x)| \leq \frac{1}{2}$, it therefore follows that
\begin{align*}
\left| \int_{a}^{b} f(x) \, \mathrm{d}x - \sum_{n \in (a, b]\cap\mathbb{Z}} f(n) \right|
\leq \frac{|f(a)| + |f(b)|}{2} + \frac{1}{2} \int_{a}^{b} |f'(x)| \, \mathrm{d}x
\end{align*}
From the assumption, it is easy to check that $f(x) \to 0$ as $x \to \infty$. So, this estimate shows that $\sum_{n=1}^{\infty} f(n)$ satisfies the Cauchy criteria and hence converges. Moreover, plugging $a = 0$ and letting $b \to \infty$, the desired bound follows. $\square$

Addendum. The lemma easily generalizes as follows:

Proposition. Let $f : \mathbb{R} \to \mathbb{R}$ be continuous, integrable, and of bounded variation on $\mathbb{R}$. Then $\sum_{n\in \mathbb{Z}} f(n)$ converges, and
$$ \left| \int_{I} f(x) \, \mathrm{d}x - \sum_{n \in \mathbb{Z}} f(n) \right| \leq \frac{1}{2}V_I(f), $$
where $V_I(f)$ is the total variation of $f$.

A: If $f$ is monotonous on an interval of the form $[a,+\infty)$ (which is the case of the function OP mentions at the end), then the result holds.
In general, without such an assumption, the result may fail to be true.
For example, let $f$ be continuous, piecewise affine function define by :
$$f(x) = \left\{\begin{array}{cl} 
n^2(x-n)+1& \text{if } x\in \left[n-\frac 1{n^2}, n\right] \text{ with } n\geq 2 \\
1-n^2(x-n)& \text{if } x\in \left[n, n+\frac 1{n^2}\right]  \text{ with } n\geq 2 \\
0 & \text{else}
\end{array}\right.$$
Then, $f$ is positive and :
$$\int_0^\infty f(t) \text dt = \sum_{k=2}^{+\infty} \frac{1}{n^2}  <\infty$$
while, for $h \in \mathbb Q_{>0}$, there is $N>0$ such that $Nh \in \mathbb N$, and we have :
$$h\sum_{n=0}^{+\infty}f(nh) \geq h\sum_{n=0}^{+\infty}f(Nnh) =  h\sum_{n=0}^{+\infty}1  =+\infty$$
Therefore, the result fails.
A: in order to understand why we need monotonous function we shall
prove the result and look where we used the fact that the function is monotonic.
\begin{equation}
\int_0^{\infty}f(x)dx = \sum_{n=0}^{\infty}\int_{nh}^{(n+1)h}f(x)dx \le  
h \sum_{n=0}^{\infty}f(nh)
\end{equation}
by the same argumant we get that
\begin{equation}
\int_0^{\infty}f(x)dx = \sum_{n=0}^{\infty}\int_{nh}^{(n+1)h}f(x)dx \ge  
h \sum_{n=0}^{\infty}f(nh)-hf(0)
\end{equation}
so we get
\begin{equation}
0 \le h \sum_{n=0}^{\infty}f(nh)-\int_0^{\infty}f(x)dx \le hf(0)
\end{equation}
so by taking $h \rightarrow  0$  by sandwich theorem we get the desired result.
i hope you can take it from here.
