Show that $f$ is Riemann integrable on $[a,b]$ and that $\int_{a}^b f=t-s$.

Despite having looked at the many examples on here of proving (or disproving) that a function is Riemann integrable, I still can't quite wrap my head around how one would prove the following:

Suppose $a\leq s<t\leq b$. Define $f:[a,b]\rightarrow\{0,1\}$ by $$f(x)=\begin{cases} 1 & \text{if } s<x<t,\\ 0 & \text{otherwise.} \end{cases}$$ Prove that $f$ is Riemann integrable on $[a,b]$ and that $\int_a^b f=t-s$.

First I simply tried "unwinding" the definition that I am working with of what it means for a function to be Riemann integrable:

If $f$ is a bounded function on a closed, bounded interval, then $f$ is Riemann integrable if its lower Riemann integral equals its upper Riemann integral.

Ok, so the lower Riemann integral is defined as $$L(f,[a,b])=\sup_PL(f,P,[a,b])=\sup_P\sum_{j=1}^n(x_j-x_{j-1})\inf_{[x_{j-1},x_j]}f$$ and the upper Riemann integral is defined as $$U(f,[a,b])=\inf_PU(f,P,[a,b])=\inf_P\sum_{j=1}^n(x_j-x_{j-1})\sup_{[x_{j-1},x_j]}f$$ where both are taken over all partitions $P$ of $[a,b]$. So I want to show that $$L(f,[a,b])=t-s=U(f,[a,b]).$$ But I don't know how!

Is there a standard approach to solving these types of problems? I am certain I need to utilize some sort of $\epsilon,\delta$ argument here, but I am not very good with those types of proofs to begin with. I'm not really looking for an answer as much as I am looking for why the answer would be written the way it is i.e. what is your thought process when you see one of these and how does that process help you to a solution?

• The function only takes two values, and when it has value $1$ is really predictable. Use this to get your upper and lower sums. Aug 29 '18 at 1:36
• Discuss the positional relation of $(x_j)_0^n$ and $s,t$, e.g. what if some $x_k$ satisfies $s < x_k < t < x_{k+1}$? What about other cases?
– xbh
Aug 29 '18 at 1:37
• Use the definition of Riemann integral based on Riemann sums. Aug 29 '18 at 2:04
• $U(f,P)$ should be able to be calculated quite easily for any partition $P$. Thus $U(f, [a,b])$ should also be easily recovered. $L(f,[a,b])$ is a little trickier. You should find that $L(f,P)\leq t-s$ for any partition $P$ (just write it out). Now you just need to show that $\sup_P L(f,P)=t-s$ (if you don't/can't use zhw's method).
– user123641
Aug 29 '18 at 19:38

Hint: Suppose $a<s<t<b.$ Consider $U(f,P_n)- L(f,P_n)$ for the partition $P_n=\{a,s-1/n,s+1/n,t-1/n,t+1/n,b\}$ for large $n.$

• Here the norm of partition does not tend to $0$. I think you intended to have a partition which divides each of $[a, s], [s, t]$ and $[t, b]$ into $n$ parts so that the whole $[a, b]$ is divided into $3n$ parts and then we take limits as $n\to\infty$. Aug 29 '18 at 3:47
• @ParamanandSingh I think zhw has the $U(f,P_n)-L(f,P_n)<\epsilon$ equivalent definition in mind which doesn't care about mesh size.
– user123641
Aug 29 '18 at 4:08
• @RobertWolfe: yeah this does show that $f$ is integrable. Aug 29 '18 at 5:21
• @RobertWolfe Sorry to comment so late, but what is "mesh size?" Also, what is the $U(f,P_n)-L(f,P_n)<\epsilon$ definition? Aug 29 '18 at 17:39
• @ThyArtisMath a function is integrable if and only if for every $\epsilon>0$ there is a partition $P$ such that $U(f,P)-L(f,P)<\epsilon$. zhw is providing a sequence of partitions that will eventually procure you such a partition. "mesh size" or simply "mesh" or "norm of partition" of a partition $P=\{x_0, x_1, \ldots, x_n\}$ is defined as $\max_{1\leq k\leq n}(x_{k}-x_{k-1})$.
– user123641
Aug 29 '18 at 19:26

Given a partition $P$ of $[a,b]$, then this partition can be of two types ($\underbrace{s\mbox{ and }t \in P}_{Type 1})$ or ($\underbrace{s \mbox{ or } t \not \in P}_{Type 2}$)

Then if $P$ is of Type1, $L(f,P,[a,b])=t-s$ because out of the interval $[s,t]$ we have $f(x)=0$ and hence $\inf f(x)=0$. In a same way you can show that $U(f,P,[a,b])=t-s$ too.

If $P$ is of Type2, you can see (and prove) that $L(f,P,[a,b])\leq L(f,P',[a,b])$ for any $P'$ of Type1. So, you can affirme (why?) that $\sup \limits_P L(f,P,[a,b])=\sup \limits _{P'}L(f,P',[a,b])$, where the first sup is taken over all $P$ and the second is taken over all $P'$ that are of type1.

Finaly, as we saw that the lower and upper sum using type1-partitions will always be the same constant, we conclude what we want!

• It is sufficient to consider partitions of type 1 only and use definition of Riemann integral. using a Riemann sum is simpler here. Aug 29 '18 at 2:01