Evaluate integral $\int_{-2}^0 x^2+x\ dx$ using Riemann Sum Consider the integral $$\int_{-2}^0 x^2+x\ dx.$$
The question says to use Riemann Sum theorem which is $$\sum_{i=1}^nf(x_i)\delta x$$
I know that $\delta x= \frac{-2}{n}$ and that $x_i=-2+(\frac{2}{n}i)$
After i plug everything in I get $$\sum_{i=1}^n\frac{2}{n}\left(-2-\frac{2}{n}i\right)^2+\left(-2-\frac{2}{n}i\right)$$
After completing the square I have $$\frac{2}{n}\sum_{i=1}\left(4-\frac{8}{n}i\right)+\left(\frac{4}{n^2}i^2\right)+\left(-2-\frac{2}{n}i\right)$$
I know that $i=\left(\frac{(n+1)}{2}\right)$ and $i^2=\left(\frac{(n+1)(2n+1)}{6}\right)$ 
but how do I manipulate the equation so that I can use them?


I know that $\delta x= \frac{-2}{n}$ 

The $\delta x$ should be positive. You should think of it as the length of the corresponding rectangle. In this case it is simplest to take $x_i=-\frac{2i}{n}$. So you have,
\begin{align*} 
&\int_{-2}^0 x^2+x\ dx\\ 
=&\lim_{n\rightarrow+\infty}
 \sum_{i=1}^n \left(\left(-\frac{2i}{n}\right)^2+\left(-\frac{2i}{n}\right)\right)\frac{2}{n}\\ 
=&\lim_{n\rightarrow+\infty}
 \sum_{i=1}^n \left(\frac{8i^2}{n^3}-\frac{4i}{n^2}\right)\\
=&\lim_{n\rightarrow+\infty}
 \frac{8}{n^3}\left(\sum_{i=1}^n i^2\right)
 -\frac{4}{n^2}\left(\sum_{i=1}^n i\right)\\
=&\lim_{n\rightarrow+\infty}
 \frac{8}{n^3}\left(
       \frac{n^3}{3}+\frac{n^2}{2}+\frac{n}{6}\right)
 -\frac{4}{n^2}\left(\frac{1+n}{2}\right)\\
=&\lim_{n\rightarrow+\infty}
 \left(
       \frac{8}{3}+\frac{8}{2n}+\frac{n}{6n^2}\right)
 -\left(\frac{2}{n}+2\right)\\
=& \frac{8}{3}-2
\end{align*}
