We will use the right Riemann sum. We can break this integral in two parts.
[tex]\int_{0}^{3} (x^3-6x) dx=\int_{0}^{3} x^3 dx-6\int_{0}^{3} x dx[/tex]
We take the interval and we divide it n times:
[tex]\Delta x=\frac{b-a}{n}=\frac{3}{n}[/tex]
The area of the i-th rectangle in the right Riemann sum is:
[tex]A_i=\Delta xf(a+i\Delta x)=\Delta x f(i\Delta x)[/tex]
For the first part of our integral we have:
[tex]A_i=\Delta x(i\Delta x)^3=(\Delta x)^4 i^3[/tex]
For the second part we have:
[tex]A_i=-6\Delta x(i\Delta x)=-6(\Delta x)^2i[/tex]
We can now put it all together:
[tex]\sum_{i=1}^{i=n} [(\Delta x)^4 i^3-6(\Delta x)^2i]\\\sum_{i=1}^{i=n}[ (\frac{3}{n})^4 i^3-6(\frac{3}{n})^2i]\\
\sum_{i=1}^{i=n}(\frac{3}{n})^2i[(\frac{3}{n})^2 i^2-6][/tex]
We can also write n-th partial sum:
[tex]S_n=(\frac{3}{n})^4\cdot \frac{(n^2+n)^2}{4}
-6(\frac{3}{n})^2\cdot \frac{n^2+n}{2}[/tex]