# What is the correct value of $\int_0^\infty dx\ J_0\left( 2 a \sinh\left( \frac{x}{2} \right) \right) \sin(b x)$?

Integral (6.679.4) in Gradshteyn and Ryzhik claims that $$\int_0^\infty dx\ J_0\left( 2 a \sinh\left( \frac{x}{2} \right) \right) \sin(b x) \ = \ \frac{2}{\pi} \sinh(\pi b) \left[ K_{ib}(a) \right]^2$$ I think that this is not correct. Here is a screenshot of some numerics in Mathematica: For random values $$a=2.34$$ and $$b=3$$, it seems that the LHS of the above evaluates to $$0.408$$ while the RHS evaluates to $$0.653$$, and so they disagree.

I think there are three options:

1. I am making a mistake somehow in the above.

2. Mathematica is defining Bessel functions $$J$$ or $$K$$ differently than G&R, which I think is not likely.

2. This is an error in G&R.

In the last case, I have seen that Equation (58) on Page 115 of Erdelyi: Volume 1 Tables of Integral Transforms is the source for G&R (6.679.4). This integral simply stated there without a source, so I have no clue how this integral is derived.

What is $$\int_0^\infty dx\ J_0\left( 2 a \sinh\left( \frac{x}{2} \right) \right) \sin(b x)$$?

• A warning: the integral oscillates heavily. In these cases, numerical integration is not always reliable. So, it might be too early to claim an error in G&R. Jan 8, 2019 at 22:03

Maple agrees with G&R on the formula, however it has considerable difficulty with the numerical evaluation of the integral as this oscillates very rapidly. But the integral from $$0$$ to $$20$$ is given as $$.6536634068$$, agreeing quite nicely with the theoretical result.

• What an awesome and simple trick! I should have known better than to doubt Gradshteyn and Ryzhik :) Jan 9, 2019 at 14:14

Interesting problem, for sure.

Using another CAS, I played with the precision. For Mathematica, your first command would be

f[a_,b_,n_]:=NIntegrate[BesselJ[0, 2 a Sinh[x/2]] Sin[b x], {x, 0, Infinity}, WorkingPrecision -> n]

Below are my results for the integration up to infinity for your particular values. $$\left( \begin{array}{cc} n & \text{result} \\ 10 & 0.4084616144 \\ 20 & 0.4084616143 \\ 30 & 0.6848603276 \\ 40 & 0.6848603276 \\ 50 & 0.6554693076 \\ 60 & 0.6554693076 \\ 70 & 0.6554693076 \\ 80 & 0.6554693076 \\ 90 & 0.6541206739\\ 100 & 0.6541738396 \\ 200 & 0.6533938298 \\ 300 & 0.6534598266 \\ 400 & 0.6536447955 \\ 500 & 0.6534985760 \end{array} \right)$$ It seems to be very slow convergence (notice the swings of these results even for large values of $$n$$).

The systematic complain of the CAS was related to the highly oscillatory integrand as Robert Israel commented.