Series methods for integration

Similar documents
CS 450 Numerical Analysis. Chapter 8: Numerical Integration and Differentiation

Error estimation in the Clenshaw-Curtis quadrature formula

Comparison of Clenshaw-Curtis and Gauss Quadrature

The Not-Formula Book for C2 Everything you need to know for Core 2 that won t be in the formula book Examination Board: AQA

Chapter 6. Algebraic eigenvalue problems Introduction Introduction 113. Das also war des Pudels Kern!

arxiv: v1 [physics.comp-ph] 22 Jul 2010

Ch. 03 Numerical Quadrature. Andrea Mignone Physics Department, University of Torino AA

chapter 12 MORE MATRIX ALGEBRA 12.1 Systems of Linear Equations GOALS

The solution of linear differential equations in Chebyshev series

PHYS-4007/5007: Computational Physics Course Lecture Notes Appendix G

Pascal s Triangle on a Budget. Accuracy, Precision and Efficiency in Sparse Grids

Infinite series, improper integrals, and Taylor series

A Method for Reducing Ill-Conditioning of Polynomial Root Finding Using a Change of Basis

d 1 µ 2 Θ = 0. (4.1) consider first the case of m = 0 where there is no azimuthal dependence on the angle φ.

Mathematics for Chemists

Scientific Computing

Numerical Analysis Exam with Solutions

Lectures 9-10: Polynomial and piecewise polynomial interpolation

Numerical integration and differentiation. Unit IV. Numerical Integration and Differentiation. Plan of attack. Numerical integration.

