I saw this in the following question: Is there a function with infinite integral on every interval?
I already understood all other steps on the first answer, however, I don't know how to prove the following step:
Let $\{q_n\}$ be an enumeration of the rational numbers, how can I justify that $$\sum_{n=1}^\infty \frac{2^{-n}}{|x-q_n|}<\infty$$ for almost every $x\in\mathbb{R}$ (i.e. almost everywhere)?
I know it has something to do with the fact that $2^{-n}$ tend to zero exponentially while $|x-q_n|$ tends to zero linearly.
Also, there are some modification that I made that shouldn't change the result, which are using all the rational numbers instead of only those between 0 and 1, and removing the square root (since it is squared anyways)
I think you have to take $(q_n)$ to be an ennumeration of rationals in a finite interval instead of the whole line.
$\int_a^{b} \sum \frac {2^{-n}} {|x-q_n|} dx = \sum \int_a^{b}\frac {2^{-n}} {|x-q_n|} dx$ and $\int_a^{b} \frac 1 {|x-q_n|}dx=\int_{a-q_n}^{b-q_n} \frac 1 {\sqrt {|y|} } dy$. Since the integral here is bounded and $\sum \frac1 {2^{n}} <\infty$ it follows that $\int_a^{b} \sum \frac {2^{-n}} {|x-q_n|} dx <\infty$ which implies $\sum \frac {2^{-n}} {|x-q_n|} dx<\infty$ for almost all $x \in (a,b)$. Since $a$ and $b$ are arbitrary we see that the sum is finite for almost all real values of $x$.