In the recent question on "eventually oscillating function" I had a heuristic for the function $d(x)$ that its amplitude is constant, but could not further describe that function. I just found a relation to a possibly wider context of alternating series with two-way-infinite bounds. But still I cannot prove my observations with my knowledge.

In the linked question the function under consideration was $ f(x) = \sum_{k=0}^\infty (-1)^k x^{2^k} $ (only for $ x \in (0,1) $) and the motivating observation was, that its nonvanishing oscillation with $x$ when $x \to 1$ does not admit a certain limit.

I experimented with a reformulation of $f(x)$ as a double-series (by expansion in the exponential-series for each term) and change-of-order of summation, which surprisingly did not give the expected evaluation to $f(x)$. Instead that gave a smooth and ** non** oscillating function $g(x)$ which can be seen as a "center", a "body" or "the mass" for $f(x)$ such that the difference $d(x)=f(x)-g(x)$ can be seen as its "decoration". The much interesting aspect is, that it seems to

*capture perfectly the slight oscillation*of $f(x)$ and even has a

*perfect constant*amplitude.

The focuses of this question here are:

why is $g(x)$ not equal to $f(x)$ /why is the double-series not "naively" resummable?*Q1:*is it indeed true, that the amplitude of $d(x)$ is constant?*Q2:*can the amplitude of $d(x)$ be given by some closed form formula?*Q3:*

I've got now one more heuristic which allows to connect this with a much wider field: that of the two-way infinite alternating "iteration series" (let's call it "AIS") which I'll explain in short below. The same effect occurs in such AIS in the context of ** tetration**, and can even be looked at, when the doubly infinite alternating

**is expressed as AIS - but in the latter case the amplitude of the associated function $d(x)$ is zero, effectively saying that $ \sum_{k=-\infty}^\infty (-1)^k x^k = 0$ for all $x$, which is known to be true.**

*geometric series*What is an AIS? Let's rewrite the given function $f(x)$ as an (alternating) iteration series. The consecutive terms $x$ , $x^2$ , $x^{2^2}=(x^2)^2$ , $x^{2^3}=(x^4)^2$ and so on of $f(x)$ can be seen as iteration of the squaring of the previous term. So let's define the basic function $r(x) = x^2 $ having the iterations $r^{\circ 0}(x)=x$, $r^{\circ 1}(x)=x^2$ , $r^{\circ h+1}(x)=r^{\circ h}(x)^2$ and also the inverse $r^{\circ -1}(x)= \sqrt x $. Also let's write the shorter form $x_h$ for the iteration height $h$ in $ r^{\circ h}(x)$. With this we have the AIS, based on our function $r(x)$ $$ s(x_0) = ... + x_{-2} - x_{-1} + x_0 - x_1 + x_2 - ... $$ whose parts are $$ \begin{array} {} s_{\text{lo}} (x_0) &= x_0 - x_1 + x_2 - ... &= \sum_{h=0}^\infty(-1)^h x_0^{2 ^h}&=f(x_0) \\ s_{\text{hi}}(x_0) &= x_0 - x_{-1} + x_{-2} - ... &= \sum_{h=0}^\infty(-1)^h x_0^{2 ^{-h}} \\ s (x_0) & = s_{\text{lo}} (x_0) - x_0 + s_{\text{hi}}(x_0) && x \in (0,1) \end{array}$$ The $ s_\text{ lo }$ and $s_\text{ hi }$ - markers indicate, that the iterates of the base-function $r(x)$ approach respectively the lower fixpoint ($\lambda_\text{lo}=0$) or the upper fixpoint ($\lambda_\text{hi}=1$). And of course, the initial $x_0$ must be chosen from the range between the two fixpoints to allow infinite iterations in either direction.

Heuristically I've got the surprising identity of my "double-series" function $g(x)$ and $s_{\text{hi}}(x)$ in the form that $s_{\text{hi}}(x)=x - g(x)$ or $g(x)= x_{-1} - x_{-2} + x_{-3} - ... + ...$ (why is this?). Thus finally the extremely simple definition for $d(x)$ seems to occur:
$$ d(x) = f(x) - g(x) = s (x) $$
So the observation of the constant amplitude of $d(x)$ exhibits as being just a property of the AIS of this base-function $r(x)=x^2 $.

This can also be generalized to $r_b(x) = x^b$ and then the according AIS $s_b(x)$ has lower amplitude as the base-parameter in the exponent $b$ decreases $b \to 1$ and has higher amplitude as $b$ increases.

That observation seen as property of an AIS has a wider range of relevance ; I found it in the same way in the study of iteration series of the *tetration* (see here and specifically here), where for instance $r(x) = b^x$ with $b=\sqrt 2$ and the lower fixpoint $2$ and the upper fixpoint $4$ with some initial $x_0$ in between. Again the amplitude of the resulting function $s_b(x)$ is constant over $x$, but decreases with $b \to 1$ and increases with $b \to \eta $ where $\eta = \small \exp(\exp(-1))$

Moreover, if I look at the *geometric series* with quotient $b$, then the base function becomes $r_b(x)= x \cdot b$ and the resulting AIS $s_b(x)$ has amplitude ** zero for all $x$ .** (which is a known fact).

While it is obvious to me, that $s_b(x)$ must have a constant amplitude with varying $x$ (actually periodic of one interval $x_0 .. x_2$ ) the same conjecture concerning $d(x)$ depends on the surprising identity of my initial function $g(x)$ and $s_\text{hi} (x) $ in the form $ g(x) = x - s_\text{hi} (x) $.

How could I prove that identity $ g_b(x) = x - s_{b,\text{hi}} (x) $ ?*Q4:*

(thus, that the expansion into and then evaluation of the double series does not give $g(x)=f(x) \quad (=s_\text{lo}(x))$ as naively expected but rather the counterintuitive one)

One open question in my answer was that of the wavelength/frequency shift of the function $d(x)$. If it is indeed $d(x) = s(x)$ then the periodicity of the function and the constancy of its amplitude is, as I already said, simple to understand. But for the AIS with $r_b(x)=x^b$ with general $b \gt 1$ it is also the fractional $h$'th iteration directly expressible as $x_h = x^{b^h}$ for continuous $h$. Expressed now in terms of $h$ the periodicity of $d_b(x_h) = s_b(x_h) $ is then perfect. It is also very near to the sine-curve with precision up to the 6'th or even further digit. Last question:

can an exact description of the wave-form of $d_b(x_h)$ depending on $h$ be given?*Q5:*

[update] Added pictures which illustrate the near-sine-form of $d(x_h)$ when the abscissa shows the iteration-height $h$

$f(x)$ and $g(x)$ are very similar; the oscillation of $f(x)$ is difficult to recognize. Thus that oscillatory aspect $d(x)$ is shown with another scale (red, scale on the right side of the graph)

The function $d(x_h)$ when reciprocally scaled by its amplitude is nearly a perfect sine wave; the difference is hardly visible. The curves for $d(x_h)$ and the sine-wave are perfectly overlaid in the picture; the difference as $err(x_h)$ in blue has its own scale on the right side of the graph: