# Integral as a limit of an infinite sum of infinitely narrow rectangles

I tried to approach integrating by filling the space with infinitely many infinitely narrow rectangles.

$$a$$ is the left bound

$$b$$ is the right bound

$$n$$ means the number of rectangles, approaches $$\infty$$

$$k$$ means the k-th rectangle

My integral is described by the following formula:

$$\lim_{n \to \infty} \sum_{k=1}^{n} \frac{b-a}{n} \cdot f(a + \frac{k(b-a)}{n})$$

The rough idea in the picture below:

Let's solve for $$f(x) = \frac{1}{x}$$, a = 1, b = 3

$$\lim_{n \to \infty} \sum_{k=1}^{n} \frac{2}{n} \cdot \frac{1}{1 + \frac{2k}{n}} = \lim_{n \to \infty} \left(\frac{2}{n+2}+\frac{2}{n+4}+\frac{2}{n+6}+ \dots\right)$$ The sum clearly diverges, but I don't know why.. any ideas? Is this way of integrating possible? If not, why? Are my formulas correct?

Your sum should only go up to $$n$$. You have otherwise properly described the right hand Riemann sum. The sum has a finite number of terms, so it does not diverge. You take the limit after you do the sum and should get $$\log 3$$.
• $n$ approaches $\infty$ though? That's why I put it above the sum. What else should I limit $k$ to? – Mateusz Sowiński Feb 1 '19 at 19:06
• That is the point of the limit out front. You evaluate the sum for a given $n$, then take the limit. The sum is bounded by $2$, so the limit cannot diverge either – Ross Millikan Feb 1 '19 at 19:11
• @MateuszSowiński $n$ approaches $\infty$, but we're dealing with a sequence of sums—with the $n$th sum having $n$ as its upper limit. You've got $k$ approaching $\infty$ in each one. – timtfj Feb 1 '19 at 19:11
• @MateuszSowiński Increasing $n$ = using more rectangles for the next sum. Increasing $k$ = counting through the $n$ rectangles for a given $n$, so $k$ only ever goes up to $n$. – timtfj Feb 1 '19 at 19:18