I posted this question, quite a while ago, on math.stackexchange.com, here. I received an interesting answer but not sufficiently accurate for my purposes, so I'm trying here.
I have a class of functions $\mathcal{F}$. For each member in the class, $f\in \mathcal{F}$, I know the Taylor series at $𝑧=0$ up to some free to choose order $𝑁$. For each $f$ I am trying to numerically estimate the value of $𝑓(𝑧)$ outside its radius of convergence, in particular I am trying to estimate
$$ L = \lim_{t\to \infty} f(t). $$
The functions have the following properties:
- Analytic in a neighborhood of $z=0$.
- For $z\to \infty$ with $\Re(z)>0$ $|f(z) - L_+| = O(e^{-g_+ \Re(z)})$, with $g_+>0$
- For $z\to \infty$ with $\Re(z)<0$ $|f(z) - L_-| = O(e^{g_- \Re(z)})$, with $g_->0$
- The functions have poles on a vertical line in the complex plane with constant real part
- The functions are everywhere else analytic.
- Defining $$ f(t) = \sum_{n=0}^\infty a_n t^n$$ The coefficients grow as $\vert a_n \vert \sim c^n$ for some positive constant $c$.
An example of the kind of functions I am talking about is given by
$$ f(t) = \tanh( g(t-t_0)) $$
with $g,t_0 \in \mathbb{R}$, $g>0$, which has poles at
$$ t = t_0 +i \frac{\pi}{g} \left ( n +\frac{1}{2} \right ), \quad n\in\mathbb{Z} $$
and converges to $\pm 1$ for $t\to \pm\infty $.
I would like to estimate the value $L = \lim_{t\to+\infty} f(t) = 1$ knowing its Taylor series at zero.
Note that, for $t\to +\infty$
$$ f(t) = 1 +2 e^{-2g(t-t_0)} + O( e^{-4g(t-t_0)}) $$
so it suffices a value of $t$ such that $2g(t-t_0)$ is greater than, say, $4,5$ to obtain a good approximation of $L$.
I have tried Padè approximants but they don't perform so well. I suspect that a modification of the answer to this question may work but this is definitely outside my expertise.
Here is an example of such a function up to order 21:
\begin{align} f(t) &= 1.\, -768. t+9420. t^2+27112. t^3-4.01876\times 10^6 t^4+8.1376\times 10^7 t^5 \\ & +2.7442\times 10^8 t^6-4.88657\times 10^{10} t^7+7.90082\times 10^{11} t^8+1.02608\times 10^{13} t^9\\ & -5.72507\times 10^{14} t^{10}+5.21309\times 10^{15} t^{11}+1.81363\times 10^{17} t^{12}\\ &-5.74547\times 10^{18} t^{13}+1.72697\times 10^{19} t^{14}+2.43501\times 10^{21} t^{15}\\ &-5.26563\times 10^{22} t^{16}-2.09506\times 10^{23} t^{17}+2.91622\times 10^{25} t^{18}\\ & -4.3093\times 10^{26} t^{19}-6.19092\times 10^{27} t^{20}+3.20257\times 10^{29} t^{21} +O(t^{22}). \end{align}
And here is a plot of the function $f(t)$ (blue) together with its Taylor series up to order $21$ (orange).
The asymptotic value is $f(\infty) = -23.9832$. Using the method described in the answer and Padè [9,10] I obtain $-24.1351$. However, using the series up to order 20 and Padè [8,10], all the solutions have a sizeable imaginary part. Using up to 30 terms I obtain a slightly better numbers but then precision starts decreasing. Presumably this is also due to rounding errors given that the coefficients tend to be very large (this problem can't easily be cured).
I understand that numerical analytic continuation is a complicated problem. So I'm not looking for a method that will always work, I'd be happy with a method/euristic that produces good results "most of the times" (whatever that means)