How to calculate $\int_a^b \frac{1}{x^2} dx$ by the definition of Riemann integral. ($0
How to calculate $\int_a^b \frac{1}{x^2} dx$ by the definition of Riemann integral. ($0<a<b$)
I have tried to let $x_k=a+\frac{(b-a)}{n}k$. However, I have no idea to deal with the denominator in the following expression:
$$
\sum_{k=1}^n\frac{b-a}{n}\cdot\left(\frac{1}{a+\frac{b-a}{n}k}\right)^2
$$
I expanded the quadratic term, but it seems become more difficult.
 A: Using the end points for the Riemann sum is not a very good idea as you have observed the difficulty. 
Instead, let $x_k^*$ be the geometric mean of $x_{k-1}$ and $x_k$, that is $x_k^*=\sqrt{x_{k-1}x_k}$. Then the Riemann sum becomes
$$
R_n=\sum_{k=1}^n\frac{b-a}{n}\frac{1}{(x_k^*)^2}
=\sum_{k=1}^n\frac{b-a}{n}\frac{1}{x_{k-1}x_k}.
$$
Now observe that 
$$
\begin{align}
\frac{1}{x_{k-1}x_k}&=\frac{1}{(a+h_nk-h_n)\cdot(a+h_nk)}\\
&=\left(\frac{1}{a+h_nk-h_n}-\frac{1}{a+h_nk}\right)\frac{n}{b-a},\quad h_n:=\frac{b-a}{n}.
\end{align}
$$
So
$$
R_n=\sum_{k=1}^n\left(\frac{1}{a+h_n(k-1)}-\frac{1}{a+h_nk}\right)
=\frac{1}{a}-\frac{1}{a+h_nn}.
$$
Now the limit $\lim_{n\to\infty}R_n$ should be easy.
A: We can use Riemann sums for the integral. Since it is a decreasing function, we will use the Right Hand limit and under estimate the integral. 
We want n rectangles whose bases add up to $(b-a)$. 
So let's let :$x_k=a+\frac{(b-a)}{n}k$ where $k$ runs from $0$ to $n$.
We want a representative value of the function on the interval $[x_n,x_{n+1}]$. If we want to underestimate the value of the integral, then we can use the lowest value of the function there. Since $1/x^2$ is monotonically decreasing, this is guaranteed if we us the right most point of the interval, so for the $n_{th}$ interval, we use the value $1/x_{n+1}^2$.
This leads to:
$$\int_a^b \frac{1}{x^2} dx = \lim_{n->\infty} \sum_{k=0}^{n-1}\frac{(b-a)/n}{(a+\frac{(k+1)(b-a)}{n})^2}$$
NB: Since we are taking a right hand sum, we only go up to $k=n-1$ in the sum and that's also why $(k+1)$ appears there in the denominator.
Now lets rearrange terms to simplify the denominator and term being squared (dropping the sigma for convenience).
$$\frac{(b-a)}{na^2}\frac{1}{(1+\frac{(k+1)(b-a)}{na})^2}$$
Now we can use that $\frac{1}{1+x}\approx (1-x)$ for $|x|<1$ to get:
$$\frac{(b-a)}{na^2}(1-\frac{(k+1)(b-a)}{na})^2$$
So we have fixed the problem with the denominator. 
Now square the term in parentheses, keep in mind $\sum_{k=0}^n k =\frac{n(n+1)}{2}$ and $\sum_{k=0}^n k^2 = \frac{n(n+1)(2n+1)}{6}$ will allow you to get rid of the sum replacing the occurences of $k$ with appropriate functions of $n$. 
Once everything is in terms of $n,a,$ and $b$, you should be able to take the usual limits with $n$ going to infinity and reproduce the expected result.  
A: Divide the interval from $a$ to $b$ into $n$ pieces.  Each piece will have length $(b-a)/n$.  Let $x_k^*$ be a point in the $k$th interval.  We approximate the value all across each interval by its value at $x_k^*$, $\frac{1}{x_k^*}$ so approximate the "area under the curve" by the area $\frac{1}{x_k^{*2}}(b-a)/n$.
The area under the curve from $a$ to $b$ is approximated by the sum
$\sum_{k=1}^n \frac{1}{x_k^{*2}}(b- a)/n= \frac{b-a}{n}\sum_{k=1} 
\frac{1}{x_k^{*2}}$.
We can, in particular, take $x_k^*$ to be the right hand endpoint of each interval, $k(b-a)/n$, so the Riemann sum is $\frac{b-a}{n}\sum_{k=1}^n \frac{1}{k^2(b-a)^2/n^2}= \frac{n}{b-a}\sum_{k=1}^n \frac{1}{k^2}$ 
Now, can you find a "closed form" for $\sum_{k=1}^n \frac{1}{k^2}$?
