# Integration in the surreal numbers

In the appendix to ONAG (2nd edition), Conway points that the definition of integration (using Riemann sums as left and right options) gives the "wrong" answer : $\int_0^\omega \exp(t)\thinspace dt=\exp(\omega)$ (instead of $\exp(\omega)-1$). I wonder if this was not due to lack of some options (presumably right ones), and if a better definition could not be sought by using Kurzweil-Henstock integration (but I was not able to concoct one, of course, else I would not ask here). Has the idea already been tried?

• For those of us whose surreal calculus skills are a bit rusty, would it be possible for you to sketch the calculation for the "wrong" answer? Commented Apr 24, 2012 at 11:56
• Mmm... I cannot find my copy of ONAG ; the main idea is to use for left and right options Riemann sums of the function to be integrated, integrals of the same function over simpler (i.e. given by options of the bounds) intervals, and integrals of simpler functions on the same interval (working only with positive monotonous functions, if I remember well). Commented Apr 24, 2012 at 16:36
• The calculation is attributed to Kruskal but details are not provided. The appendix does give Norton's definition of the integral; this is rather complicated and takes about half a page to explain. Since Conway's conclusion is that Norton's definition is probably not the "right" one, I'm not sure it would be that helpful to reproduce it here. Commented Apr 24, 2012 at 21:00

## 4 Answers

In a recent article in the Notices of the AMS, Philip Ehrlich briefly describes some progress in this area. Below is a relevant excerpt from the article.

Conway originally expressed doubt that “reasonable” global definitions of exponentiation, logarithm, sine, and cosine could be defined on $$\mathbf{No}$$. Through the collective efforts of Kruskal, Norton, Gonshor, van den Dries, Ehrlich, and Kaplan, however, this doubt has been put to rest. Van den Dries and Ehrlich (2001) showed that $$\mathbf{No}$$ together with the Kruskal–Gonshor exponential function $$\exp$$ defined thereon has the same elementary properties of the ordered field of real numbers with real exponentiation, and Ehrlich and Kaplan have further shown that $$\mathbf{No}$$ has canonical sine and cosine functions which in turn lead to a canonical exponential function on $$\mathbf{No}$$’s surcomplex counterpart $${\mathbf{No}}[i]$$ that extends $$\exp$$.

Additional rudiments of analysis on the surreals have also been developed by Alling, Fornasiero, Rubinstein–Salzedo and Swaminathan, and Costin, Ehrlich and Friedman. Costin and Ehrlich, in particular, have developed a theory of integration (and differentiation) that extends the range of analysis from the reals to the surreals for a large subclass of resurgent functions that arise in applied analysis. The resurgent functions, which generalize the analytic functions, were introduced by Écalle in the early 1980s in connection with work related to Hilbert’s 16th problem. Unlike nonstandard analysis, which provides an infinitesimalist approach to integration on the extended reals ($$\mathbb{R}\cup \{\pm \infty \}$$), surreal integration deals with integrals whose bounds and values need not be extended reals at all. For example, in the surreal theory (setting $$e^x=\exp x$$) we have $$\begin{equation*} \int _{0}^{\omega }e^{x}dx=e^{\omega }-1=\omega ^{\omega }-1. \end{equation*}$$ This work makes contributions towards realizing some of the analytic goals expressed by Kruskal and Norton in their unsuccessful early attempts to establish a theory of surreal integration as described by Conway.

In particular, the theory of integration mentioned above is developed in Integration on the Surreals: a Conjecture of Conway, Kruskal and Norton, arXiv:1505.02478, 2015.

See also Ehrlich's answer to a related MO question.

• I am pleased to report that the paper in arXIv referred to above has now been superseded by a vastly revised and improved version of that paper. Ovidiu Costin and I expect to post the revised version in arXiv within the next few weeks. Commented Aug 7, 2022 at 20:35

Edit (8/21/24). The paper Integration on the Surreals by Ovidiu Costin and myself referred to below has now appeared online in Advances in Mathematics. It is a substantially revised and expanded version of the below referenced preprint that appeared on mathatXiv. A pdf file of the just-said version is available at https://doi.org/10.1016/j.aim.2024.109823.

