Sum of infinite series using integration For a continuous function $f(x)$, we have:
$$\int_a^b{f(x)dx}=\lim_{h \to 0; n \to \infty}h\sum_{r=1}^n{f(a+rh)}$$
where$$h=\frac{b-a}{n}$$
When a=0 and b=1, we have
$$\int_0^1{f(x)dx}=\lim_{h \to 0; n \to \infty}\frac{1}{n}\sum_{r=1}^n{f(\frac{r}{n})}$$
My book says

More generally we have $$\int_0^k{f(x)dx}=\lim_{h \to 0; n \to \infty}\frac{1}{n}\sum_{r=1}^{kn}{f(\frac{r}{n})}$$

However from the first equation, if we substitute a=0 and b=k we obtain
$$\int_0^k{f(x)dx}=\lim_{h \to 0; n \to \infty}\frac{k}{n}\sum_{r=1}^n{f(\frac{rk}{n})}$$
It appears that they have taken $n=kn$
Can the equation given by my book be proved in any other way?
 A: For partitions  $P $ with arbitrarily spaced points, $a = x_0 < x_1 < \ldots < x_n = b$, and tags $\xi_r \in [x_{r-1}, x_r$], the Riemann sum is given  by
$$S(P,f) = \sum_{r=1}^n f(\xi_r)(x_r- x_{r-1})$$
If $f$ is Riemann integrable, the sum converges to the integral over $[a,b]$ as the partition is refined, or, equivalently as $\|P\| = \underset{1\leqslant r \leqslant n}\max(x_r - x_{r-1}) \to 0$,  regardless of how the tags are chosen.
With $a=  0$ and $b=k$ where $k>0$ is fixed we can use a uniform partition with $x_r = \frac{rk}{n}$ for $r = 1,2,\ldots, n$ and  tags $\xi_r = x_r$,  and we have
$$\sum_{r=1}^n f(\xi_r)(x_r- x_{r-1}) =\sum_{r=1}^nf\left(\frac{rk}{n}\right)\left(\frac{(r+1)k}{n} - \frac{rk}{n} \right)  = \frac{k}{n}\sum_{r=1}^nf\left(\frac{rk}{n}\right) \\ \underset{n \to \infty}\to \int_0^kf(x) \, dx,$$
since $\|P\| = \frac{k}{n} \to 0$ as $n \to \infty$.
Otherwise, if $k$ is a positive integer so that $kn$ is a valid summation index we can also use the partition with $x_r = \frac{r}{n}$ for $r = 1,2,\ldots, kn$ and  tags $\xi_r = x_r$.  We then have
$$\sum_{r=1}^{kn} f(\xi_r)(x_r- x_{r-1}) = \sum_{r=1}^{kn}f\left(\frac{r}{n}\right)\left(\frac{r+1}{n} - \frac{r}{n} \right)= \frac{1}{n}\sum_{r=1}^{kn}f\left(\frac{r}{n}\right) \\ \underset{n \to \infty}\to \int_0^kf(x) \, dx,$$
since $\|P\| = \frac{1}{n} \to 0$ as $n \to \infty$.
