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

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

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

MA2501 Numerical Methods Spring 2015

COURSE Numerical integration of functions

Computational Physics

Power Series Solutions to the Legendre Equation

LECTURE 14 NUMERICAL INTEGRATION. Find

Numerical Analysis Preliminary Exam 10.00am 1.00pm, January 19, 2018

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

Section 6.6 Gaussian Quadrature

Preliminary Examination in Numerical Analysis

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

Examination paper for TMA4215 Numerical Mathematics

Numerical integration - I. M. Peressi - UniTS - Laurea Magistrale in Physics Laboratory of Computational Physics - Unit V

Data Analysis-I. Interpolation. Soon-Hyung Yook. December 4, Soon-Hyung Yook Data Analysis-I December 4, / 1

Scientific Computing: Numerical Integration

Lecture Note 3: Polynomial Interpolation. Xiaoqun Zhang Shanghai Jiao Tong University

Lecture 10 Polynomial interpolation

Exam 2. Average: 85.6 Median: 87.0 Maximum: Minimum: 55.0 Standard Deviation: Numerical Methods Fall 2011 Lecture 20

Jim Lambers MAT 460/560 Fall Semester Practice Final Exam

Method of Finite Elements I

Polynomial Functions

Do not turn over until you are told to do so by the Invigilator.

A first order divided difference

AM205: Assignment 3 (due 5 PM, October 20)

Lecture Note 3: Interpolation and Polynomial Approximation. Xiaoqun Zhang Shanghai Jiao Tong University

12.0 Properties of orthogonal polynomials

8.3 Numerical Quadrature, Continued

Numerical Integration

Scientific Computing

Interpolation Theory

Input: A set (x i -yy i ) data. Output: Function value at arbitrary point x. What for x = 1.2?

3.1 Interpolation and the Lagrange Polynomial

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

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

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

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.

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

Power Series Solutions to the Legendre Equation

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.

November 20, Interpolation, Extrapolation & Polynomial Approximation

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

Numerical Methods I Orthogonal Polynomials

The Perrin Conjugate and the Laguerre Orthogonal Polynomial

Chapter 4: Interpolation and Approximation. October 28, 2005

6x 2 8x + 5 ) = 12x 8

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

Chapter 3 Interpolation and Polynomial Approximation

MATHEMATICAL METHODS INTERPOLATION

Dynamic Programming. Macro 3: Lecture 2. Mark Huggett 2. 2 Georgetown. September, 2016

Bindel, Spring 2012 Intro to Scientific Computing (CS 3220) Week 12: Monday, Apr 16. f(x) dx,

(0, 0), (1, ), (2, ), (3, ), (4, ), (5, ), (6, ).

Math 4310 Solutions to homework 7 Due 10/27/16

PARTIAL DIFFERENTIAL EQUATIONS

GAUSS-LAGUERRE AND GAUSS-HERMITE QUADRATURE ON 64, 96 AND 128 NODES

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

Fast Numerical Methods for Stochastic Computations

Interpolation & Polynomial Approximation. Hermite Interpolation I

MTH5102 Spring 2017 HW Assignment 1: Prob. Set; Sec. 1.2, #7, 8, 12, 13, 20, 21 The due date for this assignment is 1/18/17.

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

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

Legendre s Equation. PHYS Southern Illinois University. October 18, 2016

Lecture 4: Fourier Transforms.

Polynomial Review Problems

The problems that follow illustrate the methods covered in class. They are typical of the types of problems that will be on the tests.

Applications of Differentiation

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

Series Solutions of Differential Equations

Lecture : The Indefinite Integral MTH 124

NUMERICAL ANALYSIS PROBLEMS

Engg. Math. II (Unit-IV) Numerical Analysis

Math 4377/6308 Advanced Linear Algebra I Dr. Vaughn Climenhaga, PGH 651A HOMEWORK 3

CURVE FITTING LEAST SQUARE LINE. Consider the class of linear function of the form. = Ax+ B...(1)

Ma 530 Power Series II

Department of Applied Mathematics Preliminary Examination in Numerical Analysis August, 2013

Examples 2: Composite Functions, Piecewise Functions, Partial Fractions

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

Math 255 Honors: Gram-Schmidt Orthogonalization on the Space of Polynomials

