# Consider the Integral $\int_{0}^1\left( x^3-3x^2\right)dx$ and evaluate using Riemann Sum

Consider the integral $$\int_{0}^1\left(x^3-3x^2\right)dx$$ $$\delta x=\frac{1}{n}$$

$$x_i=0+\frac{1}{n}i$$

Plugging everything in I get $$\lim_{n\rightarrow\infty}\sum_{i=1}^n \left(\frac{1}{n}i \right)^3 -3\left(\frac{1}{n}i\right)^2 \frac{1}{n}$$ Then I follow through with the exponents and distrubution to get $$\lim_{n\rightarrow\infty}\sum_{i=1}^n \left(\frac{1}{n^4}i^3 \right) -\left(\frac{3}{n^3}i^2\right)$$

Continuing the problem I get

$$\lim_{n\rightarrow\infty} \frac{1}{n^4}\left(\sum_{i=1}^n i^3\right)-\frac{3}{n^3} \left(\sum_{i=1}^ni^2 \right)$$

$$\frac{1}{n^4}\left(\left(\frac{n(n+1)}{2}\right)^2\right)- \frac{3}{n^3}\left(\frac{n^3}{3}+\frac{n^2}{2}+\frac{n}{6}\right)$$
After distributing I get $$\lim_{n\rightarrow\infty} \frac{n^2+2n+1}{4n^2}-\frac{2n^2+3n+1}{2n^2}$$
The answer is $$-\frac{3}{4}$$ but I keep getting 1.
I think you made a careless mistake. $$\lim_{n\rightarrow\infty} \left(\frac{n^2+2n+1}{4n^2}-\frac{2n^2+3n+1}{2n^2}\right)=\lim_{n\to\infty}\left(\frac14+\frac1{2n}+\frac1{4n^2}-1-\frac3{2n}-\frac1{2n^2}\right)=\frac14-1=-\frac34.$$