Example
The Dirichlet function \(f\) is not Darboux integrable on any interval \([a,b]\)

Proof

Recall that the Dirichlet function is defined as

$$ \begin{align*} f(x) = \begin{cases} 1, & \text{if } x \in \mathbb{Q}, \\ 0, & \text{if } x \in \mathbb{R} \setminus \mathbb{Q}. \end{cases} \end{align*} $$

By the density of rationals, every interval must contain a rational number and by the density of irrationals, every interval must contain an irrational number. Hence, in every interval, \(M_j = 1\) and \(m_j=0\). Therefore

$$ \begin{align} U(f,P) &= \sum_{j=1}^{n} M_j(f)(x_j - x_{j-1}) = 1 \cdot (b-a) = b-a \\ L(f,P) &= \sum_{j=1}^{n} m_j(f)(x_j - x_{j-1}) = 0. \end{align} $$

But this means that

$$ \begin{align} U(f,P) - L(f,P) = b - a. \end{align} $$

But we can never make \(b-a\) as small as we want. Therefore, it is not Darboux integrable. \(\ \blacksquare\)


References