Comparison of Clenshaw-Curtis and Gauss Quadrature

Similar documents
Slow Growth for Gauss Legendre Sparse Grids

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

Orthogonal Polynomials, Quadratures & Sparse-Grid Methods for Probability Integrals

IS GAUSS QUADRATURE BETTER THAN CLENSHAW CURTIS?

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

Scientific Computing

Slow Exponential Growth for Clenshaw Curtis Sparse Grids

The discrete and fast Fourier transforms

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

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

Ten things you should know about quadrature

MA2501 Numerical Methods Spring 2015

Chebfun and numerical quadrature

Romberg Integration and Gaussian Quadrature

Contents. I Basic Methods 13

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

12.0 Properties of orthogonal polynomials

LECTURE 16 GAUSS QUADRATURE In general for Newton-Cotes (equispaced interpolation points/ data points/ integration points/ nodes).

On an Eigenvalue Problem Involving Legendre Functions by Nicholas J. Rose North Carolina State University

Last Update: April 7, 201 0

ETNA Kent State University

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

On the convergence of interpolatory-type quadrature rules for evaluating Cauchy integrals

Exercise 11. Isao Sasano

Accuracy, Precision and Efficiency in Sparse Grids

you expect to encounter difficulties when trying to solve A x = b? 4. A composite quadrature rule has error associated with it in the following form

Error estimation in the Clenshaw-Curtis quadrature formula

Slow Exponential Growth for Clenshaw Curtis Sparse Grids jburkardt/presentations/... slow growth paper.

Advanced Computational Fluid Dynamics AA215A Lecture 2 Approximation Theory. Antony Jameson

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

Series methods for integration

Polynomial Approximation: The Fourier System

On the Chebyshev quadrature rule of finite part integrals

Computing Gauss-Jacobi quadrature rules

256 Summary. D n f(x j ) = f j+n f j n 2n x. j n=1. α m n = 2( 1) n (m!) 2 (m n)!(m + n)!. PPW = 2π k x 2 N + 1. i=0?d i,j. N/2} N + 1-dim.

Differentiation and Integration

Towards a Faster Spherical Harmonic transform

Department of Applied Mathematics and Theoretical Physics. AMA 204 Numerical analysis. Exam Winter 2004

Recurrence Relations and Fast Algorithms

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

Outline of Fourier Series: Math 201B

Ten things you should know about quadrature. Nick Trefethen, Vanderbilt, Wed. 28 May 8:35 PM

Golub-Kahan iterative bidiagonalization and determining the noise level in the data

arxiv: v1 [math.cv] 18 Aug 2015

COURSE Numerical integration of functions

A quadrature rule of interpolatory type for Cauchy integrals

Math 489AB A Very Brief Intro to Fourier Series Fall 2008

Fully Symmetric Interpolatory Rules for Multiple Integrals over Infinite Regions with Gaussian Weight

Math 365 Homework 5 Due April 6, 2018 Grady Wright

SMOOTH APPROXIMATION OF DATA WITH APPLICATIONS TO INTERPOLATING AND SMOOTHING. Karel Segeth Institute of Mathematics, Academy of Sciences, Prague

ZERO DISTRIBUTION OF POLYNOMIALS ORTHOGONAL ON THE RADIAL RAYS IN THE COMPLEX PLANE* G. V. Milovanović, P. M. Rajković and Z. M.

An exponentially graded mesh for singularly perturbed problems

Solution: First we need to find the mean of this distribution. The mean is. ) = e[( e 1 e 1 ) 0] = 2.

Scientific Computing: Numerical Integration

On the Lebesgue constant of barycentric rational interpolation at equidistant nodes

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

In numerical analysis quadrature refers to the computation of definite integrals.

Lectures 9-10: Polynomial and piecewise polynomial interpolation

Key words. conjugate gradients, normwise backward error, incremental norm estimation.

Index. for Ɣ(a, z), 39. convergent asymptotic representation, 46 converging factor, 40 exponentially improved, 39

Simpson s 1/3 Rule Simpson s 1/3 rule assumes 3 equispaced data/interpolation/integration points

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

ETNA Kent State University

Gradient Method Based on Roots of A

