# Almost-half iterate of $x^2+1$

Because I can't find a function $h:\mathbb R\mapsto\mathbb R$ with the property $$h^{\circ 2}(x)=x^2+1$$ I'm looking for a function that almost has that property - that is, I would like to find a closed-form (and preferably elementary) function $h:\mathbb R\mapsto\mathbb R$ satisfying $$\lim_{x\to\infty} (x^2+1-h(h(x)))=0$$ or, equivalently, $$h(h(x))=x^2+1+\mathcal O(\epsilon(x))$$ where $\lim_{x\to\infty} \epsilon(x)=0$. But I haven't been able to do this either. I've tried functions in the form $$|x|^{\sqrt 2}+C$$ but none of them have worked. Can anybody find such a function $h$?

• What is the domain of $h$? – orlp Dec 2 '17 at 21:06
• @orlp Real numbers. I'll clarify in the question. – Franklin Pezzuti Dyer Dec 2 '17 at 21:12
• Negative reals too? Because if not you can quite easily construct a piecewise function. – orlp Dec 2 '17 at 21:13
• @orlp Yes, negative reals as well. It seems that if you construct a function $h$ that works for positive reals, you could just take $h(|x|)$, and that would work for all reals. But I'm hoping for something nice (preferably continuous and differentiable). – Franklin Pezzuti Dyer Dec 2 '17 at 21:16
• There a pretty interesting associated differential eqation: $$h(x) = x\cdot \frac{h'(x^2+1)}{h'(x)}$$ – orlp Dec 2 '17 at 22:42

Starting with

$$g(x) = x^\sqrt{2} + C$$

we have

\begin{align} g(g(x)) &= \left(x^\sqrt{2} + C\right)^\sqrt{2} + C \\ &= x^2 \left(1 + Cx^{-\sqrt{2}}\right)^\sqrt{2} + C \\ &\approx x^2 \left( 1 + C\sqrt{2}x^{-\sqrt{2}} \right) + C \qquad \text{(binomial theorem)} \\ &= x^2 + C\sqrt{2}x^{2-\sqrt{2}} + C. \end{align}

It looks like we can get what we want if we replace $C$ with $x^{\sqrt{2}-2}/\sqrt{2}$.

Indeed, if

$$h(x) = x^{\sqrt{2}} + \frac{1}{\sqrt{2}} x^{\sqrt{2}-2} \tag{*}$$

then

\begin{align} h(h(x)) &= \left( x^{\sqrt{2}} + \frac{1}{\sqrt{2}} x^{\sqrt{2}-2} \right)^\sqrt{2} + \frac{1}{\sqrt{2}} \left( x^{\sqrt{2}} + \frac{1}{\sqrt{2}} x^{\sqrt{2}-2} \right)^{\sqrt{2}-2} \\ &= \left( x^{\sqrt{2}} + \frac{1}{\sqrt{2}} x^{\sqrt{2}-2} \right)^\sqrt{2} + O\!\left(x^{2(1-\sqrt{2})}\right) \\ &= x^2 \left( 1 + \frac{1}{\sqrt{2}} x^{-2} \right)^\sqrt{2} + O\!\left(x^{2(1-\sqrt{2})}\right) \\ &= x^2 \left[ 1 + x^{-2} + O\!\left(x^{-4}\right) \right] + O\!\left(x^{2(1-\sqrt{2})}\right) \\ &= x^2 + 1 + O\!\left(x^{2(1-\sqrt{2})}\right) \end{align}

as $x \to +\infty$.

Though neither elementary or of closed form, it is not difficult to numerically compute such a function. Notice that we have

$$h(x)^2+1=h(h(h(x)))=h(x^2+1)$$

$$h(x)=\sqrt{h(x^2+1)-1}$$

By iterating this using

$$h_0(x)=|x|^{\sqrt2}$$

$$h_{n+1}(x)=\sqrt{h_n(x^2+1)-1}$$

we converge to a functional square root of $$x^2+1$$, as demonstrated in this graph. Intuitively, $$h_0$$ is sufficiently accurate for large $$x$$ and $$h_{n+1}$$ approximates smaller arguments $$(x)$$ in terms of larger arguments $$(x^2+1)$$ of $$h_n$$.