From this paper, I am trying to compute the coefficients in the expansion of the Gaussian wavepacket
$$\phi(x) = \frac{1}{(2\pi\sigma^2)^{\frac{1}{4}}}\exp \Big(-\frac{(x-x_{0})^{2}}{4\sigma^{2}} + ik_{0}(x-x_{0})\Big) $$ where $\sigma << 1$ and $k_{0} >> \frac{1}{\sigma}$ in terms of the functions $$ \psi_{n}(x) = \sqrt{2}\sin(n\pi x).$$
My attempt is as follows:
$$\phi(x) = \sum_{m}\alpha_{m}\psi_{m}(x) $$
From the orthogonality of sines, we have $$ \int_{0}^{1}\psi_{m}(x) \psi_{n}(x) dx = 2 \delta_{mn}.$$ This gives us $$ \alpha_{n} = \frac{\sqrt{2}}{2}\frac{1}{(2\pi\sigma^2)^{\frac{1}{4}}} \int_{0}^{1} dx \sin(n \pi x) \exp \Big(-\frac{(x-x_{0})^{2}}{4\sigma^{2}} + ik_{0}(x-x_{0})\Big).$$
My next step is to write the sine in terms of exponential functions and to complete the square on both terms to get:
$$ \alpha_{n} = \frac{1}{2i}\frac{1}{(8\pi \sigma^{2})^{\frac{1}{4}}}\int_{0}^{+1}dx\Bigg(\exp\Big[-\frac{1}{4\sigma^{2}}(x-a_{+})^{2} -\sigma^2(k_{0}+\pi n)^2 +2in \pi x_{0}\Big] - \exp\Big[-\frac{1}{4\sigma^{2}}(x-a_{-})^{2} -\sigma^2(k_{0}-\pi n)^2 -2in \pi x_{0}\Big]\Bigg)$$
Here, $$a_{\pm} = 2\sigma^{2}\Big(\pm i n \pi + \frac{x_{0}}{2 \sigma^{2}} +ik_{0}\Big)$$
The next step is to use the fact that $\sigma << 1$ to extend the upper limit to $ \infty$ and treat the integral as approximately Gaussian. I get the following approximate result:
$$\alpha_{n} \approx -i(2 \pi \sigma^{2})^{\frac{1}{4}}\Bigg(\exp\Big[-\sigma^2(k_{0}+\pi n)^2 +2in \pi x_{0}\Big] - \exp\Big[-\sigma^2(k_{0}-\pi n)^2 -2in \pi x_{0}\Big]\Bigg)$$
But the correct answer according to the paper is
$$\alpha_{n} \approx i(2 \pi \sigma^{2})^{\frac{1}{4}} \exp\Big[-(k_{0}-\pi n)^{2} \sigma^{2} + i (k_{0} - \pi n) x_{0}\Big]$$
Would this problem be better solved using the stationary phase method or using the error function? Or do I have the right idea here?
The function
$$\phi(x)=\frac{1}{\sqrt[4]{2 \pi \sigma^2}} \exp\left(-\frac{(x-x_0)^2}{4 \sigma^2}+i k_0 (x-x_0)\right)\tag{1}$$
can be represented by the 1-periodic Fourier series
$$\phi(x)=\frac{a_1(0)}{2}+\underset{N\to\infty}{\text{lim}}\left(\sum\limits_{n=1}^N a_1(n) \cos(2 \pi n x)+\sum\limits_{n=1}^N b_1(n) \sin(2 \pi n x)\right)\tag{2}$$
where
$$a_1(n)=2 \int\limits_0^1 \phi(x) \cos(2 \pi n x) \, dx=\\\sqrt[4]{\frac{\pi }{2}} \sqrt{\sigma} \left(e^{-\sigma^2 (k_0+2 \pi n)^2+2 i \pi n x_0} \left(\text{erf}\left(\frac{x_0}{2 \sigma}+i \sigma (k_0+2 \pi n)\right)-\text{erf}\left(\frac{x_0-1}{2 \sigma}+i \sigma (k_0+2 \pi n)\right)\right)+e^{\sigma^2 \left(-(k_0-2 \pi n)^2\right)-2 i \pi n x_0} \left(\text{erf}\left(\frac{x_0}{2 \sigma}+i \sigma (k_0-2 \pi n)\right)-\text{erf}\left(\frac{x_0-1}{2 \sigma}+i \sigma (k_0-2 \pi n)\right)\right)\right)\tag{3}$$
and
$$b_1(n)=2 \int\limits_0^1 \phi(x) \sin(2 \pi n x) \, dx=\\i \sqrt[4]{\frac{\pi}{2}} \sqrt{\sigma} \left(e^{-\sigma^2 (k_0+2 \pi n)^2+2 i \pi n x_0} \left(\text{erf}\left(\frac{x_0-1}{2 \sigma}+i \sigma (k_0+2 \pi n)\right)-\text{erf}\left(\frac{x_0}{2 \sigma}+i \sigma (k_0+2 \pi n)\right)\right)+e^{\sigma^2 \left(-(k_0-2 \pi n)^2\right)-2 i \pi n x_0} \left(\text{erf}\left(\frac{x_0}{2 \sigma}+i \sigma (k_0-2 \pi n)\right)-\text{erf}\left(\frac{x_0-1}{2 \sigma}+i \sigma (k_0-2 \pi n)\right)\right)\right)\tag{4}$$
or by the 2-periodic Fourier series
$$\phi(x)=\frac{a_2(0)}{2}+\underset{N\to\infty}{\text{lim}}\left(\sum\limits_{n=1}^N a_2(n) \cos(\pi n x)+\sum\limits_{n=1}^N b_2(n) \sin(\pi n x)\right)\tag{5}$$
where
$$a_2(n)=\int\limits_0^2 \phi(x) \cos(\pi n x) \, dx=\\\frac{1}{2} \sqrt[4]{\frac{\pi}{2}} \sqrt{\sigma} \left(e^{-\sigma^2 (k_0+\pi n)^2+i \pi n x_0} \left(\text{erf}\left(\frac{x_0}{2 \sigma}+i \sigma (k_0+\pi n)\right)-\text{erf}\left(\frac{x_0-2}{2 \sigma}+i \sigma (k_0+\pi n)\right)\right)+e^{\sigma^2 \left(-(k_0-\pi n)^2\right)-i \pi n x_0} \left(\text{erf}\left(\frac{x_0}{2 \sigma}+i \sigma (k_0-\pi n)\right)+\text{erf}\left(\frac{1-\frac{x_0}{2}}{\sigma}-i \sigma (k_0-\pi n)\right)\right)\right)\tag{6}$$
and
$$b_2(n)=\int\limits_0^2 \phi(x) \sin(\pi n x) \, dx=\\\frac{1}{2} i \sqrt[4]{\frac{\pi}{2}} \sqrt{\sigma} \left(e^{-\sigma^2 (k_0+\pi n)^2+i \pi n x_0} \left(\text{erf}\left(\frac{x_0-2}{2 \sigma}+i \sigma (k_0+\pi n)\right)-\text{erf}\left(\frac{x_0}{2 \sigma}+i \sigma (k_0+\pi n)\right)\right)+e^{\sigma^2 \left(-(k_0-\pi n)^2\right)-i \pi n x_0} \left(\text{erf}\left(\frac{x_0}{2 \sigma}+i \sigma (k_0-\pi n)\right)+\text{erf}\left(\frac{1-\frac{x_0}{2}}{\sigma}-i \sigma (k_0-\pi n)\right)\right)\right)\tag{7}.$$
The function $\phi(x)$ can also be represented by the "nested" exponential Fourier series
$$\phi(x)=\underset{N, f\to\infty}{\text{lim}}\left(\sum\limits_{n=1}^N \frac{\mu(2 n-1) }{2 n-1} \left(\frac{3 F(0)}{8}\\+\frac{1}{2} \sum\limits_{k=1}^{2 f (2 n-1)} (-1)^k\, \cos\left(\frac{\pi k}{2 n-1}\right) \left(F\left(\frac{k}{4 n-2}\right) e^{\frac{i \pi k x}{2 n-1}}+F\left(-\frac{k}{4 n-2}\right) e^{-\frac{i \pi k x}{2 n-1}}\right)\\-\frac{1}{8} \sum\limits_{k=1}^{4 f (2 n-1)} (-1)^k\, \left(F\left(\frac{k}{8 n-4}\right) e^{\frac{i \pi k x}{4 n-2}}+F\left(-\frac{k}{8 n-4}\right) e^{-\frac{i \pi k x}{4 n-2}}\right)\right)\right)\tag{8}$$
where $\mu(n)$ is the Möbius function, the evaluation frequency $f$ in the two inner sums over $k$ is assumed to be a positive integer, and
$$F(\omega)=\mathcal{F}_x[\phi(x)](\omega)=\int\limits_{-\infty}^{\infty} \phi(x) e^{-2 \pi i \omega x} \, dx=2^{3/4} \sqrt[4]{\pi} \sqrt{\sigma} e^{-\sigma^2 (k_0-2 \pi \omega)^2-2 i \pi x_0 \omega}\tag{9}$$
is the Fourier transform of $\phi(x)$.
My related MSO question provides information on the derivation of formula (8) above (which corresponds to formula (5) in my related MSO question). Formula (8) above can also be evaluated using $\cos$ and $\sin$ terms analogous to formulas (2) and (5) above (see formulas (11) and (12) in my linked MSO question). Since $\phi(x)$ is complex analytic I believe formula (8) above is actually globally convergent for all $x\in\mathbb{C}$.
The figures below illustrate formulas (2), (5), and (8) for $\phi(x)$ above in orange overlaid on $\phi(x)$ defined in formula (1) above in blue using the $\phi(x)$ parameters $\sigma=\frac{1}{10}$ and $k_0=\frac{9}{10}$ where formulas (2), (5), and (8) are all evaluated using the upper evaluation limit $N=10$.
Figures (1) and (2) below illustrate the real and imaginary parts of the 1-periodic Fourier series defined in formula (2) above in orange overlaid on the corresponding parts of $\phi(x)$ defined in formula (1) above in blue using the $\phi(x)$ parameter $x_0=\frac{1}{2}$.
Figure (1): Illustration of the real part of formula (2) in orange overlaid on the blue reference function $\Re(\phi(x))$
Figure (2): Illustration of the imaginary part of formula (2) in orange overlaid on the blue reference function $\Im(\phi(x))$
Figures (3) and (4) below illustrate the real and imaginary parts of the 2-periodic Fourier series defined in formula (5) above in orange overlaid on the corresponding parts of $\phi(x)$ defined in formula (1) above in blue using the $\phi(x)$ parameter $x_0=1$.
Figure (3): Illustration of the real part of formula (5) in orange overlaid on the blue reference function $\Re(\phi(x))$
Figure (4): Illustration of the imaginary part of formula (5) in orange overlaid on the blue reference function $\Im(\phi(x))$
Figures (5) and (6) below illustrate the real and imaginary parts of formula (8) above for $\phi(x)$ in orange overlaid on the corresponding parts of $\phi(x)$ defined in formula (1) above in blue using the $\phi(x)$ parameter $x_0=1$ where formula (8) is evaluated using the evaluation limits $f=4$ and $N=10$. Since $\phi(x)$ is complex analytic I believe formula (8) actually converges globally for all $x\in\mathbb{C}$.
Figure (5): Illustration of real part of formula (8) for $\phi(x)$ in orange overlaid on the blue reference function $\Re(\phi(x))$
Figure (6): Illustration of imaginary part of formula (8) for $\phi(x)$ in orange overlaid on the blue reference function $\Im(\phi(x))$