# Riemann sum -> Integral

http://ocw.mit.edu/courses/mathematics/18-01sc-single-variable-calculus-fall-2010/exam-3/materials-for-exam-3/MIT18_01SCF10_exam3.pdf

Question 3a)

What is going on here? Why are we integrating from 3 to 0/how did we determine this interval? How does $$\frac{i*3}{n}$$ become x and 3/n become dx?

If there's some major concept I'm missing out on here, please feel free to point it out.

Following the hint of Babak Sorouh we consider the function $f(x)=x^2$ and $a=1, b=4$. By his formula $$\lim_{n\rightarrow\infty}\sum_{i=1}^n\left(1+i\frac{3}{n}\right)^2\frac{3}{n}=\lim_{n\rightarrow\infty}\frac{4-1}{n}\sum_{i=1}^n\bigg( 1+\frac{i(4-1)}{n}\bigg)^2=\int_1^{4}x^2dx=\frac{x^3}{3}|_1^4=21.$$
According to the definition of definite integral if $y=f(x)$ be a continuous function on interval $[a,b]$ then $$\int^a_bf(x)dx=\lim_{\Delta x\rightarrow0}\sum_{x=a}^bf(x)\Delta x$$. In a special numerical methods, based on dividing the interval into $n$ equal parts of lenght, we get $\Delta x=(b-a)/n$. So $$\int^a_bf(x)dx=\lim_{n\rightarrow\infty}\frac{b-a}{n}\sum_{k=1}^nf\bigg( a+\frac{k(b-a)}{n}\bigg)$$ Now, you can follow for details @blindman's answer.
Question. Find the limit $$L=\lim_{n\rightarrow \infty}\sum_{i=1}^{n}\left(1+i.\frac{3}{n}\right)^2\frac{3}{n}.$$ Solution. We have $$\begin{array}{lll} \sum_{i=1}^{n}\left(1+i.\frac{3}{n}\right)^2\frac{3}{n}&=&\frac{3}{n}\sum_{i=1}^{n}\left(1+\frac{6i}{n}+\frac{9i^2}{n^2}\right)\\ &=&\frac{3}{n}\left(\sum_{i=1}^{n}1+\frac{6}{n}\sum_{i=1}^{n}i+\frac{9}{n^2}\sum_{i=1}^{n}i^2\right)\\ &=&\frac{3}{n}\left(n+\frac{6n(n+1)}{2n}+\frac{9n(n+1)(2n+1)}{6n^2}\right)\\ &=&3+9\frac{n+1}{n}+\frac{9(n+1)(2n+1)}{2n^2}. \end{array}$$ Hence $$L=\lim_{n\rightarrow\infty}\left(3+9\frac{n+1}{n}+\frac{9(n+1)(2n+1)}{2n^2}\right)=3+9+9=21.$$