# Problem with the Lebesgue integral of Dirichlet function

According to all sources $\int\limits_{[0,1]}{{{\chi }_{\mathbb{Q}\cap [0,1]}}\left( x \right)}dx=0$ (Lebesgue integral out of Dirichlet funtion).

However, below I constructed a sequence of functions ${{f}_{n}}$ which converges to

$\underset{n\to \infty }{\mathop{\lim }}\,{{f}_{n}}(x)=\Phi (x)$ and ${{\chi }_{\mathbb{Q}\cap [0,1]}}\left( x \right)=\Phi (x)$

$\underset{n\to \infty }{\mathop{\lim }}\,\int\limits_{[0,1]}{{{f}_{n}}(x)}dx=\int\limits_{[0,1]}{\Phi (x)}dx=p\in (0,1)$

so $p$ is an arbitrary number from the interval (0,1).

This is a contradiction because $\int\limits_{[0,1]}{{{\chi }_{\mathbb{Q}\cap [0,1]}}\left( x \right)}dx=0$.

Maybe somebody will be able to find a problem in my reasoning ...

The biggest problem in the method is the assumption that [\Phi (x)=0] for $x$ which is irrational number in the interval [0,1]. In my opinion I proved that it is true. Do you agree with my reasoning (see below for details).

Let us consider characteristic function of the set $\mathbb{Q}\cap [0,1]$ (Dirichlet funtion) {{\chi }_{\mathbb{Q}\cap [0,1]}}\left( x \right)=\left\{ \begin{align} & 1\text{ for }x\in \mathbb{Q}\cap [0,1] \\ & 0\text{ for }x\notin \mathbb{Q}\cap [0,1] \\ \end{align} \right. Let $\left\{ {{a}_{i}} \right\}_{i=1}^{\infty }$ be a sequence which contains all rational numbers i.e. $\mathbb{Q}=\bigcup\limits_{i=1}^{\infty }{\left\{ {{a}_{i}} \right\}}$. Let’s define the following function {{f}_{n}}(x)=\left\{ \begin{align} & 1\text{ if }\underset{i\in \{1,...,n\}}{\mathop{\exists }}\,x\in \left[ {{a}_{i}}-\delta _{i,n}^{-},{{a}_{i}}+\delta _{i,n}^{+} \right] \\ & 0\text{ otherwise} \\ \end{align} \right.

where $\delta _{i,n}^{+}-\delta _{i,n}^{-}={{\delta }_{n}}$ and $p=\sum\limits_{i=1}^{n}{{{\delta }_{n}}}=\sum\limits_{i=1}^{n}{\left( \delta _{i,n}^{+}-\delta _{i,n}^{-} \right)}$ and $p\in (0,1)$.

For every sequence of rational numbers $\left\{ {{a}_{i}} \right\}_{i=1}^{\infty }$ and $1>p>0$ it is possible to construct the intervals $\left[ {{a}_{i}}-\delta _{i,n}^{-},{{a}_{i}}+\delta _{i,n}^{+} \right]$ such that $p=\sum\limits_{i=1}^{n}{{{\delta }_{n}}}=\sum\limits_{i=1}^{n}{\left( \delta _{i,n}^{+}-\delta _{i,n}^{-} \right)}$ and $\left[ {{a}_{i}}-\delta _{i,n}^{-},{{a}_{i}}+\delta _{i,n}^{+} \right]\cap \left[ {{a}_{j}}-\delta _{j,n}^{-},{{a}_{j}}+\delta _{j,n}^{+} \right]=\varnothing$.

In order to do that first it is necessary to construct a sequence of intervals $\left[ {{a}_{i}}-\varepsilon _{i,n}^{-},{{a}_{i}}+\varepsilon _{i,n}^{+} \right]$ such that $1=\sum\limits_{i=1}^{n}{{{\varepsilon }_{n}}}=\sum\limits_{i=1}^{n}{\left( \varepsilon _{i,n}^{+}-\varepsilon _{i,n}^{-} \right)}$ and $\left( {{a}_{i}}-\varepsilon _{i,n}^{-},{{a}_{i}}+\varepsilon _{i,n}^{+} \right)\cap \left( {{a}_{j}}-\varepsilon _{j,n}^{-},{{a}_{j}}+\varepsilon _{j,n}^{+} \right)=\varnothing$.

For any fixed $n>1$ it is possible to order all $\{{{a}_{1}},...,{{a}_{n}}\}$ such that ${{a}_{{{\alpha }_{1}}}}<{{a}_{{{\alpha }_{2}}}}<...<{{a}_{{{\alpha }_{n}}}}$. Now we can define the following numbers $\varepsilon _{1}^{-}={{a}_{{{\alpha }_{1}}}}$

$\varepsilon _{1}^{+}=\frac{{{a}_{{{\alpha }_{1}}}}+{{a}_{{{\alpha }_{2}}}}}{2}$

${{\varepsilon }_{1}}=\varepsilon _{1}^{-}+\varepsilon _{1}^{+}$

$\varepsilon _{2}^{-}=\frac{{{a}_{{{\alpha }_{1}}}}+{{a}_{{{\alpha }_{2}}}}}{2}$

$\varepsilon _{2}^{+}=\frac{{{a}_{{{\alpha }_{2}}}}+{{a}_{{{\alpha }_{3}}}}}{2}$

${{\varepsilon }_{2}}=\varepsilon _{2}^{-}+\varepsilon _{2}^{+}$

...

$\varepsilon _{n-1}^{-}=\frac{{{a}_{{{\alpha }_{n-2}}}}+{{a}_{{{\alpha }_{n-1}}}}}{2}$

$\varepsilon _{n-1}^{+}=\frac{{{a}_{{{\alpha }_{n-1}}}}+{{a}_{{{\alpha }_{n}}}}}{2}$

${{\varepsilon }_{n-1}}=\varepsilon _{n-1}^{-}+\varepsilon _{n-1}^{+}$

$\varepsilon _{n}^{-}=\frac{{{a}_{{{\alpha }_{n-1}}}}+{{a}_{{{\alpha }_{n}}}}}{2}$

$\varepsilon _{n}^{+}=1-{{a}_{{{\alpha }_{n}}}}$

${{\varepsilon }_{n}}=\varepsilon _{n}^{-}+\varepsilon _{n}^{+}$

It is possible to see that $\sum\limits_{i=1}^{n}{{{\varepsilon }_{i}}}=1$

$\sum\limits_{i=1}^{n}{{{\varepsilon }_{i}}}={{\varepsilon }_{1}}+{{\varepsilon }_{2}}+...+{{\varepsilon }_{n-1}}+{{\varepsilon }_{n}}=(\varepsilon _{1}^{-}+\varepsilon _{1}^{+})+(\varepsilon _{2}^{-}+\varepsilon _{2}^{+})+...+(\varepsilon _{n-1}^{-}+\varepsilon _{n-1}^{+})+(\varepsilon _{n}^{-}+\varepsilon _{n}^{+})=$

$=\left( {{a}_{{{\alpha }_{1}}}}+\frac{{{a}_{{{\alpha }_{2}}}}-{{a}_{{{\alpha }_{1}}}}}{2} \right)+\left( \frac{{{a}_{{{\alpha }_{2}}}}-{{a}_{{{\alpha }_{1}}}}}{2}+\frac{{{a}_{{{\alpha }_{3}}}}-{{a}_{{{\alpha }_{2}}}}}{2} \right)+\left( \frac{{{a}_{{{\alpha }_{3}}}}-{{a}_{{{\alpha }_{2}}}}}{2} \right.+...+\left. \frac{{{a}_{{{\alpha }_{n-1}}}}-{{a}_{{{\alpha }_{n-2}}}}}{2} \right)+$

$+\left( \frac{{{a}_{{{\alpha }_{n-1}}}}-{{a}_{{{\alpha }_{n-2}}}}}{2}+\frac{{{a}_{{{\alpha }_{n}}}}-{{a}_{{{\alpha }_{n-1}}}}}{2} \right)+\left( \frac{{{a}_{{{\alpha }_{n}}}}-{{a}_{{{\alpha }_{n-1}}}}}{2}+1-{{a}_{{{\alpha }_{n}}}} \right)=$

$={{a}_{{{\alpha }_{1}}}}+\frac{{{a}_{{{\alpha }_{2}}}}-{{a}_{{{\alpha }_{1}}}}}{2}+\frac{{{a}_{{{\alpha }_{2}}}}-{{a}_{{{\alpha }_{1}}}}}{2}+\frac{{{a}_{{{\alpha }_{3}}}}-{{a}_{{{\alpha }_{2}}}}}{2}+\frac{{{a}_{{{\alpha }_{3}}}}-{{a}_{{{\alpha }_{2}}}}}{2}+...$

$+\frac{{{a}_{{{\alpha }_{n-1}}}}-{{a}_{{{\alpha }_{n-2}}}}}{2}+\frac{{{a}_{{{\alpha }_{n-1}}}}-{{a}_{{{\alpha }_{n-2}}}}}{2}$

$+\frac{{{a}_{{{\alpha }_{n}}}}-{{a}_{{{\alpha }_{n-1}}}}}{2}+\frac{{{a}_{{{\alpha }_{n}}}}-{{a}_{{{\alpha }_{n-1}}}}}{2}+1-{{a}_{{{\alpha }_{n}}}}=$

$={{a}_{{{\alpha }_{1}}}}-\frac{{{a}_{{{\alpha }_{1}}}}}{2}+\frac{{{a}_{{{\alpha }_{2}}}}}{2}-\frac{{{a}_{{{\alpha }_{2}}}}}{2}+\frac{{{a}_{{{\alpha }_{1}}}}}{2}-\frac{{{a}_{{{\alpha }_{3}}}}}{2}+\frac{{{a}_{{{\alpha }_{3}}}}}{2}+...$

$+\frac{{{a}_{{{\alpha }_{n-2}}}}}{2}-\frac{{{a}_{{{\alpha }_{n-1}}}}}{2}+\frac{{{a}_{{{\alpha }_{n-1}}}}}{2}-\frac{{{a}_{{{\alpha }_{n-2}}}}}{2}+\frac{{{a}_{{{\alpha }_{n}}}}}{2}-\frac{{{a}_{{{\alpha }_{n-1}}}}}{2}+\frac{{{a}_{{{\alpha }_{n}}}}}{2}-\frac{{{a}_{{{\alpha }_{n-1}}}}}{2}+1-{{a}_{{{\alpha }_{n}}}}=$

$={{a}_{{{\alpha }_{1}}}}-{{a}_{{{\alpha }_{1}}}}+{{a}_{{{\alpha }_{2}}}}-{{a}_{{{\alpha }_{2}}}}+...+{{a}_{{{\alpha }_{n}}-1}}-{{a}_{{{\alpha }_{n-1}}}}+{{a}_{{{\alpha }_{n}}}}+1-{{a}_{{{\alpha }_{n}}}}=1$

In every interval $\left[ {{a}_{i}}-\varepsilon _{i,n}^{-},{{a}_{i}}+\varepsilon _{i,n}^{+} \right]$ it is possible to find subintervals $\left[ {{a}_{i}}-\delta _{i,n}^{-},{{a}_{i}}+\delta _{i,n}^{+} \right]$ such that $\left[ {{a}_{i}}-\delta _{i,n}^{-},{{a}_{i}}+\delta _{i,n}^{+} \right]\subset \left[ {{a}_{i}}-\varepsilon _{i,n}^{-},{{a}_{i}}+\varepsilon _{i,n}^{+} \right]$ and $p=\sum\limits_{i=1}^{n}{l\left( \left[ {{a}_{i}}-\delta _{i,n}^{-},{{a}_{i}}+\delta _{i,n}^{+} \right] \right)}=\sum\limits_{i=1}^{n}{\left( \delta _{i,n}^{+}-\delta _{i,n}^{-} \right)}=\sum\limits_{i=1}^{n}{{{\delta }_{i,n}}}$.

In order to do that it is enough to assume that ${{\delta }_{i,n}}=p{{\varepsilon }_{i,n}}$ or $\delta _{i,n}^{-}=p\varepsilon _{i,n}^{-},\delta _{i,n}^{+}=p\varepsilon _{i,n}^{+}$.

Verification $\sum\limits_{i=1}^{n}{{{\varepsilon }_{i}}}=1$ $\sum\limits_{i=1}^{n}{{{\delta }_{i}}}=\sum\limits_{i=1}^{n}{p{{\varepsilon }_{i}}}=p\sum\limits_{i=1}^{n}{{{\varepsilon }_{i}}}=p1=p$ additionally because $p\varepsilon _{i,n}^{-}<\varepsilon _{i,n}^{-}$ and $p\varepsilon _{i,n}^{+}<\varepsilon _{i,n}^{+}$ then $\left[ {{a}_{i}}-\delta _{i,n}^{-},{{a}_{i}}+\delta _{i,n}^{+} \right]=\left[ {{a}_{i}}-p\varepsilon _{i,n}^{-},{{a}_{i}}+p\varepsilon _{i,n}^{+} \right]\subset \left[ {{a}_{i}}-\varepsilon _{i,n}^{-},{{a}_{i}}+\varepsilon _{i,n}^{+} \right]$. Because of that for each $n$ $\int\limits_{[0,1]}{{{f}_{n}}(x)dx}=\sum\limits_{i=1}^{n}{{{\delta }_{n}}}=p$ then $\underset{n\to \infty }{\mathop{\lim }}\,\int\limits_{[0,1]}{{{f}_{n}}(x)dx}=\underset{n\to \infty }{\mathop{\lim }}\,p=p\in (0,1)$

Because set $\mathbb{Q}\cap [0,1]$ is dense in [0,1] then $\underset{n\to \infty }{\mathop{\lim }}\,\delta _{i,n}^{-}=0$, $\underset{n\to \infty }{\mathop{\lim }}\,\delta _{i,n}^{+}=0$.

For every fixed ${{a}_{i}}$ we have $\underset{n\to \infty }{\mathop{\lim }}\,\left[ {{a}_{i}}-\delta _{i,n}^{-},{{a}_{i}}+\delta _{i,n}^{+} \right]=\left[ {{a}_{i}}-\underset{n\to \infty }{\mathop{\lim }}\,\delta _{i,n}^{-},{{a}_{i}}+\underset{n\to \infty }{\mathop{\lim }}\,\delta _{i,n}^{-} \right]=\left[ {{a}_{i}}-0,{{a}_{i}}+0 \right]=\{{{a}_{i}}\}$ $\underset{n\to \infty }{\mathop{\lim }}\,\bigcup\limits_{i=1}^{n}{\left[ {{a}_{i}}-{{\delta }_{n}},{{a}_{i}}+{{\delta }_{n}} \right]}=\{{{a}_{i}}\}_{i=1}^{\infty }=\mathbb{Q}\cap [0,1]$

Let $\Phi (x)=\underset{n\to \infty }{\mathop{\lim }}\,{{f}_{n}}(x)$ and x is a rational nuber in the interval [0,1] then

$\Phi (x)=\underset{n\to \infty }{\mathop{\lim }}\,{{f}_{n}}(x)=1$ for $x\in \mathbb{Q}\cap [0,1]$

In limit case $\underset{n\to \infty }{\mathop{\lim }}\,\delta _{i,n}^{-}=\underset{n\to \infty }{\mathop{\lim }}\,\delta _{i,n}^{-}=0$ then function $\Phi (x)=\underset{n\to \infty }{\mathop{\lim }}\,{{f}_{n}}(x)$ is 1 only for rational numbers consequently $\Phi (x)=\underset{n\to \infty }{\mathop{\lim }}\,{{f}_{n}}(x)=0$ for x which is an irrational number in the interval [0,1] i.e.

$x\in R\backslash \left( \mathbb{Q}\cap [0,1] \right)$ then $\Phi (x)=\underset{n\to \infty }{\mathop{\lim }}\,{{f}_{n}}(x)=0$

Because of that $\Phi (x)=\underset{n\to \infty }{\mathop{\lim }}\,{{f}_{n}}(x)={{\chi }_{\mathbb{Q}\cap [0,1]}}\left( x \right)$

According to the definition of the Lebesgue integral we have $\underset{n\to \infty }{\mathop{\lim }}\,\int\limits_{[0,1]}{{{f}_{n}}(x)}dx=\int\limits_{[0,1]}{{{\chi }_{\mathbb{Q}\cap [0,1]}}\left( x \right)}dx=p\in (0,1)$

which is a contradiction because $\int\limits_{[0,1]}{{{\chi }_{\mathbb{Q}\cap [0,1]}}\left( x \right)}dx=0$.

• Why exactly is $\Phi(x) = \lim_{n\to \infty} f_n(x) = 1$ only for rational numbers $x$? The set of numbers $x$ for which this limit is $1$ contains $U = \bigcap_{n=1}^\infty U_n$, where $U_n = (a_1 - \delta_{1,n}^-, a_1 + \delta_{1,n}^+) \cup \cdots \cup (a_n - \delta_{n,n}^-,a_n+\delta_{n,n}^+)$ is open. This set $U$ is a $G_\delta$-set containing $Q = \mathbb{Q} \cap [0,1]$ and is therefore strictly larger than $Q$. Mar 16 '13 at 22:44
• A further (minor) point is why the pointwise limit $\Phi(x) = \lim_{n \to \infty} f_n(x)$ exists in the first place. You can arrange this by making sure that $\delta_{i,n}^-$ and $\delta_{i,n}^+$ are monotonically decreasing functions of $n$. Mar 16 '13 at 22:53
"For every fixed ${{a}_{i}}$ we have $\lim_{n\to \infty} \left[ {{a}_{i}}-\delta _{i,n}^{-},{{a}_{i}}+\delta _{i,n}^{+} \right]=\left[ {{a}_{i}}-\lim_{n\to \infty} \delta _{i,n}^{-},{{a}_{i}}+\lim_{n\to \infty} \delta _{i,n}^{-} \right]=\left[ {{a}_{i}}-0,{{a}_{i}}+0 \right]=\{{{a}_{i}}\}$ $\lim_{n\to \infty} \bigcup\limits_{i=1}^{n}{\left[ {{a}_{i}}-{{\delta }_{n}},{{a}_{i}}+{{\delta }_{n}} \right]}=\{{{a}_{i}}\}_{i=1}^{\infty }=\mathbb{Q}\cap [0,1]$"
You are right that you want to calculate $\lim_{n\to \infty} \bigcup\limits_{i=1}^{n}{\left[ {{a}_{i}}-{{\delta }_{n}},{{a}_{i}}+{{\delta }_{n}} \right]}$. However, what you have actually calculated (in the rest of that line) is $\lim_{n\to \infty} \bigcup\limits_{i=1}^{n} \big( \lim_{m\to \infty} {\left[ {{a}_{i}}-{{\delta }_{m}},{{a}_{i}}+{{\delta }_{m}} \right]} \big)$, which is not the same thing.
Here's one way to see that your construction isn't what you think it is: your argument was for some $p\in(0,1)$, but note that it is completely the same for $p=1$ as well. In this case, each $f_n$ is simply $1$ on all of $[0,1]$, and hence so is $\lim_{n\to\infty} f_n$. But in the mistake I copied above, the logic would conclude equally well that $\lim_{n\to\infty} f_n$ is the indicator function of $\mathbb Q$.
• Agreed. The way to make formal sense of these limits is to interpret them as $\lim_{n\to\infty}[a_i - \delta_{i,n}^-,a_i+\delta_{i,n}^+] = \bigcap_{n=i}^\infty[a_i-\delta_{i,n}^-,a_i+\delta_{i,n}^+]=\{a_i\}$ and then one sees that the argument involves the incorrect identification of $\bigcup_{i=1}^\infty \bigcap_{n=i}^\infty[a_i - \delta_{i,n}^-,a_i+\delta_{i,n}^+]$ with $\bigcap_{n=1}^\infty \bigcup_{i=1}^n [a_i - \delta_{i,n}^-,a_i + \delta_{i,n}^+]$. As I pointed out in my comments to the question, the latter set is strictly larger than the former (the former is $\mathbb{Q} \cap [0,1]$). Mar 16 '13 at 23:12