# Integral of $1$ minus Dirichlet's function

Suppose $f:[0,1] \to \mathbb R$ is defined as $$f(x) = \begin{cases} 1, &\text{if } x \text{ is irrational; and } \\ 0, &\text{if }x \text{ is rational}. \end{cases}$$

I know from Real Analysis that $\int_0^1 f =1$, but intuitively it seems that the "area under curve" is 0.

Is there some intuitive explanation as to why $\int_0^1 f =1$ (without using measure theory)?

-
Why do you find it intuitive that the area under the curve is 0? The function is 1 for almost all x values... –  Jason DeVito Aug 24 '10 at 18:40
It seems that there is no area under the curve because there are no intervals, I, for which f(I) ={1}. –  jennifer Aug 24 '10 at 18:46
Does your intuition suggest that both ∫fdx and ∫(1−f)dx are 0, but their sum is ∫dx = 1? –  Rahul Aug 24 '10 at 18:58
How do you define $\int_0^1 f \, dx$ without Lebesgue measure? f is not Riemann integrable. –  KennyTM Aug 24 '10 at 19:01
Rahul, Yes intuitivly I would think both integrals would be 0, which contradicts the fact that the integral of sum is 1. –  jennifer Aug 24 '10 at 19:01
show 1 more comment

Some of this answer is implicit in many people's comments, but let's make it explicit.

Here's a question. It seems to you that the area under the curve --- of Dirichelt's function --- is zero. But Dirichelt's function is not a "curve", precisely because it is discontinuous. What then do you mean?

Let's consider that idea of "under the curve", for some possible failures of intuition. If you take the phrase "under the curve" very seriously, you'll probably be thinking of something like the lower Darboux sum. This, indeed, is zero for any interval, because there is no space for any rectangles of finite width underneath "the curve". The problem is that the Darboux integral is not well-defined, because the upper Darboux sum for any interval is the length of the interval --- because the shortest rectangles of finite width which envelop the function are the rectangles of height 1.

Thus, Dirichlet's function is not integrable by techniques such as the Darboux integral, because the upper and lower Darboux sums do not coincide. Additional techniques are required --- such as measure theory --- to define the integral at all.

-