Consider the function $\ f:\mathbb{R}\rightarrow\mathbb{R}$ such that $\ f(x) := \begin{cases} 1 & \mathrm{x\ is\ a\ terminating\ decimal}\\ 0 & \mathrm{otherwise} \end{cases}$
Terminating decimals are a subset of the rationals, showing that it's a countable set over any finite bounds. This means the Lebesgue integral over any finite bounds $[a, b]$ will be zero.
However, my friend claimed that the integral of $\ f$ over $\ (-\infty, \infty)$ is equal to 2? It sounds fake but I'm not sure how to disprove (or prove) it. Although Riemann integration is undefined over an unbounded domain, I don't know enough about Lebesgue at this point.
If someone could give me a reason it is (or isn't) equal to 2 that'd be greatly appreciated! Thanks
$\mathbb{Q}$ is countable, and every $x\in\mathbb{R}$ with a terminating decimal expansion is rational, so $f=0$ almost everywhere. Therefore the Lebesgue integral $\int_{\mathbb{R}}f(x)\;dx=0$.