How to calculate $\frac{1}{\sqrt{2\pi}}\int^∞_{-∞}e^{-x^2+ik_0x}e^{-ikx}dx$? $$A(k)=\frac{1}{\sqrt{2\pi}}\int^∞_{-∞}u(x,0)e^{-ikx}dx$$
When $$u(x,0)=e^{-x^2+ik_0x}$$
We get $$A(k)=\frac{1}{\sqrt2}e^{-\frac{(k-k_0)^2}{4}}$$
How to get A(k)?
I am stuck at here,
$$
A(k)
=\frac{1}{\sqrt{2\pi}}\int^∞_{-∞}e^{-x^2+ik_0x}e^{-ikx}dx
=\frac{1}{\sqrt{2\pi}}\int^∞_{-∞}e^{-x^2}\int^∞_{-∞}e^{ik_0x-ikx}dx=\frac{1}{\sqrt{2\pi}}\sqrt{\pi}[\frac{e^{ik_0x-ikx}}{ik_0-ik}]^∞_{-∞}dx=\frac{1}{\sqrt{2}}[\frac{e^{ik_0x-ikx}}{ik_0-ik}]^∞_{-∞}dx$$
 A: Let $a=k_{0}-k$ and 
\begin{align}
I &= \int\limits_{-\infty}^{\infty} \mathrm{e}^{-x^{2}+iax} dx \\
&= \mathrm{e}^{-a^{2}/4} \int\limits_{-\infty}^{\infty} \mathrm{e}^{-(x-ia/2)^{2}} dx
\end{align}
we completed the square in the exponent.
\begin{align}
I_{1} &= \int \mathrm{e}^{-(x-ia/2)^{2}} dx \\
&= \int \mathrm{e}^{-y^{2}} dy \\
&= \frac{\sqrt{\pi}}{2} \mathrm{erf}(y) \\
&= \frac{\sqrt{\pi}}{2} \mathrm{erf}\left(x-i\frac{a}{2} \right)
\end{align}
Applying limits to $I_{1}$, we obtain
\begin{align}
\int\limits_{-\infty}^{\infty} \mathrm{e}^{-(x-ia/2)^{2}} dx
&= \frac{\sqrt{\pi}}{2} \mathrm{erf}\left(x-i\frac{a}{2} \right) \Big|_{-\infty}^{\infty} \\
&= \frac{\sqrt{\pi}}{2} \Big[\lim_{x \to \infty} \mathrm{erf}\left(x-i\frac{a}{2} \right)
- \lim_{x \to -\infty} \mathrm{erf}\left(x-i\frac{a}{2} \right)  \Big] \\
&= \sqrt{\pi}
\end{align}
Thus
\begin{equation}
I = \sqrt{\pi} \mathrm{e}^{-a^{2}/4}
\end{equation}
and
\begin{equation}
A(k) = \frac{1}{\sqrt{2}} \mathrm{e}^{-(k_{0}-k)^{2} /4}
\end{equation}
