# Improper integral over the rationals

Question:

Suppose that I wish to integrate a function over the natural numbers. How could I do this?

Consider the definite integral $$\int_a^bf(x)\ dx$$. If we consider this as the 'area under the curve' between $$x=a$$ and $$x=b$$, then $$\int_a^bf(x)\ dx$$ is the sum of the areas infinitely many rectangles, each with an area of $$f(x)\epsilon$$, where $$\forall x\in\mathbb{R}^+.\epsilon. Thus: $$\int_a^bf(x)\ dx=\lim_{\epsilon\to0}\sum_{x=a}^{b/\epsilon}f(x)\epsilon$$ For $$x\in\mathbb{N}$$, this is simply a finite sum, since there are no terms between $$x=n$$ and $$x=n+1$$: $$\int_{M\subset\mathbb{N}}f(x)\ dx=\int_a^bf(x)\ dx=\lim_{\epsilon\to 0}\sum_{x=a}^{b}f(x)\epsilon\ \mid a,b,x\in\mathbb{N}$$ This summation is zero for all $$a$$ and $$b$$, UNLESS $$b=\infty$$ and $$a, in which case the infinite sum, corresponding to the improper integral $$\int_a^\infty f(x)\ dx$$ can be nonzero, the nicest case being $$a=0$$: $$f:\mathbb{N}\to X\implies\int_0^\infty f(x)\ dx=\lim_{\epsilon\to0}\sum_{x=0}^\infty f(x)\epsilon>0$$ Evaluating this sum can be incredibly difficult, but it is possible.

Now, the big question: What is the improper integral of $$f(x)$$ over the rationals? i.e.: $$f:\mathbb{Q}\to X\implies\int_0^\infty f(x)\ dx=\ \Large?$$ I would assume that because the rationals are dense $$f:\mathbb{Q}\to X\land g:\mathbb{N}\to X\implies\int_0^\infty f(x)\ dx\gg\int_0^\infty g(n)\ dn$$ This following from the fact that for a finite natural number $$b$$: $$\sum_{0\leq x\leq b\\x\in\mathbb{Q}}f(x)\gg\sum_{0\leq x\leq b\\x\in\mathbb{N}}f(x)$$

• Let's consider for a moment $L=\lim_{\varepsilon \rightarrow 0} \sum_{x\in\mathbb{N}} f(x)\varepsilon = \lim_{\varepsilon \rightarrow 0} \varepsilon \cdot \left( \sum_{x\in\mathbb{N}} f(x) \right)$. You have either $\sum_{x\in\mathbb{N}} f(x) = \pm \infty$, in which case $L=\pm \infty$, or $\sum_{x\in\mathbb{N}} f(x) = l \in \mathbb{R}$, and in this case $L=0$. However, you tagged this question as nonstandard-analysis: in this framework you can do many shenanigans with hyperfinite sums and infinitesimal $\varepsilon$. – Emanuele Bottazzi Dec 12 '18 at 20:33
• You're almost right. Generally $\sum_{x\in\mathbb{N}}f(x)=\pm\infty$, yes. But $0\cdot\pm\infty$ is indeterminate. The question is tagged nonstandard-analysis because that's about the only way to evaluate the sum without running into this problem. Honestly, you almost need to force it to make sense. It's probably way more trouble than it's worth, but after watching 3b1b's video on the p-adics, I figured "hey, why not?" – R. Burton Dec 13 '18 at 16:36
• Some confusion arises from the usual meaning of the expression $\lim_{\varepsilon\rightarrow 0} \sum_{x \in \mathbb{N}} f(x)\varepsilon = \lim_{\varepsilon\rightarrow 0} \left(\varepsilon \cdot \lim_{n \rightarrow \infty}\sum_{x \leq n} f(x) \right)$. The problem here is not the indeterminate form $0\cdot \infty$, but which of the two limits is computed before the other, since it is well-known that limits do not always commute. – Emanuele Bottazzi Dec 21 '18 at 22:10

Within nonstandard analysis you can proceed as follows: take any infinitely large $$N \in ^\ast\mathbb{N}$$ and consider the set $$\{0, 1, \ldots, N\}\supset \mathbb{N}$$. By the transfer principle, $$[0,N]$$ has the same properties of a finite subset of $$\mathbb{N}$$, and the sum $$\varepsilon \sum_{x \leq N} f(x)$$ is well-defined for every hyperreal (= nonstandard real) $$\varepsilon$$. In this setting, a somewhat natural choice is to define $$\varepsilon=N^{-1}$$.
In order to define a sum over $$\mathbb{Q}$$ you can proceed in a similar way: let $$M=N!$$ for some infinitely large $$N \in ^\ast\mathbb{N}$$, and consider the set $$Q=\left\{ \frac{n}{M} : -M^2 \leq n \leq M^2 \right\} \supset \mathbb{Q}$$. Transfer still ensures that $$Q$$ has the same properties of a finite subset of $$\mathbb{Q}$$, so the sum $$\varepsilon\sum_{x \in Q} f(x)$$ is well-defined. Once again, a meaningful choice for $$\varepsilon$$ is $$\varepsilon = |Q|^{-1} =(2M^2+1)^{-1}$$.
• Is the $N!$ to account for the permutations of $x/y$ for $x,y\in^*\mathbb{N}:x,y<N$? – R. Burton Dec 23 '18 at 15:45
• Nope. The choice of $M=N!$ is sufficient to ensure the inclusion $\mathbb{Q}\subset Q$. – Emanuele Bottazzi Dec 24 '18 at 14:58