MathGroup Archive 2008

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

Search the Archive

Re: Re: Method Option

  • To: mathgroup at smc.vnet.net
  • Subject: [mg90936] Re: [mg90906] Re: Method Option
  • From: Murray Eisenberg <murray at math.umass.edu>
  • Date: Wed, 30 Jul 2008 03:53:23 -0400 (EDT)
  • Organization: Mathematics & Statistics, Univ. of Mass./Amherst
  • References: <g6h5dc$h0u$1@smc.vnet.net> <200807290538.BAA18202@smc.vnet.net>
  • Reply-to: murray at math.umass.edu

The "Method->Bogus" ruse obviously works, but the situation seems to cry 
out for a better way.

Having to go to the function's reference page to see the list of methods 
in the MOREa built-in function to determine the possible values of 
Method when Method is a legitimate option.  Perhaps a new function 
Methods (too easily confused with Method, though)...

   Methods[NIntegrate]

... or an extension of Options:

   Options[NIntegrate, Method]

mark mcclure wrote:
> On Jul 27, 2:42 am, Peter Breitfeld <ph... at t-online.de> wrote:
>> A lot of build-in functions in Mathematica have the option Method. Usually
>> this is mentioned in the "More Information" section of the reference page.
>> Most of the time there is the statement Method->Automatic.
>> Take for example ContourPlot:
>>   "Method Automatic the method to use for refining contours"
>> OK, but what other methods do I have then?
> 
> Even though Method -> Automatic appears in the list
> generated by Options[ContourPlot], the option appears
> to be ignored.  Otherwise,
>   ContourPlot[x^2 + y^2, {x, -2, 2}, {y, -2, 2},
>    Method -> Bogus]
> would generate error messages.  Actually, this is a
> good technique find possible options.  Here's an
> example with NIntegrate:
> 
> -----------------------------
> Mathematica 6.0 for Mac OS X x86 (32-bit)
> Copyright 1988-2008 Wolfram Research, Inc.
> 
> In[1]:= NIntegrate[x^2, {x,-2,2}, Method -> Bogus]
> 
> NIntegrate::bdmtd:
>    The Method option should be one of Automatic,
>    CartesianRule, ClenshawCurtisRule,
>    GaussBerntsenEspelidRule, GaussKronrodRule,
>    LobattoKronrodRule, LobattoPeanoRule, MultiPanelRule,
>    NewtonCotesRule, TrapezoidalRule, AdaptiveMonteCarlo,
>    AdaptiveQuasiMonteCarlo, DoubleExponential,
>    DuffyCoordinates, ExtrapolatingOscillatory, MonteCarlo,
>    QuasiMonteCarlo, Trapezoidal, EvenOddSubdivision,
>    SymbolicPiecewiseSubdivision, OscillatorySelection,
>    UnitCubeRescaling, or a user-implemented integration
>    strategy or rule.
> 
> NIntegrate::nsr:
>    Bogus is not a valid specification of an integration
>    strategy or rule.
> 
>                     2
> Out[1]= NIntegrate[x , {x, -2, 2}, Method -> Bogus]
> -------------------------------
> 
> You can find information on the method types by searching
> the documentation.  I don't believe there is standard way
> to do this, though.  I'd like to know a general technique
> to detect which method is selected when Method is set to
> Automatic.
> 
> Mark McClure
> 

-- 
Murray Eisenberg                     murray at math.umass.edu
Mathematics & Statistics Dept.
Lederle Graduate Research Tower      phone 413 549-1020 (H)
University of Massachusetts                413 545-2859 (W)
710 North Pleasant Street            fax   413 545-1801
Amherst, MA 01003-9305


  • Prev by Date: Re: Problem with BinCounts
  • Next by Date: Re: Re: question about sorting lists
  • Previous by thread: Re: Method Option
  • Next by thread: Re: Method Option