I have two complex numbers, $a = x_1 + y_1 i$ and $b = x_2 + y_2 i$. These serve as inputs to an infinite continued fraction of the form $f_n = a + \frac{b}{f_{n - 1}}$, with $f_1 = a$. Thus the first few levels of the continued fraction are:
- $f_1 = a$
- $f_2 = a + \frac{b}{a} = \frac{a^2 + b}{a}$
- $f_3 = a + \frac{b}{a + \frac{b}{a}} = \frac{a^3 + 2 a b}{a^2 + b}$
- $f_4 = a + \frac{b}{a + \frac{b}{a + \frac{b}{a}}} = \frac{a^4 + 3 a^2 b + b^2}{a^3 + 2 a b}$
- $f_5 = a + \frac{b}{a + \frac{b}{a + \frac{b}{a + \frac{b}{a}}}} = \frac{a^5 + 4 a^3 b + 3 a b^2}{a^4 + 3 a^2 b + b^2}$
For most values of $a$ and $b$, the values of $f_n$ spiral around a fixed point $M = \frac{a + \sqrt{a^2 + 4 b}}{2}$, getting ever closer as $n$ increases.
With only the points or the points-and-vectors visible, the spiral isn't always obvious, but connecting the points with circular arcs makes it more apparent:
However, while it isn't difficult to construct circular arcs with positional continuity ($C^0$ & $G^0$, so there are no gaps between points) and tangent continuity ($G^1$, so the tangents of the circular arcs which meet at each point are the same), that is as far as the continuity goes. The piecewise arcs do not make up a smooth function which interpolates meaningfully between the points.
I want to find a function $f(x) = z$ with a real-valued input $x$ and complex-valued output $z$ which passes through $a$ at $f(1)$ and all subsequent points at their respective index values, so $f_n = f(n)$ and which ideally is infinitely-differentiable (smooth) everywhere, except at $f(0)$ which is undefined due to division by zero.
Is that even possible? If so, how do I find that function? If not, are there alternatives?
Update: While struggling to understand MathWonk's answer, I realized that I don't need to understand all the underlying mechanics if WolframAlpha can handle it for me. The key insight that MathWonk provided is that $z ↦ a + \frac{b}{z}$ can be rewritten as $z ↦ \frac{a z + b}{1 z + 0}$, which is the standard form of a linear fractional transformation $z ↦ \frac{a z + b}{c z + d}$ with $c = 1$ and $d = 0$. This corresponds to the $2 × 2$ matrix $\left(\begin{matrix}a & b \\ 1 & 0\end{matrix}\right)$. The left column of the $n$th integer power of that matrix corresponds to the numerator and denominator of the $n$th level of my continued fraction. Asking WolframAlpha to evaluate the expression $((a, b), (1, 0))^x$ produces a complicated output matrix which, using the knowledge that the left two entries in the output matrix are the numerator and denominator of the continued fraction at input-value $x$, simplifies to $\frac{(λ_1 - λ_2) λ_2^t}{λ_1^t - λ_2^t} + λ_1$, where $λ_1 = \frac{a + \sqrt{a^2 + 4 b}}{2}$ and $λ_2 = \frac{a - \sqrt{a^2 + 4 b}}{2}$. Plotting that expression in the complex plane gives the following graph, which is exactly what I wanted:
I'll probably keep trying to figure out how the linear-algebra magic works under the hood to produce that answer, since I like to know what's actually going on to produce useful solutions, but it's nice to have a concrete result!




