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.
6Towards a quadratu<strong>re</strong> rout<strong>in</strong>e<br />
the best <strong>re</strong>sults that a<strong>re</strong> <strong>in</strong> uenced chie y by the implementation details and the associated<br />
numerical e ects. This <strong>re</strong>gion is characterised by extrapolation errors that a<strong>re</strong> constant for<br />
ne + ns = const and thus depend on the total number of sequence terms <strong>re</strong>gardless of how<br />
many a<strong>re</strong> actually used for extrapolation.<br />
The contour plot ( g. 6.6) also shows that it is di cult to decide whe<strong>re</strong> to beg<strong>in</strong> the extrapolation<br />
if not too many terms a<strong>re</strong> to be used. For 40 terms, for example, the optimum lies<br />
somewhe<strong>re</strong> at ne = 15, ns = 25.<br />
The <strong>re</strong>sults we obta<strong>in</strong> when choos<strong>in</strong>g the -algorithm with WynnDeg<strong>re</strong>e->2 a<strong>re</strong> shown <strong>in</strong><br />
g. 6.7. The <strong>in</strong>convenient peaks have disappea<strong>re</strong>d (which is the same for all even values of<br />
WynnDeg<strong>re</strong>e, but not for the odd ones), yet it is hard to nd optimum values for ne and ns.<br />
The sett<strong>in</strong>g WynnDeg<strong>re</strong>e->Inf<strong>in</strong>ity yields the best extrapolation <strong>re</strong>sults ( g. 6.8). It is still<br />
true that the<strong>re</strong> a<strong>re</strong> pairs of sequences that give the same estimates for the limit S e(2m+1) n and<br />
eS (2m+2)<br />
n+1 , <strong>re</strong>spectively, which can be seen from the bands runn<strong>in</strong>g <strong>in</strong> parallel to the ns-axis.<br />
The <strong>re</strong>spective contour plot (6.9) shows that the best way to improve the extrapolation <strong>re</strong>sult<br />
is to <strong>in</strong>c<strong>re</strong>ase ne, perhaps with a few terms summed up explicitly. We have thus con rmed<br />
the suspicion that the limit<strong>in</strong>g process 1 from the last section is <strong>in</strong>deed superior.<br />
For comparison we compute the extrapolation error if we do not use approximate partition,<br />
but take the zeros of the <strong>in</strong>tegrand as partition po<strong>in</strong>ts. Just the determ<strong>in</strong>ation of the partial<br />
<strong>in</strong>tegrals is di e<strong>re</strong>nt. The <strong>re</strong>st of the evaluation <strong>re</strong>ma<strong>in</strong>s the same as with the asymptotic<br />
partition befo<strong>re</strong>.<br />
In[25]:= a = 20 Pi;<br />
firstval = N[Integrate[S<strong>in</strong>[Sqrt[x^2 - a^2]]/(x^2 - a^2) x,<br />
fx,a,Sqrt[Pi^2+a^2]g],40];<br />
seq = Table[NIntegrate[S<strong>in</strong>[Sqrt[x^2 - a^2]]/(x^2 - a^2) x,<br />
fx,Sqrt[(i Pi)^2+a^2],Sqrt[((i+1) Pi)^2+a^2]g],<br />
fi,1,300g];<br />
We nd that the <strong>re</strong>sults a<strong>re</strong> far better and practically <strong>in</strong>dependent of the value we choose for<br />
WynnDeg<strong>re</strong>e.<br />
We thus conclude that when implement<strong>in</strong>g an automatic quadratu<strong>re</strong> rout<strong>in</strong>e with Mathematica,<br />
we ought to consider the follow<strong>in</strong>g po<strong>in</strong>ts:<br />
The sett<strong>in</strong>g WynnDeg<strong>re</strong>e->Inf<strong>in</strong>ity gives the best <strong>re</strong>sults for asymptotic partition and<br />
<strong>re</strong>asonably good ones for standard (zero) partition, so it is a suitable choice for a default<br />
value of this option.<br />
To <strong>in</strong>c<strong>re</strong>ase the accuracy of the extrapolation <strong>re</strong>sult, the number of terms <strong>in</strong>cluded <strong>in</strong><br />
the extrapolation (NSumExtraTerms) should be <strong>in</strong>c<strong>re</strong>ased, whe<strong>re</strong>as NSumTerms may be<br />
left unchanged.<br />
Whenever feasible, the zeros of the <strong>in</strong>tegrand should be chosen as the partition po<strong>in</strong>ts.<br />
This yields mo<strong>re</strong> accurate <strong>re</strong>sults with fewer terms <strong>in</strong>volved.<br />
152