Measure and Integration: Solutions of CW2

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

Mathematical Olympiad Training Polynomials

Chapter 13: Integral Calculus. SSMth2: Basic Calculus Science and Technology, Engineering and Mathematics (STEM) Strands Mr. Migo M.

We consider the problem of finding a polynomial that interpolates a given set of values:

Fast Convolution; Strassen s Method

Fixed point iteration and root finding

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

Mathematics Notes for Class 12 chapter 7. Integrals

Math 660-Lecture 15: Finite element spaces (I)

Multistage Methods I: Runge-Kutta Methods

Interpolation and Approximation

Interpolation. Chapter Interpolation. 7.2 Existence, Uniqueness and conditioning

6x 2 8x + 5 ) = 12x 8. f (x) ) = d (12x 8) = 12

Root Finding (and Optimisation)

Calculus I Sample Exam #01

Exercise 11. Isao Sasano

5. Hand in the entire exam booklet and your computer score sheet.

Key Words: cardinal B-spline, coefficients, moments, rectangular rule, interpolating quadratic spline, hat function, cubic B-spline.

Exam in TMA4215 December 7th 2012

Fundamentals of Numerical Mathematics. Charles University Prague Faculty of Mathematics and Physics Czech Republic

2

Transcription:

CE 025 - Lecture 6 LECTURE 6 GAUSS QUADRATURE In general for ewton-cotes (equispaced interpolation points/ data points/ integration points/ nodes). x E x S fx dx hw' o f o + w' f + + w' f + E 84 f 0 f f f 2 closed formula x s x 0 x x 2 x E x h ote that for ewton-cotes formulae only the weighting coefficients w i were unknown and the were fixed x i p. 6.

CE 025 - Lecture 6 However the number of and placement of the integration points influences the accuracy of the ewton-cotes formulae: even th degree interpolation function exactly integrates an + th degree polynomial This is due to the placement of one of the data points. odd th degree interpolation function exactly integrates an th degree polynomial. Concept: Let s allow the placement of the integration points to vary such that we further increase the degree of the polynomial we can integrate exactly for a given number of integration points. In fact we can integrate an 2 + degree polynomial exactly with only + integration points p. 6.2

CE 025 - Lecture 6 Assume that for Gauss Quadrature the form of the integration rule is x E fx dx w o f o + w f + + w f + E x S 85 f 0 f f f f2 x s x 0 x x 2 x x x E In deriving (not applying) these integration formulae Location of the integration points, x i i O are unknown Integration formulae weights, w i i O are unknown 2 + unknowns we will be able to exactly integrate any 2 + degree polynomial! p. 6.

CE 025 - Lecture 6 Derivation of Gauss Quadrature by Integrating Exact Polynomials and Matching Derive point Gauss-Quadrature 2 unknowns, which will exactly integrate any linear function w o x o Let the general polynomial be fx Ax + B where the coefficients A Bcan equal any value Also consider the integration interval to be + such that x S and x E + (no loss in generality since we can always transform coordinates). + fx dx w o fx o Substituting in the form of fx + Ax + B d x w o Ax o + B p. 6.4

CE 025 - Lecture 6 A x2 ---- + Bx 2 + w o Ax o + B In order for this to be true for any st degree polynomial (i.e. any A and B). Therefore x o 0, w o 2 for point Gauss Quadrature. 86 A0 + B2 Ax o w o + Bw o 0 x o w o 2 w o f 0 f(x) - x 0 + We can integrate exactly with only point for a linear function while for ewton-cotes we needed two points! p. 6.5

CE 025 - Lecture 6 Derive a 2 point Gauss Quadrature Formula 87 - x 0 x + The general form of the integration formula is w o, x o, w, x are all unknowns I w o f o + w f 4 unknowns we can fit a rd degree polynomial exactly fx Ax + Bx 2 + Cx + D Substituting in for fx into the general form of the integration rule + fx dx w o fx o + w fx p. 6.6

