MathGroup Archive 2007

[Date Index] [Thread Index] [Author Index]

Search the Archive

Numerical integration

  • To: mathgroup at smc.vnet.net
  • Subject: [mg79621] Numerical integration
  • From: dimitris <dimmechan at yahoo.com>
  • Date: Tue, 31 Jul 2007 06:13:18 -0400 (EDT)

In[3]:=
Integrate[Log[1 + z^2]*(BesselJ[1, z]^2/z), {z, 0, Infinity}]
N[%, 10]

Out[3]=
MeijerG[{{1/2}, {}}, {{0, 0}, {-1}}, 1]/(2*Sqrt[Pi])

Out[4]=
0.8732180258611361020606751916`10.

On another CAS I took,

convert("Integrate[Log[1 + z^2]*(BesselJ[1, z]^2/z), {z, 0,
Infinity}]",FromMma,evaluate);
evalf(%,20);

           1/2
  1/2 (2 Pi    BesselI(0, 1) BesselK(0, 1)

               1/2                                /   1/2
         + 2 Pi    BesselK(1, 1) BesselI(1, 1))  /  Pi
                                                /

                        0.87321802586113613925

Both CAS return the same symbolic result.
[An interesting challenge is to simplify the MeijerG
output of Mathematica to that of the other CAS]

I want to check this symbolic result with NIntegrate.
I have "played around" with the options but I could get
"more closely" than

In[16]:=
NIntegrate[Log[1+z^2]*(BesselJ[1,z]^2/z),{z,
      0, },MaxRecursion\[Rule]18]//InputForm

>From In[16]:=
\!\(\*
  RowBox[{\(NIntegrate::"slwcon
      "\), \(\(:\)\(\ \)\), "\<\"Numerical integration
    converging too slowly; suspect
    one of the following: singularity, value of the integration being
0, \
oscillatory integrand, or insufficient WorkingPrecision. If your
integrand is \
oscillatory try using the option Method->Oscillatory in NIntegrate. \
\\!\\(\\*ButtonBox[\\\"More...\\\", ButtonStyle->\\\"RefGuideLinkText\\
\", \
ButtonFrame->None, ButtonData:>\\\"NIntegrate::slwcon\\\"]\\)\"\>"}]\)

>From In[16]:=
\!\(\*
  RowBox[{\(NIntegrate::"ncvb"\), \(\(:\)\(\ \)\), "\<\"NIntegrate
failed
    to converge to prescribed accuracy
    after \\!\\(19\\) recursive bisections in \\!\\(z\\) near \\!\\(z\
\) = \
\\!\\(35857.55603944016`\\). \\!\\(\\*ButtonBox[\\\"More...\\\", \
ButtonStyle->\\\"RefGuideLinkText\\\", ButtonFrame->None, \
ButtonData:>\\\"NIntegrate::ncvb\\\"]\\)\"\>"}]\)

Out[16]//InputForm=
0.8732193803103058

I would be very happy if someone pointed a tactic for perfroming
satisfactory numerical integration with mathematica for this integral.
I use mathematica 5.2 but you can use Mathematica 6 as well!

The integral arose in another forum. There it was pointed out that
the performance of Mathematica 6 is buggy as regards numerical
integration.

I look forward to seeing any replies.

Greetings from burning Greece!

Dimitris

PS

See here

http://groups.google.gr/group/sci.math.symbolic/browse_thread/thread/57af36ff6f540a0d/a076ffbc412f974a?hl=el#a076ffbc412f974a

for above mentioned thread.



  • Prev by Date: Re: RE: Re: Workbench 1.0 -> 1.1 upgrade
  • Next by Date: Re: graphing traces of complicated evaluations (improved)
  • Previous by thread: Re: Numerical integration
  • Next by thread: Creating a Multiple LogLinear List Plot