# How to prove that function $f$ is Riemann integrable

Let $$f: [0,2] \rightarrow \mathbb{R}$$ a bounded function with $$f(x) = \begin{cases} x \qquad \qquad 0 \leq x \leq 1 \\ x-1 \qquad \quad 1 < x \leq 2 \end{cases}$$ Prove that $$f$$ is Riemann integrable and calculate $$\int_0^2 f(x)dx$$.

Can I prove this by saying that since $$f$$ is monotonically increasing on the interval $$[0,1]$$ and on the interval $$(1,2]$$, it is Riemann integrable on the interval $$[0,2]$$. And how do I calculate the integral using an upper and lower integral and upper and lower sums?

• Would you allow the use of Darboux's theorem, or do you want a proof that merely uses the definition of the integral in terms of upper and lower sums? – hello Apr 6 '20 at 14:33
• I want a proof that merely uses the definition of the integral in terms of upper and lower sums, since we haven't done anything with Darboux's theorem yet (I don't even know what is it actually) – Neri Apr 6 '20 at 14:34
• hint: Draw a graph of $f$ and choose cleverly a 3 to 4 point partition of $[0,2]$ that involves $n$. – DeepSea Apr 6 '20 at 14:52
• While likely beyond the scope of what you are looking for, your claim is correct! A monotonically increasing function has a countable number of discontinuties, thus is a set of measure $0$. Now, apply the theorem here: proofwiki.org/wiki/Riemann-Lebesgue_Theorem – Mike Apr 6 '20 at 15:33

You could use the fact that if $$f$$ is integrable on $$[a,b]$$ and $$[b,c]$$ then $$f$$ is integrable on $$[a,c]$$ and satisfies $$\int_{a}^{c} f = \int_{a}^{b} f + \int_{b}^{c} f$$ Now $$\int_{1}^{2} x - 1 \, dx = \int_{0}^{1} u \, du$$ and therefore it suffices to show that $$\int_{0}^{1} x \, dx$$ is integrable.
The lower sums are $$L = \sum_{i=1}^{n} f(t_{i-1})(t_{i} - t_{i-1})$$ and the upper sums are $$U = \sum_{i=1}^{n} f(t_{i})(t_{i} - t_{i-1})$$ If we use the uniform partition where $$t_{i} = a + \frac{b-a}{n}i = \frac{i}{n}$$ then these become \begin{align*} L & = \sum_{i=1}^{n} \frac{i-1}{n} \frac{1}{n} \\ & = \frac{1}{n^{2}} \sum_{i=1}^{n} (i - 1) \\ & = \frac{(n-1)(n)}{2n^{2}} \\ & = \frac{n^{2} - n}{2n^{2}} \\ & = \frac{1 - \frac{1}{n}}{2} \\ & \rightarrow \frac{1}{2}, \, \text{ as } n \rightarrow \infty \end{align*} You should be able to show that $$U = \frac{n^{2}+n}{2n^{2}} \rightarrow \frac{1}{2}$$. Since the upper sum and lower sum both converge to the same value, the integral is defined.
• This is a good answer. +1. Technically speaking though, when you take the limit as $n\to \infty$, aren't you taking the limit under the uniform partition scheme (call it $\mathcal{P}_n$)? Shouldn't there be a line about $\displaystyle \inf_{\mathcal{P}} U(f,\mathcal{P})\leq \lim_{n\to\infty} U(f,\mathcal{P}_n)=\frac{1}{2}$. Similarly, for the lower sum $\displaystyle \sup_{\mathcal{P}} L(f,\mathcal{P})\geq \frac{1}{2}$. Hence $\displaystyle \sup_{\mathcal{P}} L(f,\mathcal{P})\geq \frac{1}{2}\geq \inf_{\mathcal{P}} U(f,\mathcal{P})$. – zugzug Apr 6 '20 at 17:17
• If $U(f,P_{n}) - L(f,P_{n}) \rightarrow 0$ for any sequence of partitions, then the integral is defined, because we must always have $\inf U - \sup L \leq U(f,P_{n}) - L(f,P_{n})$, so I never worry about which sequence of partitions I choose, so long as it works! This is the Archimedes-Riemann theorem. I think you're right that if the OP wants to use no assumptions/theorems this is definitely worth mentioning. – Shai Apr 6 '20 at 17:35
Let $$\mathcal{P}=\{0=x_0 be any partition. Let $$j_0$$ be such that $$1\in[x_{j_0},x_{j_0+1})$$. Then \begin{align} U(f,\mathcal{P})&=\sum_{k=0}^{j_0-1}x_{k+1}(x_{k+1}-x_k)+\sum_{k=j_0+1}^{n}(x_{k+1}-1)(x_{k+1}-x_k) \,+f(1)(x_{j_0+1}-x_{j_0}) \\ L(f,\mathcal{P})&=\sum_{k=0}^{j_0-1}x_{k}(x_{k+1}-x_k)+\sum_{k=j_0+1}^{n}(x_{k}-1)(x_{k+1}-x_k) \,+0\,(x_{j_0+1}-x_{j_0}) \end{align} Subtracting, we find \begin{align} U(f,\mathcal{P})-L(f,\mathcal{P})&=\sum_{k=0}^{j_0-1}(x_{k+1}-x_k)^2+\sum_{k=j_0+1}^{n}(x_{k+1}-x_k)^2 \,+f(1)\,(x_{j_0+1}-x_{j_0}). \end{align} Given $$\epsilon>0$$, how can you make this small?