<s>[INST] Integral as a limit of a sum How do I get 
$$
\int_a^b \frac{1}{x}dx = \ln\left(\frac{b}{a}\right)$$
 as a limit of sum. The constant width partition of the interval $(a,b)$ doesn't seem to work.
 [/INST] The constant width partition works fine. No need for fancy partitions. To wit:
Let $x_k = a+\frac{k}{N}(b-a)$, with $k = 0,...,N$. We have, of course, $x_0=a$, $x_N = b$.
Using the Taylor series expansion of $x \mapsto \ln x$, and the mean value theorem, we obtain the bounds, for $x \geq y$:
$$ \ln y + \frac{x-y}{y} - \frac{(x-y)^2}{2 y^2} \leq \ln x \leq \ln y + \frac{x-y}{y}.$$
Letting $y=x_k$, $x=x_{k+1}$, we get:
$$\ln x_k + \frac{1}{N x_k} - \frac{1}{2 N^2 x_k^2} \leq \ln x_{k+1} \leq \ln x_k + \frac{1}{N x_k}.$$
Rearranging gives:
$$- \frac{1}{2 N^2 x_k^2} \leq \ln x_{k+1} - \ln x_k - \frac{1}{N x_k} \leq 0.$$
Now sum the inequality over $k = 0,...,N-1$, to get:
$$- \frac{1}{2 N^2} \sum_{k=0}^{N-1}\frac{1}{x_k^2} \leq \ln \frac{b}{a} - \frac{1}{N}\sum_{k=0}^{N-1} \frac{1}{x_k} \leq 0.$$
Since $x_k\geq a$, we obtain:
$$- \frac{1}{2 N a^2} \leq \ln \frac{b}{a} - \frac{1}{N}\sum_{k=0}^{N-1} \frac{1}{x_k} \leq 0.$$
Now let $N \to \infty$, to obtain the desired result,
$$ \lim_{N \to \infty} \frac{1}{N}\sum_{k=0}^{N-1} \frac{1}{x_k} = \int_a^b \frac{1}{t} dt = \ln \frac{b}{a}.$$
</s>