I have searched and failed to find a rigorous proof showing that $$\int_{0}^\infty e^{-ax^2}\ \mathrm{d}x = \frac{\sqrt{\pi}}{2\sqrt{a}}$$ is true for $\Re(a)=0$ and $\Im(a)\neq0$. For example, why does $$ \int_{-\infty}^\infty e^{-ix^2}\ \mathrm{d}x = \sqrt{\frac{\pi}{i}} $$ and does one need to invoke contour integration to show this? Or is the following technique valid:
Suppose $\Re (b)>0$ and $a$ is complex; then $$ \int_{-\infty}^\infty e^{-ax^2}\ \mathrm{d}x \stackrel{?}{=} \lim_{b\to0}\int_0^\infty e^{-(a+ b)x^2}\ \mathrm{d}x = \lim_{b\to0}\frac{\sqrt{\pi}}{2\sqrt{a+b}}. $$
I have an idea for contour integration but is there any way to justify this with real analysis? If not I would very much appreciate a hint for the complex analytic approach. Thanks!
If $a$ is a pure imaginary number, using contour integration $$\int_{0}^\infty e^{-ax^2}\, dx = e^{i\frac \pi 4} \sqrt{\frac \pi {4a}}$$ (have a look here for the proof).
Where the problem starts to be more difficult is to establish that $$\int_{0}^\infty e^{-(a+ib)x^2}\, dx =\frac{\sqrt{\pi }}{2 \sqrt[4]{a^2+b^2}} e^{-\frac{i}{2} \arg (a+i b)}$$ where $a$ and $b$ are real numbers