Gaussian integral with $iax^2+iJx-\sigma^2x^2/2$ I'm trying to calculate a wave function of QM using propagator theory. We have that $$\psi(x,0) = \sqrt{\sigma}\frac{1}{\pi^{1/4}}e^{ikx-\frac{\sigma^2x^2}{2}}$$
where we have that $\sigma,k$ are real numbers and $\sigma$ is strictly positive. The sistem is free so the hamiltonian is just the kinetic part and we find the propagator for the wave function 
$$\langle x,t\vert x',0 \rangle = \sqrt{\frac{m}{2\pi i \hbar t }}e^{im(x-x')^2/2\hbar t}$$
then using that $\psi(x,t) = \langle x,t\vert \psi \rangle = \int \mathrm{d}x'\langle x,t \vert x',0 \rangle \underbrace{\langle x',0 \vert \psi \rangle}_{=\psi(x',0)} $ we have to solve the integral

$$\tag{1}\color{blue}{\psi(x,t) = \sqrt{\frac{m\sigma}{2\pi^{3/2}i\hbar t}}\int\mathrm{d}x'\exp\left(i\frac{m(x-x')^2}{2\hbar t}+ikx'-\frac{\sigma^2x'^2}{2}\right)}$$

My question is how can I solve the integral $(1)$?
If we get out of the integral the $x$ part because the integration is over $x'$ we can use 
$$\frac{imx^2}{2\hbar t} - \frac{imxx'}{\hbar t} - \frac{imx'^2}{2\hbar t} +ikx' - \frac{\sigma^2x'^2}{2} = A(x) + ix'\left(k - \frac{mx}{\hbar t}\right) -\left(\frac{im}{\hbar t}+\sigma^2\right)\frac{x'^2}{2}$$
And then I have a linear term with a purely imaginary number and a power of two term with a complex number. The $A$ gets out of the integral and we perform the integration. My results before was problematic because when I set $t \to 0$ my resulting wave function is different than $\psi(x,0)$. 
 A: I am going to write the intermediate steps, you can complete the gaps. For simplicity, call
\begin{eqnarray}
a &=& \frac{im}{2\hbar t} - \frac{\sigma^2}{2}\\
b &=& \frac{im x}{\hbar t} + i k \\
c &=& \frac{im}{2\hbar t} x^2
\end{eqnarray}
So that the argument of the integral (1) becomes
$$
\exp\left(i\frac{m(x-x')^2}{2\hbar t}+ikx'-\frac{\sigma^2x'^2}{2}\right) = \exp\left(a x'^2 + b x' + c\right) \tag{1}
$$
(be carefull with $a$, you have a problem with a sign) Now let's organize the argument of the exponential function
$$
ax'^2 + bx' + c = a \left[x'^2 + \frac{b}{a} + \frac{c}{a} \right] = a\left[ \left(x' + \frac{b}{2a} \right)^2 + \left(\frac{c}{a} - \frac{c^2}{4a^2} \right)\right] \tag{2}
$$
The second term does not depend on $x'$ so you can get it out of the integral, the first term is simple to integrate
$$
\int{\rm d}x'~ \exp\left[a\left(x' + \frac{b}{2a} \right)^2 \right] = \left(-\frac{\pi}{a}\right)^{1/2} = \left(\frac{2\pi}{\sigma^2 - im /\hbar t}\right)^{1/2} \tag{3}
$$
So the wave function reduces to
\begin{eqnarray}
\psi(x, t) &=& \left(\frac{m\sigma}{2\pi^{3/2}i \hbar t}\right)^{1/2} \left(\frac{2\pi}{\sigma^2 - im /\hbar t}\right)^{1/2}\exp\left[c - \frac{b^2}{4a^2}\right] \\
&=& \frac{-im\sigma}{\pi^{1/2}(-im + \hbar t \sigma^2)} \exp\left[-\frac{\hbar k^2 + m x(2k -i\sigma^2 x)}{2\hbar t \sigma^2 - 2 i m} \right] \tag{4}
\end{eqnarray}
And from here is simple to see that 
$$
\lim_{t \to 0}\psi(x,t)  = (1 + i)\left(-\frac{i\sigma}{2\pi^{1/2}}\right) \exp\left[-\frac{1}{2}x(2ik + \sigma^2 x)\right] = \psi(x, 0) \tag{5}
$$
