Evaluating Integrals using Lebesgue Integration Suppose we are to evaluate:
$$I = \int_{0}^{1} f(x) dx$$
Where
$$f(x)=\begin{cases}1 \space \text{if} \space x\space \text{is rational}, & \newline  0  \space \text{if} \space x \space \text{is irrational} \\ \end{cases}$$
I have been told that this can be done using measure theory.
Will anyone care to explain how possibly? I am new to measure theory, so I am just researching, please do not say "no attempt shown" this is because I dont know Lebesgue yet, but I heard it has great applications on this? 

Lebesgue integration tells you that the value is zero. Basically, much like how you can split integrals over intervals in Riemann integration, you can split integrals over arbitrary measurable sets in Lebesgue integration. Here we write:
$$\int_{[0,1]} f(x) dx = \int_{[0,1] \cap \mathbb{Q}} 1 dx + \int_{[0,1] \cap \mathbb{Q}^c} 0 dx$$
Now that we've written it as an integral of constant functions, we just multiply the constants by the measures of the corresponding sets, obtaining
$$\int_{[0,1]} f(x) dx = 1 \cdot 0 + 0 \cdot 1 = 0.$$
since $[0,1] \cap \mathbb{Q}$ has measure zero. Explaining how to prove that it has measure zero would require a significant amount of explanation of the definitions and theorems from measure theory.
