Wave Propagation in Linear Media | re-examined
Wave Propagation in Linear Media | re-examined
Wave Propagation in Linear Media | re-examined
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
6.2 Choos<strong>in</strong>g the rst partition po<strong>in</strong>t<br />
6Towards a quadratu<strong>re</strong> rout<strong>in</strong>e<br />
When us<strong>in</strong>g an extrapolation method to determ<strong>in</strong>e the value of an <strong>in</strong>tegral, we face the<br />
problem that we must conclude from a nite sequence of partial sums to its limit. While it<br />
is normally easy to judge the existence of an <strong>in</strong>de nite <strong>in</strong>tegral, it takes some considerations<br />
to nd the right start<strong>in</strong>g po<strong>in</strong>t for the sequence be<strong>in</strong>g subject to the extrapolation algorithm.<br />
If the choice was wrong, the algorithm may <strong>in</strong> some cases <strong>re</strong>turn a warn<strong>in</strong>g message if it<br />
encounters convergence problems. However, the check<strong>in</strong>g capabilities a<strong>re</strong> limited and strongly<br />
data dependent, and most extrapolation algorithms even nd nite <strong>re</strong>sults for divergent series.<br />
Hence the <strong>re</strong>sponsibility to be ca<strong>re</strong>ful always <strong>re</strong>sts with the user.<br />
To illustrate the possible di culties, we <strong>re</strong>gard a simple example. Consider the <strong>in</strong>tegral<br />
I =<br />
Z 1<br />
a<br />
1<br />
x +1 s<strong>in</strong> (x , xm) 2 dx : (6.8)<br />
We want toevaluate it through extrapolation and choose the partition po<strong>in</strong>ts to be the zeros<br />
of the s<strong>in</strong>-function. For the sake of simplicity, we assume that the lower <strong>in</strong>tegration limit a<br />
be the smallest positive zero. As we need the sequence of partial sums, we must de ne a<br />
function that <strong>re</strong>turns all zeros of the <strong>in</strong>tegrand <strong>in</strong> ascend<strong>in</strong>g order, start<strong>in</strong>g with <strong>in</strong>dex 0. To<br />
that end, it is essential to dist<strong>in</strong>guish the two branches of the parabolic argument (x,xm) 2 .<br />
It is easy to see that the<strong>re</strong> a<strong>re</strong> o = bxm 2 = c zeros between the lower limit of <strong>in</strong>tegration and<br />
the m<strong>in</strong>imum of the argument function at x = xm, so this value can be used as an <strong>in</strong>dex o set<br />
for the calculation of the zeros.<br />
In Mathematica notation, the <strong>in</strong>tegrand and the function <strong>re</strong>turn<strong>in</strong>g the k-th positive zero<br />
xk a<strong>re</strong> given below. The position of the ext<strong>re</strong>mum xm and the <strong>in</strong>dex o set o a<strong>re</strong> global<br />
parameters.<br />
In[7]:= f[x_] := 1/(x+1) S<strong>in</strong>[(x-xm)^2];<br />
zero[k_] := If[k >= o, xm + Sqrt[(k-o) Pi],<br />
xm - Sqrt[(o-k) Pi]];<br />
Now we calculate the rst 100 elements of the sequence of partial sums with the zeros used<br />
as subdivision po<strong>in</strong>ts.<br />
In[8]:= xm = 15;<br />
o = N[Floor[xm^2/Pi]];<br />
zmax = 100;<br />
sequ = Table[NIntegrate[f[x],fx,zero[i],zero[i+1]g,<br />
Method->GaussKronrod],fi,0,zmaxg];<br />
partial = FoldList[Plus,0,sequ];<br />
ListPlot[partial,PlotStyle->fPo<strong>in</strong>tSize[0.006]g];<br />
138