Improper integral with complex limits 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?
 A: Consider the integral of $e^{-z^2}$ around a rectangular contour with corners at $-R, R, R+ib, -R+ib$.  As $R \to +\infty$ the integrals over the vertical pieces go to $0$, while the integral over $(-R, R)$ goes to $\sqrt{\pi}$.
A: when $c,a \ne 0$ are real : $$F(c) = \int_{-\infty}^{+\infty} e^{-(ax+c)^2} dx = \frac{1}{a} \int_{-\infty}^{+\infty} e^{-y^2} dy = \frac{\sqrt{\pi}}{a}$$
the LHS is clearly analytic in $c$, as the RHS, hence by analytic continuation : 
$$F(c) = \int_{-\infty}^{+\infty} e^{-(ax+c)^2} dx  = \frac{\sqrt{\pi}}{a}$$
for every $c \in \mathbb{C}$
A: We have
$$ \int_{-\infty}^{\infty} e^{-(ax+ib)^2} dx = \int_{-\infty}^{\infty} e^{-a^2 x^2 - 2iabx +b^2} dx $$
Using the fact that 
$$  \int_{-\infty}^{\infty} e^{-\alpha y^2 +\beta  y } dy  = \sqrt{\frac{\pi}{\alpha}} e^{\frac{\beta^2}{4\alpha}} ; \quad \alpha>0, \beta\in \mathbb C$$
So, 
$$ \int_{-\infty}^{\infty} e^{-(ax+ib)^2} dx = e^{b^2}\int_{-\infty}^{\infty} e^{-a^2 x^2 - 2iabx} dx = \sqrt{\frac{\pi}{a^2}} e^{b^2} e^{\frac{-4 a^2 b^2}{4a^2}} = \sqrt{\frac{\pi}{a^2}} = \frac{\sqrt{\pi}}{|a|}; a\neq0.$$
