3

In a lecture yesterday on the definition of integrals in terms of step functions, my lecturer mentioned an unusual function on the interval [0,1]. I am curious to wether my evaluation of the integral of this function is correct. First, defining the function:

$\text{Let }{\phi}=\{q_1,q_2,q_3,...\}={\bigcup}_{n=1}^{\infty}F_n,\text{ where }F_n\text{ is the }$Farey sequence $\text{bounded in }[0,1],\text{ and }q_1<q_2<q_3,...$

Now, we define two functions as follows: $$W:{\phi}\;{\to}\;{\mathbb{R}},\; W(r) =\begin{cases}\frac{1}{2^n},\; r{\in}{\phi}:r=q_n\\0,\;\;\;r{\notin}{\phi}\end{cases}$$ so $W(q_1)=\frac{1}{2}, W(q_2)=\frac{1}{4},W(q_3)=\frac{1}{8},\text{ etc}.$ Now we define another function based on W:

$$f:[0,1]\;{\to}\;\mathbb{R},\;f(x)=\sum_{r{\lt}x}W(r).$$ This is the function i am interested in. The function should be integrable, since it's set of discontinuities is $[0,1]{\backslash}{\mathbb{Q}},$ which is a countable set. Hence, i tried to manually evaluate the integral and came up with the following:

$$\int_0^1f(x)dx=\int_0^1\sum_{r{\lt}x}W(r)dx=\big[x\sum_{r{\lt}x}W(r)\big]_{x=0}^{x=1}=\sum_{r{\lt}1}W(r)-0\big(\sum_{r{\lt}0}W(r)\big)$$ $$=\sum_{r{\lt}1}W(r)=\sum_{r{\in}{\phi}}W(r)=\sum_{n=1}^{\infty}\frac{1}{2^n}=\frac{1}{1-\frac{1}{2}}=1$$ $${\therefore}\int_0^1f(x)dx=1$$.

This at first seemed contradictory, since ${\forall}x{\in}[0,1],\;f(x){\lt}1\;{\Rightarrow}\;\int_{[0,1]}f(x)dx\;{\lt}\;1(1-0)=1.$

However, due to the fact that there are infinitely many rational numbers in the interval $[0,a]:a{\in}[0,1]$, it could also make sense that the function $f$ boils down to $f(x)=1$.