ƒ f(x)dx ~ X) ^i,nf(%i,n) -1 *=1 are the zeros of P«(#) and where the num

Integration, differentiation, and root finding. Phys 420/580 Lecture 7

Numerical Methods. King Saud University

UNIVERSITY OF CAMBRIDGE

Taylor series. Chapter Introduction From geometric series to Taylor polynomials

Exact and Approximate Numbers:

Math 1B, lecture 15: Taylor Series

Iterative solvers for linear equations

Integration. Topic: Trapezoidal Rule. Major: General Engineering. Author: Autar Kaw, Charlie Barker.

LECTURE NOTES ELEMENTARY NUMERICAL METHODS. Eusebius Doedel

Numerical Integration (Quadrature) Another application for our interpolation tools!

Practical Algebra. A Step-by-step Approach. Brought to you by Softmath, producers of Algebrator Software

Part II NUMERICAL MATHEMATICS

5.8 Chebyshev Approximation

DOCTORAL THESIS Extended Abstract

ON SOME QUESTIONS ARISING IN THE APPROXIMATE SOLUTION OF NONLINEAR DIFFERENTIAL EQUATIONS*

Linear algebra for MATH2601: Theory

Slow Growth for Gauss Legendre Sparse Grids

Two hours. To be provided by Examinations Office: Mathematical Formula Tables. THE UNIVERSITY OF MANCHESTER. 29 May :45 11:45

Scientific Computing: An Introductory Survey

FACTORIZATION AND THE PRIMES

SCHOOL OF MATHEMATICS MATHEMATICS FOR PART I ENGINEERING. Self-paced Course

Preface. Figures Figures appearing in the text were prepared using MATLAB R. For product information, please contact:

COURSE Numerical integration of functions (continuation) 3.3. The Romberg s iterative generation method

Section 6.6 Gaussian Quadrature

ESCONDIDO UNION HIGH SCHOOL DISTRICT COURSE OF STUDY OUTLINE AND INSTRUCTIONAL OBJECTIVES

The method of lines (MOL) for the diffusion equation

Queens College, CUNY, Department of Computer Science Numerical Methods CSCI 361 / 761 Spring 2018 Instructor: Dr. Sateesh Mane.

Physics 115/242 Romberg Integration

Stochastic Processes

Compute the behavior of reality even if it is impossible to observe the processes (for example a black hole in astrophysics).

MATHEMATICAL FORMULAS AND INTEGRALS

MATHEMATICAL FORMULAS AND INTEGRALS

INFINITE SEQUENCES AND SERIES

Number Systems III MA1S1. Tristan McLoughlin. December 4, 2013

The iterated sinh transformation

Algebra 2 Secondary Mathematics Instructional Guide

CHAPTER 4. Interpolation

Howard Mark and Jerome Workman Jr.

C. Complex Numbers. 1. Complex arithmetic.

(f(x) P 3 (x)) dx. (a) The Lagrange formula for the error is given by

The Use of Large Intervals in Finite- Difference Equations

2012 Assessment Report. Mathematics with Calculus Level 3 Statistics and Modelling Level 3

2012 Specialist Mathematics GA 3: Written examination 2

Inequalities for the perimeter of an ellipse. G.J.O. Jameson, Math. Gazette 98 (2014)

Numerical Analysis Preliminary Exam 10 am to 1 pm, August 20, 2018

NUMERICAL METHODS. x n+1 = 2x n x 2 n. In particular: which of them gives faster convergence, and why? [Work to four decimal places.

6 Lecture 6b: the Euler Maclaurin formula

Math 365 Homework 5 Due April 6, 2018 Grady Wright

Outline. 1 Numerical Integration. 2 Numerical Differentiation. 3 Richardson Extrapolation

Module 10: Finite Difference Methods for Boundary Value Problems Lecture 42: Special Boundary Value Problems. The Lecture Contains:

4. List of program goals/learning outcomes to be met. Goal-1: Students will have the ability to analyze and graph polynomial functions.

Numerical differentiation

Lecture 4: Numerical solution of ordinary differential equations

INTERPOLATION. and y i = cos x i, i = 0, 1, 2 This gives us the three points. Now find a quadratic polynomial. p(x) = a 0 + a 1 x + a 2 x 2.

Fourier Theory on the Complex Plane II Weak Convergence, Classification and Factorization of Singularities

1 Numbers. exponential functions, such as x 7! a x ; where a; x 2 R; trigonometric functions, such as x 7! sin x; where x 2 R; ffiffi x ; where x 0:

CHAPTER 10: Numerical Methods for DAEs

Unit 2: Solving Scalar Equations. Notes prepared by: Amos Ron, Yunpeng Li, Mark Cowlishaw, Steve Wright Instructor: Steve Wright

2016 VCE Specialist Mathematics 2 examination report

4.1 Classical Formulas for Equally Spaced Abscissas. 124 Chapter 4. Integration of Functions

CS 542G: Robustifying Newton, Constraints, Nonlinear Least Squares

Guide for Ph.D. Area Examination in Applied Mathematics

Contents. I Basic Methods 13

A Chebyshev Polynomial Rate-of-Convergence Theorem for Stieltjes Functions

Damped harmonic motion

Linear Multistep Methods I: Adams and BDF Methods

13 Definite integrals

8.5 Taylor Polynomials and Taylor Series

Time: 1 hour 30 minutes

MAT 460: Numerical Analysis I. James V. Lambers

Coordinate systems and vectors in three spatial dimensions

Infinite Series. 1 Introduction. 2 General discussion on convergence

COMPUTATIONAL METHODS AND ALGORITHMS Vol. I - Numerical Analysis and Methods for Ordinary Differential Equations - N.N. Kalitkin, S.S.

Stability of Feedback Control Systems: Absolute and Relative

6.3 METHODS FOR ADVANCED MATHEMATICS, C3 (4753) A2

Time: 1 hour 30 minutes

Iterative Methods for Solving A x = b

NUMERICAL COMPUTATION IN SCIENCE AND ENGINEERING

PURE MATHEMATICS AM 27

Lecture 1 - Vectors. A Puzzle... Introduction. Vectors: The quest begins! TA s Information. Vectors

Transcription:

By K. Wright* Some methods of integration using Chebyshev and Legendre polynomial series are compared, mainly from an empirical point of view. The evaluation of both definite and indefinite integrals is considered, and also the advisability of dividing a range of integration using separate series in each part instead of covering the whole range with one series. 1. Introduction Clenshaw and Curtis (196) suggested a method of finding both the definite and indefinite integrals of a function by expanding the integrand as a Chebyshev series and integrating it. The main idea is that the size of the series coefficients gives a convenient estimate of the accuracy obtained and this allows further action to be taken automatically. Since then, various alterations and modifications to this scheme have been put forward. Here it is hoped to make a critical assessment of these possibilities, along with some further slight variations, mainly from an empirical point of view though some theoretical work is also considered. Examples are given which illustrate the properties of the method and which either verify or show some limitations to the theoretical work. Naturally the conclusions are not very clear-cut, but certain general properties are discernible and some doubts are raised about the validity of previous views. 2. Methods considered All the methods considered here can be put in the following general form: for the integral ff(x)dx or \f{x)dx (i) suppose {<,(*)} is a complete set of functions on (a, by, (ii) obtain an approximation to the integrand in the form o n-l by making 2 a, ;) =/(*;) o at n points x h (iii) integrate this interpolating function. The method is characterized by (a) the choice of the functions {<j> r (x)}, (b) the choice of the points {*,}. Here <f> r (x) is taken as some polynomial of degree r and consequently the values of the integral only depend on the choice of {*,}, at least apart from rounding effects. The series coefficients will naturally still depend on the <f> r (x) and they can be used to estimate the accuracy. The range of integration will be taken as ( 1,1) for convenience since this does not cause any restrictions as long as a and b are finite. Certain sets of points are particularly convenient since corresponding sets of polynomials exist satisfying orthogonal summation relations over them, and this enables the series coefficients to be determined very simply. For the Chebyshev polynomials T n (x) there are two sets of n points with this property: the zeros of T n {x) X-, = cos (2/ + l)7r/«, j =,... n 1, and the maxima and minima of T n _ x (x) with the end points x, = cosjir/in - 1), j =,... n - 1. Elliott (1965) considers both these sets of points for interpolation and integration. He calls the first set the "classical" points, as they correspond to a general property of orthogonal polynomials. The other points Elliott calls the "practical" set, and these are the points that Clenshaw and Curtis use. They have the useful property that the points for m 2n 1 contain those for n. Both sets of points were used by Lanczos (1938, 1957). It is clearly not necessary to restrict this method to Chebyshev series, for other sets of orthogonal polynomials satisfy orthogonality relations over their zeros. An obvious choice is to use Legendre polynomials then for the definite integral the method reduces to the Gauss formula. It suffers from the defect that the points are no longer simple cosines, but these numbers can be stored if necessary. Since the Gauss-Legendre method does not seem to have been given explicitly before, we state it here. Suppose the Gauss points and weights of order n are {Xj} and {w,}. Then the approximation to f(x) is f{x) ~ S a r P r (x) where a r = (r (1) This assumes the usual normalization of the Legendre polynomial so that P r (l)=l- The series is then integrated using P,(x)dx = {P r+,(x) - P r _ 1). (2) Filippi (1964) suggests a slightly different idea which obtains the indefinite integral as a Chebyshev series, but University of Newcastle upon Tyne Computing Laboratory, 1 Kensington Terrace, Newcastle upon Tyne 2. 191

this time by expanding the integrand in terms of the derivatives of Chebyshev polynomial T' n (x), which consequently eliminates the integration step. He uses points similar to the "practical" ones but not including the end points. That is x } = cosjir/(n -f l),j = 1,... n. There is an orthogonality relation which makes these points also convenient, and they have a property similar to the practical points that the points for m = In + 1 contain those for n. These are the four methods considered here. The advantage of using a Chebyshev expansion is that the corresponding series is usually rapidly convergent. The choice of Legendre polynomials seems reasonable on account of their connection with Gauss quadrature. The naive justification of the choice of Chebyshev zeros is that the error has a factor I1(JC jc y ) = KT n {x\ and this factor has smallest maximum modulus for this choice of points. The usual method of use of these formulae is to increase the number of points until sufficient accuracy is obtained. This is clearly particularly convenient if function values already found can be used again, but even so it is not obviously the best strategy. Hence the possibility of splitting the range using two or even more series is considered, as well as the straightforward use. This corresponds to the normal use of finite-difference type methods, and clearly needs consideration. These methods, unlike high-order Newton-Cotes formulae, are convergent as the number of points increases for any continuous function. All the weights effectively used by the methods for definite integrals can be shown to be positive, and so using a theorem in Krylov (1962) p. 265 the methods are convergent. Consider now what is required of a method of integration. It should be efficient in some sense giving high accuracy for little work. To make this more precise we find two separate problems: for the definite integral we want to minimize the error in just one value; for the indefinite integral we want to minimize the largest error in the range considered. These are clearly not the same problem and it would be surprising if they had the same answer. Even the separate problems as stated do not obviously have a solution, since they may depend on the nature of the integral as well as the method of integration. However, it may still be possible to choose a set of points which though not always optimum are generally better than others in some way. For the definite integral we have the precise result that the Gauss points give an integral value exact for as high a degree polynomial as possible, and this leads to the conclusion that the Gauss formula will generally be better for smooth functions, though not being exact for every function of this type it cannot be the optimum choice for every function. Another separate important point needing consideration is the practical usefulness of possible error estimates, either if one wants to know the accuracy obtained by a particular formula or wants to make it the basis of an automatic integration procedure. 192 3. Error estimates using series Classical error estimates using derivatives can be used with series formulae, but they are not of great practical value since the derivatives are not usually available. Similarly, newer methods such as that given by Davis and Rabinowitz (1954), though more convenient, still involve additional knowledge of the integral, such as some norm, which may be difficult to estimate accurately. The series methods, on the other hand, give a very simple means of estimating the error, but as compensation they are more difficult to justify rigorously. Though the methods require the consideration only of a finite series approximating the integral it is often convenient to compare this with the corresponding infinite series expansion. They should differ little if the series is rapidly convergent, and then the next term in the series will form the dominant term in the error. As this is not known the last term found can be used instead, and this would normally be expected to be larger than the error. It is probably safest, as Clenshaw and Curtis suggest, to take the largest of the last two or three terms in the integrated series as an estimate, in the hope that this procedure will take care of any spuriously small coefficients caused, for example, by the function being odd or even. This estimate can be applied to both the definite and indefinite integrals. For the Gauss-Legendre method definite integral the error is considerably smaller than would be predicted by this estimate. Suppose the infinite series expansion of the integral is fix) = 2 A r PAx) and the corresponding coefficients obtained by collocation are {a r }, r =... n 1. Then the definite integral is just 2A since J_P r (x) =, r #, so the error is E = 2(A a ). Now using (1) a = i S w,f(x,) = * 2 w, 2 1=1 (=1 r= Changing the order of summation gives r= 1=1.1 but 2 w,pax,) = \ PAx)dx if r < : i=l J-l = if < r < In. For other r and if r is odd /) = since PA X ) function. So a - A o = i 2 A lr 2 w,p 2 Ax,) 1S an

Table 1 Series coefficients of indefinite integral I (t + 3)" 1 dt +-7529565 +-343145751-29437252 +-336789 --433276 +-59472-851 +1287-188 +-7529564 +-34314575-29437251 + 336787 --433265 +59419-8511 +1326-193 +-386294361 +-341116917-38917917 +5334194 --783747 +119456 --18637 + 324-47 +-75295544 +-343145751 --29437252 +-336789 --433276 + 59471-853 +1249-182 and \A 2r \ (3) So for rapid convergence 2A 2n can be taken as an estimate of the error in the integral. This is rather limited in its application unless some knowledge of the behaviour of the series coefficients is assumed, but it is interesting to remember when examining empirical results. For more slowly convergent series Clenshaw and Curtis give an estimate of the error in the definite integral using the "practical" points, and Elliott considers this further for both the "practical" and "classical" cases. As an example illustrating some of these points the results for the integral Table 2 Errors (xlo 9 ) in indefinite integral J (t + 3)" 1 dt t -8 --6 --4 --2-2 -4-6 -8 1 57 +47-3 -78-15 -46-15 -52 + 12-18 +23 + 127-39 -145 +3 + 143 +58-62 + 1 + 16-43 + 33 + 16-42 -2 +37-1 -23 +25 +9 + 56 +58 + 13 +4 +65 + 29 + 3 + 59 +61 are given using 8 points. The series representing the indefinite integral are given in Table 1 and the errors in the integral at various points in the range in Table 2. It is illustrated quite clearly that the Gauss-Legendre method gives a better value for the definite integral (t = 1) than the indefinite integral. This is perhaps even more marked for the 6-point formula where the definite integral has error 1 X 1~ 9 while the indefinite for Gauss has error 1,859 x 1~ 9, and for the practical points 8,183 x 1~ 9. The practical and classical points give about the same accuracy for the definite integral while the Filippi value is appreciably worse. For the indefinite integral the Gauss method, quite surprisingly is best, followed by Filippi, classical and practical points. The last term in the integrated series is a fairly close upper bound of the largest error in all cases, though quite considerably larger, as expected, for the Gauss points. Clearly no reliable conclusions can be drawn from one integration or even from a small number of examples. Since it would be impracticable to give a large number of numerical results, properties which appeared consistent will be mentioned and later some exceptional 193 examples will be considered. Most of the functions considered were well behaved, having singularities of different types at varying distances from the range of integration. Various numbers of points (usually less than 2) were taken for all examples. The superiority of the Gauss points for the indefinite integral appears remarkably consistent, though I know of no explanation. Similarly the practical points consistently gave the worst maximum error for the indefinite integral. Both the classical and practical points have comparatively small errors at the end of the range, while for the Filippi method the error is usually near its maximum there. The size of the last term seems only reliable as an upper error estimate if the series is very rapidly convergent. (The order of this is that a should be about 1~ 9 a, though this is quite variable.) As an exceptional example the results using 8 points for J V + t)dt are given in Tables 3 and 4. The integrand has a slowly convergent series on account of the branch point at t = 1. Here the Gauss points no longer show a more accurate value for the definite integral than for the indefinite integral. This is still, however, consistent with the estimate of 2a i6 where a r

are the coefficients of the series for the integral (not shown). The value for a i6 using 2 points is ~95 which is larger than half the error ~-24. This is a consequence of the way the series converges, which will be considered in more detail later. The Gauss points still give the best indefinite integral followed by classical, Filippi and practical methods. Similar behaviour occurs for 4, 6, 1, and 2 points. The uniformity of sign of the error in the Filippi method though consistent for all numbers of points taken with this function, does not occur with all functions, and does not have any obvious significance. 4. Comments on other work on series 4.1 Elliott's comparisons Elliott (1965) considers the comparison of the practical and classical points more generally, considering interpolation as well as integration. He also discusses the properties of some particular types of series in detail, relating these to the singularities of the functions. In particular he considers the infinite Chebyshev series with a n = t" which corresponds to the function 1 - t 2 JKJ 2{\+t 2 ~2tz) which has one simple pole at z = (1 + t 2 )/2t. He shows that the maximum error for interpolation will be smaller for the classical points if / < \/2 1, and the practical ones otherwise (/ real). He then considers even and odd functions of the form and shows that the practical points are always best for these functions. These correspond to series of the form a r = f, a 2r+, =, or a 2r =, a 2r+, = r. If, however, one considers a function of the form l/(a 2 + z 2 ), it appears by similar arguments that the classical points are always superior. This casts some doubt on Elliott's conclusion that the practical points are generally preferable for any odd or even function. Probably more significant is his other conclusion that the differences in maximum error are always very small, and this continues to hold. Elliott also produces error estimates for the definite integral using the two methods and then considers their asymptotic properties. He shows that for the practical points the error is O(l/«3 ) or more precisely O( t"/n 3 ), r and for the classical points it is O(l/«2 ) or O(2 t"/n 2 ), so r that the practical points should usually be better. Two reservations need to be made however: (a) the theory applies to n large, (b) it does not apply to the indefinite integral. Similar analysis can be performed for the indefinite integral. Following Elliott closely, with the notation that J n {z) = ft n (t)/(t - z)dt instead of the definite integral, we have the estimate of the error using the practical points as 194 + 1-63 +-9626 +-13727-1533 +-426-171 +O-OOO88 --56 +-22 --8 --6 --4 --2-2 -4-6 -8 1- Table 3 Series coefficients of \ -\/(l + t)dt, Range ( 1,1) 8 points + 1-59856 +-965 +-1373-156 +-395-136 +-14-171 +-71 Table 4 +-75473 +-96973 +-17961 --229 +-685 --285 +-148 --93 + 38 Errors in f V(l + *) dt X 1 s +76 +23 +55 + 33 + 14 +31 +41 +25 +32 M and for the classical points + 147-145 + 131 +279 + 114-27 +48 + 149 + 1 +89 m=[ J - -23-58 -54-38 -47-55 -46-44 -52-48 JN- I FILTPPI + 1-6277 +-9639 +-13713-1518 +-49-153 +-66 --3 +11-11 -116-118 -18-113 -117-112 -112-115 -115 where z m are the positions of the poles, g m, h m are associated with the singularities and are dependent on N the number of points. Putting t = cos 6, x = cos a and integrating by parts gives sin a sin no. Now if a = this first term vanishes giving but for a ^= this term stays giving only O(l/iV). For the definite integral there is further cancellation when the Js are subtracted for the practical points, but again this does not occur for the indefinite integral for ^ ^ in - 1)«C7) sin («+ l)a}, which may add instead of cancelling. (4) (5)

