I would like to compute an integral of the form ($a,b \neq 0$)
$$\int_{-\infty}^{\infty} e^{-(ax+ib)^2} dx = \frac{1}{a} \int_{-\infty+ib}^{\infty+ib} e^{-z^2} dz$$
where we made the substitution $z = ax+ib$. I know that the last integral is a gaussian integral and that it should equal $\sqrt{\pi}$, but I'm not sure how to compute it by hand. I tried to solve it in the complex plane via contour integration but I seem to go in a circle and do not arrive at $\sqrt{\pi}$.
Could somebody help out?