2
$\begingroup$

It is known that $J_{\nu }(x)=\frac{2}{\pi }$ $\int_0^{\infty } \cosh (\nu t) \sin \left(x \cosh (t)-\frac{\pi \nu }{2}\right) \, dt$ for $x>0$ and $-1<\Re(\nu )<1$.

(see DLMF formula 10.9.8)

The integrand is highly oscillatory for large t and NIntegrate gives an inaccurate result as shown below. How can accuracy be improved ?

intJ[\[Nu]_,x_]:=2/\[Pi] NIntegrate[Cosh[\[Nu] t]Sin[x Cosh[t]-(\[Pi] \[Nu])/2],{t,0,\[Infinity]}]
intJ[0.5, 3.0]
0.227508
BesselJ[0.5, 3.0]
0.0650082
$\endgroup$
2
  • $\begingroup$ may be not all integral representations are equal. Eq (149) on this web page gives the exact value as BesselJ for the values you used. Here it is intJ[v_, x_] := 1/Pi NIntegrate[Cos[v*t - x*Sin[t]], {t, 0, Pi}] - Sin[v*Pi]/Pi* NIntegrate[Exp[-v*t - x*Sinh[t]], {t, 0, Infinity}] $\endgroup$
    – Nasser
    Sep 24 '21 at 6:29
  • $\begingroup$ @Nasser: You made use of another integral representation of BesselJ. This does not answer the question. Am I not right? $\endgroup$
    – user64494
    Sep 24 '21 at 6:47
2
$\begingroup$

An ArcCosh substitution allows NIntegrate to compute the integral accurately.

Cosh[ν t] Sin[x Cosh[t] - (π ν)/2] Dt[t, u] /. t -> ArcCosh[u]
(*
  (Cosh[ν ArcCosh[u]] Sin[u x - (π ν)/2])/(Sqrt[-1 + u] Sqrt[1 + u])
*)
intJ[ν_, x_] := 2/π NIntegrate[
   (Cosh[ν ArcCosh[u]] Sin[u x - (π ν)/2])/(Sqrt[-1 + u] Sqrt[1 + u])
   , {u, 1, ∞}
   , PrecisionGoal -> 12
   ];

intJ[1/2, 3]
BesselJ[0.5, 3.0]
% - %%
(*
  0.0650082
  0.0650082
  4.996*10^-15
*)
$\endgroup$
1
  • $\begingroup$ Let us consider a slightly modified integrand Cosh[[Nu] (t +t^(2/9))] Sin[x Cosh[t + t^(2/9)]] - ([Pi] [Nu])/2] and the same range of integration from 0 to Infinity. Does the approach suggested by you work in this case? $\endgroup$
    – user64494
    Sep 24 '21 at 14:12
0
$\begingroup$

This can be done by cutting the tail of the improper integral under consideration.

intJ[\[Nu]_?NumericQ, x_?NumericQ] := 2/\[Pi] NIntegrate[Cosh[\[Nu] t] *
Sin[x Cosh[t] - (\[Pi] \[Nu])/2], {t, 0, 20}, Method -> "LocalAdaptive"]
intJ[0.5, 3.0]

0.0650177

Addition. One can split the integral into two ones:

intJ1[\[Nu]_?NumericQ, x_?NumericQ] :=  2/\[Pi] NIntegrate[
Cosh[\[Nu] t]*Sin[x Cosh[t] - (\[Pi] \[Nu])/2], {t, 0, 20}, 
Method -> "LocalAdaptive"] + 
2/\[Pi] NIntegrate[Cosh[\[Nu] t]*Sin[x Cosh[t] - (\[Pi] \[Nu])/2], {t, 20, Infinity}]
intJ1[0.5, 3.0]

0.0650122

$\endgroup$
1
  • $\begingroup$ I think the cutted tail can be estimated by Laplace's method or its modifications/generalizations. This is math, not Mathematica. $\endgroup$
    – user64494
    Sep 24 '21 at 13:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.