I wonder if anyone could confirm my solution to this integral? $$ \int_0^\infty x e^{-iax^2/2}dx = -\frac{i}{a}, \quad \Im[a]<0 \tag{1} $$ I've included the answer that I got from plugging in the integral to mathematica.
To solve this integral I think that I have to assume that $a$ has a small imaginary part i.e. $a\rightarrow a-i\varepsilon$ where $\varepsilon>0$, and then use Cauchy's integral theorem. $$ \begin{align} \oint_\Gamma z e^{-iaz^2/2}dz&=0\\&=\int_0^R x e^{-i(a-i\varepsilon)x^2/2}dx +iR^2\int_0^{\pi/4} e^{i2\phi}e^{-i(a-i\varepsilon)R^2\text{exp}(i2\phi)/2}d\phi +i\int_R^0 \rho e^{(a-i\varepsilon)\rho^2/2}d\rho \end{align} $$ I think I then should argue that the second integral vanishes as $R\rightarrow\infty$ because the exponential doesn't change sign within the integration region. If I then let $\varepsilon\rightarrow0^+$, I get $$ \int_0^\infty x e^{-iax^2/2}dx=-i\int_\infty^0 \rho e^{a\rho^2/2}d\rho=-\frac{i}{a} $$ What I'm most concerned about is if I can let $\varepsilon\rightarrow0$ before I've completed the integration? Because right it feels like I could just have forgotten the $i\varepsilon$ prescription because It seems to me it dosen't add anything to my problem.