On the domain $D:[0,1]\times[0,1]\times[0,1], ~f(x,y,z)$ is defined to be: $$ \begin{align*} &1~ \text{for rational}~ x,\\ &2~ \text{for irrational}~ x,~0\leq y \leq \frac{1}{2}\\ &0~ \text{for irrational}~ x,~\frac{1}{2}< y \leq 1. \end{align*} $$
The question asks to show that the iterated integral $\int_0^1\int_0^1\int_0^1f(x,y,z)~dz~dy~dx$ exists, but $f$ is not integrable.
I assume that the value for the iterated integral is simply 1, since $\mathbb{Q}$ is countable but $\mathbb{R}\setminus\mathbb{Q}$ is uncountable, and thus it is safe to assume that $x$ will take on irrational values for most of the interval $[0,1]$, with rational values negligible.
However, would that be a precise answer?
Also, I understand that $f$ would be nowhere continuous, but I am not sure how to extend that thought to rigorously show that $f$ would not be integrable.
My attempt was to show that an iterated Riemann sum would take on the form of: $$\sum_i^n \frac{1}{n}~ f(x_i,y_i,z_i),$$ but since there are infinitely many both irrational and rational $x$ in any given interval, $f(x_i,y_i,z_i)-f(x_{i+1},y_{i+1},z_{i+1})$ would always yield a nonzero value, which by definition should tend to $0$ should the number of iterations approach infinity.
Thanks for any help!