Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

MaxRecursion(/WorkingPrecision?) Error in Mathematica 8

  1. Sep 6, 2012 #1
    I'm getting an error message that suggests my attempts to increase the variable MaxRecursion in NIntegrate aren't working.

    I define
    f[n_,b_]:=NIntegrate[q*BesselJ[0,q*b]*(-(2/(n (2+n) q^4))+(1-q^2)^(n/2) HeavisideTheta[1-q^2] ((2+n q^2)/(n (2+n) q^4)-Hypergeometric2F1[1,n/2,1+n/2,1-1/q^2]/(n q^2))),{q,0,Infinity},Method->"DoubleExponentialOscillatory",MaxRecursion->50,WorkingPrecision->30]

    and upon trying to evaluate f[3,4] I get the message
    NIntegrate::ncvb: NIntegrate failed to converge to prescribed accuracy after 9 recursive bisections in q near {q} = {1.00125749138406369739184946806}. NIntegrate obtained 0.0302818978835504820230915378392`30. and 1.04354107472455181267006501674`30.*^-16 for the integral and error estimates. >>
    9 being the default value of MaxRecursion.

    Does anyone have any ideas why?
    I'm also finding that when I try and

    Plot[f[3,b],{b,0,1},WorkingPrecision->30]

    I'm getting the message
    NIntegrate::precw: The precision of the argument function (q BesselJ[0,0.0000204286 q] (-(2/(15 q^4))+(1-q^2)^(3/2) ((2+3 Power[<<2>>])/(15 q^4)-(-1+1/q^2+Power[<<2>>] ArcTanh[<<1>>])/((1+Times[<<2>>])^2 q^2)) HeavisideTheta[1-q^2])) is less than WorkingPrecision (30.`). >>

    How do I fix this?

    Thanks in advance.
     
  2. jcsd
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Can you offer guidance or do you also need help?
Draft saved Draft deleted



Similar Discussions: MaxRecursion(/WorkingPrecision?) Error in Mathematica 8
  1. Mathematica Error (Replies: 4)

  2. Mathematica error (Replies: 23)

  3. In mathematica 8 (Replies: 5)

Loading...