Computing an Integral Involving Rational and Bessel Functions

bessel functionscomplex-analysisdefinite integralsimproper-integralsresidue-calculus

I tried to compute the following integral by using Contour integration method.
$$
\int_0^{\infty}\frac{x^2}{x^4+1}J_0(ax) dx
$$

where $J_0$ is Bessel function of the first kind and $a$ is a positive real constant. Based on the table of integrals (p. 672), we expect to have $-\operatorname{kei}(a)$ as the answer, where $\operatorname{kei}$ is Kelvin function. I wanted to compute it myself but I ended up with a different answer. Here is what I did:
The poles on upper half-plan are $\sqrt{i}$ and $i\sqrt{i}$. Because $\frac{x^2}{x^4+1}J_0(ax)$ is an even function, by using residue theorem I simply expect that
$$
\int_0^{\infty}\frac{x^2}{x^4+1}J_0(ax) dx =\frac{2\pi i}{2}\Big(\frac{J_0(a\sqrt{i})}{4\sqrt{i}}+\frac{J_0(a i \sqrt{i})}{4i \sqrt{i}}\Big)
$$

Which is not definitely $\operatorname{kei}$ function. Also, we simply put $a=2$ (remember $a$ is a positive real number) and compute the integral by wolfram alpha, we get a different answer, which is neither matched with my computations nor with the table of integrals. I appreciate any help!

Edit: As @Gonçalo points out in the comments, the integral on the curve $Re^{i \theta}$ does not vanish. So, my idea on using residue theorem was completely wrong! However, I am still seeking for an appropriate way to deal with this type of integrals and write it down as a sum of Bessel functions for instance.

Best Answer

I'm pretty sure there's a typo in the G&R tables, and that it should be $$\int_{0}^{\infty} \frac{\color{red}{x}J_{0}(ax)}{1+x^{4}} \, \mathrm dx= -\operatorname{kei}(a) \, , \quad a >0, \tag{1}$$ where $\operatorname{kei}(z)$$ = \Im \left( K_{0}(z e^{i \pi/4}) \right).$

We can prove $(1)$ using the approach that Gary mentioned in the comments.

The Hankel function of the first kind of order zero is defined as $$H_{0}^{(1)}(z) = J_{0}(z) + i Y_{0}(z). $$

The principal branch of $H_{0}^{(1)}(z)$ is analytic in the right half-plane with a branch cut along the negative real axis.

Let's integrate the function $$f(z) = \frac{z H_{0}^{(1)}(az)}{1+z^{4}} $$ around the quarter-circle contour $[r, R] \cup Re^{i[0, \pi/2]} \cup [iR, i r] \cup r e^{i[\pi/2, 0]}$.

Since $\lim_{z \to 0}z f(z) = 0$, the integral along the small quarter-circle about the origin vanishes as $r \to 0$.

And since $ |f(z)| \sim O \left(\frac{e^{-a\Im(z)}}{|z|^{7/2}} \right)$ as $|z| \to \infty$ in the upper half-plane (see here), the integral along the large quarter-circle vanishes as $R \to \infty$.

We therefore have

$$ \begin{align} \small \int_{0}^{\infty} \frac{xH_{0}^{(1)}(ax)}{1+x^{4}} \, \mathrm dx + \int_{\infty}^{0} \frac{e^{i \pi/2}t \, H_{0}^{(1)}(a e^{i \pi/2}t)}{1+(e^{i \pi /2}t)^{4}} \, e^{ i \pi /2} \, \mathrm dt &= \small \int_{0}^{\infty} \frac{xH_{0}^{(1)}(ax)}{1+x^{4}} \, \mathrm dx + \int^{\infty}_{0} \frac{t H_{0}^{(1)}(ae^{i \pi/2}t)}{1+t^{4}} \, \mathrm dt \\ &= 2 \pi i \operatorname{Res} \left[\frac{z H_{0}^{(1)}(az)}{1+z^{4}}, z = e^{\pi i/4} \right] \\ &= 2 \pi i \, \frac{e^{\pi i /4} H_{0}^{(1)}\left(a e^{ \pi i /4}\right)}{4e^{3 \pi i/4}} \\ &= \frac{\pi}{2} H_{0}^{(1)} \left(ae^{\pi i/4} \right) \\ &=\frac{\pi}{2} H_{0}^{(1)} \left(e^{i\pi/2} a e^{- \pi i/4} \right) . \end{align} $$

For $ - \pi \le \arg(z) \le \pi/2$, the modified Bessel function of the second kind of order zero ($K_{0}(z)$) is connected to $H_{0}^{(1)}(z)$ by the formula $$K_{0}(z) = \frac{\pi i}{2} H_{0}^{(1)} \left(e^{i \pi/2} z \right). $$

Therefore, the integrand $\frac{t H_{0}^{(1)}(a e^{i \pi/2} t)}{1+t^{4}}$ is purely imaginary.

And equating the real parts on both sides of the above equation, we have

$$ \begin{align} \int_{0}^{\infty} \frac{x J_{0}(ax)}{1+x^{4}} \, \mathrm dx &= \Re \left(\frac{\pi}{2} H_{0}^{(1)} \left(e^{i\pi/2}a e^{- \pi i/4} \right) \right) \\ &= \Re \left( -i K_{0} \left(a e^{- \pi i/4} \right) \right) \\ &= \Im \left(K_{0} \left(a e^{- \pi i/4} \right) \right) \\ &= - \Im \left(K_{0} \left(a e^{\pi i/4} \right) \right) \tag{2} \\ &= - \operatorname{kei}(a). \end{align} $$

$(2)$ https://en.wikipedia.org/wiki/Schwarz_reflection_principle


Similarly, $$ \begin{align} \int_{0}^{\infty} \frac{x^{3}J_{0}(ax)}{1+x^{4}} \, \mathrm dx &= \Re \left(\frac{\pi i }{2} H_{0}^{(1)} \left(e^{i\pi/2}a e^{- \pi i/4} \right) \right) \\ &= \Re \left(K_{0} \left(a e^{- \pi i/4} \right) \right) \\ &= \Re \left(K_{0} \left(a e^{\pi i/4} \right) \right) \\ &= \operatorname{ker}(a) . \end{align} $$