Obtaining $\int_0^2\big(-\frac{x^2}4-5 \big)dx$ by a Riemann sum EDIT: $R_n$ is the right endpoint of the Riemann sum
Calculate $R_n$ for the function $$f(x) = -\frac{x^2}4-5$$ on interval [0,2]
What I've done so far
$ \Delta x = \frac 2n$ and $f(x_i^*) = \frac{2i}n $
Which leads to   $$ \sum_{i=1}^n f(x_i^*)\ \Delta x$$
And once you put the numbers in
$$  \sum_{i=1}^n\left( -\frac{\left(\frac{2i}n\right)^2}4-5\right) \cdot \frac 2n $$
Which leads to my issue of expanding and getting an $i$ or $i^2$ alone.

You have
$$
 \sum_{i=1}^n f(x_i^*)\ \Delta x=-\frac {2}{n^3} \sum_{i=1}^n i^2- \frac {10}{n}\sum_{i=1}^n 1
$$ then use
$$
\sum_{i=1}^n i^2 = \frac{n(n+1)(2n+1)}{6}
$$ which is proved here to get, as $n \to \infty$,
$$
\sum_{i=1}^n f(x_i^*)\ \Delta x \to -\frac{32}3
$$
