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.

5 Numerical quadratu<strong>re</strong> and extrapolation<br />

Search<strong>in</strong>g these <strong>in</strong>dices, one nds essentially th<strong>re</strong>e di e<strong>re</strong>nt quadratu<strong>re</strong> rout<strong>in</strong>es, all written<br />

<strong>in</strong> FORTRAN:<br />

OSCINT is part of the sublibrary Toms (toms/639) <strong>in</strong> Netlib and was written by<br />

Lyness and H<strong>in</strong>es [122]. It is aimed at <strong>in</strong>tegrands that may be separated <strong>in</strong>to an oscillat<strong>in</strong>g<br />

factor with an at least asymptotically constant period (i. e. circular or Bessel<br />

functions) and an ultimately positive factor. The user has to specify the function to<br />

be <strong>in</strong>tegrated, its (ultimate) period, and a start<strong>in</strong>g po<strong>in</strong>t from which onwards the extrapolation<br />

is performed. The algorithm then carries out a sequence of nite <strong>in</strong>terval<br />

quadratu<strong>re</strong>s, each over an <strong>in</strong>tegral hav<strong>in</strong>g the length of a half period, and accelerates<br />

the <strong>re</strong>sult<strong>in</strong>g sequence of partial sums by means of the Euler transformation [113]. By<br />

default the quadratu<strong>re</strong> is performed us<strong>in</strong>g the trapezoidal rule with a number of sampl<strong>in</strong>g<br />

po<strong>in</strong>ts given by the user. The quadratu<strong>re</strong> error is not controlled, and the user<br />

may as well <strong>re</strong>place the trapezoidal by a mo<strong>re</strong> sophisticated algorithm. The rout<strong>in</strong>e<br />

uses double p<strong>re</strong>cision arithmetic.<br />

DQAINF by Espelid and Overholt [123] can be found <strong>in</strong> the sublibrary Numeralgo<br />

(numeralgo/na6). They extend the approach of Lyness and H<strong>in</strong>es <strong>in</strong> that the <strong>in</strong>tegrand<br />

may be a l<strong>in</strong>ear comb<strong>in</strong>ation of periodic functions p(x), all with the same (ultimate)<br />

period, thus f(x) = Pk i=1 pi(x)gi(x). The gi(x) a<strong>re</strong> supposed to have similar asymptotic<br />

expansions as x ! 1, gi(x) = x , P1 j=0 c (i)<br />

j =xj , with > 0. The user must specify<br />

basically the period of the functions, the rst subdivision po<strong>in</strong>t, and of course an error<br />

tolerance. Then the algorithm computes <strong>in</strong>tegral approximations over half-period<br />

<strong>in</strong>tervals us<strong>in</strong>g a 21-node Gauss rule and estimates the true <strong>in</strong>tegral value by means<br />

of extrapolation. In addition, the quadratu<strong>re</strong> error <strong>in</strong> the <strong>in</strong>tervals is estimated and<br />

if necessary, the <strong>in</strong>terval is subdivided <strong>in</strong>to th<strong>re</strong>e equal parts. The<strong>re</strong> a<strong>re</strong> both s<strong>in</strong>gle<br />

(SQAINF) and double p<strong>re</strong>cision versions available.<br />

DQAWF is a rout<strong>in</strong>e of the Quadpack package [132], which is <strong>in</strong>cluded <strong>in</strong> many<br />

sublibraries of Netlib (Slatec, Cmlib). This double p<strong>re</strong>cision rout<strong>in</strong>e has also a s<strong>in</strong>gle<br />

p<strong>re</strong>cision counterpart (QAWF) and is designed for calculat<strong>in</strong>g Fourier transforms. Thus<br />

the <strong>in</strong>tegrand needs to be of the form f(x) s<strong>in</strong> !x or f(x) cos !x. With f(x) and ! given<br />

by the user, the algorithm <strong>in</strong>tegrates between the zeros of the oscillat<strong>in</strong>g factor. The<br />

quadratu<strong>re</strong> is based on a Clenshaw-Curtis rule <strong>in</strong> comb<strong>in</strong>ation with a globally adaptive<br />

subdivision strategy, so the<strong>re</strong> is virtually no limitation imposed on the function to<br />

be <strong>in</strong>tegrated. The convergence of the <strong>re</strong>sult<strong>in</strong>g series is then accelerated us<strong>in</strong>g the<br />

-algorithm [113, 133].<br />

Variants of this rout<strong>in</strong>e with slight modi cations may also be found <strong>in</strong> proprietary<br />

libraries. In the NAG library (The Numerical Algorithms Group) it is called D01ASF<br />

[134], <strong>in</strong> the IMSL (International Mathematical and Statistical Libraries) [135] it appears<br />

as DQDAWF.<br />

All these subrout<strong>in</strong>es a<strong>re</strong> best suited to <strong>in</strong>tegrands with a constant period as x !1. If this is<br />

not the case, like for s<strong>in</strong> (f(x)) with f(x) hav<strong>in</strong>g a polynomial part with deg<strong>re</strong>e g<strong>re</strong>ater than<br />

128

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

Saved successfully!

Ooh no, something went wrong!