A user answered one of my questions here: Recognizing a certain limit as the Riemann sum of an integral and stated that $\lim_{n\to\infty}{1\over n}\sum_{k=0}^{n^2-1}e^{-k/n}=\int_0^\infty e^{-x}dx$. Does $\lim_{n\to\infty}{1\over n}\sum_{k=0}^{n^2-1}e^{-k/n}=\int_0^\infty e^{-x}dx$? What I am confused on is that since we are multiplying the height of each rectangle by 1/n, shouldn't the limits of integration be n to n+1 where n is a nonnegative integer? Can an improper integral even be represented by a Riemann sum? According to this page http://www.math.usm.edu/lambers/mat460/fall09/lecture33.pdf, improper integrals cannot be represented as limits as Riemann sums.
2 Answers
Well there are two approximations involoved here, roughly speaking the sum approximates $f$ on intervals $[0,n^2/n]=[0,n]$ of growing size (you multiply each rectangle by $1/n$, but you have $n^2$ summands, and the argument of the exponential is of the form $k/n$). For fixed $N$ you have that $$\lim_{n\to \infty} \frac{1}{n} \sum_{k=0}^{n^2-1} e^{-k/n}1_{[0,N]} = \lim_{n\to \infty} \frac{1}{n} \sum_{k=0}^{nN} e^{-k/n} \to \int_0^N e^{-x}dx.$$ Sending $N \to \infty$ afterwards gives the desired.
$$\lim_{n\to \infty} \frac{1}{n} \sum_{k=0}^{n^2-1} e^{-k/n} = \lim_n \lim_N \sum_{k=0}^{n^2-1} e^{-k/n}1_{[0,N]} = \lim_N \lim_n \sum_{k=0}^{n^2-1} e^{-k/n}1_N = \lim_N \int_0^N e^{-x}dx = \int_0^\infty e^{-x}dx.$$
The interchanging of the limits is allowed (the partial sequences converge uniformly in the "other parameter"). I do not know if one calls this a Riemann sum as well (I would) and I do not think that this is important.

- 1,439
One way to show this elementarily is to write
$$\int_{k/n}^{(k+1)/n}e^{-t}dt\le \frac1n e^{-k/n}\le \int_{(k-1)/n}^{k/n}e^{-t}dt $$ so $$\int_{0}^{n^2/n}e^{-t}dt\le \frac1n \sum_{k=0}^{n^2-1}e^{-k/n} $$ And $$\frac1n \sum_{k=1}^{n^2-1}e^{-k/n}\le \int_{0}^{(n^2-1)/n}e^{-t}dt$$ It follows that $$\int_{0}^{n}e^{-t}dt\le \frac1n \sum_{k=0}^{n^2-1}e^{-k/n}\le\frac1n+ \int_{0}^{n}e^{-t}dt $$ Thus $$\lim_{n\to\infty}\frac1n \sum_{k=0}^{n^2-1}e^{-k/n}= \int_{0}^{\infty}e^{-t}dt $$
Remark. This same proof shows that the result holds for every decreasing function $f$ instead of $x\mapsto e^{-x}$.

- 1,871