Department of Fundamentals of Computer Science


Wrocław University of Science and Technology

Aplety

Riemann's sums

The lower Riemann sum $s_n$ and the upper Rieman sum ($S_n$) for the function $f(x) = x^2$ on the interval $[0,1]$ for the partition of the interval $[0,1]$ of the form $\sigma_n$ = {$[0,\frac1n)$, $[\frac1n,\frac2n))$, $[\frac2n,\frac3n)$, ... , $[\frac{n-1}{n},1]$} can be calculated as follow:

$$ s_n(f) = \sum_{k=0}^{n-1} \left(\left(\frac{k}{n}\right)^2 \cdot \frac{1}{n} \right) = \frac{1}{n^3} \cdot ( 1^2 + 2^2 + \ldots + (n-1)^2) ~, $$ $$ S_n(f) = \sum_{k=1}^{n} \left(\left(\frac{k}{n}\right)^2 \cdot \frac{1}{n} \right) = \frac{1}{n^3} \cdot ( 1^2 + 2^2 + \ldots + n^2) ~. $$

Therefore $S_n(f) - s_n(f) = \frac1n$, so $\lim_{n\to\infty}(S_n(f)-s_n(f)) = 0$, hence the function $f$ is Riemann - integrable on the interval $[0,1]$. Check it yoursef on the following aplet:


Using the formula $1^2 + 2^2 + \ldots + n^2 = \frac16 \cdot n \cdot (n+1) \cdot (2n+1)$, we deduce that $$ \int_0^1 x^2 dx = \lim_{n\to\infty} \frac16 \cdot (1+\frac1n)\cdot(2+\frac1n) = \frac13 ~. $$