How calculate
$$\int_0^\infty \frac{\cos(x^2)}{1+x^2}\;dx$$
$\mathbf {My Attempt}$
I tried introducing a new parameter and differentiating twice like this:
$$I(a)=\int_0^\infty \frac{\cos(ax^2)}{1+x^2}\;dx \quad \Rightarrow$$
$$I^{''}(a)+I(a)=\frac{\sqrt{\pi}}{\sqrt{2}}a^{\frac{-1}{2}}+\frac{\sqrt{\pi}}{2\sqrt{2}}a^{\frac{-3}{2}}$$
I'm unable to come up with a particular solution for this differential equation.
I tried using a double integral like this:
$$\int_0^\infty e^{-y(1+x^2)}\; dy = \frac1{1+x^2} \quad\Rightarrow$$
$$\int_0^\infty \int_0^\infty \cos(x^2)\; e^{-y(1+x^2)}\; dy\,dx = \int_0^\infty\frac{\cos(x^2)}{1+x^2}\; dx$$
But this wasn't that useful.
Result by Wolfram (Mathematica): $$-\frac{1}{2} \pi \left[\sin (1) \left(S\left(\sqrt{\frac{2}{\pi }}\right)-C\left(\sqrt{\frac{2}{\pi }}\right)\right)+\cos (1) \left(C\left(\sqrt{\frac{2}{\pi }}\right)+S\left(\sqrt{\frac{2}{\pi }}\right)-1\right)\right] $$
Any hint? (I'm not familiar with the Residue Theorem)
Best Answer
Using the complex representation makes the problem solvable with a first order ODE.
$$I(a)=\int_0^\infty\frac{e^{iax^2}}{x^2+1}dx,$$
$$I'(a)=i\int_0^\infty x^2\frac{e^{iax^2}}{x^2+1}dx,$$
$$I'(a)+iI(a)=i\int_0^\infty e^{iax^2}dx=wa^{-1/2},$$ where $w$ is a complex constant (namely $(i-1)\sqrt{\pi/8}$).
Then by means of an integrating factor,
$$(I'(a)+iI(a))e^{ia}=(I(a)e^{ia})'=wa^{-1/2}e^{ia}$$
and integrating from $a=0$ to $1$,
$$I(a)e^{ia}-I(0)=w\int_0^1a^{-1/2}e^{ia}da=2w\int_0^1e^{ib^2}db=2w(C(1)+iS(1)).$$
Finally,
$$I(a)=\left(2w(C(1)+iS(1))+I(0)\right)e^{-i}$$ of which you take the real part. (With $I(0)=\pi/2$.)
Note that we have been using the Fresnel integral without the $\pi/2$ factor in its definition, and this answer coincides with those of the CAS softwares.