# Calculating upper Riemann sum. Is it sufficient to only consider “simple” partitions

Let $$b > 0$$. I'd like to calculate $$\int_{0}^b x^2 dx$$ using upper and lower Riemann sums. Since the function is continuous on $$[0,b]$$ I know that it is integrable so I only need to calculate

$$\mathcal{U}(f) := \inf_{P \in \mathcal{P}} U(f,P)$$ where $$\mathcal P$$ is the set of all partitions $$P = \{x_0 = 0, ...,x_n = b\}$$ of $$[0,b]$$ and

$$U(f,P) = \sum_{i = 1}^n M_i(x_i - x_{i-1})$$ with $$M_i = \sup\{f(x) : x \in [x_{i-1},x_i ]\}$$.

Calculating this number does not seem to be easy.

If I only consider partitions $$P_n$$ with $$x_k = k \frac{b}{n}$$ then I can show that $$\lim_{n \to \infty} U(x^2,P_n) = b^3/3$$ using

\begin{align*} U(x^2,P_n) &= \sum_{k=1}^n k^2\frac{b^2}{n^2} \frac{b}{n} \\ &= b^3 \frac{1}{n^3} \frac{n(n+1)(2n+1)}{6} \\ &= b^3 \frac{2n^3 + 3n^2 + n}{6n^3}. \end{align*} This gives the correct answer. It seems obvious that the limit of these partitions approches $$\mathcal U(f)$$. But why ? Is it sufficient to only consider such partitions ? What are the conditions $$f$$ should have for this to work ?

• Any continuous function on $[o,b]$ is integrable, so it is enough to take a sequence of partitions with maximum of the lengths of the subintervals tending to $0$. – Kavi Rama Murthy Apr 11 at 7:59
• In this example, considering the lower partitions gives essentially the same sum, and you can use the criterion that if $U(f,P_n)-L(f,P_n)\to0$ then $f$ is integrable with integral $\lim_n U(f,P_n)$. – Lord Shark the Unknown Apr 11 at 8:17
• @LordSharktheUnknown because $L(f,P_n) \leq \mathcal L (f) \leq \mathcal U(f) \leq U(f,P_n)$, taking the limit and all inequalities become equalities ? – Digitalis Apr 11 at 8:22
• Indeed${}{}{}$! – Lord Shark the Unknown Apr 11 at 8:23