I want to prove the Gaussian integral formula
$$\int_{-\infty}^\infty e^{-ax^2}\,dx = \sqrt{\pi/a}$$
for $a \in \mathbb{C}$ where $ \Re(a)>0$. In the exercise it says to 'shift the contour of integration' but I don't see why this can't be done explicitly, exactly how one would do with real $a$, with the one difference that the positive real part is necessary for convergence after going to polar coordinates.
Anyway, I'd like to do it as the book wants, so I'd appreciate a tip which contour to use, and for which function. I tried $e^{-az^2}$ on a rectangle from $-R$ to $R$, and of "height" $\varepsilon \rightarrow 0$, but this just gives me an identity (would be useful if I had to prove invariance of the integral under the shift $x \rightarrow x + i\varepsilon $, but not here).