Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'Re: NIntegrate::slwcon' topicStudent Support Forum > General > Archives > "Re: NIntegrate::slwcon"

Help | Reply To Topic
Author Comment/Response
Mitchell Kaplan
02/23/97 7:57pm

Reply to message #168 from Peter Khoury: > I'm trying to evaluate
some one and two dimensional integrals numerically using NIntegrate.
The integrands oscillate with a period which varies a little but typically
is around 1. I keep getting the message: > > NIntegrate::''slwcon'':
> ''Numerical integration converging too slowly; suspect singularity,
value \ > of the integration is 0, oscillatory integrand, or insufficient
\ > WorkingPrecision. If your integrand is oscillatory try using the
option \ > Method->Oscillatory in NIntegrate.'' > > I can't use Method->Oscillatory
cause the arguements aren't linear and sometimes I do two dimensional
integrals. Anybody have any idea how I can speed up the convergance
and be sure of getting an accurate answer? If people are interested
I can Email the 6 function definitions which are fairly simple. >
Thanks, Peat > > Peat, I'm no expert, but... I've had the same problem
with some 3 dim integrals I've been working on. The only way I've
found to avoid this is to break up the limits of integration. There
seem to be two ways to accomplish this. First, write a loop which
increments the limits, and accumulates the answer. The other (which
I think works) is the string along the various limits in the list
inside the NIntegrate statement (the on-line book says how to do this
-- it says that Mathematica checks these points for singularities,
but it also seems to break up the integration). A word of warning
about the first method -- it's slow. A good idea is to compile the
function you're integrating. Even though NIntegrate compiles the function
for you, when you loop it apparently has to re-compile each time.
Good luck. Mitch


URL: ,
Help | Reply To Topic