MathGroup Archive 2006

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

Search the Archive

sampled points by Method->Oscillatory

  • To: mathgroup at smc.vnet.net
  • Subject: [mg69450] sampled points by Method->Oscillatory
  • From: dimmechan at yahoo.com
  • Date: Wed, 13 Sep 2006 04:01:15 -0400 (EDT)

Dear all,

(I have converted everything to InputForm)

Clear["Global`*"]
$Version
"5.2 for Microsoft Windows (June 20, 2005)"

***Let me consider the following code:

sampledPoints={};
g[x_?NumberQ]:=(AppendTo[sampledPoints,x];1/x)

***The function g is just 1/x, except it keeps track of the points at
which is evaluated, in a list called sampledPoints (see also
http://groups.google.com/group/comp.soft-sys.math.mathematica/browse_thread/thread/11d40e17edbea9e9/b223cb3882539ac8?lnk=st&q=NIntegrate+SingularityDepth&rnum=3#b223cb3882539ac8).

***The function g[x]*Sin[x]=Sin[x]/x is a oscillatory function very
slowly convergent to zero as it can be seen from the following plot

Plot[g[x]*Sin[x],{x,0,30},PlotPoints->1000,PlotRange->{Automatic,{-0.3,1.1}}];

***Analytically the integral of g[x]*Sin[x] over the range
{x,0,Infinity} is equal to:

Integrate[f[x],{x,0,8}]//Timing
{0.04699999999999971*Second, Pi/2}
N[%[[2]]]
1.5707963267948966

***To get an approximation for this integral the option
Method->Oscillatory is used.

NIntegrate[g[x]*Sin[x],{x,0,8},Method->Oscillatory]
1.5707963267948966

***Can someone explain me what is the concluding remarks from the
following plots?

Length[sampledPoints]
3784

ListPlot[sampledPoints];
ListPlot[Take[sampledPoints,100]];
ListPlot[Take[sampledPoints,{100,2000}]];
ListPlot[Take[sampledPoints,{1500,3000}]];

***I have some ideas but I am a little in a mesh to put them in a row.
***I believe that the first ~30 points (0<x<3Pi) are the sampling
points not used in acceleration algorithm. Am I right?
***There is also an apparent periodicity. What does this mean?
***What happen near the point numbered 1700?


Thanks in advance for any assistance.

Dimitris Anagnostou


  • Prev by Date: Re: Evaluating a Meijer G-function
  • Next by Date: Re: Locating common subexpressions
  • Previous by thread: oscillatory integrals
  • Next by thread: HELP!ListDensityPlot rectangular matrix