Mistake while evaluating the gaussian integral with imaginary term in exponent I am trying to evaluate the integral $I=\int_0^\infty e^{-ix^2}\,dx$ as one component of evaluating a contour integral but I am dropping a factor of $1/2$ and after checking my work many times, I worry that I am making a conceptual mistake in moving to polar coordinates for the interval $(0,\infty)$ rather than $(-\infty,\infty)$. Below is my work:
$$
\begin{align*}
  \text{Define } I&=\int_0^R e^{-ix^2} \, dx=\int_0^R e^{-iy^2} \, dy \\
  \text{then } I^2&=\int_0^R e^{-ix^2} \, dx \int_0^R e^{-iy^2} \, dy \\
  &\Rightarrow I^2=\int_0^R\int_0^R e^{-ix^2}e^{-iy^{2}} \, dx \, dy \\
  &\Rightarrow I^2=\int_0^R\int_0^R e^{-i(x^2+y^2)} \, dx \, dy
\end{align*}
$$
And converting to polar coordinates, with jacobian $r$ for the integral,
and taking $\theta\in[0,\pi]$ since we are integrating in the first quadrant,
we have:
\begin{align*}
  I^2&=\int_0^\pi\int_0^R e^{-i(r^2\cos^2(\theta)+r^2 \sin^2(\theta))} r \, dr \, d\theta\\
  I^2&=\int_0^\pi\int_0^R e^{-i(r^2)} r \, dr \, d\theta\\
\end{align*}
Which we can now perform a u substitution on:
$u=r^2\Rightarrow \frac{du}{2r}=dr$, yielding
\begin{align*}
  I^2&=\frac{1}{2}\int_0^\pi\int_{0=r}^{R=r}e^{-iu} \, du \, d\theta\\
  &\Rightarrow I^2=\frac{\pi}{2} \left[\frac{-e^{-iR^2}}{i}+\frac{1}{i}\right] \\
  &\Rightarrow I^2=\frac{\pi}{2i}[1-e^{-iR^2}] \\
  &\Rightarrow I=\sqrt{\frac{\pi}{2i}}\sqrt{1-e^{-iR^2}}
\end{align*}
Then in the limit $R\rightarrow \infty$ we have
\begin{equation*}
\lim_{R\rightarrow \infty}\sqrt{\frac{\pi}{2i}}\sqrt{1-e^{-iR^{2}}}=
\sqrt{\frac{\pi}{2i}}
\end{equation*}

The mistake is in my eyes that you allow the polar angle to be in $\phi\in[0,\pi]$ although just integrating over a quadrant integration domain in cartesian coordinates,$(x,y)\in[0,R]^2$. I'd suggest putting $\phi\in[0,\pi/2]$ in order to account for the integration in the first quadrant. This modification of your calculation results in an additional factor of $1/2$ when going to polars $(r,\phi)$.
$I = \sqrt{\frac{\pi}{4i}}\sqrt{1-e^{-iR^2}}$.
The limit $R\to\infty$ works for practical purposes.
Does this help you?
David
