Let $g:[0,3]\to \mathbb{R}$ be defined by $g(x)=2$ for $0\le x\le 1,$ and $g(x)=3$ for $1<x \le3.$ An investigation based on the graph of $g$ suggests that we might expect that $\int_0^3 g=8$.
Let $\dot P$ be a tagged partition of $[0,3]$ with norm$ < \delta$; we will show how to determine $\delta$ in order to ensure that $|S(g;\dot P)-8|<\epsilon.$ Let $\dot P_1$ be the subset of $\dot P$ having its tags in $[0,1]$ where $g(x)=2,$ and let $\dot P_2$ be the subset of $\dot P$ with its tags in $(1,3]$ where $g(x)=3$. It is obvious that we have $S(g;\dot P)=S(g;\dot P_1)+S(g;\dot P_2).$
If we let $U_1$ denote the union of the subintervals in $\dot P_1,$ then it is readily shown that $$[0,1-\delta]\subset U_1 \subset [0,1+\delta]\tag1.$$ Also $U_2$ be the union of all subintervals with tags $t_i \in (1,3],$ then $$[1+\delta,3]\subset U_2\subset [1-\delta,3]\tag2.$$
Question
Verify the inclusions in $(1)$ and $(2)$
My Attempt
(i) $[0,1-\delta]\subset U_1$
let $u\in[0,1-\delta].$ Then $u$ lies in an interval $I_k=[x_{k-1},x_k]$ of $\dot P_1$ and since $||\dot P||<\delta,$ we have $x_k-x_{k-1}<\delta.$ Then $x_{k-1}\le u\le 1-\delta$ implies that $x_k< x_{k-1}+\delta \le(1-\delta)+\delta \le 1.$ Thus the tag $t_k$ in $I_k$ satisfies $t_k \le 1$ and therefore $u$ belongs to a subinterval whose tag is in $[0,1,]$ that is, $u\in U_1.$(This inclusion is already shown in the book)
(ii)$U_1\subset [0,1+\delta]$
Let $u\in U_1.$ This implies $x_{k-1}\le u\le x_k,x_k-x_{k-1}<\delta.$ Then $x_k\le 1+\delta,$ because if $x_k>1+\delta$ then $x_{k-1}>x_k-\delta \ge 1+\delta-\delta=1$ and $[x_{k-1},x_k]$ would not contain any tag in $[0,1]$.
Hence $0\le x_{k-1}\le u\le x_k \le 1+\delta$ and $u\in [0,1+\delta]$
I am having trouble showing the inclusions in $(2)$ since we are dealing with the interval $(1,3].$