# Mathematica MaxRecursion(/WorkingPrecision?) Error in Mathematica 8

#### muppet

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.030281897883550482023091537839230. and 1.0435410747245518126700650167430.*^-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.

Related Math Software Workshop News on Phys.org

### Want to reply to this thread?

"MaxRecursion(/WorkingPrecision?) Error in Mathematica 8"

### Physics Forums Values

We Value Quality
• Topics based on mainstream science
• Proper English grammar and spelling
We Value Civility
• Positive and compassionate attitudes
• Patience while debating
We Value Productivity
• Disciplined to remain on-topic
• Recognition of own weaknesses
• Solo and co-op problem solving