Speed of convergence of a Riemann sum Let $f(x)=x^d$ $(d\in(-1,0))$. We know that
$$\sum_{i=1}^n \frac{1}{n}\left(\frac{i}{n}\right)^d\xrightarrow{n\rightarrow\infty}\int_0^1x^d dx=\frac{1}{d+1}.$$
My question is the following: Can we say something about the speed of convergence? Something like
$$\left|\int_0^1x^d dx-\sum_{i=1}^n \frac{1}{n}\left(\frac{i}{n}\right)^d\right|\in O(n^d)?$$ I know that the last expression might be wrong. I just wanted to give you an idea what I am looking for. Thanks!
 A: Let us write $t_i = \frac{i}{n}$. Then, since $d < 0$, we have
$$\left\lvert\int_0^1 x^d\,dx - \sum_{i=1}^n \frac{1}{n}t_i^d \right\rvert = \sum_{i=1}^n \int_{t_{i-1}}^{t_i} x^d - t_i^d\,dx.\tag{1}$$
Writing
$$x^d - t_i^d = -d\int_x^{t_i}\xi^{d-1}\,d\xi$$
and interchanging the order of integration, we obtain
$$\int_{t_{i-1}}^{t_i} x^d - t_i^d\,dx = \lvert d\rvert \int_{t_{i-1}}^{t_i} (\xi - t_{i-1})\xi^{d-1}\,d\xi. \tag{2}$$
For $i = 1$, the integral is easily computed as
$$\int_0^{1/n} x^d - \frac{1}{n^d}\,dx = \frac{1}{1+d}\left(\frac{1}{n^{d+1}} - 0\right) - \frac1n\cdot \frac1{n^d} = \frac{\lvert d\rvert}{(1+d)n^{d+1}},$$
so we have a lower bound of $\Omega(n^{-(1+d)})$ for the convergence.
For $i \geqslant 2$, we can bound the right hand side of $2$ above by replacing $\xi^{d-1}$ with $t_{i-1}^{d-1}$, and obtain an upper bound of
$$\frac{\lvert d\rvert}{(1+d)n^{d+1}} + \sum_{i=2}^n \lvert d\rvert t_{i-1}^{d-1}\int_{t_{i-1}}^{t_i} (\xi - t_{i-1})\,d\xi = \frac{\lvert d\rvert}{(1+d)n^{d+1}} + \frac{\lvert d\rvert}{2n^{d+1}}\sum_{j=1}^{n-1} j^{d-1}.$$ 
The last sum converges (to $\zeta(1-d)$), so overall we have
$$\left\lvert\int_0^1 x^d\,dx - \sum_{i=1}^n \frac{1}{n}t_i^d \right\rvert \in \Theta(n^{-(1+d)}).$$
So for $d > -\frac12$, the convergence is even faster than $O(n^d)$, but for $d < -\frac12$ it is slower.
