So the example is in the page 139 of Chapter V, Definite Integrals
Form the integral sum $S_n$ for the function
$$ f(x) = 1 + x $$
on the interval $[1,10]$ by dividing the interval into n equal parts and choosing points $\xi_i $ that coincide with the left end-points of the subintervals $[x_i, x_{i+1}]$. What is the $$ \lim_{n\to \infty} S_n $$ equal to?
Solution:
Here, $$ \Delta x_i = \frac{10-1}{n} = \frac{9}{n}$$
and
$$ \xi_i = x_i = x_0 + i\Delta x_i$$
Whence, $$ \xi_i = 1 + \frac{9i}{n} $$
So, $$S_n = \sum_{i=0}^{n-1} f(\xi_i)\Delta x_i = \sum_{i=0}^{n-1}\Bigl(2 + \frac{9i}{n}\Bigr)\frac{9}{n} $$
And then, the next passage is
$$ =\frac {18}{n} n + \frac {81}{n^2} (0+1+...+n-1)= $$
First, I did not understand why the $n$ appeared in the first term of the sum.
$$18+\frac{81}{n^2}\frac{n(n-1)}{2}$$
Next, I did not understand why
$$\frac{n(n-1)}{2}=(0+1+...+n-1)$$
Could anyone help me understood what happened in these 2 passages?