I have a problem in evaluating the integral above. So far I've proceeded in this way. We have an even function, so:
$$ \int_0^{+\infty} \frac{\sin(x^2)}{x^4+1} dx = \frac{1}{2} \int_{-\infty}^{+\infty} \frac{\sin(x^2)}{x^4+1} dx $$
Then we choose the complex function:
$$ f(z) = \frac{e^{iz^2}}{z^4+1} \qquad \forall z \in \mathbb{C} /\{ e^{i\frac{\pi + 2k\pi}{4}} \} \qquad k= 0,1,2,3 $$
Then we choose the integration path $\gamma$ consisting of the real axis from $-R$ to $+R$ and the upper semicircle $\Gamma$ of radius $R$. So we will have:
$$ 2 \pi i \left(\text{Res}(f, e^{i\pi \over 4}) +\text{Res}(f, e^{i3\pi \over 4}) \right) = \oint_{+\gamma} f(z)dz =\\= \int_{-R}^{+R} f(z)dz + \int_{+\Gamma}f(z)dz $$
Taking the limit $R \to +\infty$ we can prove that the integral over $\Gamma$ is $0$. After some calculation and taking the imaginary part of the integral I obtain:
$$\int_0^{+\infty} \frac{\sin(x^2)}{x^4+1} dx = \frac{\pi}{4\sqrt{2}}\left( e - \frac{1}{e} \right) \simeq 1.31 $$
But, if I compute this integral on a computer, it gives me $0.37$. What is wrong with my reasoning ?
If $$I(x)=\int_0^{\infty}\frac{\sin(xt^2)}{t^4+1}dt$$ Then $$I^{\prime\prime}-I=-\int_0^{\infty}\sin(xt^2)dt==\frac1{\sqrt x}\int_0^{\infty}\sin(t^2)dt=-\frac{\sqrt\pi}{2\sqrt2}x^{-1/2}$$ By the properties of Fresnel integrals. Then we can use variation of parameters $$I(x)=u(x)e^x+v(x)e^{-x}$$ $$I^{\prime}(x)=u^{\prime}e^x+v^{\prime}e^{-x}+ue^x-ve^{-x}=ue^x-ve^{-x}$$ Where we have use one degree of freedom to set $$u^{\prime}e^x+v^{\prime}e^{-x}=0$$ Then $$I^{\prime\prime}(x)-I(x)=u^{\prime}e^x-v^{\prime}e^{-x}=2u^{\prime}e^x=-2v^{\prime}e^{-x}=-\frac{\sqrt{\pi}}{2\sqrt2}x^{-1/2}$$ Solutions: $$u=-\frac{\sqrt{\pi}}{4\sqrt2}\int x^{-1/2}e^{-x}dx=\frac{\sqrt{\pi}}{4\sqrt2}\left[c_1-\int_0^xt^{-1/2}e^{-t}dt\right]$$ $$v=\frac{\sqrt{\pi}}{4\sqrt2}\int x^{-1/2}e^xdx=\frac{\sqrt{\pi}}{4\sqrt2}\left[c_2+\int_0^xt^{-1/2}e^tdt\right]$$ So that makes $$I(x)=\frac{\sqrt{\pi}}{4\sqrt2}\left[c_1e^x+c_2e^{-x}+\int_0^xt^{-1/2}\left(e^{t-x}-e^{x-t}\right)dt\right]$$ Now, $$I(0)=0=\frac{\sqrt{\pi}}{4\sqrt2}(c_1+c_2)$$ And hopefully we can see that $$\lim_{x\rightarrow\infty}I(x)=\lim_{x\rightarrow\infty}c_2e^{-x}=\lim_{x\rightarrow\infty}\int_0^xt^{-1/2}e^{t-x}dt=0$$ So that requires $$c_1=-c_2=\int_0^{\infty}t^{-1/2}e^{-t}dt=\Gamma\left(\frac12\right)=\sqrt{\pi}$$ So now we want $$I(1)=\frac{\sqrt{\pi}}{4\sqrt2}\left[2\sqrt{\pi}\sinh(1)-2\int_0^1t^{-\frac12}\sinh(1-t)dt\right]$$ Wolfram|Alpha expresses that last integral as $$\int_0^1t^{-\frac12}\sinh(1-t)dt=\frac{\sqrt{\pi}\left(e^2\text{erf}(1)-\text{erfi}(1)\right)}{2e}\approx1.491998962365937$$ And it does in fact add up to about $0.370348638$, so even with the somewhat shaky exposition above, it may be correct.