Message Boards Message Boards

0
|
1950 Views
|
0 Replies
|
0 Total Likes
View groups...
Share
Share this post:

NIntegrate doesn't converge after increasing Precision->22?

Posted 3 years ago

I am trying to find optimal NIntegrate settings for time intensive orthogonal expansions. See the short table of results: Short table integration results

Why using machine precision converged but setting precision to 22 fails? I know increasing precision doesn't necessarily make answer more accurate, but I can't understand why it would fail. Sample code is as follows:

mlocal = 0;  nlocal = 50;    a = 1;
Jm[m_, n_, a_] := BesselJ[m, (BesselJZero[m, n]/a) r];
f1Polar = 
  Exp[  (-r^2 + (4/10)*
       r*(Cos[theta] + Sin[theta]) - (8/100))/(2*(4/10)^2) ];
alpha = f1Polar - (f1Polar /. {r^2 -> a^2, r -> a});
expr = Jm[mlocal, nlocal, a];

value = NIntegrate[
   alpha Cos[mlocal theta] expr r, {theta, 0, 2 Pi}, {r, 0, a},
   WorkingPrecision -> 22,
   AccuracyGoal -> 10,
   Method -> {"LocalAdaptive"},
   Method -> {"EvenOddSubdivision", "VerifyConvergence" -> False},  
   MinRecursion -> 0,
   MaxRecursion -> 3] // Timing
POSTED BY: Karl K.
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract