# Approximating integrals with step functions

For $f \colon [1,2] \to \mathbb{R}$ , $f(x) = 1/x$, Choose a sequence of step functions $\phi_n$ approximating $f$ with partition $P_n := [r/n : n < r < 2n]$ to show that $1/(n+1) + \cdots + 1/2n \to \int_1^2 x^{-1} dx$ as $n \to \infty$

So far i have played about with the right hand side of the integral, which equals log2, to no avail. f is continuous on [1,2], hence regulated. So we know that for any sequence of step functions $(\phi_n)_{n=1}^\infty$ converging to f uniformly, the sequence $(\int_a^b \phi_n(x) dx)_{n=1}^\infty$ also converges. So i know that if i am to choose a sequence of step functions $\phi$ approximating f that it will converge, but im not sure how to choose $\phi$

Take $\phi_{n}(x)=\sum_{i=1}^{n}\frac{n}{n+i}\chi_{E_{i}}(x)$ where $E_{i}=\{x: 1+\frac{i-1}{n}<x<1+\frac{i}{n}\}$.
Actually, you can see that it is natural by drawing the graph of $f$ and $\phi_{n}$.
• Sorry i dont understand what $\chi$ exactly means in this context? Commented Oct 20, 2013 at 23:34
• $\chi_{E}(x) = 1$ for $x \in E$ and $0$ for $x \notin E$. Commented Oct 22, 2013 at 8:51