I was attempting the following problem, I know there is an answer for this, I just want to make sure my effort is ok.
For the generalized rectangle $I= [0,1]\times [0,1]$ in the plane $\Bbb R^2$
$$f(x,y)=\begin{cases} 5 & if\ \ (x,y)\ is\ in\ I\ and\ x> 1/2 \\ 1 & if\ (x,y)\ is\ in\ I\ \ and\ x\le 1/2 \end{cases}$$
Use the $\cal{Integrability\ Criterion}$ to show that the function $f: I \to \Bbb R$ is integrable.
For each $k \in \mathbb{N}$ partition $[0,1]$ into $k$ rectangles of equal length $\frac{1}{k}$, denote the partition by $P_k$. Define $\mathcal{P}_k=(P_k,P_k)$. Then $$U(f,\mathcal{P}_k)-L(f,\mathcal{P}_k)=\sum\limits_{J \in \mathcal{P}_k}(M(f,J)-m(f,J))\text{Vol} J=\frac{4k}{k^2}\rightarrow 0$$ since there are only $k$ rectangles in the partition such that $f$ takes on both values $1$ and $5$ on such rectangles, $f$ is constant on all other rectangles. So $f$ is integrable, since $\{\mathcal{P}_k\}$ is an archimedean sequence of partitions of $I$.