Define $$f(x) =\begin{cases} x, & \text{if }2\leq x\leq 3 \\2, & \text{if } 3<x\leq 4 \end{cases}.$$
Prove that the function $f:[2,4]\rightarrow\mathbb{R}$ is integrable.
I want to use the fact that a function $f:[a,b]\rightarrow\mathbb{R}$ is integrable iff for each postive number $\epsilon$ there is a partition $P$ of the intervel $[a,b]$ such that $U(f,P)-L(f,P)<\epsilon$.
I'm trying to emulate my book in their example but its hard to follow. What I have so for is I let $\epsilon>0$ and we want to show $f:[2,4]\rightarrow\mathbb{R}$ is integrable. We must find a partition $P$ of $[2,4]$ such that $U(f,P)-L(f,P)<\epsilon$. The trouble is my partition, and I can't seem to figure out how they got it in my book.
Here is the example if talking about which relates to this problem
$$f(x) =\begin{cases} 7, & \text{if }1\leq x<3 \\10, & \text{if } x=2\\ -4 &\text{if} 2<x\leq 3 \end{cases}$$ where their partition is $P=[1,2-\frac{\epsilon}{30},2+\frac{\epsilon}{30},3]$ which I have no idea how they get that. Thanks.