a problem in uniform convergence A function $f$ is defined on $[0,1]$ by $f(x)=\frac{1}{n}$ for $\frac{1}{n}\geq x \geq \frac{1}{n+1}; n=1,2,3,\ldots,n$. Prove that $f \in R[0,1]$ and evaluate $\int_{0}^{1}f(x)dx$.
 A: The fact that $f$ is Riemann integrable follows directly from Lebesgue's criiterion of Riemann integrability. Define
$$ f_n = \sum_{k=1}^n \frac{1}{k} \chi_{[1/(k+1),1/k[}
$$
Then $f_n \to f$. Using Monotone Convergence Theorem,
$$ \int_0^1 f\,\mathrm dx = \lim_{n \to \infty} \int_0^1 f_n\,\mathrm dx = \lim_{n \to \infty} \sum_{k=1}^n \frac{1}{k} \left(\frac{1}{k} - \frac{1}{k + 1}\right)
$$
A: As in the Henry W. answer, this is Reimann integrable.  The sum is not a particularly trivial telescoping sum, however.  It can be done as follows:
$$
\sum_{k=1}^\infty \frac1k\left(\frac1k-\frac1{k+1}\right) = \sum_{k=1}^\infty \frac1{k^2} - \sum_{k=1}^\infty \frac1{k(k+1)} = \frac{\pi^2}{6} - 1
$$
where the first integral is a pretty well-known sum first solved, I think, by Euler, and the second can be done most elegantly by noting that it is 
$$
\sum_1^\infty {k^{\underline{-2}}} = \left.-\frac{1}{k}\right|_{k=1}^\infty=0 - (-1) = 1
$$ 
where the underlined $-2$ in $k^{\underline{-2}}$ is the "fal;ing powers" notation.
