Evaluating $\int^b_a \frac{dx}{x}$ from the definition of the integral I know that 
$$\int^b_a \frac{dx}{x}=\ln b-\ln a$$
I'm trying to evaluate this integral using the same method used in this answer:
https://math.stackexchange.com/a/873507/42912
My attempt
$\int^b_a \frac{dx}{x}=\lim_{n\to \infty}\sum_{i=1}^n(\frac{b-a}{n})f(a+(\frac{b-a}{n})i)=\lim_{n\to \infty}(\frac{b-a}{n})\sum_{i=1}^nf(a+(\frac{b-a}{n})i)=\lim_{n\to \infty}(\frac{b-a}{n})\sum_{i=1}^n \frac{1}{a+\frac{(b-a)}{n}i}=\ldots?$
Maybe this integral is too complicated to evaluate in this way? if it's impossible to calculate in this way, which function besides the polynomial functions can I integrate using this method?
Thanks 
 A: Using harmonic numbers, we can write $$(\frac{b-a}{n})\sum_{i=1}^n \frac{1}{a+\frac{(b-a)}{n}i}=H_{\frac{b n}{b-a}}-H_{\frac{a n}{b-a}}$$ Now, since we look at the limit for an infinite value of $n$, consider the expansion $$H_k=\left(\gamma -\log \left(\frac{1}{k}\right)\right)+\frac{1}{2 k}+O\left(\left(\frac{1}{k}\right)^2\right)$$ Now replace successively $k$ by $\frac{b n}{b-a}$ and $\frac{a n}{b-a}$ in the first rhs to get $$H_{\frac{b n}{b-a}}-H_{\frac{a n}{b-a}} \simeq-\frac{b-a}{2 a n}+\frac{b-a}{2 b n}+\log \left(\frac{b-a}{a n}\right)-\log
   \left(\frac{b-a}{b n}\right)= \log \Big(\frac{b}{a}\Big)- \frac{(b-a)^2}{2a b}\frac{1}{n}$$
A: I will denote $$I = \int_a^b \frac{1}{x} \mathrm{d}x$$
Break the interval into partitions $(t_{i-1},t_i)$ such that
$$a = t_0 < t_1 < \cdots < t_{n-1} < t_n = b$$
Let $\lambda$ denote the mesh of this partition or the length of the longest partition ($\max(t_i-t_{i-1})$).
We have broken our interval up into $n$ partitions and now we must associate each partition with a value of $f$ at one of the points in the partition. This is usually done with the maximum or minimum value of $f$ on a uniform partition. It is also done with the first value (left endpoint), last value (right endpoint) or middle value (midpoint) of the partition. This works fine for polynomials and simple functions but in our case we must construct alternate ways of assigning values to partitions, or, construct alternate partitions (ie non-uniform partitions). Of course, we could always modify both.
Daniel Fischer described one way of arriving at the result with an alternative partition. I will attempt to solve the problem with a uniform partition.
To finish the calculation, we must let our mesh to go zero by refining our partitions. Our summation will look something like
$$I = \lim_{\lambda \to 0} \sum_{i=0}^{n-1} f(t^*_i)(t_{i+1}-t_i) \; \text{where}\; t^*_i \in (t_{i},t_{i+1})$$
All of our partitions are the same length so we can let $\lambda = \frac{b-a}{n}$ and simply take the limit as $n \to \infty$. For every interval $(t_i,t_{i+1})$ we must assign a $t^*_i \in (t_{i+1}-t_i)$ which will represent the value of the function on that interval. This is often called tagging a partition.
Before we do that, lets take another look at the formula for our sum.
$$I = \lim_{n\to\infty}  \sum_{i=0}^{n-1} \frac{1}{t_i^*}\frac{b-a}{n}= \lim_{n\to\infty}  \frac{b-a}{n}\sum_{i=0}^{n-1} \frac{1}{t_i^*}$$
It is clear that we are simply summing recriprocals of numbers in each of our intervals. In our first interval $(t_0, t_0 + \frac{b-a}{n})$ we will choose the value $t_0$. In the next interval $(t_1, t_1 + \frac{b-a}{n}) = (t_0+\frac{b-a}{n}, t_0 + 2\frac{b-a}{n})$ we will choose the value $t_0 + \frac{b-a}{n} + \frac{b-a}{n^2}$. In general, for an interval $(t_j , t_j + \frac{b-a}{n}) = (t_0+j\frac{b-a}{n}, t_0 + (j+1)\frac{b-a}{n})$ we will choose the value $t_0+j\frac{b-a}{n} + j\frac{b-a}{n^2}$. Now, write our sum as
$$I=\lim_{n\to\infty}  \frac{b-a}{n}\sum_{i=0}^{n-1} \frac{1}{t_0 + i\frac{b-a}{n} + i\frac{b-a}{n^2}}$$
Noting that $t_0 = a$ we write
$$\begin{align}I&=\lim_{n\to\infty}  \frac{b-a}{n}\sum_{i=0}^{n-1} \frac{n^2}{an^2 + i(b-a)n + i(b-a)}\\
&= (b-a)\lim_{n\to\infty}  \sum_{i=0}^{n-1} \frac{n}{an^2 + ((b-a)n + (b-a))i}\end{align}$$
If we want to evaluate this limit we will need some help from the Digamma function. In general,
$$\sum_{i=0}^{n-1} \frac1{pi+q}  =\frac1p \left(\psi \left(n+\frac{q}{p}\right)-\psi \left(\frac{q}{p}\right)\right)$$
This can be seen from the power series representation. With the help of this digamma function, our series can be written
$$I = \lim_{n\to\infty}-\frac{n \psi\left(-\frac{a n^2}{(a-b) (n+1)}\right)-n \psi \left(-\frac{b n^2}{(a-b) (n+1)}+\frac{a n}{(a-b) (n+1)}-\frac{b n}{(a-b) (n+1)}\right)}{ (n+1) }$$
Although this looks unwieldy, we can use asymptotics to simplify the expression. 
$$I = \lim_{n\to\infty} \psi\left(\frac{b n}{b-a}\right) - \psi\left(\frac{a n}{b-a}\right)$$
Beyond this you just must show that $\psi \sim \log(x) + O(x^{-1})$ and everything is proven.
