I want to calculate the integral using complex integration: $$ f(t) = \int_{-\infty}^\infty \dfrac{e^{-(z+iat)^2}}{4z^2+1} dz = \int_{-\infty}^\infty \dfrac{e^{-(z+iat)^2}}{(2z-i)(2z+i)} dz$$ where $a$ is real.
There are poles at $z=\pm i/2$. If I draw a semicircle anticlockwise contour on the upper half of the complex plane, the contour encloses the $i/2$ pole. Then by the method of residues,
$$f(t) = 2\pi i\mathrm{Res}_{z=i/2} = 2\pi i \left( \dfrac{1}{2i} e^{(1/2+at)^{2}}\right)$$
I double checked on Mathematica and this is not the correct answer.
I suspect I need to do something with the $e^{-(z+iat)^2}$ part, but I'm not sure what (I'm a novice at solving complex integrals). Can you please help?
How did you get $-1+i$? The residue at $z=i/2$ is $\lim_{z\to i/2} (z-i/2) \frac {e^{-(z+iat)^{2}}} {(2z-i)(2z+i)}=\frac 1 {4i} e^{(1/2+at)^{2}}$ and you have to multiply this by $2 \pi i$