Fabius function
The Fabius function is defined on the unit interval [0, 1] to satisfy the functional differential equation d/dx f(x) = 2f(2x) on [0, 1/2], and the reflection formula f(1-x) = 1-f(x), with initial condition f(0) = 0. It can be extended to the entire real line by continuing to satisfy d/dx f(x) = 2f(2x) for all x > 0, and outputting 0 for x < 0 (which trivially also satisfies the differential equation). The Fabius function is smooth (infinitely differentiable) but nowhere analytic (its Taylor series does not converge to itself on any neighborhood). At the endpoints x = 0 and x = 1 all of its derivatives are zero, yet it is not constant on any interval. At dyadic rationals it takes on rational values and its Taylor series becomes a finite-degree polynomial. Both the Fabius function and its extended version are implemented here, as f_abius(x) and f_abiusExt(x) respectively, as well as their nth derivatives f_abiusPrime(x,n) and f_abiusExtPrime(x,n). https://en.wikipedia.org/wiki/Fabius_function
1
Usage
2
3
4
5
6
Fabius function
7
Fabius recursive (slower to render but easier to read)
22
Derivatives
29
Thue-Morse sequence
32
Helper functions
37
Cached z_n
46
Recomputing z_n
55
65
powered by
powered by