Evaluating the integral $ \int_0^{\infty} \cos(x^2)\, \mathrm{d} x$? Is it necessary to make use of the Gaussian integral and the complex exponential form of the cosine in evaluating the following integral?
$$\int_0^{\infty} \cos(x^2)\, \mathrm{d} x$$ 
Just curious - I can prove its convergence, but not evaluate it at the moment. 
 A: Is it necessary to use the Gamma function in integral form and then make the appropriate changes.... probably not, but is one of the shortest methods to choose.
Consider the integral
\begin{align}
I_{n} = \int_{0}^{\infty} \cos(x^{2n}) \, dx
\end{align}
and make the change of variables $t = x^{2n}$ which leads to
\begin{align}
I_{n} = \frac{1}{2n} \, \int_{0}^{\infty} \cos(t) \, t^{\frac{1}{2n} - 1} \, dt.
\end{align}
Now using the integral
\begin{align}
\int_{0}^{\infty} \cos(at) \, t^{p-1} \, dt = \frac{\Gamma(p)}{a^{p}} \, \cos\left( \frac{p \pi}{2} \right)
\end{align}
then $I_{n}$ becomes
\begin{align}
I_{n} = \cos\left( \frac{\pi}{4n} \right) \, \Gamma\left( \frac{1}{2n} + 1 \right).
\end{align}
For the case of $n=1$ the result is
\begin{align}
\int_{0}^{\infty} \cos(t^{2}) \, dt = \frac{1}{2} \sqrt{\frac{\pi}{2}}.
\end{align} 
A: $$
\begin{aligned}
\int_0^{\infty}\left(\cos (x^2)-i \sin (x^2)\right) d x 
= & \int_0^{\infty} e^{-x^2 i} d x \\
= & \int_0^{\infty} e^{-\left(\frac{1+i}{\sqrt{2}} t\right)^2} d x \\
= & \frac{\sqrt{2}}{1+i} \int_0^{\infty} e^{-x^2} d x \\
= & \frac{\sqrt{2}}{1+i} \cdot \frac{\sqrt{\pi}}{2} \quad (*) \\
= & \sqrt{\frac{\pi}{8}} -i\sqrt{\frac{\pi}{8}}
\end{aligned}
$$
where (*) comes from the Gaussian integral.
Comparing their real and imaginary parts gives
$$
\boxed{\int_0^{\infty} \cos (x^2) d x=\int_0^{\infty} \sin (x^2) d x=\sqrt{\frac{\pi}{8}}}
$$
