Let $f: [0, 1] \times [0, 1] \to \mathbb{R}$ be defined by
$f(x, y) = \begin{cases} 0,&\text{if } 0 \le x < \frac{1}{2}\\ 1,&\text{if }\frac{1}{2} \le x \le 1\;. \end{cases}$
I need to show that this function is integrable, and my instructor says if we consider the partition $P = (P_1, P_2)$ where $P_1 = P_2 = \{0, \frac{1}{2}, 1\}$, then $U(f, P) = L(f,P) = \frac{1}{2}$, but this is clearly false since
$U(f, P) = (1/2)^2 + (1/2)^2 + (1/2)^2 + (1/2)^2 = 1$
and
$ L(f, P) = 0 + 0 + (1/2)^2 + (1/2)^2 = 1/2.$
Can someone point out where I am going wrong?