Is there a way to make sense of an integral over an interval deprived of an infinite number of values? It's been a couple of days I've been having this in mind and while having this strange feeling that it could possibly lead to some interesting concepts or at least to the deepening of my understanding of integrals so that's why I am asking: 
Would there be a way to make rigorously sense of an integral that would be defined on an interval like [a,b] \ {rationals} or more generally an interval deprived of an infinite number of points (there is probably here a distinction to make depending on whether or not those infinite numbers of points are dense in [a,b]).
Intuitively speaking I think there should be at least a few cases where this should make sense as integrals are just summations in the end. For instance, it seems reasonable to expect the integral of the nul function on such a domain to be equal to $0$.
So, in what extent could such an integral be defined and calculated? 
Ultimately, if you could come up with a case illustrating why summing over such an interval could be of interest and meaningful (or if not why it would always be completely absurd and meaningless) it would be really great.
 A: The Lebesgue integral does this quite well: roughly speaking, if $f$ is any "nice" function and $A$ is any "nice" set of points (and all sets of the form "interval minus countably many points" are "nice"), then we can make sense of the integral of $f$ over $A$.
You can think of the Lebesgue integral, at least at first, as a "sideways" version of the Riemann integral. For example, suppose we want to integrate a function $f$ which takes only finitely many values over a set $A$. Let $\{n_1,...,n_k\}$ be the range of $f$; then the integral of $f$ over $A$ should somehow be $$\sum_{1\le i\le k}n_i\cdot Size(A\cap f^{-1}(n_i))$$ where "$Size(-)$" is some way of measuring the size of a set. Meanwhile, we should try to integrate more general functions by approximating them with finite-valued functions.


*

*For example, we can show that if $A=B-N$ for some set $N$ of "size" zero, then integrating a "nice" function over $A$ gives the same answer as integrating it over $B$ - the null piece doesn't affect the value at the end. Similarly, if $f$ and $g$ are "nice" functions coinciding except on a set of "size" zero, then all their integrals over "nice" sets are equal; as a consequence, the integral of the Dirichlet function over $[0,1]$ is zero, since $\mathbb{Q}$ has "size" zero (being countable) and the Dirichlet function is zero except at the rationals.


The really hard part here is defining the "size" of a general set; this leads to the notion of outer measure, which is really the fundamentally new idea behind the Lebesgue integral.

Admittedly, there are other integrals which are similarly general, and are arguably easier to understand. However, the Lebesgue integral is very well-behaved on an abstract level, despite its pedagogical difficulties, and I ultimately think it's the "right" answer to this question (at least initially).
A: One application of such an integral:
Let $f$ be a real-valued function defined on $[a,b]$. Then,


*

*If $f$ is Riemann-int'ble with strictly positive riemann integral over $[a,b]$, then $f>0$ on some non-empty open interval $I$.

*If $Riemann$ is replaced by $Lebesgue$ then the result is not true. To justify this, consider,
$$f(x) =
\begin{cases}
0, & \text{if }x \in [a,b] \cap\mathbb{Q} \\
1, & \text otherwise
\end{cases}
$$
Here $f$ is not Riemann int'ble but it's Lebesgue int'ble since,
$\int_{[a,b]}f = \int_{[a,b] \cap\mathbb{Q}}f +\int_{\mathbb{Q}^c \cap[a,b]}f = 0+1=1$. But, $f \ngtr 0$ on any open interval in $[a,b]$.
Note that,
$\int_{[a,b] \cap\mathbb{Q}}f=0$ since it's integrated over a set of measure 0.
