Summary :
I have "convinced myself", via contour integration and residue
theorem, that the Fresnel integral :
$$ s(\infty)=\overset{\infty }{\underset{0}{\int }}dx \sin \left(\frac{\pi x^2}{2}\right)=0 \tag{1} $$
But $s(\infty)=\frac{1}{2}$ according to Mathematica. I need to know where my logic is mistaken, otherwise I cannot be confident in applying contour integration techniques (since I clearly "have it wrong"), even though I can understand a way to correctly calculate the integral from this thread.
I include an image with illustration and summary of my work, but will continue to explain with words and LaTeX.
I started by considering the integral : $$ \oint F(x)dx=\oint e^{\frac{1}{2} i \pi x^2}dx=0 \tag{2} $$
Where the closed coutour goes from $0 → \infty$ up the real axis, then along a counter-clockwise quarter circle (with radius $\infty$), then from $\infty → 0$ down the imaginary axis.
I have set the integral to zero already since I know that the integrand is non-singular and so I can use the residue theorem.
I figure that the integral along the quarter circle is zero since I can substitute :
$$z=x+iy=Re^{i\theta} \tag{3} $$
So the integrand becomes :
$$ \exp \left(\frac{1}{2} i \pi R^2 (\cos (2 \theta )+i \sin (2 \theta ))\right)=\exp \left(\frac{1}{2} (-\pi ) R^2 \sin (2 \theta )\right) \exp \left(\frac{1}{2} i \pi R^2 \cos (2 \theta )\right) \tag{4} $$
And the expression in ( 4 ) is zero as R → $\infty$ for $0<\theta<\pi/2$.
I only need to integrate the quarter circle from $0<\theta<\pi/2 $ $ \ $ since the straight -
line integrals account for the contribution from the contour at $\theta=0$ and $\theta=\pi/2$.
Now, the straight - line integrals add to : $$ \overset{\infty }{\underset{0}{\int }}dx \left(\exp \left(\frac{1}{2} i \pi x^2\right)-\exp \left(\frac{1}{2} i \pi (ix)^2\right)\right)=2i\overset{\infty }{\underset{0}{\int }}dx \sin \left(\frac{\pi x^2}{2}\right) \tag{5} $$
EDIT: earlier, I set (5) to zero since $\oint=0$ and the quarter-circle integral is zero. However, I should not have that in the equation and just say that I have "convinced myself" that the right-hand side should be zero since $\oint=0$ and the quarter-circle integral is zero.
I am sure I will feel quite silly when someone points out my misstep, so thank you in advance.