Riemann's Integrals Question The Question i have is: Calculate the following Riemann Integral
$$\int_0^\frac{\pi}3 \tan(x) \,dx.$$
I know that $\int_a^b f(x) \, dx = \lim_{n\to\infty} \sum_{i=1}^n f(x_i^*) \Delta X$
and so I've worked out $\Delta X = \frac {b-a} n = \frac {\frac \pi 3} n = \frac \pi {3n}$
and also $ x_i^* = a+ (\Delta X)i = 0 + (\frac \pi {3n})i$.
So for my question I know that the $\int_0^ \frac\pi 3 tan(x) \, dx = \lim_{n\to\infty} \sum_{i=1}^n \tan((\frac \pi {3n})i) \times \frac \pi {3n} $  
but I am not 100% sure where to go from here.  
 A: Calculating integrals this way can be very hard... That's why we have the Funcdumental Theorem of Calculus:
$$\int \tan x\, dx=\int\frac{\sin x}{\cos x}\, dx$$
Substituting $u=\cos x $ yields
$$\int \tan x\, dx=\int\frac{-1}{u}\, dx=-\ln\left|u\right|+c=-\ln\left|\cos x\right|+c$$
Therefore, by the 2nd Fundumental Theorem of calculus,
 $$\int_0^\frac{\pi}3 \tan(x)\, dx=-\ln\frac12+\ln1=\ln 2$$
This also implies that
$$\lim_{n\to\infty} \sum_{i=1}^n\frac{\pi}{3n} \tan((\frac \pi {3n})i)=\ln 2 $$
A: The integral in question can indeed be computed as a limit of Riemann sums.
We consider Riemann sums
$$R_N:=\sum_{k=1}^N \tan(\xi_k)(x_k-x_{k-1})\qquad(1)$$
where the partition $0=x_0<x_1<\ldots< x_N={\pi\over3}$ is chosen as follows: 
$$x_k:=\arccos\bigl(2^{-k/N}\bigr)\qquad(0\leq k\leq N)\ ;$$
and the sampling points $\xi_k \in [x_{k-1},x_k]$ are chosen later.
Fix $k$ for the moment. Then
$$x_k-x_{k-1}=\arccos'(\tau)\bigl(2^{-k/N}-2^{-(k-1)/N}\bigr)\qquad(2)$$
for some $\tau\in\bigl[2^{-k/N},\>2^{-(k-1)/N}\bigr]$. Now
$$\arccos'(\tau)={1\over\cos'(\arccos\tau)}=-{1\over \sin\xi}\ ,\qquad(3)$$
where $\cos\xi=\tau$. It follows that
$$2^{(k-1)/N}\leq{1\over\cos\xi}\leq 2^{k/N}$$ or
$${1\over\cos\xi}=2^{k/N}\cdot 2^{-\Theta/N}$$
for some $\Theta\in[0,1]$. Now chose this $\xi$ as the $\xi_k$ in $(1)$. Then we get, using $(2)$ and $(3)$:
$$R_N=\sum_{k=1}^N{\sin\xi_k\over \cos\xi_k}{1\over\sin\xi_k}\bigl(2^{-(k-1)/N}-2^{-k/N}\bigr)=\sum_{k=1}^N 2^{-\Theta_k/N}(2^{1/N}-1)\ .$$
For large $N$ the factors $2^{-\Theta_k/N}$ are arbitrarily close to $1$. Therefore the last sum essentially consists of $N$ terms of equal size $2^{1/N}-1$. (The obvious squeezing argument can be supplied by the reader.) It follows that
$$\lim_{N\to\infty} R_N=\lim_{N\to\infty}{2^{1/N}-1\over 1/N}=\log 2\ .$$
