$\newcommand{\K}{\operatorname{\large\mathcal{K}}}$I am asking about a very common practice in proofs, that I see online, concerning continued fractions. There is an implicit assumption which I’d like to examine: a concrete, concise question can be found in the middle section, but I think a lot of context is necessary. Here is what I mean: sometimes, when dealing with continued fractions, we begin with the answer, and then recursively expand the answer, ad infinitum, implicitly assuming that the limit will be the same.
I occasionally edit this post to add new thoughts, and sufficient conditions (a necessary one would be very well-received!) in the middle section.
To clarify, here is a trivial example:
$$\begin{align}1&=\cfrac{2}{3-1}\\&=\cfrac{2}{3-\cfrac{2}{3-1}}\\&=\cfrac{2}{3-\cfrac{2}{3-\cfrac{2}{3-1}}}\\&\overset{?}{=}\cdots\\&=\cfrac{2}{3-\cfrac{2}{3-\cfrac{2}{3-\cfrac{2}{3-\ddots}}}}\end{align}$$
We started with $1$, then expressed it as a ratio $\frac{b_1}{a_1+\alpha_1}$. We then expanded $\alpha_1$ as a ratio $\frac{b_2}{a_2+\alpha_2}$... et cetera. We can show that (Gauss Kettenbrücher K-notation, similar to $\sum,\prod$ notation) $\K_{n=1}^\infty\frac{b_n}{a_n}$ is convergent, and because we obtained this continued fraction from a sequence of expressions, all equal to $1$, we have reason to believe that the limiting fraction is also equal to $1$. However, in so doing we lose the helper $\alpha_n$ terms, so I feel, a priori, we cannot be certain that the limit is actually $1$. It is, as it happens... the convergents are $-\K_{n=1}^m\frac{-2}{3}=1-\frac{1}{2^{m+1}-1}$, which obviously tend to $1$.
But I ask about the general procedure. For example, Wikipedia’s article on Gauss’ continued fraction uses recurring expansions, just like how we expanded “$1$” above, to derive continued fractions for ratios of hypergeometric functions. I like this derivation, but there is always the concern that, even if the continued fraction is convergent, the limiting value might not be the value we started with!
A simple example to demonstrate this concern: in the above expansion of $1$, we could just as easily write: $$\begin{align}2&=\frac{2}{3-2}\\&=\cfrac{2}{3-\cfrac{2}{3-2}}\\&=\cdots\\&\overset{!?}{=}\cfrac{2}{3-\cfrac{2}{3-\cfrac{2}{3-\ddots}}}\end{align}$$But we already know that that converges to $1$, not to $2$!
The core question.
My analysis, and a concrete setup:
Let $L$ be any nonzero real number. Suppose we find a sequence of nonzero reals $(a_k),(b_k),(\alpha_k)$ with the property that, for all $n\in\Bbb N$: $$L=\K_{k=1}^n\frac{b_k}{a’_k}$$Where $a’_k=a_k$ except for $a’_n:=\alpha_n$. Suppose further that: $$\lim_{n\to\infty}\K_{k=1}^n\frac{b_k}{a_k}=L’\in\Bbb R\setminus\{0\}$$That is, the continued fraction converges. We want to know if $L’=L$. If $p_n,q_n$ are the numerators and denominators of the $n$th convergent $\K_{k=1}^n\frac{b_k}{a_k}$ (with no simplification!) then we know that (writing $\alpha_n=\alpha_n/1$): $$L=\frac{p_n+\alpha_np_{n-1}}{q_n+\alpha_nq_{n-1}}$$For every $n$. The difference $|L-L’|$ is equal to: $$\left|\frac{q_n\left(\frac{p_n}{q_n}-L’\right)+\alpha_nq_{n-1}\left(\frac{p_{n-1}}{q_{n-1}}-L’\right)}{q_n+\alpha_nq_{n-1}}\right|=\left|\left(\frac{p_n}{q_n}-L’\right)+\cfrac{1}{1+\cfrac{q_n}{\alpha_nq_{n-1}}}\left(\frac{p_{n-1}}{q_{n-1}}-\frac{p_n}{q_n}\right)\right|$$For every $n$. Thus I can hope to send $n\to\infty$ - so long as $\frac{q_n}{\alpha_nq_{n-1}}$ is bounded away from $-1$, it is easy to see all terms tend to zero, whence $L=L’$.
However, there’s the rub - can we necessarily say that there is some $\delta>0$, that for any $n\in\Bbb N$, $\left|\frac{q_n}{\alpha_nq_{n-1}}+1\right|>\delta$? One quick observation is that, if all $(a_k),(b_k),(\alpha_k)$ are positive, then the answer is a definite: ‘yes’. Another observation, inspired by the partial answer below, is that I really only need to find a subsequence $(n_k)$ along which $\frac{q_{n_k}}{\alpha_{n_k}q_{n_k-1}}$ is bounded away from $-1$.
Note: if no such subsequence can be found, that actually implies the stronger assertion that: $\lim_{n\to\infty}\alpha_n\frac{q_{n-1}}{q_n}=-1$ as a strong limit.
Furthermore, we see that, in order for $L$ to be finite and well defined, if $q_n/\alpha_n q_{n-1}$ comes arbitrarily close to $-1$, then $\frac{\alpha_n p_{n-1}}{q_n}$ comes arbitrarily close to $-L’$. I’ve tried using that to obtain a contradiction, but I’ve had no such luck yet. Furthermore, $\alpha_np_{n-1}/p_n$ would also tend to $-1$.
A new observation: if $\alpha_n\to0$, as happens in the case of Lambert’s tangent continued fraction, and if one can be sure that $|q_n|\ge|q_{n-1}|$ for large $n$, or at least along a subsequence (more generally, we only need to assume the ratio $q_{n-1}/q_n$ is bounded) - which is often the case - then $\alpha_n q_{n-1}/q_n$ tends to $0$, and is in particular bounded away from $-1$. This is not a necessary condition, since my trivial example involving $1=3/2-\cdots$ has $\alpha_n=-1$ for all $n$. If the $\alpha_n$ are constant, then so long as we can say $|q_n|$ is sufficiently larger than $|q_{n-1}|$ (eventually, perhaps along a subsequence) then it will also be possible to bound away from $-1$ (more generally, the condition would be the unwieldy: “$q_{n-1}/q_n$ is bounded away from the constant $-1/\alpha_n$”). See the counterexample expansion of $2$: $-1/\alpha=\frac{1}{2}$ in this case, and $1/2$ is precisely the limiting ratio of $\frac{q_{n-1}}{q_n}$, explaining why convergence fails.
I don’t however think that this is anywhere near a complete, or usefully general, list. There is surely more to this story.
My question: can we say more about the general case? I’d be happy to see relatively simple, easy-to-apply conditions, other than the conditions I’ve already supplied. As I have shown, and more recently G. Edgar has shown, counterexamples do exist.
A less trivial, and more motivating, example: through some series manipulations and divisions of the Maclaurin expansions for $\sin,\cos$, we can find: $$\tan x=\cfrac{x}{1-\cfrac{x^2}{3-\cfrac{x^2}{P_1/P_2}}}$$Where: $$P_m:=\sum_{n=0}^\infty(-1)^n\frac{x^{2n}}{(2(n+m)+1)!}\prod_{k=1}^m2(n+k)$$It can be shown that, using identical manipulations: $$\frac{P_m}{P_{m+1}}=(2m+3)-\frac{x^2}{P_{m+1}/P_{m+2}}$$So, inductively, a continued fraction for $\tan x$ is born: $$\tan x=\cfrac{x}{1-\cfrac{x^2}{3-\cfrac{x^2}{5-\cfrac{x^2}{7-\ddots}}}}$$This continued fraction can be shown to converge - but does it necessarily converge to $\tan x$? The concern being, again, that we have lost the helper $\alpha_m:=-x^2/(P_m/P_{m+1})$ terms.