CE 025 - Lecture 6 + Ax + Bx 2 + Cx + D d x w o Ax o + Bx 2 o + Cx o + D + w Ax + Bx 2 + Cx + D Ax -------- 4 4 Bx Cx + -------- + -------- 2 + Dx 2 + w o Axo + Bx 2 o + Cx o + D + w Ax + Bx 2 + Cx + D Aw o xo + w x B w o x 2 o w x 2 2 + + -- + Cw o x o + w x + Dw o + w 2 0 In order for this to be true for any third degree polynomial (i.e. all arbitrary coefficients, A, B, C, D), we must have: w o xo + w x 0 w o xo 2 w x 2 2 + -- 0 w o x o + w x 0 w o + w 2 0 p. 6.7

CE 025 - Lecture 6 4 nonlinear equations 4 unknowns w o and w x o -- and x + -- All polynomials of degree or less will be exactly integrated with a Gauss-Legendre 2 point formula. p. 6.8

CE 025 - Lecture 6 Gauss Legendre Formulae I + fxdx i 0 w i f i + E + x i, 0 0 2 2, --, + -- 2-0.774597, 0, +0.774597 i 0 w i 0.5555, 0.8889, 0.5555 Exact for polynomials of degree + 2 + 5 p. 6.9

CE 025 - Lecture 6 + x i, 4-0.866-0.99804 0.99804 0.866 4 5-0.9067985-0.58469 0.00000000 0.58469 0.9067985 5 6-0.924695-0.662099-0.28699 0.28699 0.662099 0.924695 i 0 w i 0.4785485 0.652455 0.652455 0.4785485 0.2692689 0.47862867 0.56888889 0.47862867 0.2692689 0.72449 0.607657 0.46799 0.46799 0.607657 0.72449 Exact for polynomials of degree 7 9 p. 6.0

CE 025 - Lecture 6 otes + the number of integration points Integration points are symmetrical on + Formulae can be applied on any interval using a coordinatetransformation + integration points will integrate polynomials of up to degree 2 + exactly. Recall that ewton Cotes + integration points only integrates an th / + th degree polynomial exactly depending on being odd or even. For Gauss-Legendre integration, we allowed both weights and integration point locations to vary to match an integral exactly more d.o.f. allows you to match a higher degree polynomial! An alternative way of looking at Gauss-Legendre integration formulae is that we use Hermite interpolation instead of Lagrange interpolation! (How can this be since Hermite interpolation involves derivatives let s examine this!) p. 6.

CE 025 - Lecture 6 Derivation of Gauss Quadrature by Integrating Hermite Interpolating Functions Hermite interpolation formulae Hermite interpolation which matches the function and the first derivative at + interpolation points is expressed as: gx i 0 i xf i + i 0 i xf i 88 () () () () () () () f 0 f 0 f f f 2 f 2 f f f 4 f 4 f5 f 5 f f 0 2 4 5 x 0 x x 2 x x 4 x 5 x It can be shown that in general for non-equispaced points i x t i xl i xl i x i 0 i x s i xl i xl i x i 0 p. 6.2

CE 025 - Lecture 6 where p x x x o x x x x l i x p x -------------------------------------- i 0 x p x i x i xi t i x x x i 2 l i s i x x x i p. 6.

CE 025 - Lecture 6 Example of defining a cubic Hermite interpolating function Derive Hermite interpolating functions for 2 interpolation points located at and + for the interval +. 89 () f 0 f 0 () f f x 0 x + x + 2 points Establish p x p x x x o x x p x x x o + x x p. 6.4

CE 025 - Lecture 6 Establish l i x l i x l i x p x ---------------------------------------- x p xi x i x x o x x -------------------------------------------------------------------- x x i x i x o + x i x Let i 0 l o x x x o x x ----------------------------------------------------- x x o 0 + x o x l o x x x --------------- x o x Substitute in x o and x + l o x -- x 2 p. 6.5

CE 025 - Lecture 6 Let i l x x x o x x ----------------------------------------------------- x x x x o + 0 Substitute in values for x o, x l x -- + x 2 Taking derivatives l o x 2 -- l x + --- 2 p. 6.6

CE 025 - Lecture 6 Establish t i x t o x x x o 2l o x o t o x x + 2 2 -- t o x 2 + x t x x x 2 l x t x x 2 2 -- t x 2 x Establish s i x s o x x + s x x p. 6.7

CE 025 - Lecture 6 Establish i x o x t o xl o xl o x o x 2 + x 2 -- x 2 -- x o x -- 2 x + x 4 x t xl xl x x 2 x 2 -- + x 2 -- + x x -- 2 + x x 4 p. 6.8

