Calculate complex integral $\int_{-\infty}^\infty e^{-ix^2}d x=?$

Hint $$\int e^{-k x^2}\,dx=\frac{\sqrt{\pi } }{2 \sqrt{k}}\,\text{erf}\left(\sqrt{k} x\right)$$ $$f(k)=\int_{-\infty}^\infty e^{-k x^2}\,dx=\frac{\sqrt{\pi }}{\sqrt{k}}$$ $$f(i)=\frac{\sqrt{\pi }}{\sqrt{i}}=(1-i) \sqrt{\frac{\pi }{2}}$$


Trying to avoid complex funniness.

$\begin{array}\\ \int_{-\infty}^\infty e^{-ix^2}dx &=\int_{-\infty}^\infty (\cos(x^2)-i\sin(x^2))dx\\ &=2\int_{0}^\infty (\cos(x^2)-i\sin(x^2))dx\\ &=2\int_{0}^\infty \cos(x^2)dx-2i\int_{0}^\infty\sin(x^2))dx\\ \end{array} $

and these are the Fresnel integrals $C(x)$ and $S(x)$ both of which approach $\dfrac{\sqrt{\pi}}{8} $ as $x \to \infty$.

Therefore the result is $(1-i)\sqrt{\frac{\pi}{2}} $ as Claude Leibovici got.


Hint:$$\int_{-\infty}^\infty e^{-kx^2}dx=\int_{-\infty}^\infty e^{-\left(x\sqrt k\right)^2}dx$$ Use the $u$-substution $u=x\sqrt k$ and this transforms the integral into the form given in DavidG's suggestion. Can you take it from here?