lecture 25: Gaussian quadrature: nodes, weights; examples; extensions

Similar documents
More Properties of Limits: Order of Operations

The Cubic Formula. The quadratic formula tells us the roots of a quadratic polynomial, a polynomial of the form ax 2 + bx + c. The roots (if b 2 b+

A MOST PROBABLE POINT-BASED METHOD FOR RELIABILITY ANALYSIS, SENSITIVITY ANALYSIS AND DESIGN OPTIMIZATION

SOME PROPERTIES OF EXTENSIONS OF SMALL DEGREE OVER Q. 1. Quadratic Extensions

As we have seen, there is a close connection between Legendre symbols of the form

1 Review of Least Squares Solutions to Overdetermined Systems

Effect Sizes Based on Means

Numerical Analysis An Introduction

Numerical Analysis Introduction. Student Audience. Prerequisites. Technology.

Chebyshev Expansions

AN INTRODUCTION TO NUMERICAL METHODS AND ANALYSIS

Introduction to NP-Completeness Written and copyright c by Jie Wang 1

Package fastghquad. R topics documented: February 19, 2015

ENFORCING SAFETY PROPERTIES IN WEB APPLICATIONS USING PETRI NETS

4.5 Chebyshev Polynomials

On the predictive content of the PPI on CPI inflation: the case of Mexico

LS.6 Solution Matrices

Review of Fundamental Mathematics

CUBIC AND QUARTIC FORMULAS. James T. Smith San Francisco State University

F inding the optimal, or value-maximizing, capital

General Framework for an Iterative Solution of Ax b. Jacobi s Method

United Arab Emirates University College of Sciences Department of Mathematical Sciences HOMEWORK 1 SOLUTION. Section 10.1 Vectors in the Plane

The Online Freeze-tag Problem

PRIME NUMBERS AND THE RIEMANN HYPOTHESIS

C-Bus Voltage Calculation

Chapter 6. Orthogonality

Orthogonal Diagonalization of Symmetric Matrices

Concurrent Program Synthesis Based on Supervisory Control

Multiperiod Portfolio Optimization with General Transaction Costs

SECTION 6: FIBER BUNDLES

Au = = = 3u. Aw = = = 2w. so the action of A on u and w is very easy to picture: it simply amounts to a stretching by 3 and 2, respectively.

Section 1.1. Introduction to R n

Alpha Channel Estimation in High Resolution Images and Image Sequences

An important observation in supply chain management, known as the bullwhip effect,

Monitoring Frequency of Change By Li Qin

A Simple Model of Pricing, Markups and Market. Power Under Demand Fluctuations

Load Balancing Mechanism in Agent-based Grid

CABRS CELLULAR AUTOMATON BASED MRI BRAIN SEGMENTATION

Forensic Science International

DAY-AHEAD ELECTRICITY PRICE FORECASTING BASED ON TIME SERIES MODELS: A COMPARISON

Point Location. Preprocess a planar, polygonal subdivision for point location queries. p = (18, 11)

Numerical Methods I Eigenvalue Problems

Inner Product Spaces

GEC320 COURSE COMPACT. Four hours per week for 15 weeks (60 hours)

A characterization of trace zero symmetric nonnegative 5x5 matrices

Risk in Revenue Management and Dynamic Pricing

The fast Fourier transform method for the valuation of European style options in-the-money (ITM), at-the-money (ATM) and out-of-the-money (OTM)

A Multivariate Statistical Analysis of Stock Trends. Abstract

JUST THE MATHS UNIT NUMBER 1.8. ALGEBRA 8 (Polynomials) A.J.Hobson

Similarity and Diagonalization. Similar Matrices

1 Gambler s Ruin Problem

Applied Linear Algebra I Review page 1

Vector and Matrix Norms

Continued Fractions and the Euclidean Algorithm

A Modified Measure of Covert Network Performance

X How to Schedule a Cascade in an Arbitrary Graph

4.3 Lagrange Approximation

Chapter 20. Vector Spaces and Bases

Bindel, Spring 2012 Intro to Scientific Computing (CS 3220) Week 3: Wednesday, Feb 8

[1] Diagonal factorization

Linearly Independent Sets and Linearly Dependent Sets

Solving Quadratic Equations

Measuring relative phase between two waveforms using an oscilloscope

Prentice Hall Mathematics: Algebra Correlated to: Utah Core Curriculum for Math, Intermediate Algebra (Secondary)

MATH APPLIED MATRIX THEORY

SQUARE GRID POINTS COVERAGED BY CONNECTED SOURCES WITH COVERAGE RADIUS OF ONE ON A TWO-DIMENSIONAL GRID

Pressure Drop in Air Piping Systems Series of Technical White Papers from Ohio Medical Corporation

Stability Improvements of Robot Control by Periodic Variation of the Gain Parameters

The Economics of the Cloud: Price Competition and Congestion

Static and Dynamic Properties of Small-world Connection Topologies Based on Transit-stub Networks

Lectures on the Dirichlet Class Number Formula for Imaginary Quadratic Fields. Tom Weston

POLYNOMIAL HISTOPOLATION, SUPERCONVERGENT DEGREES OF FREEDOM, AND PSEUDOSPECTRAL DISCRETE HODGE OPERATORS

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

Introduction to Matrix Algebra

Recall that two vectors in are perpendicular or orthogonal provided that their dot

The impact of metadata implementation on webpage visibility in search engine results (Part II) q

Synopsys RURAL ELECTRICATION PLANNING SOFTWARE (LAPER) Rainer Fronius Marc Gratton Electricité de France Research and Development FRANCE

1 Lecture: Integration of rational functions by decomposition

INTERPOLATION. Interpolation is a process of finding a formula (often a polynomial) whose graph will pass through a given set of points (x, y).

Application of Operator Theory for the Representation of Continuous and Discrete Distributed Parameter Systems

Inner product. Definition of inner product

Chapter 17. Orthogonal Matrices and Symmetries of Space

Nonlinear Iterative Partial Least Squares Method

Two-resource stochastic capacity planning employing a Bayesian methodology

CURVE FITTING LEAST SQUARES APPROXIMATION

by the matrix A results in a vector which is a reflection of the given

Beyond the F Test: Effect Size Confidence Intervals and Tests of Close Fit in the Analysis of Variance and Contrast Analysis

3 1. Note that all cubes solve it; therefore, there are no more

LEVERRIER-FADEEV ALGORITHM AND CLASSICAL ORTHOGONAL POLYNOMIALS

This unit will lay the groundwork for later units where the students will extend this knowledge to quadratic and exponential functions.

Fluent Software Training TRN Solver Settings. Fluent Inc. 2/23/01

Automatic Search for Correlated Alarms

Machine Learning with Operational Costs

A Note on Integer Factorization Using Lattices

6.042/18.062J Mathematics for Computer Science December 12, 2006 Tom Leighton and Ronitt Rubinfeld. Random Walks

An Introduction to Risk Parity Hossein Kazemi

Franck Cappello and Daniel Etiemble LRI, Université Paris-Sud, 91405, Orsay, France

The Characteristic Polynomial

Service Network Design with Asset Management: Formulations and Comparative Analyzes

ALGEBRAIC EIGENVALUE PROBLEM

Transcription:

38 lecture 25: Gaussian quadrature: nodes, weights; examles; extensions 3.5 Comuting Gaussian quadrature nodes and weights When first aroaching Gaussian quadrature, the comlicated characterization of the nodes and weights might seem like a significant drawback. For examle, if one aroximates an integral with an (n + )-oint Gaussian quadrature rule and finds the accuracy insufficient, one must comute an entirely new set of nodes and weights for a larger n from scratch. Many years ago, one would need to look u re-comuted nodes and weights for a given rule in book of mathematical tables, and one was thus limited to using values of n for which one could easily find tabulated values for the nodes and weights. However, in a landmark aer of 969, Gene Golub and John Welsch found a nice characterization of the nodes and weights in terms of a symmetric matrix eigenvalue roblem. Given the existence of excellent algorithms for comuting such eigenvalues, one can readily comute Gaussian quadrature nodes for arbitrary values of n. Some details of this derivation are left for a homework exercise, but we summarize the results here. One can show, via the discussion in Section 2.5, that, given values f (x) = and f (x) = the subsequent orthogonal olynomials can be generated via the three-term recurrence relation (3.4) f k+ (x) =x f k (x) a k f k (x) b k f k (x). The values of a,...,a n and b,...,b n follow from the Gram Schmidt rocess used in Section 2.5. Later we will also need the definition b := h, i = Z b a w(x) dx. G. H. Golub and J. H. Welsch, Calculation of Gauss Quadrature Rules, Math. Com. 23 (969) 22 23. In general, such algorithms require O(n 3 ) oerations to comute all eigenvalues and eigenvectors of an n n matrix; for the modest values of n most common in ractice (n in the tens or at most low hundreds), this exense is not onerous. Exloiting the structure of J n, this algorithm could be sed u to O(n 2 ). A good source for the values of {a k } and {b k } is Table. in Walter Gautschi s Orthogonal Polynomials, Oxford University Press, 24. Given a fixed value of n, collect the coefficients {a k } n k= and {b k } n k= and use them to oulate the Jacobi matrix 2 3 a b b a b2. (3.5) J n = b2...... 6... 4 an bn 7 5 bn a n The following theorem (whose roof is left for as a homework exercise) gives a ready way to comute the roots of f n+.

39 Theorem 3.9. Let {f j } n+ j= denote a sequence of monic orthogonal olynomials generated by the recurrence relation (3.4). Then l is a root of f n+ if and only if l is an eigenvalue of J n with corresonding eigenvector 2 (3.6) v(l) = 6 4 f (l) f (l)/ b f 2 (l)/ b b 2. f n (l)/ b b n 3. 7 5 Theorem 3.9 thus gives a convenient way to comute the nodes of a Gaussian quadrature rule. Given the nodes, one could comute the weights using either of the formulas (3.3) involving Lagrange basis functions. However, Golub and Welsch roved that these same weights could be extracted from the eigenvectors of the Jacobi matrix J n. Label the eigenvalues of J n as l < l < < l n and the corresonding eigenvectors, given by the formula (3.6), as v = v(l ), v = v(l ),..., v n = v(l n ). Then the weights for n + -oint Gaussian quadrature can be comuted as (3.7) = b kv j k 2, 2 Note: assumes (v j ) = f (l j )=. where k k 2 is the vector 2-norm. The formula (3.7) relies on the secific form of the eigenvector in (3.6). If the eigenvector is normalized differently (e.g., MATLAB s eigs routine gives unit eigenvectors, kv j k 2 =, then one should use the general formula (v j ) 2 (3.8) = b kv j k 2, 2 where (v j ) is the first entry in the eigenvector v j. 3.5. Examles of Gaussian Quadrature Let us examine four well-known Gaussian quadrature rules.

4 method interval, (a, b) weight, w(x) Gauss Legendre (, ) Gauss Chebyshev (, ) x 2 Gauss Laguerre (, ) e x Gauss Hermite (, ) e x2 The weight function lays an essential role here. For examle, a Gauss Chebyshev quadrature rule with n + = 5 oints will exactly integrate olynomials of degree 2n + = 9 times the weight function. Thus this rule will exactly integrate Z x 9 x 2 dx, but it will not exactly integrate Z x dx. This is a subtle oint that many students overlook when first learning about Gaussian quadrature. Examle 3.2. Gauss Legendre Quadrature When numerical analysts seak of Gaussian quadrature without further qualification, they tyically mean Gauss Legendre quadrature, i.e., quadrature with the weight function w(x) = (erhas over a transformed domain (a, b); see Section 3.5.2.) As discussed in Section 2.5., the orthogonal olynomials for this interval and weight are called Legendre olynomials. To construct a Gaussian quadrature rule with n + oints, determine the roots of the degree-(n + ) Legendre olynomial, then find the associated weights. First consider n =. The quadratic Legendre olynomial is f 2 (x) =x 2 /3, and from this olynomial one can derive the 2-oint quadrature rule that is exact for cubic olynomials, with roots ±/ 3. This agrees with the secial 2-oint rule derived in Section 3.4.. The values for the weights follow simly, w = w =, giving the 2-oint Gauss Legendre rule I n ( f )= f ( / 3)+ f (/ 3) that exactly integrates olynomials of degree 2n + = 3, i.e., all cubics. Recall that Simson s rule also exactly integrates cubics, but it requires three f evaluations, rather than the two f evaluations required of this rule.

4.6 n = 4.5.4.3.2..35.3.25.2.5..5 n = 8.5 - -.5.5 - -.5.5 - -.5.5.2..5 n = 6..8.6 n = 32.5 n = 64.4.3.25 n = 28 w.2 j.5.4.2..2..5 - -.5.5 - -.5.5 - -.5.5 For Gauss Legendre quadrature rules based on larger numbers of oints, we can comute the nodes and weights using the symmetric eigenvalue formulation discussed in Section 3.5. For this weight, one can show Figure 3.9: Nodes and weights of Gauss Legendre quadrature, for various values of n. In each case, the location of the vertical line indicates x j, while the height of the line shows. a k =, k =,,... ; b = 2; b k = k2 4k 2, k =, 2, 3,.... Figure 3.9 shows the nodes and weights for six values of n, as comuted via the eigenvalue roblem. Notice that the oints are not uniformly saced, but are slightly more dense at the ends of the interval. Moreover, the weights are smaller at these ends of the interval. The table below shows nodes and weights for n = 4, as comuted in MATLAB. j nodes, x j weights,.9679845938664.2369268855689.53846935683.47862867499366 2..568888888888889 3.53846935683.47862867499367 4.9679845938664.2369268855689 Examle 3.3. Gauss Chebyshev quadrature Another oular class of Gaussian quadrature rules use as their nodes the roots of the Chebyshev olynomials. The standard degree-

42 k Chebyshev olynomial is defined as T k (x) =cos(k cos x), which can be generated by the recurrence relation T k+ (x) =2xT k (x) T k (x). with T (x) = and T (x) =x. These Chebyshev olynomials are orthogonal on (, ) with resect to the weight function w(x) = x 2. The degree-(n + ) Chebyshev olynomial has the roots x j = cos (j + /2), j =,..., n. n + In this case all the weights work out to be identical; one can show = n + for all j =,... n. Figure 3. shows these nodes and weights. One can also define the monic Chebyshev olynomials according to the recurrence (3.4) with a k =, k =,,... ; See Süli and Mayers, Problem.4 for a sketch of a roof. b = ; b = /2; b k = /4, k = 2, 2, 3,.... The resulting olynomials are scaled versions of the usual Chebyshev olynomials T k+ (x), and thus have the same roots. Again, we emhasize that the weight function lays a crucial role: the Gauss Chebyshev rule based on n + interolation nodes will exactly comute integrals of the form Z (x) dx x 2 for all 2 P 2n+. For a general integral Z f (x) dx. x 2 the quadrature rule should be imlemented as I n ( f )= n  f (x j ); j= Note that the / x 2 comonent of the integrand is not evaluated here; its influence has already been incororated into the weights { }.

43.7 n = 4.6.5.4.3.2..4.3.2. n = 8.5.2 n = 6 - -.5.5 - -.5.5 - -.5.5..5. n = 32.5 n = 64.25 n = 28.8.4.2.6.3.5.4.2..2..5 - -.5.5 - -.5.5 - -.5.5 The Chebyshev weight function w(x) = /( x 2 ) blows u at ±, so if the integrand f does not balance this growth, adative Newton Cotes rules will likely have to lace many interolation nodes near these singularities to achieve decent accuracy, while Gauss Chebyshev quadrature has no roblems. Moreover, in this imortant case, the nodes and weights are trivial to comute, thus allaying the need to solve the eigenvalue roblem. It is worth ointing out that Gauss Chebyshev quadrature is quite different than Clenshaw Curtis quadrature. Though both use Chebyshev oints as interolation nodes, only Gauss Chebyshev incororates the weight function w(x) =( x 2 ) /2 in the weights { }. Thus Clenshaw Curtis is more aroriately comared to Gauss Legendre quadrature. Since the Clenshaw Curtis method is not a Gaussian quadrature formula, it will generally be exact only for all 2 P n, rather than all 2 P 2n+. Figure 3.: Nodes and weights of Gauss Chebyshev quadrature, for various values of n. In each case, the location of the vertical line indicates x j, while the height of the line shows. The nodes, roots of Chebyshev olynomials, cluster toward the end of the intervals; the weights are the same for all the nodes, = /(n + ). Examle 3.4. Gauss Laguerre quadrature The Laguerre olynomials form a set of orthogonal olynomials over (, ) with the weight function w(x) = e x. The accomanying quadrature rule aroximates integrals of the form Z f (x)e x dx. The recurrence (3.4) uses the coefficients

44 n = 4 n = 8 n = 6 log - -2 log - -2 log - -2-25 -25-25 -2-2 -2-2 -2-2 a k = 2k +, k =,,... ; b = ; b k = k 2, k =, 2, 3,.... Figure 3. shows the nodes and weights for several values of n. Since the domain of integration (, ) is infinite, the quadrature nodes x j get larger and larger. As the nodes get larger, the corresonding weights decay raidly. When < 5, it becomes difficult to reliably comute the weights by solving the Jacobi matrix eigenvalue roblem. To get the small weights given here, we have used Chebfun s lagts routine routine, which uses a more efficient algorithm of Glaser, Liu, and Rokhlin (27). Figure 3.: Nodes and weights of Gauss Laguerre quadrature, for various values of n. In each case, the location of the vertical line indicates x j, while the height of the line shows log. Note that the horizontal axis is scaled logarithmically. As n increases the quadrature rule includes larger and larger nodes to account for the infinite domain of integration; however, the weights are excetionally small for the larger nodes. For examle for n = 6, w 6 23. Examle 3.5. Gauss Hermite quadrature The Hermite olynomials are orthogonal olynomials over (, ) with the weight function w(x) =e x2. This quadrature rule aroximates integrals of the form Z f (x)e x2 dx. The Hermite olynomials can be generated using the recurrence (3.4) with coefficients a k =, k =,,... ; b = ; b k = k/2, k =, 2, 3,.... Figure 3.2 shows nodes and weights for various values of n. Though the interval of integration is infinite, the nodes do not grow as raidly as for Gauss Laguerre quadrature, since the Hermite weight w(x) =e x2 decays more raidly than the Laguerre weight w(x) = e x. (Again, the nodes and weights in the figure were comuted with Chebfun s imlementation of the Glaser, Liu, and Rokhlin algorithm.)

45 n = 4 n = 8 n = 6 log - log - log - -6-4 -2 2 4 6-6 -4-2 2 4 6-6 -4-2 2 4 6 3.5.2 Changing variables to transform domains One notable drawback of Gaussian quadrature is the need to recomute (or look u) the requisite weights and nodes. If one has a quadrature rule for the interval [c, d], and wishes to adat it to the interval [a, b], there is a simle change of variables rocedure to eliminate the need to recomute the nodes and weights from scratch. Let t be a linear transformation taking [c, d] to [a, b], b a t(x) =a + (x c) d c Figure 3.2: Nodes and weights of Gauss Hermite quadrature, for various values of n. In each case, the location of the vertical line indicates x j, while the height of the line shows log. Contrast this lot to Figure 3.. Though the domain of integration is infinite in both cases, the weight function here, e x2, decays much more raidly than e x, exlaining why the largest nodes are smaller than seen in Figure 3. for Gauss Laguerre quadrature. with inverse t : [a, b]! [c, d], d t (y) =c + b Then we have Z b a f (x)w(x) dx = Z t (b) b = d t (a) The quadrature rule for [a, b] takes the form for b b = d bi( f )= c (y a). a f (t(x))w(t(x))t (x) dx Z a d f (t(x))w(t(x)) dx. c c n  b f (bx j ), j= a w c j, bx j = t (x j ), where {x j } n j= and {} n j= are the nodes and weights for the quadrature rule on [c, d]. Be sure to note how this change of variables alters the weight function. The transformed rule will now have a weight function w(t(x)) = w(a +(b a)(x c)/(d c)), not simly w(x). To make this concrete, consider Gauss Chebyshev quadrature, which uses the weight function w(x) =( x 2 ) /2 on

46 [, ]. If one wishes to integrate, for examle, R x( x2 ) /2 dx, it is not sufficient just to use the change of variables formula described here. To comute the desired integral, one would have to adjust the nodes and weights to accommodate w(x) =( x 2 ) /2 on [, ]. Comosite rules Emloying this change of variables technique, it is simle to devise a method for decomosing the interval of integration into smaller regions, over which Gauss quadrature rules can be alied. (The most straightforward alication is to adjust the Gauss Legendre quadrature rule, which avoids comlications induced by the weight function, since w(x) = in this case.) Such techniques can be used to develo Gaussian-based adative quadrature rules. 3.5.3 Gauss Radau and Gauss-Lobatto quadrature Some alications make it necessary or convenient to force one or both of the end oints of the interval of integration to be among the quadrature oints. Such methods are known as Gauss Radau and Gauss Lobatto quadrature rules, resectively; rules based on n + interolation oints exactly integrate all olynomials in P 2n or P 2n : each quadrature node that we fix decreases the otimal order by one.