Wave Propagation in Linear Media | re-examined
Wave Propagation in Linear Media | re-examined
Wave Propagation in Linear Media | re-examined
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
6.5 Considerations for a Mathematica implementation<br />
polynomial approximation causes the sequence of partial sums to take on the form of dist<strong>in</strong>ct<br />
`wave packets' <strong>in</strong> the rhythm of the beat f<strong>re</strong>quency @ ,<br />
@x (x) , (x) . A <strong>re</strong>asonable criterion<br />
could thus be to seek the abscissa value whe<strong>re</strong> such awavepacket comprises a given number<br />
of k elements, that is<br />
0 (x)<br />
0 (x) , 0 (x) = k: (6.13)<br />
The<strong>re</strong> is, unfortunately, no general guidel<strong>in</strong>e how to choose k | the larger it is, the better<br />
the <strong>re</strong>sult will be.<br />
6.5 Considerations for a Mathematica implementation<br />
Let us now put the considerations of the last section <strong>in</strong>to a context that is closer to an<br />
implementation <strong>in</strong> Mathematica. To evaluate an <strong>in</strong> nite sum by means of extrapolation,<br />
we normally use the built-<strong>in</strong> function NSum with the option Method->SequenceLimit. This<br />
function <strong>in</strong>ternally performs exactly the same operations as we did <strong>in</strong> the example above |<br />
rst it computes a sequence of partial sums and then it passes an appropriate portion of this<br />
list to the function SequenceLimit for extrapolation. The selection of this sublist is controlled<br />
by the two parameters NSumTerms and NSumExtraTerms, <strong>re</strong>spectively. The extrapolation<br />
process itself may be <strong>in</strong> uenced by the option WynnDeg<strong>re</strong>e.<br />
NSumTerms is the number n of terms that a<strong>re</strong> summed up explicitly befo<strong>re</strong> the extrapolation<br />
is performed.<br />
NSumExtraTerms is the number k of terms that a<strong>re</strong> used <strong>in</strong> the extrapolation.<br />
WynnDeg<strong>re</strong>e sets someth<strong>in</strong>g like the `deg<strong>re</strong>es of f<strong>re</strong>edom' for the extrapolation [144]. It is<br />
also the only option to SequenceLimit. If its value is 1, Aitken's 2 algorithm is used,<br />
for values g<strong>re</strong>ater than one the -algorithm is <strong>in</strong>voked. Apart from this dist<strong>in</strong>ction, the<br />
actual function of this parameter is not documented further, but it seem<strong>in</strong>gly speci es<br />
how far the -array ( g. 5.1) is computed.<br />
Remark (Sequence extrapolation) Accord<strong>in</strong>g to Keiper [144], the basic algorithm of<br />
SequenceLimit transforms the sequence <strong>in</strong>to a sequence of length n,2. In the triangular<br />
scheme that is often used to illustrate the data dependencies of the -algorithm, this is<br />
equivalent to the computation of the two columns to the right of the start<strong>in</strong>g sequence.<br />
As we have seen <strong>in</strong> section 5.2, the very rst execution of this algorithm yields the same<br />
<strong>re</strong>sult as the 2 algorithm. The basic transformation is <strong>re</strong>peated WynnDeg<strong>re</strong>e times. If<br />
the <strong>re</strong>sult<strong>in</strong>g sequence still has mo<strong>re</strong> than two elements, the whole process starts aga<strong>in</strong><br />
until the outcome is too short or | <strong>in</strong> terms of the -array |until the triangle is completed.<br />
One could suspect that if the -array iscompleted anyhow, the <strong>re</strong>sult ought to<br />
be <strong>in</strong>dependent of the parameter WynnDeg<strong>re</strong>e, but this is not true. The di e<strong>re</strong>nce is that<br />
the column to the left of the start<strong>in</strong>g sequence always consists of zeros, so for each time<br />
the algorithm is <strong>re</strong>started <strong>in</strong> the middle of the -array, the <strong>re</strong>spective column to the left<br />
of the p<strong>re</strong>vious <strong>re</strong>sult is <strong>re</strong>placed with zeros, which naturally a ects the nal outcome.<br />
149