CE 025 - Lecture 6 Establish i x o x s o xl o xl o x o x x + 2 -- x 2 -- x o x -- x x 4 2 + x x s xl xl x x x 2 -- + x 2 -- + x x -- x + x 4 2 + x In general gx o x f o + x f + o x f + x f o p. 6.9

CE 025 - Lecture 6 90 i (x) () i (x) 0 (x) (x) () (x) i (x) x () i (x) () 0 (x) x 0 (x) () 0 () (x) x x These functions satisfy the constraints i x j ij i x j 0 i x i j 0 x j ij p. 6.20

CE 025 - Lecture 6 Gauss-Legendre Quadrature by integrating Hermite interpolating polynomials I otes + fx dx w i f i + E i 0 Use + without loss of generality we can always transform the interval. Approximation for I is exact for 2 + degree polynomials We can derive all Gauss-Legendre quadrature formulae by approximating fx with an 2 + th degree Hermite interpolating function using specially selected integration/ interpolation points. where I + gxdx + E gx i 0 i xf i + i 0 i xf i p. 6.2

CE 025 - Lecture 6 Thus I + i xf i + i xf i dx + E i 0 i 0 I A i f i + B i f i + E i 0 i 0 where A i + + i xdx and B x dx i i Furthermore we can show that E + 2 p + x ---------------------- 2 + 2! f 2 + 2 x o + H.O.T. dx p. 6.22

CE 025 - Lecture 6 ote that we are assuming Taylor series expansions about x o and using higher order terms in the expansion. Therefore E 0 for any polynomial of degree 2 + or less! The problem that we encounter is that the integration formula as it now stands in general requires us to know both functional and first derivative values at the nodes! Let us select x o x x 2 x such that B i 0 i 0 + i x dx 0 i 0 + s i x l xl xdx 0 i 0 i i + p x x x i ----------------------------------- l i x dx 0 i 0 x p xi x i p. 6.2

CE 025 - Lecture 6 ----------------- xi p xl i x dx 0 i 0 p + p x polynomial of degree + l i x polynomial of degree Therefore we require p x to be orthogonal on + to all polynomials of degree or less any multiple of Legendre-Polynomials will satisfy this. Let p x 2 ----------------------------------------P + +! 2 2 +! + x where p x x x o x x x x 2 x x P + the Legendre polynomial of degree + 2 ---------------------------------------- + +! 2 is required to normalize the leading coefficient of 2 +! P + x p. 6.24

CE 025 - Lecture 6 What have we done by defining p x in this way we have selected the integration/ interpolation/data points x o x x to be the roots of P + x. In general P n x ---------- dn x 2 2 n -------------------------- n! dx n n P o x P x x P 2 x --x 2 2 P x --5x 2... x p. 6.25

CE 025 - Lecture 6 So far we have established Selecting p x to be proportional to the Legendre Polynomial of degree + this satisfies the orthogonality condition which will lead to: f i + i x dx 0 As a result terms will not appear in the Gauss-Legendre integration formula. If we select p x to be the Legendre Polynomial of degree + the roots of that polynomial will represent the interpolating/integration/data points since p x x x o x x x x has been set equal to CP + x ow we must find the weights of the integration formula. ote that A i will represent the weights! A i + i xdx p. 6.26

CE 025 - Lecture 6 where A i + t i x l i x l i xdx xi t i x x x i 2 l i l i x p x ----------------------------------- x p xi x i p x x x o x x and where x o x are the roots of the Legendre polynomial of degree + or p x 2 ----------------------------------------P + +! 2 2 +! + x p. 6.27

CE 025 - Lecture 6 Two point Gauss-Legendre integration Develop a 2 point Gauss-Legendre integration formula for +. Let gx gx j 0 i xf i o xf o + j 0 i xf i + xf + o xf o + xf Thus I + gxdx + E I + o xf o dx + + xf dx + o xf o dx + + + xf dx + I f o o x d x f x d x f o o x dx + + + f + + + xdx p. 6.28

CE 025 - Lecture 6 Step - Establish interpolating points Interpolation points will be the roots of the Legendre Polynomial of order 2. P 2 x --x 2 2 --x 2 2 0 x 2 x 2 -- x 0 -- x 0 0.5775 p. 6.29

