MathGroup Archive 2007

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

Search the Archive

Re: NIntegrate and the number of grid points used

  • To: mathgroup at smc.vnet.net
  • Subject: [mg72789] Re: [mg72779] NIntegrate and the number of grid points used
  • From: Bob Hanlon <hanlonr at cox.net>
  • Date: Sat, 20 Jan 2007 02:32:28 -0500 (EST)
  • Reply-to: hanlonr at cox.net

NIntegrate has the option EvaluationMonitor

f[x_]:=Exp[x]*Sin[5x/2];

pts={};NIntegrate[f[x],{x,0,Pi},EvaluationMonitor:>AppendTo[pts, x]]

3.53665

Length[pts]

55

Plot[f[x],{x,0,Pi},
    Epilog->{Red,Line[{{#,0},{#,f[#]}}]&/@pts},PlotRange->All,ImageSize->500];


Bob Hanlon

---- Thomas Schmelzer <thomas.??? at balliol.ox.ac.uk> wrote: 
> Hoi zame,
> 
> I am using NIntegrate to run a few experiments. I wonder whether there is a 
> possibility to get access to the number of points used by Mathematica? That 
> would be helpful.
> 
> Thomas


  • Prev by Date: Re: A Series test
  • Next by Date: Re: normalize a table
  • Previous by thread: NIntegrate and the number of grid points used
  • Next by thread: Re: NIntegrate and the number of grid points used