I'm trying to solve the question in which they ask me to
Compute upper and lower integrals for the function $f:[a,b]\rightarrow \mathbb{R}$, $f(x)=0$ for $x\in [a,c)$ and $f(x)=1$ for $x\in [c,b]$.
The thing stopping me from making progress is that when I extend the upper and lower Darboux sums for a standard partition $\sigma= \{a=x_0,x_1,x_2,...,x_n=b \}$ of $[a,b]$, I can't compute anything for any general interval of the form $[x_i,x_{i+1}]$ with $i\in \{ 0,1,...,n-1 \}$ because I don't know their relation against $[a,c),[c,b]$.
Meaning that such interval can include points of both of them, or points of either one of them. The exercise comes from page 141 of the book "A First Course in Real Analysis by Sterling K. Berberian". Any hint is much appreciated, Thanks!
With any "standard" partition $(x_0,x_1,\ldots, x_n)$ there is an index $p$ such that $x_p \leqslant c < x_{p+1}$ and the upper and lower Darboux sums are
$$U(P,f) = \sum_{j=1}^n \sup_{x \in [x_{j-1},x_j]} f(x) \,(x_j - x_{j-1}) = 1 \cdot (b- x_p) = 1 \cdot (b - c +c - x_p) \\= b-c + (c - x_p) \leqslant b- c + (x_{p+1} - x_p) \leqslant b-c + \|P\|$$
and
$$L(P,f) = \sum_{j=1}^n \inf_{x \in [x_{j-1},x_j]} f(x) \,(x_j - x_{j-1}) = 1 \cdot (b- x_{p+1}) = 1 \cdot (b - c + c - x_{p+1}) \\= b-c - (x_{p+1} -c) \geqslant b-c -(x_{p+1} - x_p) \geqslant b- c - \|P\|$$
where $\|P\|$ is the partition norm. Thus, for any partition $P$
$$b-c \leqslant U(P,f) \leqslant b-c +\|P\|, \\ b-c - \|P\|\leqslant L(P,f) \leqslant b-c $$
Since the upper and lower sums are bounded below and above, respectively, the upper and lower integrals exist with
$$b-c \leqslant \overline{\int}_a^b f = \inf_{P'} U(P',f) \leqslant U(P,f) \leqslant b-c + \|P\|, \\ b-c - \|P\| \leqslant L(P,f) \leqslant \sup_{P'} L(P',f) = \underline{\int}_a^b f \leqslant b-c $$
For any $\epsilon > 0$ we can choose a partition $P$ with $\|P\| = \epsilon$ and we have
$$b-c - \epsilon \leqslant \underline{\int}_a^b f \leqslant \overline{\int}_a^b f \leqslant b-c + \epsilon$$
Since $\epsilon$ can be chosen arbitrarily close to $0$ it follows that
$$ \underline{\int}_a^b f = \overline{\int}_a^b f = b-c $$