Partitions and Riemann sums

calculusriemann sum

Reading my textbook and i'm alittle bewildered by a step in calculating the Riemann sum.

The question reads as follows:

"Calculate the lower and upper Riemann sums for the function $f(x)= x^2$ on the interval $[0,a]$(where a>0), corresponding to the partition $P_n$ of $[x_{i-1},x_i]$ into $n$ subintervals of equal length"

I know that

$\Delta x = \frac{a}{n}$

$x_i = \frac{ia}{n}$

The particular part I'm having issue following is how they solve it.

It looks like this:

$L(f,P_n) = \sum_{i=1}^n(x_{i-1})^2 \Delta x =\frac{a^3}{n^3}\sum_{i=1}^n(i-1)^2$

I'm unsure on how they went from:

$\sum_{i=1}^n(x_{i-1})^2 \Delta x$

to

$ \frac{a^3}{n^3}\sum_{i=1}^n(i-1)^2$

I'd be very happy if somebody could help me with the parts inbetween.

Best Answer

Just substitute those terms in,

$$\sum_{i=1}^n (x_{i-1})^2\Delta x =\sum_{i=1}^n \left(\frac{(i-1)a}n\right)^2\left(\frac{a}{n} \right) $$