These general conclusions are borne out by empirical results. To illustrate this an example given by Filippi (1964): Jarctan(l + x)dx is used, with 8, 9 and 1 points. There appears to be a slight error in his results for the practical points, for he shows them as having a large error for the definite integral. This is in his coefficient b-, and could be explained by his halving the last term after integration instead of before. His general conclusions still appear to hold for the indefinite integral but unlike the other Chebyshev methods the definite integral is not more accurate than the indefinite. Table 5 shows just the largest error in the range (tabulated at 1 interval) and the definite integral error. The corresponding results for the other methods are given for comparison. Even though n is not very large the first two methods are clearly better at the ends of the range. For small «the definite integral is usually more accurate using the classical points than the practical, and the changeover seems to occur fairly consistently around 8 or 9 points. As a second example using more (2) points the results for J (/ + ll)~ l dt are given in Table 6 where "max" means the largest value tabulated at interval 2. The singularity is very close to the range of integration, and it is interesting to note that the Gauss method does not show so much improvement. It seems that the improvement is reduced as the singularities get closer. This is confirmed by the example J VO + f)dt previously given. There also the first two Chebyshev methods still show improvements at the end, though even using 2 points the classical points are still better than the practical. This function is not of the type covered by the theory, as it does not just have simple poles. 4.2 Imhof's work Imhof (1963) shows that the original Clenshaw and Curtis method for the integral f(x)dx is asymptotically equivalent to using the trapezium rule for the integral f/(cos /) sin t dt. This provides a method of proving that the formula is convergent for all continuous functions as the number of points tends to infinity. However, it does not appear valid to conclude that for finite n the series method will not be better than the asymptotic form, even though the weights vary only slightly. It is these variations which make the formula exact for polynomials of degree n. This is illustrated by an example (the weights for the end points which do not appear to be clearly defined are taken to make it exact for f(x) = const.). Values of (t + 3)~ l dt using the original and asymptotic forms are given in Table 7. The asymptotic formula is still out by 6 in the last place using 2 points, while the original has it correct using only 8 points. 195 7 pts. 9 pts. 12 pts. Max end Table 5 Errors x 1 9 for f arctau (1 + x) dx -l-i Max end Max end Max end -129151-16943 + 673 + 1115 +268 +22 + 3226 + 1845-969 -776 +476-7 Table 6 + 8434 +624 +457-11 + 192 Error x 1 9 for J (t + l-l)" 1 dt -16431 +818 NO. OF PTS. 4 6 8 2 + 35297-3667 Table 7-8288 -77 Values of (/ + 3)" 1 ORIGINAL -6928751-6931455 -6931472-6931472 ASYMPTOTIC -6916993-69381 -6931134-6931466 FIUPPl + 144886 +63517-4376 -3987-192 -16 FTL1PPI -42257-42257 5. Use of the method of Davis and Rabinowitz Davis and Rabinowitz (1954) give a method for obtaining an upper bound for the error in the quadrature of analytic functions. For the function f(x) the error (/) satisfies l where fix) is assumed analytic in a region R containing the range of integration, / is a norm of/(x) over this region, in fact / = J J \f(x)\ 2 dxdy, and a R is a

