In the middle of an exercise I have to compute:
$$\lim_{n\to\infty}\int_0^n\frac{f(\frac{x}{n})}{1+x^2}dx$$
($f\in C[0,1]$) It is obvious that this has to be equal to: $$\int_0^{\infty}\frac{f(0)}{1+x^2}dx=\frac{\pi}{2}f(0)$$
But I am not sure how to prove it in a rigurous way, since you can have divergence problems or some weird situations.
Suppose $|f(x)|\le B$ on $[0,1]$, and given $\epsilon>0$, we can choose $\delta>0$ such that $|f(x)-f(0)|<\epsilon$ for $x\in [0, \delta]$. Now $$|\int_0^n \frac{f(x/n)-f(0)}{1+x^2}dx| \le \int_0^{\delta n} |\frac{f(x/n)-f(0)}{1+x^2}| + \int_{\delta n}^\infty \frac{2B}{1+x^2}$$ $$\le \int_0^{\delta n} \frac{\epsilon}{1+x^2} + \int_{\delta n}^\infty\frac{2B}{1+x^2}\le \epsilon\int_0^\infty\frac{1}{1+x^2}+\int_{\delta n}^\infty \frac{2B}{1+x^2}$$
Because $\int_0^\infty\frac{1}{1+x^2}dx<\infty$, for sufficiently large $n$, $\int_{\delta n}^\infty \frac{2B}{1+x^2}dx\le \epsilon$, hence finally
$$|\int_0^n \frac{f(x/n)-f(0)}{1+x^2}dx|\le (\int_0^\infty\frac{1}{1+x^2}+1)\epsilon$$
More generally, this can be used to show that $$\int_0^n f(x/n)g(x)dx\rightarrow f(0)\int_0^\infty g(x)dx$$ if $f$ is bounded on $[0, 1]$ and right continuous at $0$, and $\int_0^\infty |g(x)|dx<\infty$.