calculating $\int_{-\infty}^\infty e^{iat^2}\,{\rm d}t$ I want to show 

$$\int_{-\infty}^\infty e^{ist^2}\,{\rm d}t=\pi^{1/2}e^{is\pi/4}$$

where $s$ is the sign of a function from a previous part of this question so just treat it as a constant (either $+1$ or $-1$). 



My guess is to use contour integration and the residue theorem: I have taken a semicircular (radius $R$) clockwise contour $C$ tracing from $0$ to $Ri$ then taking an arc round to $-Ri$ then tracing back up to $0$. Then we consider the integral

$$\oint_Ce^{-iz^2}\,{\rm d}z$$

which is zero by Cauchy's theorem. Then separate $C$ into two parts namely

$$0 = \int_{-R}^Re^{-ist^2}dt + \int_{\pi/2}^{3\pi/2}\exp\left[-is(R^2e^{2i\theta})\right]iRe^{i\theta}\,{\rm d}\theta$$

but I'm stuck on what I should do next. Any help is great thanks. Also, I have seen this post but they don't seem to get the correct answer that agrees with what I am supposed to show so I have decided to re ask this question.
First integral, for $s=1$
\begin{align}
2\int \mathrm{e}^{it^{2}} dt &amp;= 2\frac{1}{\sqrt{i}} \int \mathrm{e}^{x^{2}} dx \\
&amp;= \frac{1}{\sqrt{i}} \sqrt{\pi} \mathrm{erfi}(x) \\
&amp;= \frac{1}{\sqrt{i}} \sqrt{\pi} \mathrm{erfi}(t\sqrt{i})
\end{align}

Thus
\begin{align}
2\int\limits_{0}^{\infty} \mathrm{e}^{it^{2}} dt &amp;= \frac{1}{\sqrt{i}} \sqrt{\pi} \mathrm{erfi}(t\sqrt{i}) \Big|_{0}^{\infty} \\
&amp;= \frac{1}{\sqrt{i}} \sqrt{\pi} (i-0) = \sqrt{i}\sqrt{\pi} = \mathrm{e}^{i\pi /4}\sqrt{\pi}
\end{align}

Second integral, for $s=-1$
\begin{align}
2\int \mathrm{e}^{-it^{2}} dt &amp;= 2\frac{1}{\sqrt{i}} \int \mathrm{e}^{-x^{2}} dx \\
&amp;= \frac{1}{\sqrt{i}} \sqrt{\pi} \mathrm{erf}(x) \\
&amp;= \frac{1}{\sqrt{i}} \sqrt{\pi} \mathrm{erf}(t\sqrt{i})
\end{align}

Thus
\begin{align}
2\int\limits_{0}^{\infty} \mathrm{e}^{-it^{2}} dt &amp;= \frac{1}{\sqrt{i}} \sqrt{\pi} \mathrm{erf}(t\sqrt{i}) \Big|_{0}^{\infty} \\
&amp;= \frac{1}{\sqrt{i}} \sqrt{\pi} (1-0) = \frac{1}{\sqrt{i}} \sqrt{\pi} = \mathrm{e}^{-i\pi /4}\sqrt{\pi}
\end{align}

And we have
\begin{equation}
\int\limits_{-\infty}^{\infty} \mathrm{e}^{ist^{2}} dt = \mathrm{e}^{is\pi /4}\sqrt{\pi}
\end{equation}
for $s=\pm 1$
First integral, for $s=1$
\begin{align}
2\int \mathrm{e}^{it^{2}} dt &amp;= 2\frac{1}{\sqrt{i}} \int \mathrm{e}^{x^{2}} dx \\
&amp;= \frac{1}{\sqrt{i}} \sqrt{\pi} \mathrm{erfi}(x) \\
&amp;= \frac{1}{\sqrt{i}} \sqrt{\pi} \mathrm{erfi}(t\sqrt{i})
\end{align}

Thus
\begin{align}
2\int\limits_{0}^{\infty} \mathrm{e}^{it^{2}} dt &amp;= \frac{1}{\sqrt{i}} \sqrt{\pi} \mathrm{erfi}(t\sqrt{i}) \Big|_{0}^{\infty} \\
&amp;= \frac{1}{\sqrt{i}} \sqrt{\pi} (i-0) = \sqrt{i}\sqrt{\pi} = \mathrm{e}^{i\pi /4}\sqrt{\pi}
\end{align}

Second integral, for $s=-1$
\begin{align}
2\int \mathrm{e}^{-it^{2}} dt &amp;= 2\frac{1}{\sqrt{i}} \int \mathrm{e}^{-x^{2}} dx \\
&amp;= \frac{1}{\sqrt{i}} \sqrt{\pi} \mathrm{erf}(x) \\
&amp;= \frac{1}{\sqrt{i}} \sqrt{\pi} \mathrm{erf}(t\sqrt{i})
\end{align}

Thus
\begin{align}
2\int\limits_{0}^{\infty} \mathrm{e}^{-it^{2}} dt &amp;= \frac{1}{\sqrt{i}} \sqrt{\pi} \mathrm{erf}(t\sqrt{i}) \Big|_{0}^{\infty} \\
&amp;= \frac{1}{\sqrt{i}} \sqrt{\pi} (1-0) = \frac{1}{\sqrt{i}} \sqrt{\pi} = \mathrm{e}^{-i\pi /4}\sqrt{\pi}
\end{align}

And we have
\begin{equation}
\int\limits_{-\infty}^{\infty} \mathrm{e}^{ist^{2}} dt = \mathrm{e}^{is\pi /4}\sqrt{\pi}
\end{equation}
for $s=\pm 1$