coefficient dependent on R and the quadrature formula but not on /. The region R can be varied so long as /(z)does not have any singularities in it, giving different bounds. The a R values can be found for the four methods considered here, using for regions R a set of ellipses which Davis and Rabinowitz use. This clearly cannot prove anything about the relative merits of the methods, but it is interesting to note that the size of the a values does correspond to the errors found in practice. The regions are indicated by the parameter a which is the semi-major axis of an ellipse with foci at (±1, ). In Table 8 values for the definite integral only are given, for different numbers of points n, and different values of a. The Gauss formula is seen to give consistently smaller values, but it is interesting to note that the difference gets smaller as a decreases, which corresponds to the approach of singularities. For n = 3 the Filippi method is the best of the Chebyshev methods, while the classical one is best for n = 6, and for large n the practical points are best as would be expected. 6. Subdivision of the range of integration Instead of increasing the degree of the polynomial approximation to increase accuracy an alternative course of action is to subdivide the interval. First some rather arbitrary assumptions will be made so that a clear criterion for the choice of the more efficient method is possible. Afterwards the assumptions will be qualified and some exceptions pointed out. Consider the comparison of integration over one interval with integration over two half intervals. Suppose that the series coefficients in the large interval are {a,} and in the two sub-intervals {b r } and {c r }. Clearly b r and c r should decrease more rapidly with r than a r. If we assume that the function is not worse behaved in one sub-range than the other, then it is reasonable to put b r si c r a 2-'o r. (8) (A justification of this approximation based on Taylor's series is given in Wright (1964).) Here it is also assumed that the series produced by collocation are approximately equal to the corresponding infinite series. Suppose that taking n terms in the whole interval does not give sufficient accuracy; we want to see whether we gain most by halving the interval using n points in each half or by doubling the number of points in the large interval. Here it is simplest to use the last coefficient as an estimate of the accuracy. So from (8) we gain by halving if 2-kl < \a 2n \. (9) To get any further, some assumptions about the series are needed. Suppose first that Then (9) gives \a r \ = r ( < / < 1). 2 "t" < t 2 " (1) 196 n 3 6 9 16 a 1-2 1-5 2 3 1-2 1-5 2 3 1-2 1-5 2 3 1-2 1-5 -18-33 2 56 3 6 2 71 3 48 4 36 OO 5 15 3 41 5 98 6 2 8 15-5 26 8 63 Table 8 Value of a 2-48 88 15 2 16 19 3 99 4 57 5 21 3 29 OO 5 7O 6 14-8 ll 6 93-8 21 Table 9 Errors in evaluation of (9 METHOD 16 pts. split 16 pts. whole 2 pts. split 2 pts. whole -31 + 51-2 +3-35 + 115 +-1 +8-32 58 2 99 2 ll - 2 38 4 45 6 45 -«14-3 ll - 6 17-9 2-13 43-7 24-12 32-12 22-2 37 3 4 13 2 ll 4 86 5 37 2 16 4 38-6 77 O-O 8 57 4 16 7 45 + I)" 1 dx X 1 6 +-8 +42 +- + 3 + 114 + 125 + 12 +23 This is perhaps more interesting in terms of the number of series coefficients n. Suppose 1 decimals are required then ]Q-'O ~ \a n \ ~ t" giving n ^ 33, so that if more than 33 terms are required to get 1 decimals it is better to halve the interval. The function with a r = t r (for the Chebyshev coefficients) has a simple pole on the real axis at (1 + t 2 )/2t so that the behaviour in the two sub-ranges will not be similar. However, a function with a simple pole on the imaginary axis will have a series of the form a r = (it) r, and to get a real function two poles are needed. So the evaluation of J (9x 2 + \)~ x dx is taken as an example; here the t value would be i(y/\ l)/3. Table 9 shows the errors in the definite integral using 16 and 2 points for the two variations of the four methods. For other forms of series a similar but slightly more complicated analysis can be performed. However, an idea can be obtained by comparing the series with one of the form f. Suppose we define a rate of convergence R n = aja n+ 1 then for the example taken R n \jt a

