27.12.2012 Views

Wave Propagation in Linear Media | re-examined

Wave Propagation in Linear Media | re-examined

Wave Propagation in Linear Media | re-examined

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

7 Mathematica implementation of a quadratu<strong>re</strong> function<br />

f<strong>in</strong>t is the <strong>in</strong>tegrand function (x) u( (x)), which can be de ned <strong>in</strong> two ways. One is<br />

s<strong>in</strong> x<br />

to use a so-called pu<strong>re</strong> function, e. g. S<strong>in</strong>[#]/#& for x (see also the open<strong>in</strong>g <strong>re</strong>mark<br />

<strong>in</strong> section 7.5). If the <strong>in</strong>tegrand is decla<strong>re</strong>d explicitly, then it must be of the form f[x]<br />

or, if the<strong>re</strong> a<strong>re</strong> several other parameters, f[a,b,c][x]. In this case, only the name of<br />

the function together with the additional parameters (f[a,b,c]) has to be passed to<br />

OscInt.<br />

fzero is the function be<strong>in</strong>g used to determ<strong>in</strong>e the partition po<strong>in</strong>ts fx0;x1;x2;:::g. Depend<strong>in</strong>g<br />

on the option FunctionType it is understood either as an explicit enumeration<br />

of the partition po<strong>in</strong>ts x (n); n 0 or as the argument function (x) (or an approximation<br />

(x)) of the oscillat<strong>in</strong>g factor of the <strong>in</strong>tegrand, which is then used to compute<br />

the subdivision po<strong>in</strong>ts xn numerically. In the latter case, the function must be di e<strong>re</strong>ntiable.<br />

In the former case, it is the user's <strong>re</strong>sponsibility to ensu<strong>re</strong> that fzero <strong>re</strong>turns<br />

po<strong>in</strong>ts <strong>in</strong> ascend<strong>in</strong>g order that lie exclusively to the right of the rightmost ext<strong>re</strong>mum or<br />

<strong>in</strong> exion po<strong>in</strong>t of the argument function. It is, however, not necessary to see to it that<br />

x (0) > a, as the rout<strong>in</strong>e will seek the rst x (k) > a itself. Like f<strong>in</strong>t, the function<br />

fzero can be given either as a pu<strong>re</strong> function or <strong>in</strong> explicit notation.<br />

a is the lower <strong>in</strong>tegration limit.<br />

opts a<strong>re</strong> options the user can set to take <strong>in</strong> uence on the computation. They a<strong>re</strong><br />

expla<strong>in</strong>ed below.<br />

Normally, the partition po<strong>in</strong>ts a<strong>re</strong> chosen such that they lie <strong>in</strong> a <strong>re</strong>gion whe<strong>re</strong> (x) and its<br />

derivative 0 (x) a<strong>re</strong> monotonic, <strong>in</strong> order to avoid the problems discussed <strong>in</strong> section 6.2. If an<br />

enumeration function is passed to OscInt, this function must be written accord<strong>in</strong>gly. If the<br />

orig<strong>in</strong>al (x) is used as fzero, then z0 is selected to be larger than the largest <strong>re</strong>al part of the<br />

solutions of 0 (x) =0. In some cases, however, it might be mo<strong>re</strong> convenient tochoose the rst<br />

subdivision po<strong>in</strong>t accord<strong>in</strong>g to a di e<strong>re</strong>nt criterion | particularly if we use an approximation<br />

(x). Thus the<strong>re</strong> is a second way to <strong>in</strong>voke OscInt with an explicit speci cation of a lower<br />

subdivision limit a0:<br />

OscInt[f<strong>in</strong>t, fzero, fa, a0g, opts].<br />

Apart from the new parameter, the mean<strong>in</strong>gs of the other <strong>in</strong>put values <strong>re</strong>ma<strong>in</strong> unchanged.<br />

The partition po<strong>in</strong>ts a<strong>re</strong> now chosen such that x (k) >a0; k K(a0), or x0 >a0, depend<strong>in</strong>g<br />

on the <strong>in</strong>terp<strong>re</strong>tation of fzero.<br />

The<strong>re</strong> is a variety of options <strong>in</strong>dispensable to control the evaluation of OscInt. Some of them<br />

a<strong>re</strong> standard Mathematica options that a<strong>re</strong> used also for other numerical functions, others<br />

have been newly <strong>in</strong>troduced.<br />

WynnDeg<strong>re</strong>e is the standard option for the computation of the limit of the sequence of<br />

partial sums. Its default value is Inf<strong>in</strong>ity.<br />

162

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!