This is why i am questioning my answer, besides the unusual integration method. Could someone please let me know whether my evaluation of the integral is correct, and if not, how to evaluate the integral?

  • How do you swap the $\sum_{r < x}$ with the integral if $x$ is the integration variable? That doesn't really make sense. – Bruno B Mar 12 '25 at 14:57
  • @BrunoB Good point, however my evaluation still seems to make sense to me if i simply omit that equality – Josh Cherrington Mar 12 '25 at 14:59
  • You can't just omit it, it's the whole reason you're evaluating $[\sum_{r < x} W(r)]_{x = 0}^{x = 1}$ and thus getting $1$ at the end... – Bruno B Mar 12 '25 at 15:01
  • @BrunoB I think you are right. However i also think that i have corrected my working with $\int_0^1\sum_{r{\lt}x}W(r)dx=\big[x\sum_{r{\lt}x}W(r)\big]_{x=0}^{x=1}$, which seems to make sense to me. Although the sum relies on x, the right hand side reflects all contributions of x towards the value of the sum – Josh Cherrington Mar 12 '25 at 15:03
  • 1
    You are saying that $\int_0^1 f(x),\mathrm d x=\biggl[xf(x)\biggr]_0^1$, which is clearly not necessarily true – Lorago Mar 12 '25 at 15:06
  • @Lorago I know, however i believe it to be true in this case to the fact that at any point in $[0,1]$, infinitely many rational numbers have already contributed towards the value of $f(x)$, so $f(x)$ can be treated as just the number 1 in this case – Josh Cherrington Mar 12 '25 at 15:10
  • 1
    If I take the Wikipedia page at face value, it seems like the $q_n$s cannot even be monotonically ordered like this, in the sense that they tend towards both $0$ and $1$? If $\phi$ is really supposed to be the union of the Farey sequence's sets that is. Lorago did give you a procedure which is correct but you will have $f(x) = +\infty$ on the whole of $[0,1]$ if the $q_n$s are allowed to tend to $0$. Maybe they're instead supposed to correspond to the rightmost-outside-of-$1$ term of each $F_n$? – Bruno B Mar 12 '25 at 15:25
  • 1
    @BrunoB $\sum_{n=1}^{\infty}\frac{1}{2^n}=1$, so $f(x)$ is bounded by 1, surely? – Josh Cherrington Mar 12 '25 at 15:29
  • That is my bad. But still, something feels off about the current definition. Though that does warrant the "unusual" part of the title I suppose. – Bruno B Mar 12 '25 at 15:32
  • I agree with Bruno B that the sequence cannot be ordered so that $q_1<q_2<\dots$, but this is not really an issue from what I see. You just have that $f(x)=\sum_{\substack{n\in\mathbb Z^+ \ q_n<x}}\frac{1}{2^n}$, and the set ${n\in\mathbb Z^+ : q_n<x}$ may very well be infinite for all $x$ without there really being any issues – Lorago Mar 12 '25 at 15:39
  • @JoshCherrington: I see that $F_n$ is the set (finite) of all Farey numbers of order $n$ in $[0,1]$, but what is $(F_n)$? – Mittens Mar 12 '25 at 15:53
  • @Mittens huh? I just put brackets around $_n$ , that's all. Also the infinite union of the sets is not finite, which is the set in question – Josh Cherrington Mar 12 '25 at 18:03
  • 3
    @JoshCherrington: It is rather confusing notation. $F_n$ is the set of Faray numbers of order at most $n$, this is a finite set. Now $\Phi:=\bigcup_n F_n$ is the set of all Farey numbers. The notation $\bigcup_n(F_n)$ is confusing, the shoes are different from the box in which are package. Also, the ordering $\Phi$ as $q_1<q_2<\ldots$ is not possible since $0$ is an accumulation points of $\Phi$. What exactly is $q_1,q_2,\ldots$? – Mittens Mar 12 '25 at 18:08
  • @mittens is what i have written now okay? also what is the purpose of the colon before the equality sign when writing ${\phi}:={\bigcup}_nF_n$? – Josh Cherrington Mar 13 '25 at 11:07
  • @Mittens i don't think the ordering actually matters, it's more that you can assign some natural number $n{\in}{\mathbb{N}}$ to each $q_n{\in}{\phi}.$ The ordering would only matter if the integral wasn't across the entire interval $[0,1]$ – Josh Cherrington Mar 13 '25 at 15:43
  • @JoshCherrington: I agree, but the way you defined $W$ does not make any sense. One lat thing, $\phi=\bigcup_nF_n$ is in fact $\mathbb{Q}\cap[0,1]$. Now, perhaps what your instructor was doing is choosing any probability distribution on $\mathbb{Q}$ by listing all rationals ${q_n:n\in\mathbb{N}}$ (the order is not important) ans assigning to $q_n$ the measure $2^{-n}$. Then, $W(x)$ is the distribution of the measure $\sum_n2^{-n}\delta_{q_n}$. $W$ is a strictly monotone increasing nonnegative function bounded by $1$. This $W(x)$ is integrable over [0,1]. – Mittens Mar 13 '25 at 18:02
  • @Mittens I think rhis is what the lecturer was doing, yes. How is it different to what I have done – Josh Cherrington Mar 13 '25 at 18:19
  • 1
    @JoshCherrington: your definition of $W$ is based on the order of real numbers, the assignation you have to defined $W$ is not possible for $\mathbb{Q}$ is dense. Anyway, I see what the problem was about. Just to end this conversation, you can assigned any probability measures on points of $\mathbb{Q}$, that is let $(a_n:n\in\mathbb{N})$ be a sequence of nonnegative numbers with $\sum_na_n=1$ and define $P=\sum_na_n\delta_{q_n}$. The distribution function $W(x)=\sum_{r\leq x}P(r)$ of $P$ is also Lebesgue integrable over $[0,1]$. – Mittens Mar 13 '25 at 18:29

1 Answers1

4

For each $n\in\mathbb Z^+$, define a function $g_n:[0,1]\to\mathbb R$ by

$$g_n(x)=\frac{1}{2^n}\chi_{(q_n,1]}(x)=\begin{cases} \frac{1}{2^n},&q_n<x,\\ 0, &\text{otherwise}. \end{cases}$$

Note that

$$\int_0^1 g_n(x)\,\mathrm dx=\int_{q_n}^1\frac{\mathrm dx}{2^n}=\frac{1-q_n}{2^n}.$$

Finally observing that

$$f(x)=\sum_{n=1}^\infty g_n(x)$$

we can then compute

$$\int_0^1f(x)\,\mathrm dx=\int_0^1\sum_{n=1}^\infty g_n(x)\,\mathrm dx=\sum_{n=1}^\infty\int_0^1 g_n(x)\,\mathrm dx=\sum_{n=1}^\infty\frac{1-q_n}{2^n},$$

where the interchange of limit and integral is justified by the summands being positive (so monotone convergence applies for example). I do not know anything about the sequence $\{q_n\}_{n\in\mathbb Z^+}$, so hopefully you can take it from here if you wish to evaluate this sum somehow.

Lorago
  • 12,173