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$.

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)
$$
