MathGroup Archive 2007

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

Search the Archive

Re: Message: "Numerical interation converging too slowly"

  • To: mathgroup at smc.vnet.net
  • Subject: [mg83250] Re: Message: "Numerical interation converging too slowly"
  • From: Jean-Marc Gulliet <jeanmarc.gulliet at gmail.com>
  • Date: Fri, 16 Nov 2007 05:25:32 -0500 (EST)
  • Organization: The Open University, Milton Keynes, UK
  • References: <fhh7h5$8p4$1@smc.vnet.net>

Hoa Bui wrote:
> Hi all,
> 
> Please help!
> 
> I have a list of points:
> lst={{0,0.0673209172484956`},{0.003449278068524249`,0.10109827933089396`},{\
> 0.014031516572727063`,0.19966139796005267`},{0.04649737451028208`,0.\
> 2870434103185859`}}
> 
> I then define a function NN[x] that returns the linearly interpolated
> value at x:
> linN = Interpolation[lst, InterpolationOrder -> 1];
> NN[x_?NumberQ]:=linN[x];
> 
> In[17]:=NN[0]
> Out[17]=0.0673209
> 
> In[18]:=NIntegrate[NN[s],{s,0,0.45}]
> Out[18]=0.344713
> 
> However, if I want to make the integral a function of the upper limit,
> and plot it:
> Plot[NIntegrate[NN[s],{s,0,z}],{z,0,0.045}],
> I get this message:
> "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."
> 
> Maybe there's nothing wrong with the result, but I'm not sure. And the
> message is annoying, too.
> Does anyone know how to make Mathematica do the work without complaining?
> 
> I appreciate it.
> HB
> 

Hum, the posted code works fine (i.e. no warning nor error messages are 
issued) with Mathematica 6.0.1. I have uploaded the following pdf on my 
web site so you can check the graph produced by your version against 
version 6:

http://homepages.nyu.edu/~jmg336/mathematica/HoaBuiIntegration.pdf

(Sorry, I am away from my machine with version 5.2 installed, so I 
cannot investigate further.)

Regards,
-- 
Jean-Marc


  • Prev by Date: Re: Re: Mac OS X 10.5 - Mathematica 5.1 hangs - 6.0 works?
  • Next by Date: Re: Multiple Constants
  • Previous by thread: Message: "Numerical interation converging too slowly"
  • Next by thread: Re: Message: "Numerical interation converging too slowly"