If $f$ is a version of the Dirichlet function: $f(x) = 1$ when $x$ is an irrational in $[0,1]$ and $f(x) = 0$ otherwise
How can I determine whether or not $f$ is integrable using the definition of upper and lower integrals?
From my understanding, the upper integral is $1$, and the lower integral is $0$, and because these aren't equal, $f$ isn't integrable. Is this correct? How can I prove this using those definitions?
Let $P$ be a subdivision
$$0 = x_0 < x_1 < \ldots < x_n = 1$$
of the segment $[0,1]$. For any $i \in \{1, \ldots, n\}$, the segment $[x_{i-1}, x_i]$ contains both rational and irrational points, which means the function $f$ attains both $1$ and $0$ on each $[x_{i-1}, x_i]$.
So $\displaystyle\sup_{x \in [x_{i-1}, x_i]} f(x) = 1$ and $\displaystyle\inf_{x \in [x_{i-1}, x_i]} f(x) = 0$.
The upper Darboux sum for $P$ is:
$$\sum_{i=1}^n (x_i - x_{i-1}) \cdot \left(\sup_{x \in [x_{i-1}, x_i]} f(x)\right) = \sum_{i=1}^n (x_i - x_{i-1}) = 1$$
and the lower Darboux sum for $P$ is:
$$\sum_{i=1}^n (x_i - x_{i-1}) \cdot \left(\inf_{x \in [x_{i-1}, x_i]} f(x)\right) = \sum_{i=1}^n 0 = 0$$
$f$ is integrable if the supremum of lower Darboux sums and the infimum of the upper Darboux sums over all subdivisions exist and are equal. In this case, the former is clearly $0$, and the latter is $1$. Therefore, they cannot be equal so $f$ is not integrable.