TITLE: Taylor expansion of a gaussian integral
QUESTION [7 upvotes]: I tried Taylor expanding the following function for small $x \ll 1$:
\begin{align*}
f(x) = \frac{1}{\sqrt{2\pi}} \int\limits^{+\infty}_{-\infty} e^{\frac{-xy^4}{24}-\frac{y^2}{2}}\,\mathrm{d}y.
\end{align*}
I already know that $f$ takes on finite values for $x \geq0$. My goal is to get a series expression for $f$ of the following form:
\begin{align*}
f_N(x) = \sum^N_{n = 0}a_n x^n.
\end{align*}
So after using the formula (for $a = 0$)
\begin{align*}
f(x) = \sum^\infty_{n = 0} \frac{f^{(n)}(a)}{n!}(x-a)^n,
\end{align*}
I get up to the $N$-th term:
\begin{align*}
f_N(x) = \sum^N_{n = 0} \frac{1}{n!}\frac{(-x)^n}{24^n}(4n-1)!!
\end{align*}
However, when plugging in a small value for $x$ (for example $x = 0.1$) in Wolfram Alpha, I get that till $N = 25$ the approximation is very good, but after around $N = 30$ the series diverges away from the true value ($\approx 0.988306$ ). So for $N \rightarrow + \infty$, the series seems to diverge.
My questions are:
How can this be ? I thought that for larger and larger $N$ the Taylor approximation would be more and more better ? (well, for small $x$ atleast)
Does this mean that the radius of convergence is equal to $0$ and that the interval of convergence is just the point $x = 0$ ? If not, then what is the radius of convergence ? If yes, doesn't this contradict the fact that $f$ is finite for $x \geq1$ ?

REPLY [3 votes]: Your function may be expressed in terms of the modified Bessel function of the second kind as follows:
$$
f(x)=\sqrt {\frac{3}{{2\pi x}}} e^{\frac{3}{{4x}}} K_{1/4} \left( {\frac{3}{{4x}}} \right).
$$
By the results of the paper http://dx.doi.org/10.1007/s10440-017-0099-0, for all $N\geq 0$ and $x$ with $|\arg x|<\frac{3\pi}{2}$, we have
$$
f(x) = \sum\limits_{n = 0}^{N - 1} {( - 1)^n \frac{{(4n - 1)!!}}{{24^n n!}}x^n }  + R_N (x),
$$
where the remainder $R_N (x)$ satisfies
$$
\!\!\left| {R_N (x)} \right| \!\le\! \frac{{(4N - 1)!!}}{{24^N N!}}\left| x \right|^N 
\!\times\! \begin{cases} \!1 & \!\!\text{if } \; \left|\arg x\right| \leq \frac{\pi}{2}, \\ \!\min\! \left(\chi\!\left(N+\frac{1}{4}\right)+1,|\csc ( \arg x)|\right) & \!\!\text{if } \; \frac{\pi}{2} < \left|\arg x\right| \leq \pi, \\ \!\cfrac{\sqrt {2\pi \left( N + \frac{1}{4} \right)} }{\left| \cos (\arg x)\right|^{N + 1/4} } + \chi\!\left(N+\frac{1}{4}\right)+1 & \!\!\text{if } \; \pi < \left|\arg x\right| < \frac{3\pi}{2}. \end{cases}
$$
Here, for $p>0$,
$$
\chi (p) = \sqrt \pi  \frac{{\Gamma\! \left( {\frac{p}{2} + 1} \right)}}{{\Gamma \!\left( {\frac{p}{2} + \frac{1}{2}} \right)}},\quad \sqrt {\frac{\pi }{2}\left( {p + \frac{1}{2}} \right)}  \le \chi (p) \le \sqrt {\frac{\pi }{2}\left( {p + \frac{2}{\pi }} \right)} .
$$
As it was noted by others, the series cannot converge for any $x \neq 0$ because $x=0$ is a branch point of $f(x)$. However, it is an asymptotic expansion of $f(x)$ as $x\to 0$. As you can see, we have an explicit control over the error term. To obtain the best numerical approximation, stop the series at its numerically least term, i.e., at $N = \left[ {\frac{3}{{2\left| x \right|}}} \right]$ and estimate the error using the formulae above.