constant. For other functions it will vary: if it increases then it is better to use more points before halving; if it decreases it is better to use less. Consider the series with a r = t r /r, then R r = (r + l)/rt which decreases with r so fewer points should be taken; however the condition on / goes the other way, that is / can be larger than before, without halving giving an improvement. Putting the accuracy equal to the last series coefficient of the integrand is not in complete accord with the estimates discussed previously. For the definite integral using the classical points ajn 2 would be more appropriate, and for the practical points ajn 3. For the indefinite integral ajn would be better for both methods. As far as the argument used above is concerned, however, this is equivalent to having a series with coefficients t r /r, t r /r 2 or r/r 3 instead. This is illustrated by a second example, though the effects are not very clear using so few terms. Table 1 shows the errors in the evaluation of r'l-x Even though / > the Chebyshev methods do not show a consistent improvement in halving. This confirms the effect of the amended accuracy estimate. What is surprising is that the results for the practical points using 12 and 16 points do show the halving method as better. The errors in the two half ranges did partially cancel here though. Another factor contributing to the smallness of the improvement produced by halving in the Chebyshev methods in this example is that the assumption about the relationship between the series in the full and half ranges is only approximately true. The half interval series are not quite as rapidly convergent as expected. For functions with one simple pole the corresponding rates can be calculated explicitly for the Chebyshev series. Table 11 shows some of these rates R~l/t for the three series concerned and some different positions of the poles. The most apparent property shown by the examples in Tables 9 and 1 is that the Gauss method does show considerable improvement when the range is split. The Gauss-Legendre series theory is a little different from the Chebyshev, and it is to the Chebyshev methods that the justification applies in the first place. The Gauss- Legendre method behaves in a similar way, but now the series a n /" corresponds to a function with a branch point that is (1 2tx + / 2 )~*. Also for the definite integral it is more appropriate to use a^n as an estimate for the error instead of a n. With a r = p this leads to the same condition on / as before, but now this accuracy will be obtained using about half the number of points found before. So this suggests using not more than 16 points in any range for the Gauss method. Returning to the results given for functions with poles, the corresponding Legendre series converge more slowly and so the advantage of halving is more apparent. 197 METHOD 8 split 8 whole 12 split 12 whole 16 split 16 whole 2 split 2 whole Table 1 Errors X1 7 for +27937 + 1171-547 + 135-64 -8 +5-1 -l -18 +3852-81 +845 + 17 +2 +3 +-6 4x dx +487 + 18681 +45 + 186 +-3 +4 - - -35224 + 18266 +96 + 1424 +257 + 149-2 + 17 Table 11 Rates of convergence for functions with one simple pole POLE -25/ -5/ i -5 + -5/ 1 +i 1 + -Si 1-25 (-1, i) 1-281 1-618 2-414 1-7 2-89 2-81 2 (-1,) 281 2-89 4-612 2-414 4-611 2-89 2-618 (, 1) 281 2-89 4-612 4-346 7-161 6-197 6-854 There are two other minor qualifications to the arguments used. Firstly if the function evaluation is not the dominant part of the work then this work increases more like n 2 and so naturally there is greater advantage ia halving. Secondly the function was assumed to be similarly behaved in the two half ranges. If this is not so one of the sub-ranges will give more accuracy than the other, and for the total effect effort is wasted. Either using a non-central division, or different numbersof points in each half would avoid this difficulty. Functions with other types of singularity such as. branch points or multiple poles have series of different form, but a generally similar analysis applies. If the singularity is weak or far away then the series is usually rapidly convergent and no problem arises. If the singularity is near or severe then some division of the interval is. likely to be advantageous. However, there are some functions which do not readily fit into, these categories, for example exponential and trigonometric functions which have no finite singularities but an essential singularity at infinity. If these are taken over a wide range or have a large argument they also cannot be well represented by a few terms of a series of polynomials. This appears to correspond to series which behave asymptotically like t"jn\, and using theory similar