CE 025 - Lecture 6 Checking these roots P 2 x ---------- d2 x 2 2 2 -------------------------- 2 2! dx 2 P 2 x -- ------- d2 8dx 2 x 4 2x 2 + P 2 x --2x 8 2 4 P 2 x --x 2 2 p x 2 ----------------- 2 2! 2 22! P x 2 p x 4 4 ----------------- --x 4 2 2 2 p x x 2 -- p. 6.0

CE 025 - Lecture 6 From formula which defines p x using the integration points p x x + -- x -- x2 -- Step 2 - Establish the coefficients of the derivative terms in the integration formula Let s demonstrate that with the roots x o 0.5775 we will satisfy + + o x dx 0 and x d x 0 First develop o x and x by developing s o x and s x p x, p x, lo x, l x, p x x x o x x p x x xo + x x p. 6.

CE 025 - Lecture 6 l j x p x -------------------------------------- x p j 0 x j x j l j x x x o x x -------------------------------------------------------------------- x x j x j x o + x j x l o x x x o x x -------------------------------------------------------------- x x o x o x o + x o x l o x x x --------------- x o x l x x x o x x ----------------------------------------------------------------------- x x x x o + x x l x x x o --------------- x x o p. 6.2

CE 025 - Lecture 6 s o x x x o s x x x ow we can establish o x o x s o x l o x l o x x x o x x x o --------------- x x --------------- x o x x o x oting that x o --, x -- o x x + x -- -- x -- ------------------------------------------ -- -- 2 o x -- x 4 --x 2 --x + -- 2 / p. 6.

CE 025 - Lecture 6 Similarly for x x s x l x l x x x o x x o x x x -------------------- -------------------- x x o x x o Substituting x o --, x -- x x -- x + -- x + -- ----------------------------------------------------------------- -- + -- 2 x -- x 4 --x 2 + --x -- 2 / p. 6.4

CE 025 - Lecture 6 ow we can develop + o xdx + o xdx + -- x 4 --x 2 --x + -- 2 / dx + o xdx 4 ---- -- 4 2 -- x4 / x --x 6 2 / x + -- 2 + + o xdx -- 4 -- -- 4 2 / -- + -- 6 2 / -- -- 4 2 / + -- -- 6 2 / + o x dx 0 p. 6.5

CE 025 - Lecture 6 Develop + xdx + xdx + -- x 4 --x 2 + --x -- 2 / dx + xdx 4 ---- -- 4 2 / x --x 6 2 + -- 2 -- x4 / x + + xdx -- 4 -- -- 4 / 2 + -- -- 6 2 / -- -- 4 2 / -- 6 + -- 2 / + x dx 0 p. 6.6

CE 025 - Lecture 6 ow our integration formula reduces to: + + I f o o xdx + f xdx I A o f o + A f where A o + o xdx and A xdx + Step - Develop A o, A Establish o x o x t o x l o x l o x xo o x x x o 2l o l o xl o x p. 6.7

CE 025 - Lecture 6 2 o x x x o --------------- x x x o x --------------- x x --------------- x o x x o x o x x + -- 2 x -- x -- ------------------------ ------------------------------------------------------------- -- -- -- -- -- -- o x 4 -- x + -- 2 ------------- 2 x 2 2 -- --x + -- o x 2 --------- ------ + x 4 x 2 2 --x + -- o x -- x 4 x + 2 -- 2 / p. 6.8

CE 025 - Lecture 6 Develop + o xdx + o xdx + 4 -- x x + 2 -- / 2 dx + o xdx -- x4 ---- 4 4 x ---- 2 + 2 2 -- 2 / x + + o xdx -- 4 -- -- + 2 4 2 -- 2 / -- -- 2 4 2 -- 2 / + o xdx -- 4 4 -- -- + o x dx A o p. 6.9

CE 025 - Lecture 6 Similarly we can show that A + x dx Thus we have established the two point Gauss Quadrature rule I + f x dx w o f o + w f where x o -- and x are the integration points and + -- w o w We note that this integration rule was established by defining a Hermite cubic interpolating function and defining the integration points x o, x such that + o x dx 0 and x d x 0 + Therefore the functional derivative values drop out of the Gauss Legendre integration formula! p. 6.40