6
$\begingroup$

Computing numerically integrals of oscillating functions from $0$ to $\infty$ is a well-known and difficult problem. Here is an example for which I do not know a solution: I know how to compute (to thousands of decimal places if necessary) $\int_0^\infty J_0(x)^4\,dx$ and $\int_0^\infty J_0(x)^3\log(x)\,dx$, where $J_0$ is the $J$-Bessel function. On the other hand, I do not know how to compute $\int_0^\infty J_0(x)^4\log(x)\,dx$ because the magic of the sumalt program of Pari/GP doesn't work here because the exponent is even. Note that I do not need this specific integral (which for all I know may even be expressible in closed form), my question is more generally how to compute an integral with an even number of $J$ functions multiplied by some slowly increasing function such as $\log(x)$.

$\endgroup$
5
  • 2
    $\begingroup$ Sorry, please ignore the question. The sumpos command of Pari/GP does the job: for instance X=intnumgaussinit();sumpos(n=1,intnumgauss(x=n*Pi,(n+1)*Pi,f(x),X))+intnum(x=0,Pi,f(x)) $\endgroup$ Commented May 3, 2019 at 12:15
  • $\begingroup$ Its value equals $-0.768524.$ Is it not enough? Such type questions are for MSE. $\endgroup$
    – user64494
    Commented May 3, 2019 at 15:27
  • 2
    $\begingroup$ Maybe, but the whole point is that its computation is difficult: in fact the last 4 decimals of your value are wrong (how did you get this value ?) The result is $-0.7675160527704783073109458702255454421$ if I am not mistaken. $\endgroup$ Commented May 3, 2019 at 16:35
  • 1
    $\begingroup$ The Mathematica code NIntegrate[BesselJ[0, x]^4*Log[x], {x, 0, Infinity}] produces $-0.768524$, all digits are $ -0.7685238456868556$. How do you obtain your result? $\endgroup$
    – user64494
    Commented May 3, 2019 at 17:25
  • 2
    $\begingroup$ I don't want to start an argument here, but I believe Mathematica is wrong and my result correct at least to 35D. I used the Pari/GP command given in my first comment with $f(x)$ the integrand. $\endgroup$ Commented May 3, 2019 at 19:12

0

You must log in to answer this question.

Browse other questions tagged .