How to compute $\int_0^\infty \frac{\cos(ax)}{(1+x^2)\sqrt{x}}dx$. $$
\mbox{How can I compute}\
\int_{0}^{\infty}\frac{\cos\left(ax\right)}{\left(1 + x^{2}\right)\,\sqrt{\,{x}\,}}\,\mathrm{d}x\ ?.
$$
I saw many questions about computations of that integral without the term $\,\sqrt{\,{x}\,}\,$ and that it can be solved by using various techniques ( contour integral, iterated integral, etc$\ldots$ ). But how can I compute my integral $?$.
 A: Let
$$
f(a) = \int_0^{+\infty} \frac{\cos(ax)}{(1+x^2)\sqrt{x}} \, \mathrm{d} x,
$$

First, we note that $f(a)=f(-a)$, hence $f$ is even and we will focus only on $a \ge 0$.
Second,
$$
\begin{split}
\left| f(a) \right| &\le \left|\int_0^{+\infty} \frac{\cos(ax)}{(1+x^2)\sqrt{x}} \, \mathrm{d} x \right|\\
&\le \int_0^{+\infty} \frac{\left|\cos(ax)\right|}{(1+x^2)\sqrt{x}} \, \mathrm{d} x \\
&\le \int_0^{+\infty} \frac{\mathrm{d} x}{(1+x^2)\sqrt{x}}  = f(0)
\end{split}$$
With some math one finds that
$$
f(0) = \int_0^{+\infty} \frac{\mathrm{d} x}{(1+x^2)\sqrt{x}} =2\int_0^{+\infty} \frac{\mathrm dt}{1+t^4} =  \frac{\pi}{\sqrt{2}} \approx 2.22
$$
(see here)

Now, if we differentiate twitce under integral symbol (we can do it because of Leibniz integral rule)
$$
\begin{split}
f''(a) &= -\int_0^{+\infty} \frac{\cos(ax) \cdot x^2}{(1+x^2)\sqrt{x}} \, \mathrm{d} x\\
&= -\int_0^{+\infty} \frac{\cos(ax) \left(x^2+1-1\right)}{(1+x^2)\sqrt{x}} \, \mathrm{d} x\\
&= - \left[\int_0^{+\infty} \frac{\cos(ax)}{\sqrt{x}} \, \mathrm{d} x -\int_0^{+\infty} \frac{\cos(ax) }{(1+x^2)\sqrt{x}} \, \mathrm{d} x \right] \\
&= f(a) - \int_0^{+\infty} \frac{\cos(ax)}{\sqrt{x}} \, \mathrm{d} x 
\end{split}$$
Now,
$$
\begin{split}
\int_0^{+\infty} \frac{\cos(ax)}{\sqrt{x}} \, \mathrm{d} x &= \frac{1}{2}\int_\mathbb{R}\frac{\cos(ax)}{\sqrt{|x|}} \, \mathrm{d} x \\
&= \mathcal F \left(\frac{1}{\sqrt{|x|}}\right)(a) \\
&=\frac{1}{2} \sqrt{\frac{2\pi}{|a|}}\\
&= \sqrt{\frac{\pi}{2}}\sqrt{\frac{1}{|a|}}
\end{split}
$$
where we used $ \mathcal F \left(\frac{1}{\sqrt{|x|}}\right)(a) = \frac{1}{2} \sqrt{\frac{2\pi}{|a|}}$ (see Fourier Transform of $\frac{1}{\sqrt{|x|}}$)

So, the problem is now to solve
$$
\begin{cases}
f''(a) -f(a) = -\sqrt{\frac{\pi}{2}}\sqrt{\frac{1}{|a|}}\\
f(0) = \frac{\pi}{\sqrt 2}\\
\end{cases}
$$
From linear differential equations we know that a solution is
$$
f(a) = c_1 \mathrm{e}^a + c_2 \mathrm{e}^{-a} + f_\mathrm p(a)
$$
where $c_1$ and $c_2$ are real numbers and $f_\mathrm p$ is the complementary solution.
Wolfram Alpha helps us to know that
$$
\begin{split}
f(a) &= c_1 \mathrm{e}^a + c_2 \mathrm{e}^{-a} + \sqrt{\frac{\pi}{2}}\int_0^{a} \frac{\mathrm{e}^{-x+a}-\mathrm{e}^{x-a}}{2\sqrt{x}}\, \mathrm d x\\
&= c_1 \mathrm{e}^a + c_2 \mathrm{e}^{-a} + \sqrt{\frac{\pi}{2}}\int_0^{a} \frac{\sinh(a-x)}{\sqrt{x}}\, \mathrm d x
\end{split}
$$
Now, if we add the initial condition, we get
$$
c_1+c_2 = \frac{\pi}{\sqrt 2},
$$
hence, after renaming the constant $c_1 = C$, the solution is
$$
\begin{split}
f(a)&= C \mathrm{e}^a + \left(\frac{\pi}{\sqrt 2} - C\right) \mathrm{e}^{-a} + \sqrt{\frac{\pi}{2}}\int_0^{a} \frac{\sinh(a-x)}{\sqrt{x}}\, \mathrm d x\\
&= 2C \sinh(a) +  \frac{\pi}{\sqrt 2} \mathrm{e}^{-a} + \sqrt{\frac{\pi}{2}}\int_0^{a} \frac{\sinh(a-x)}{\sqrt{x}}\, \mathrm d x
\end{split}
$$
If you find some other initial value (for example $f(1)$), then you can eliminate the constant $C$ too.
