$\int_0^{\infty}\cos(x^2)$ Complex analysis

I'm having trouble calculating the integral $\int_0^{\infty}{\cos{x^2}}dx$

I'm supposed to use the Contour with the parameters $C_1=t,t\in[0,R],C_2=Re^{it},t\in[0,\frac{\pi}{4}], C_3=te^{i\frac{\pi}{4}},t\in[0,R]$.

What I've tried to do is to calculate $\int{e^{iz^2}}$ on the Contour and at the end taking the real part of that integral. but I'm stuck on $C_2$. I know it's supposed to be $0$ when $R$ goes to infinity.

This is what I've tried:

$|\int_{C_2}e^{iz^2}|=|\int_0^{\frac{\pi}{4}}e^{2iR^2e^{2it}}Rie^{it}|\le length(C_2)Max|e^{2iR^2e^{2it}}Rie^{it}|)=\frac{2\pi R^2}{8}Max|e^{2iR^2(\cos(2t)+i\sin(2t))}|=|\frac{2\pi R^2}{8}Max_{t\in[0,\frac{\pi}{4}]}|e^{-R^2\sin(2t))}|$

but $\sin(2t)$ can be $0$. what am I doing wrong at the end there?

• Also, $|\cos(x+iy)|$ increases with $|y|$, so you can't get your auxiliary integral to vanish. – Kenny Lau Aug 9 '18 at 8:05
• @daruma This is the Fresnel cosine integral and it most certainly converges. – saulspatz Aug 9 '18 at 8:06
• I'm too sleepy to work through your calculations, but look at the link for the Fresnel cosine integral I gave above. It outlines the calculation. – saulspatz Aug 9 '18 at 8:11
• That's exactly what I need except they only mention that the integral over $C_2$ goes to zero as R goes to infinity, without proving it. – ofek121 Aug 9 '18 at 8:17
• – Robert Z Aug 9 '18 at 8:23

The elements I provide here, are inspired from the French wikipedia article Intégrale de Fresnel. A way to compute $\int_0^{\infty}{\cos{x^2}} \ dx$ with complex methods is to compute the integral of $g(z) = e^{-z^2}$ on the countour you defined.
Above wikipedia article demonstrates that the integral of $g$ on $C_2$ goes to zero as $R$ goes to $\infty$. Based on that and on the known result $\int_0^{\infty}{e^{-x^2}} \ dx = \frac{\sqrt{\pi}}{2}$, the article derives the value $$\int_0^{\infty}{e^{-it^2}} \ dt = \sqrt{\frac{\pi}{2}}\frac{1-i}{2}.$$
Then $\int_0^{\infty}{\cos{x^2}}\ dx$ is the real part of the above.