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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

7.3.4 PartitionPo<strong>in</strong>ts<br />

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

This function <strong>re</strong>turns a list of subdivision po<strong>in</strong>ts <strong>in</strong> ascend<strong>in</strong>g order. The way to call it is<br />

PartitionPo<strong>in</strong>ts[zerof, a, n, offs, i<strong>re</strong>l, opts],<br />

zerof be<strong>in</strong>g the well-known function (x) orx (n). The argument a denotes the lower bound<br />

of the sequence, n is the desi<strong>re</strong>d number of po<strong>in</strong>ts. The variable offs is the o set o obta<strong>in</strong>ed<br />

from PartitionOffs. This function could have been merged <strong>in</strong>to PartitionPo<strong>in</strong>ts (and <strong>in</strong><br />

fact had been <strong>in</strong> a former version of PartitionTable), but as for <strong>in</strong>stance OscIntControlled<br />

makes multiple calls to PartitionPo<strong>in</strong>ts to gradually build up the table of subdivision po<strong>in</strong>ts,<br />

is was deemed mo<strong>re</strong> e cient to split these two functional blocks. The parameter i<strong>re</strong>l denotes<br />

the <strong>in</strong>dex r 0 of the rst po<strong>in</strong>t and can be used to compute subdivision tables <strong>in</strong> two or<br />

mo<strong>re</strong> portions.<br />

Like PartitionOffs, this function also behaves di e<strong>re</strong>ntly for di e<strong>re</strong>nt values of the option<br />

FunctionType. The simplest case is when zerof <strong>re</strong>turns the partition po<strong>in</strong>ts themselves<br />

(FunctionType->ZeroList). Then we just need to build up the table fx (r);x (r+<br />

1);::: ;x (r+n,1)g.<br />

Th<strong>in</strong>gs a<strong>re</strong> mo<strong>re</strong> complicated when (x) is given di<strong>re</strong>ctly (FunctionType->S<strong>in</strong>Argument or<br />

CosArgument). Then the evaluation depends on the behaviour of (x) at x ! 1. If the<br />

limit is de nite, then the <strong>in</strong>tegrand is not <strong>in</strong> nitely oscillat<strong>in</strong>g, and a partition extrapolation<br />

quadratu<strong>re</strong> is not applicable at all. In this case, we <strong>re</strong>turn Inf<strong>in</strong>ity so that the rst partial<br />

<strong>in</strong>tegral al<strong>re</strong>ady covers the enti<strong>re</strong> range. For an <strong>in</strong>de nite limit, we must dist<strong>in</strong>guish between<br />

<strong>in</strong>c<strong>re</strong>as<strong>in</strong>g and dec<strong>re</strong>as<strong>in</strong>g functions and nally obta<strong>in</strong> the partition po<strong>in</strong>t from the follow<strong>in</strong>g<br />

equations:<br />

zi :<br />

8<br />

><<br />

>:<br />

xi = 1 if ,1Inf<strong>in</strong>ity]]],<br />

Table[Inf<strong>in</strong>ity,fk,0,n-1g],<br />

N[zerof'[offs+1]] > 0,<br />

koffs = N[Ceil<strong>in</strong>g[zerof[offs]/Pi],2 wp];<br />

Re[Table[x/.F<strong>in</strong>dRoot[zerof[x] == (k+koffs+cfoffs) Pi,<br />

fx,offs,offs+1g],<br />

fk,i<strong>re</strong>l,i<strong>re</strong>l+n-1g]],<br />

True,<br />

170<br />

(7.2)

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

Saved successfully!

Ooh no, something went wrong!