Jim Lambers ENERGY 281 Spring Quarter Lecture 5 Notes

Zernike Polynomials and their Spectral Representation

Numerical Methods I: Numerical Integration/Quadrature

e x = 1 + x + x2 2! + x3 If the function f(x) can be written as a power series on an interval I, then the power series is of the form

Fast algorithms based on asymptotic expansions of special functions

Introduction. Chapter One

Convergence and Stability of a New Quadrature Rule for Evaluating Hilbert Transform

Orthogonal Polynomials, Quadratures & Sparse-Grid Methods for Probability Integrals

Numerical Analysis. A Comprehensive Introduction. H. R. Schwarz University of Zürich Switzerland. with a contribution by

(x x 0 )(x x 1 )... (x x n ) (x x 0 ) + y 0.

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

A Riemann Hilbert approach to Jacobi operators and Gaussian quadrature

Fourier Series. ,..., e ixn ). Conversely, each 2π-periodic function φ : R n C induces a unique φ : T n C for which φ(e ix 1

Positive Denite Matrix. Ya Yan Lu 1. Department of Mathematics. City University of Hong Kong. Kowloon, Hong Kong. Abstract

LECTURE NOTES ELEMENTARY NUMERICAL METHODS. Eusebius Doedel

Slow Growth for Sparse Grids

The iterated sinh transformation

Numerical Integration for Multivariable. October Abstract. We consider the numerical integration of functions with point singularities over

The Order of Accuracy of Quadrature Formulae for Periodic Functions

arxiv:math/ v1 [math.na] 12 Jul 2004

Numerical Solutions of Laplacian Problems over L-Shaped Domains and Calculations of the Generalized Stress Intensity Factors

Trigonometric Gaussian quadrature on subintervals of the period

STRONGLY NESTED 1D INTERPOLATORY QUADRATURE AND EXTENSION TO ND VIA SMOLYAK METHOD

It is a pleasure to o er this essay for Mathematics Today as a

Dimension-adaptive sparse grid for industrial applications using Sobol variances

ON A WEIGHTED INTERPOLATION OF FUNCTIONS WITH CIRCULAR MAJORANT

Applied Numerical Analysis (AE2220-I) R. Klees and R.P. Dwight

Padua2DM: fast interpolation and cubature at the Padua points in Matlab/Octave

3. Numerical Quadrature. Where analytical abilities end...

Transactions on Modelling and Simulation vol 12, 1996 WIT Press, ISSN X

Cubic Splines MATH 375. J. Robert Buchanan. Fall Department of Mathematics. J. Robert Buchanan Cubic Splines

A note on multivariate Gauss-Hermite quadrature

n 1 f n 1 c 1 n+1 = c 1 n $ c 1 n 1. After taking logs, this becomes

Numerical Experiments for Finding Roots of the Polynomials in Chebyshev Basis

Assignment 6, Math 575A

4. Numerical Quadrature. Where analytical abilities end... continued

Transcription:

WDS'11 Proceedings of Contributed Papers, Part I, 67 71, 211. ISB 978-8-7378-184-2 MATFYZPRESS Comparison of Clenshaw-Curtis and Gauss Quadrature M. ovelinková Charles University, Faculty of Mathematics and Physics, Prague, Czech Republic. Abstract. In the present work, Gauss and Clenshaw-Curtis quadrature formulas are compared. It is well known, that Gauss quadrature converges for every continuous function f and has a factor-of-2 advantage in efficiency for finite n ((n + 1-point scheme integrates exactly polynomials of degree 2n + 1 On the other hand, Clenshaw-Curtis scheme integrates exactly polynomials of degree at most n, but converges also for every continuous function f. This scheme does not turn out to be half as efficient as the Gauss formula for most of the integrands, both quadratures reach almost the same accuracy. Moreover, using the fast Fourier transformation, the Clenshaw-Curtis scheme can be implemented in O(n log n operations, what makes the scheme more efficient. Gauss quadrature nodes and weights can be evaluated in O(n 2 operations solving a tridiagonal eigenvalue problem. However, there are some problems (boundary elements integrals where the Gauss quadrature should continue to be preferred quadrature rule. Introduction In this article we will consider the following problem. We are given a continuous function f on the closed interval [, 1] and we seek to approximate the integral by sums I = I(f = I n = I n (f = f(xdx n w k f(x k for various integers n, where the nodes x k depend on n but not on the function f itself. The weights are defined uniquely by the property that I n is wanted to be interpolatory quadrature, what means that it integrates exactly polynomials of degree at most n. The most important approach to such a problem is through the automatic quadrature scheme, what is a set of quadrature formulas, each with its own error estimate. According to the specified tolerence the one of these formulas is chosen, without requiring an excessive number of values of the integrand. The quadrature formulas and the error estimate must be possible to evaluate using only values of the integrand in the interval of integration. Usually, the formulas are applied in sequence so it is very suitable that function values required by one formula can be used by the later ones. There are several methods how to built a quadrature formula. The well known ewton-cotes formulas are defined by taking the nodes to be equally spaced from to 1. The properties of such schemes for n are very bad, some of the weights are negative and the formulas do not converge for a general continuous integrand f. They converge only if the function f is analytic in large region surrounding the interval of integration. Another very significant example is the Gauss quadrature formula, which is defined by choosing the nodes optimally in the sense of maximizing the degree of polynomials that (1 can integrate exactly. Since there are n + 1 nodes, the attainable degree is n + 1 order higher. Thus the (n + 1-point Gauss formula integrates exactly polynomials of degree 2n + 1, what makes it the most accurate. k= 67

OVELIKOVA: COMPARISO OF CLESHAW-CURTIS AD GAUSS QUADRATURE Clenshaw-Curtis scheme There are two ways how to describe the idea behind the Clenshaw-Curtis scheme. Firstly, we construct the interpolatory polynomials that have the same values as the integrand in the zeros of the Tchebyshev polynomials. We observe that a sequence of such polynomials converges to the function almost everywhere for the piecewise continuous function (unlike the interpolatory polynomials agreeing at equidistant nodes. That means that the function f(x will be firstly approximated by an interpolating polynomial agreeing with it in the Tchebyshev points, and then this polynomial will be integrated. The second, equivalent, way is to substituate the variable of integration f(xdx = If we knew the cosine transform of the function f f(cos θ = F (θ = then the integral (1 could be rewritten as follows f(cos θ sin θdθ. (1 A n cos(nθ (2 A n cos(nθ sin θdθ = s= n even 2A n 1 n 2 (3 The cosine transform of the function f is, of course, not known, but if we compute the disctrete finite cosine transform of F (θ sampled at equidistant points θ = πs, s =, 1,...,, then we obtain 1 ( πs ( πsn a n = 2 F cos. (4 Then the inverse formula gives F ( πs = 1 a n cos Thus we can use this formula and approximate the integrand F (θ Finally, we obtain the Clenshaw-Curtis quadrature formula f(cos θ sin θdθ ( πsn. (5 ( an cos(nθ. (6 n even ( an 2 1 n 2. (7 The expansion to the cosine series exists and converges for every function f continuous with bounded variation. Many properties now follow from classical Fourier series results such as Parseval s theorem or the yquist sampling theorem. It was proved [Imhof, 1963] that the 1 in these and later formulas the symbol weight means that the first and the last terms of the sum have half 68

OVELIKOVA: COMPARISO OF CLESHAW-CURTIS AD GAUSS QUADRATURE weights a n are positive, the scheme integrates polynomials of degree n exactly and converges for all continuous function f (for details see [ovelinkova, 21]. The high cost of the cosine transform was a serious drawback in using this type of quadrature formula. Furthermore, the conventional computation of the cosine transform using the recurrence relation [Engels, 198] is numerically unstable, particularly at the low frequencies. Also in case the automatic scheme requires refinement of the sampling, massive storage is needed to save the integrand values after the cosine transformation is computed. In the paper [Gentleman, 1972] a modification of the fast Fourier transform was introduced, what overcomes all the problems mentioned above, it is very resistant to rounding errors and can be implemented in O(n log n [Waldvogel, 26]. In order not to waste integrand values already obtained, the new choice of the number of nodes n should be a multiple of the previous one, usually this is taken as n = 2 p [Gentleman, 1972]. There are many error estimates for this quadrature scheme proposed, for example see [Clenshaw and Curtis, 196], [O Hara and Smith, 1967], [Gentleman, 1972], all of them can be easily calculated, what is very important for checking the accuracy obtained. Comparison As written in the introduction section, the Gauss quadrature is positive and also converges for every continuous function f C([, 1]. The nodes and weights of this formula can be evaluated in O(n 2 operations by solving a tridiagonal eigenvalue problem, as was proved in [Golub and Welsch, 1969]. The basic comparison is straightforward, the Gauss quadrature appear to have factor-of-2 advantage in efficiency for finite f, on the other hand, Clenshaw-Curtis scheme is easier and faster to implement. However, the numerical comparison of the Clenshaw-Curtis and the Gauss quadrature schemes can reveal suprising results [O Hara and Smith, 1967], [Trefethen, 28]]: Clenshaw-Curtis scheme reaches almost the same accuracy for most of the integrands. The Gauss quadrature significantly outperforms the Clenshaw-Curtis quadrature only for functions analytic in a sizable neighborhood of [, 1]. For such functions, the convergence of both methods is very fast. Thus Clenshaw-Curtis quadrature essentially never requires many more evaluations than Gauss to converge to a prescribed accuracy. Even Clenshaw and Curtis themselves recorded the same effect [Clenshaw and Curtis, 196]. There were several error estimations stated in [O Hara and Smith, 1972] and [ Trefethen, 28] that explains the practical equivalence of these two quadrature rules. For the theoretical explanation of such a behavior we will introduce following definitions. Given f C([, 1], and n, let p n be the unique best approximation to f on [, 1] of degree n with respect to the norm. =. and define En = f p n. For a quadrature scheme with nonnegative weights and for any f C([, 1] the following statement holds I I n 4E n, (8 and I n I as n. Since both of the quadrature considered are nonnegative, this statement can be applied and thus we have that if the best approximants to f converge rapidly as n then I n will converge rapidly to I. As in [Trefethen, 28] this will be combined with results of the approximation theory to the effect that if f is smooth, its best approximants converge rapidly. The results derived from the Tchebyshev series for a function f C([, 1] will be considered. Let us construct the Tchebyshev series for f C([, 1] as it was done in [Trefethen, 28]. 69

OVELIKOVA: COMPARISO OF CLESHAW-CURTIS AD GAUSS QUADRATURE Then we obtain 2 f(x = j= a j T j (x, a j = 2 π f(xt j (x dx, (9 where the T j (x = cos(j cos x are the Tchebyshev polynomials of degree j. The equal sign in the first formula is justified under the mild condition that f is Dini-continuous, in which case the series converges uniformly to f. In the work [Trefethen, 28] is showed, that if f is smooth, its Tchebysheff coefficients decrease rapidly. Two smoothness conditions are considered: a kth derivative satisfying a condition related to bounded variation, or analyticity in a neighborhood of [, 1]. Several theorems bounding the coefficients of the Tchebyshev expansion are proved, and finally the following theorem is stated. Let the norm. T be the Tchebyshev-weighted 1-norm defined by u T = u (x 1. Theorem 1. Let Clenshaw-Curtis and Gauss quadrature be applied to a function f C([, 1]. If f, f,..., f (k are absolutely continuous on [, 1] and f (k T = V < for some k 1, then for all sufficiently large n I I n 32V 15πk(2n + 1 k k. (1 Sufficiently large n means for the Clenshaw-Cutis scheme that n > n k for some n k that depends on k but not f or V and for the Gauss quadrature n k 2. Let the norm. T be the Tchebyshev-weighted 1-norm defined by u T = u (x 1. The factor 2 k in the error bound applies to Clenshaw-Curtis quadrature too. The crucial fact of the proof is that of aliasing. On the grid in [, 2π] of 2n equally spaced points θ j = πj/n, j 2n, the functions cos((n+pπθ j and cos((n pπθ j are indistinguishable. Applying this fact to the variable x = cos θ we obtain Theorem 2. For any integer p with p n T n+p (x j = T n p (x j (11 on the Tchebyshev grid. Consequently for the Clenshaw-Curtis scheme { 2, for n ± p is even 1 (n p I n (T n+p = I n (T n p = I(T n p = 2, for n ± p is odd. The error in integrating T n+p can be expressed I(T n+p I n (T n+p = { 8pn, n 4 2(p 2 +1n 2 +(p 2 2 for n ± p is even, for n ± p is odd. (12 (13 2 the symbol indicates that the term for j = is multiplied by 1/2 7

OVELIKOVA: COMPARISO OF CLESHAW-CURTIS AD GAUSS QUADRATURE Clenshaw-Curtis formula has essentially the same performance for most integrands and can be implemented effortlessly by the fast Fourier transformation. This scheme applied to the functions analytic in a sizable neighborhood of [, 1] exhibits a curious phenomenon, that explains also why Gauss quadrature outperforms this scheme in these cases. When the number of nodes in the integration rule increases, the error of the Clenshaw-Curtis quadrature rule does not decay to zero evenly but in two distinct stages. In the work [Weideman and Trefethen, 27] was proved that for the number of nodes n less than a critical value, the error behaves like O(ρ 2n, where ρ is a constant greater than 1. For these values the accuracy of Clenshaw-Curtis scheme is almost indistinguishable from the one of Gauss quadrature. With higher amount of nodes, the error decreases at the rate O(ρ n. It means, that initially Clenshaw-Curtis scheme converges about as fast as the Gauss rule. The point in which the convergence switches from one rate to another can be seen also in the error curve constructed for this scheme as it was done in [Weideman and Trefethen, 27]. It was proved also, the critical value of n where the kink occurs depends on the position of the singularity if the integrand. Even though, the practical equivalency of these two schemes was stated in several papers, there are problems in which Gauss quadrature scheme should stay the preferred integration rule (for example [Elliott, Johnston and Johnston, 28]. Conclusion In this paper, we have briefly introduced Clenshaw-Curtis scheme which belongs to the class of interpolatory quadrature schemes. We stated some of the most important characteristics as well as the inconvenience which caused that this scheme was not that much in use it the past. The comparison with the well-known Gauss formula was examined from several points of view and the theoretical explanation was given. In many cases, these two schemes can be considered as equivalent, however there are some problems in which the equivalency can not be applied. The outlook for the future work is to focus on the sensitivity of the schemes discussed. Acknowledgments. The work was supported by the grant SVV-211-263316 References Clenshaw, C. W. and Curtis, A. R., A method for numerical integration on an automatic computer, umer. Math., 2, pp. 197-25, 196. Elliott, D., Johnston, B. M., Johnston, P. R., Clenshaw-Curtis and Gauss-Legendre quadrature for certain boundary element integrals, SIAM J. SCI. COMPUT., 31, pp.51-53, 28. Engels, H., umerical quadrature and cubature, London, Academia Press, 198. Gentleman, W. M., Implementing Clenshaw-Curtis quadrature. I, Comm. ACM, 15, pp. 337-342, 1972. Gentleman, W. M., Implementing Clenshaw-Curtis quadrature. II, Comm. ACM, 15, pp. 343-346, 1972. Golub, G. H. and Welsch, J. H., Calculation of Gauss quadrature rules, Math. Comp., 23, pp. 221-23, 1969. Imhof, J. P., On the method for numerical integration of Clenshaw and Curtis, umer. Math., 5, pp. 138-141, 1963. ovelinkova, M., on-interpolatory quadratures and refined interpolatory quadratures, Diploma thesis, 21. O Hara, H. and Smith, F. J., Error estimation in the Clenshaw-Curtis quadrature formula, Compu. J., 11, pp.213-219, 1968 Trefethen, L.., Is Gauss quadrature better than Clenshaw-Curtis?, SIAM Rev., 5, pp.67-87, 28. Waldvogel, J., Fast construction of the fejer and Clenshaw-Curtis quadrature rules, BIT, 46, pp.195-22, 26. Weideman, J. A. C. and Trefethen, L.., The kink phenomenon in Fejér and Clenshaw-Curtis quadrature, umer. Math., 17, pp.77-727, 27. 71