MathGroup Archive 2005

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

Search the Archive

Re: NSum: badly missed Option

  • To: mathgroup at smc.vnet.net
  • Subject: [mg56938] Re: NSum: badly missed Option
  • From: "antononcube" <antononcube at gmail.com>
  • Date: Tue, 10 May 2005 03:43:02 -0400 (EDT)
  • References: <200505070816.EAA20223@smc.vnet.net><d5j5ob$qf3$1@smc.vnet.net> <d5kb13$2at$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Alan wrote:
> "Chris Chiasson" <chris.chiasson at gmail.com> wrote in message
> news:d5j5ob$qf3$1 at smc.vnet.net...
> > Try SetOptions on NIntegrate before the NSum call.
>
> Excellent. Thanks for the solution!
>
> regards,
> alan


Nested Method option can be used in NSum.

For example:

In[1]:= NSum[1/(x20*Sin[x]^2), {x, 2, Infinity}, Method -> NIntegrate]

NIntegrate::ncvb:
  NIntegrate failed to converge to prescribed accuracy after 7
    recursive bisections in x near x = 18.8764.

Out[1]= 1.16782 10^-6

In[2]:= NSum[1/(x20*Sin[x]^2), {x, 1, Infinity}, Method -> {NIntegrate,
MaxRecursion -> 100}]

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.

Out[2]= 1.41228

Anton Antonov
Wolfram Research, Inc.


  • Prev by Date: Re: Re: How to quickly find number of non-zero elements in sparse matrix rows?
  • Next by Date: Re: Partitioning a list from an index
  • Previous by thread: Re: NSum: badly missed Option
  • Next by thread: Re: Re: NSum: badly missed Option