Calculate an integral with Riemann sum

When definite integrals are amenable to exact valuation, it is typically the case that the more expedient approach involves an anti-derivative rather than the limit of a Riemann sum. Often computation of the limit may be straightforward or even trivial, but somewhat tedious, as is the case for integrals of $f: x \mapsto x$ or $f: x \mapsto x^2$.

On the other hand, integrals with simple integrands and easily recognized anti-derivatives such as $f: x\mapsto x^{-2}$ are more challenging with regard to the limit of Riemann sum -- and in that sense the Riemann sum may be "interesting."

To make this more explicit, consider computing the integral

$$\int_a^b x^{-2} \, dx = \lim_{n \to \infty}S_n$$

where

$$S_n =\frac{b-a}{n}\sum_{k=1}^n \left(a + \frac{b-a}{n}k\right)^{-2}.$$

We have

$$\frac{b-a}{n}\sum_{k=1}^n \left(a + \frac{b-a}{n}k\right)^{-1}\left(a + \frac{b-a}{n}(k+1)\right)^{-1} \leqslant S_n \\ \leqslant \frac{b-a}{n}\sum_{k=1}^n \left(a + \frac{b-a}{n}k\right)^{-1}\left(a + \frac{b-a}{n}(k-1)\right)^{-1},$$

and decomposing into partial fractions,

$$\sum_{k=1}^n \left\{\left(a + \frac{b-a}{n}k\right)^{-1}-\left(a + \frac{b-a}{n}(k+1)\right)^{-1}\right\} \leqslant S_n \\\leqslant \sum_{k=1}^n \left\{\left(a + \frac{b-a}{n}(k-1)\right)^{-1}-\left(a + \frac{b-a}{n}k\right)^{-1}\right\}. $$

Since the sums are telescoping, we have

$$\left(a + \frac{b-a}{n}\right)^{-1}-\left(a + \frac{b-a}{n}(n+1)\right)^{-1} \leqslant S_n \leqslant a^{-1} - b^{-1}.$$

By the squeeze theorem, we get the value of the integral as

$$\lim_{n \to \infty}S_n = a^{-1} - b^{-1}.$$

An example where I found the Riemann sum an interesting and, perhaps, most expedient approach is:

Bronstein Integral 21.42


Here is an example ...

For each $z\in\mathbb{C}$ with $\vert z\vert\neq 1$, consider :

$$F(z)=\int_0^{2\pi}\ln\left|z-e^{it}\right|\,dt$$

It is possible to get an explicit form for $F(z)$, using Riemann sums.

For each integer $n\ge1$, consider :

$$S_n=\frac{2\pi}{n}\sum_{k=0}^{n-1}\ln\left|z-e^{2ik\pi/n}\right|$$which is the $n-$th Riemann sum attached to the previous integral (and a uniform subdivision of $[0,2\pi]$ with constant step $\frac{2\pi}{n}$).

Now :$$S_n=\frac{2\pi}{n}\ln\left|\prod_{k=0}^{n-1}\left(z-e^{2ik\pi/n}\right)\right|=\frac{2\pi}{n}\ln\left|z^n-1\right|$$and you can easily show that :$$F(z)=\left\{\matrix{2\pi\ln\left|z\right|& \mathrm{ if}\left|z\right|>1\cr0 & \mathrm{otherwise}}\right.$$


Not a direct answer to your question but I find the following representation of the Riemann sum interesting. Even though it is trivial, these representations show that the sequence of primes or the sequence of composites behave somewhat in a similar same way as the sequence of natural numbers in terms of their asymptotic growth rates. (Too long for a comment hence posting as an answer)

Let $p_n$ be the $n$-th prime number and $c_n$ be the $n$-th composite number; then,

$$ \lim_{n \to \infty} \frac{1}{n} \sum_{r=1}^{n} f\bigg(\frac{p_r}{p_n}\bigg) = \int_{0}^{1}f(x)dx. $$

$$ \lim_{n \to \infty} \frac{1}{n} \sum_{r=1}^{n} f\bigg(\frac{c_r}{c_n}\bigg) = \int_{0}^{1}f(x)dx. $$