to that already given indicates that reducing the interval never improves the accuracy. This is illustrated by the ri results for cos (1? + 1) dt. Table 12 shows the errors for the four methods using 12 and 2 points. In addition to the effect of halving it is interesting to note that the superiority of the Gauss method is very marked here. (This is only a property of the definite integral.) 7. Conclusions It is difficult to draw a simple, clear-cut conclusion in a comparison of this kind, partly because of the method used and partly because of the number of different circumstances which affect the results. Firstly a summary of the conclusions for the evaluation of definite integral using just one approximating polynomial will be given. The three Chebyshev methods do not differ greatly in accuracy, but for large numbers of points they appear to be ordered as (i) practical, (ii) classical, (iii) Filippi. For small numbers of points (<8) the classical appear better than the practical, irrespective of the rate of convergence of the series. The Gauss method is consistently better than the Chebyshev methods, the difference being small if there are singularities close to the range of integration, but getting larger as the singularities move away. Secondly, for the indefinite integral the differences between all the methods are small, but the Gauss- Legendre method appears to give the best results consistently-even if there are singularities close to the range of integration. The practical points on the other hand appear to give almost consistently the worst results with the maximum error usually about twice that of the next method. This is quite a small effect of course. Thirdly, in practice there are two ways of using the formulae: either increasing the degree of the approximating polynomial until the required accuracy is attained or subdividing the interval keeping the degree of approximation fixed. With the second scheme the practical and Filippi points lose one of their main advantages, that the same points can be used over again with a higher degree formula. However, even if this property is taken into account, if the series is sufficiently slowly convergent it is still worth halving the interval. For the series with a r = V a calculation as before gives t > 3 Vl as the condition for halving to gain. The halving method has also the following advantages (i) The error estimates are more reliable for rapidly convergent series. (ii) If the method is used as the basis for an automatic process then this could have the effect of giving more points near a rapidly varying part of References METHOD 12 split 12 whole 2 split 2 whole Errors X1" for + 17215-62192 +88-6 Table 12,1 cos (1* + 1) dt + 144555 + 2228-427 + 1 +3674 + 6-482322 +424274-3865 +56 the function. For example the original range might become divided into one half range and two quarter ranges. (iii) If non-analytic functions are considered, such as functions with discontinuities in some low-order derivative, a simpler formula is usually beneficial, consistent with the theory given in Krylov (1962), Ch. 8. (iv) The Gauss-Legendre method loses its main disadvantage that many sets of points need to be stored: only one set need be kept with this system. However, for certain types of ill-behaved function, though perhaps not the most typical, halving certainly gives less accuracy. It may also be more convenient to have one series if the indefinite integral is to be evaluated afterwards, though here convenience does not necessarily mean economy. If the halving process is adopted then it appears that the Gauss-Legendre method is the most suitable particularly for the definite integral. If a high-degree polynomial approximation is used the advantage of the practical and Filippi points, that the same values can be used for different approximations, is probably decisive, the practical points being preferred for the definite integral and the Filippi points for the indefinite. In view of the number of distinctions which need to be made for the comparatively straightforward problem of quadrature it seems most unwise to draw any conclusion from this discussion about the relative merits of these sets of points for other purposes such as the solution of differential or integral equations. Acknowledgements I should like to thank the members of Newcastle University Computing Laboratory for their help, in particular a former M.Sc. student R. L. Lightowler whose dissertation (1963) forms part of the work out of which this paper has developed. CLENSHAW, C. W., and CURTIS, A. R. (196). "A Method for numerical integration on'an automatic computer," Num. Math., Vol. 2 p. 197 (References continued overleaf) 198