In a comment on Timothy Chow's recent answer that cited a paper a by O. Costin, H. Friedman and myself concerned with integration on the surreals, I noted that the cited paper has now been superseded by a revised and expanded version of portions that paper, and that Costin and I expect to post the revised version on arXiv within the next few weeks. I'm pleased to note that the revision (Integration on the Surreals: https://arxiv.org/abs/2208.14331) has now appeared. A separate paper by Costin and Friedman concerned with a different portion of the original paper will appear on another occasion.

Here is another answer by me, in which I will give an explicit Mathematica code for evaluating integrals over surreal numbers. It is based on the same approach as my prevuous answer, but uses a more general formula.

It should be noted that my approach does not satisfy the property of linearity against an infinite coefficient. In other words, moving an infinite factor from under the integral changes the value of the expression: $$\alpha\int f\ne \int (\alpha f)$$. The property of linearity against infinite factors has been included in other approaches to surreal integration problem, but I consider it unnatural.

In the code below, for simplicity, in input w corresponds to $$\omega$$ and W to $$\omega_1$$. The input accepts any surreal numbers composed of these values as integration limits and any surreal-valued function of integration variable x as the expression under integral. In output, derivation is denoted as ꝺ.

f[x_] = w^W;
a = 0;
b = w;
f[x_] = f[x] /. W -> W[w];
Unprotect[Power]; Power[0, 0] = 1; Protect[Power];
Fin[t_] := (PowerExpand[f[t]] /. Log[w] -> 0 /. w -> 0) +
Limit[Evaluate[LaplaceTransform[ D[f[t], w], t, x]] +
Evaluate[LaplaceTransform[ D[f[t], w], t, -x]], x -> 0]/
2 /. \[Infinity] -> 0 /. -\[Infinity] -> 0 //
FullSimplify  (*Finding the finite part so to integrate separately*)
int = \[Pi]  W  Integrate[D[f[t], w], {t, a, b}] +
Integrate[Fin[t], {t, a, b}] // FullSimplify;
int = If[a == b, \[Pi]  D[f[t], w], int, int] /.
Derivative[1][W][w] -> ꝺ[W] /. W[w_] :> W // Normal;
Print[Inactivate[
Integrate[
f[x] /. W[w] -> W /. w -> \[Omega] /.
W -> Subscript[\[Omega], 1], {x,
a /. w -> \[Omega] /. W -> Subscript[\[Omega], 1],
b /. w -> \[Omega] /. W -> Subscript[\[Omega], 1]}],
Integrate], "=",
int /. w -> \[Omega] /. W -> Subscript[\[Omega], 1]]


The code correctly gives all the results from the other my answer, but also can find more complicated results, such as:

• $$\int _0^{\omega }e^{c x \omega }dx=\frac{c \omega ^3+\omega +\pi \left(e^{c \omega ^2} \left(c \omega ^2-1\right)+1\right) \omega _1}{c \omega ^2}$$

• $$\int _0^{\omega }e^{c x^2 \omega }dx=\omega +\frac{1}{2} e^{c \omega ^3} \pi \omega _1-\frac{\pi ^{3/2} \text{erfi}\left(\sqrt{c} \omega ^{3/2}\right) \omega _1}{4 \sqrt{c} \omega ^{3/2}}$$

• $$\int _0^{\omega }\log (c x \omega )dx=\omega (\log (c)+\log (\omega )-1)+\pi \omega _1$$

• $$\int _0^{\omega }\omega ^xdx=\frac{\frac{\pi \left((\omega \log (\omega )-1) \omega ^{\omega }+1\right) \omega _1}{\omega }+1}{\log ^2(\omega )}$$

• $$\int _0^{\omega }\omega ^{\omega }dx=\pi (\log (\omega )+1) \omega _1 \omega ^{\omega +1}+\omega$$

• $$\int _0^{\omega }p \omega ^{q \omega }dx=p \omega \left(\pi q (\log (\omega )+1) \omega _1 \omega ^{q \omega }+1\right)$$

• $$\int _0^{\omega }\omega ^{\omega _1}dx=\pi \omega _1 \left(\omega \partial \left(\omega _1\right) \log (\omega )+\omega _1\right) \omega ^{\omega _1}$$

• $$\int _0^{\omega }\omega _1^{\omega }dx=\pi \omega \left(\frac{\omega \partial\left(\omega _1\right)}{\omega _1}+\log \left(\omega _1\right)\right) \omega _1^{\omega +1}+\omega$$

• $$\int _0^{\omega }\omega _1^xdx=\frac{\omega _1^{\omega }-1}{\log \left(\omega _1\right)}+\frac{\partial\left(\omega _1\right) \left(\pi \left(\omega \log \left(\omega _1\right)-1\right) \omega _1^{\omega +1}+\pi \omega _1+\omega \right)}{\log ^2\left(\omega _1\right) \omega _1}$$

• $$\int _0^{\omega _1}\omega ^xdx=\frac{\omega _1 \left(\pi \left(\log (\omega ) \omega _1-1\right) \omega ^{\omega _1}+\pi +1\right)}{\omega \log ^2(\omega )}$$

• $$\int _0^{\omega }\log \left(\omega _1\right)dx=\omega \left(\log \left(\omega _1\right)+\pi \partial\left(\omega _1\right) \omega _1\right)$$

etc.

The following rules define a natural extension of integration to Hardy fields, and when Hardy field structure is introduced in surreals, works for surreals as well. It does not employ any specific properties of surreal numbers beyond the H-field structure.

But first, some notes on notation.

• We assume the canonical embedding of Hardy field into surreals, so $$\omega$$ is equivalent of the germ of the function $$f(x)=x$$ at infinity, $$\infty$$ and a defined derivation function $$\partial$$ such that $$\partial(\omega)=1$$.

• We denote the numerosity of the interval $$[0,1)$$ as $$\omega_1$$. Although this is not necessary, we consider it equal to the first uncountable ordinal, which we have freedom to do due to the automorphisms of surreals.

• In the context of $$a,b\in\mathbb{R}$$, we use notation $$\int_a^b$$ to denote an integral where the limits of integration, $$a$$ and $$b$$ are half-included, in other words, $$\int_a^b=\frac12\left(\int_{(a,b)}+\int_{ [a,b ]}\right)$$.

• We equate the germ of the real-valued function $$f(x)$$ at infinity if the germ belongs to the Hardy field and is a sum of a purely infinite and a real number (no infinitesimal terms in Conway normal form), with a (generally, divergent) expression $$f(a)+\int_a^\infty f'(t)dt=f(\omega),$$ where $$a$$ is an arbitrary real number.

Provided that, the following fundamental rule emerges:

$$\int_S u dt=\pi N(S) \partial(u),$$ where $$S\subset\mathbb{R}$$ is the integration domain, $$N(S)$$ is the numerosity expressed as a surreal number and $$u$$ is a surreal number with no finite part (the finite part can be separated from any surreal number using Conway normal form). If the value under integral contains finite and non-finite (infinite and infinitesimal) parts, the integration can be done separately.

Consequences:

• $$\int_a^b u dt=\pi \omega_1 (b-a)\partial(u)$$.

• $$\int_a^b u f(t) dt =\pi \omega_1 \partial(u)\int_a^b f(t)dt,$$

The both of the above formulas can be used to generalize integration to arbitrary $$a,b\in \text{No}$$. In the case of the later formula we employ Newton-Leibnitz formula, which we postulate to still hold in surreal domain.

• $$\int_S \ln \omega \, dt=\frac{1}{\omega }\int_S \omega \, dt$$

Examples:

• $$\int _0^1\omega dt=\pi \omega _1$$

• $$\int _0^1\exp \omega \, dt=\pi \omega _1 \exp \omega$$

• $$\int_0^\omega \ln \omega \,dt=\int_0^\infty \ln \omega \,dt=\frac12\int_{\mathbb{R}} \ln \omega \,dt= \pi \omega _1$$

• $$\int_0^1 \ln \omega_1\, dt = \frac1{\omega_1}\int_0^1\omega_1\,dt= \pi \partial(\omega_1)$$

• $$\frac1\pi\int_0^{\omega_1}\omega\,dt=\omega_1^2$$

(numerosity of the Long Line or $$1\times 1$$ square with half-included perimeter)

• $$\int_{\mathbb Z}\ln \omega=2\pi$$
• Maybe I'm confused, but aren't all of the values inside your example integrals 'constants'? I would expect, for instance, that $\int_0^1\omega\ dt=\omega$ for any 'reasonable' definition of integration... Commented Jul 26 at 21:01
• @StevenStadnicki they are "constants" but they are infinite constants. For instance, $2\omega/\pi$ is the derivative of the function $\text{sgn}(x)$ at 0, at this point the function makes a jump of 2, so $\int_{-1}^1\left( {\begin{cases}2\omega/\pi,&{\text{if }}x=0\\ 0,&{\text{if }}x\ne 0\end{cases}}\right)\,dx=2$ Commented Jul 26 at 21:07
• @StevenStadnicki see more here: math.stackexchange.com/questions/4627326/… Also, notice, these infinite values have non-zero derivations while finite constants have derivations $0$ Commented Jul 26 at 21:10
• @StevenStadnicki also here: philosophy.stackexchange.com/a/112762/796 Commented Jul 26 at 21:18
• I wasn't one of the downvotes, but I feel like the point in my initial comment still holds strongly. Commented Jul 28 at 21:07