is this solution of $\int_0^\infty \sin(z^2) dz $ valid? Is this method valid?
We have $\displaystyle \int_0^\infty e^{-u^2}du = \frac{\sqrt \pi}{2}$. 
Let $u = \frac{1+i}{\sqrt 2}x$, we get $\displaystyle \frac{1 + i}{\sqrt 2 }\int_0^{\infty }e^{-i x^2} dx = \frac{\sqrt \pi }{2 } \implies \int_0^\infty e^{-ix^2}dx = \frac{1-i}{2\sqrt 2 } \sqrt{\pi}$.
Comparing real and imaginary parts we get $\displaystyle \int_0^{\infty}\sin(x^2)dx = \int_0^{\infty}\cos(x^2)dx = \frac{\sqrt \pi }{2 \sqrt 2}$.
 A: The method works, but in present form it lacks justification. The key step is to prove that 

the integral of $\exp(-z^2)$ along the circular arc from $R$ to $Re^{\pi i/4}$ tends to $0$ as $R\to \infty$. 

Once you have this, the Cauchy integral theorem tells you that 
$$\int_0^R \exp(-(re^{\pi i /4})^2)\,e^{\pi i/4}dr - \int_0^R \exp(-r^2)\,dr \to 0$$
as $  R\to\infty $. It follows that 
$$\int_0^\infty \exp(-r^2 i )\,dr =  \frac{\sqrt{\pi}}{2}e^{-\pi i /4}$$
which is the desired result. 
It remains to prove the statement emphasized above. First,
$$\left| \int_0^{\pi/4} \exp(-R^2 e^{2i\theta} )\,R\,d\theta \right| \le 
R\int_0^{\pi/4} \exp(-R^2 \cos 2\theta ) \,d\theta
\tag2$$ 
Next,  split the interval of integration into two subintervals at $\pi/4-R^{-3/2}$. The short interval contributes at most $R\cdot R^{-3/2}=R^{-1/2}$. On the long one the integrand is bounded by $\exp(-R^2 \cos (\pi/2-2R^{-3/2}) )$ where $$-R^2 \cos (\pi/2-2R^{-3/2})= - R^2 \sin (2R^{-3/2})\sim -2R^{1/2}$$ 
and of course $R\exp(-2R^{1/2})\to 0$ as $R\to \infty$.