DAVIS, P. J., and RABINOWITZ, P. (1954). "On the estimation of Quadrature errors for analytic functions," M.T.A.C., Vol. 8, p. 193. ELLIOTT, D. (1965). "Truncation Errors in two Chebyshev Series Approximations," Math. Comp., Vol. 19, p. 234. FIUPPI, S. (1964). "Angenaherte Tschebyscheff-Approximation einer Stammfunktion eine Modifikation des Verfahrens von Clenshaw und Curtis," Num. Math., Vol. 6, p. 32. IMHOF, J. P. (1963). "On the method for Numerical Integration of Clenshaw and Curtis," Num. Math., Vol. 5, p. 138. KRYLOV, V. I. (1962). Approximate Calculation of Integrals, trans. Stroud, A.C.M. monograph, Macmillan, New York. LANCZOS, C. (1938). "Trigonometric Interpolation of Empirical and Analytical Function," /. Maths and Phys., Vol. 17, p. 123. LANCZOS, C. (1957). Applied Analysis, Pitman. LIGHTOWLER, R. L. (1963). "An investigation of certain quadrature formulae," M.Sc. dissertation, University of Newcastle upon Tyne, England. WRIGHT, K. (1964). "Chebyshev collocation methods for ordinary differential equations," The Computer Journal, Vol. 6, p. 358. Numerical Methods and Computers, by Shan S. Kuo, 1965; 341 pages. (Reading, Massachusetts: Addison-Wesley Publishing Company, Inc., 59s.) This book contains an introduction to computer programming, using FORTRAN, and some numerical methods for which corresponding programs are given. The book is divided into three parts, the first dealing with some of the principles of computers, the second with numerical methods and the third with "Modern methods." In part I, there arefivechapters which give a brief history of computers, a description of their main parts, methods of flowcharting,floating-pointarithmetic, the main chapter describing FORTRAN as used on the IBM 162. In part II some numerical methods are described for dealing with the following problems: polynomial and transcendental equations, ordinary differential equations, simultaneous linear equations, latent roots and vectors of symmetric matrices, interpolation, curve-fitting and quadrature. All these topics are treated very superficially. There is also one brief chapter on errors, which concentrates on the effect of truncation errors in solving a differential equation. In part III there are short descriptions of Monte Carlo methods and the use of the Simplex method for solving linear programming problems. Although the book has been designed for the use of engineering and science students, I would not recommend its use. There are many errors; some only in detail such as requesting a subroutine to calculate the integeram for 7V< 25 although integers must be less than 1 5 ; and some more serious errors, such as the test for convergence of the Gauss-Seidel process for solving simultaneous linear equations which would, for example, indicate that the process had converged after the first iteration if a null vector had been used as the first approximation. In addition to the errors, another source of confusion is the explanation of some programming points. For example there is no clear distinction made between spaces between characters on a line and blank lines, and as a second example the only use of a common statement is in a twosegment program in which the variables assigned to the common area only occur in one of the segments. No mention is made of the efficiency of programs with regard to running time on a computer, and some of the examples given are not commendable in this respect. The printing of the book is of high quality and there are few mis-prints. V. E. PRICE Book Reviews 199 Elementary Numerical Analysis {an algorithmic approach), by S. D. Conte, 1965; 278 pages. (Maidenhead: McGraw- Hill Publishing Company Ltd., 64s.) This is a textbook for a first course in numerical methods for undergraduates in engineering and science, and is based on a "three-hour, one-semester" course taught at Purdue University. The emphasis is on methods (algorithms) for solving problems on a modern computer, and it is assumed that the student is familiar with a programming language, preferably FORTRAN. For most of the algorithms we are given a mathematical derivation, together with a careful discussion of the accuracy to be expected. Where several alternative algorithms are available a comparison is made of their relative computational efficiency. Mathematical proofs of theorems have sometimes been omitted where the author considered them inappropriate for the students he had in mind. There is a large number of worked examples, many of them complete with a flow chart, a program in FORTRAN IV, and actual computer results obtained on an IBM 79. In fact the presentation of extensive tables of computer results is a special feature of this book, and should help a student to gain insight into the accuracy and efficiency of the various numerical processes, even if he does not have access to a computer himself. However, the author intends that the student should use a computer and write programs for the solution of problems. The chapter headings are as follows: number systems and errors, the solution of nonlinear equations, interpolation and approximation, differentiation and integration, matrices and systems of linear equations, the solution of differential equations, and boundary-value problems in ordinary differential equations. The author has covered a wide range of numerical methods under these headings, and the book will undoubtedly prove useful to the students for whom it is intended. Among topics that have not been included are least squares methods, curve fitting, linear programming, Monte Carlo methods, and partial differential equations. The only concession that is made to readers unfamiliar with FORTRAN is the inclusion of a book on Numerical Methods and FORTRAN Programming in the list of references. The book is attractively printed and includes a good index. L. A. G. DRESEL