Chapter 4, Integration of Functions. Open and Closed Formulas x 1 =a x 2 x 3 x 4 x 5 =b Closed formula uses end points, e.g., Open formulas - use interior.

Slides:



Advertisements
Similar presentations
Numerical Integration
Advertisements

Computational Physics Numerical Integration Dr. Guy Tel-Zur Tulips by Anna Cervova, publicdomainpictures.net.
1 Chapter 5 Numerical Integration. 2 A Review of the Definite Integral.
Computational Methods in Physics PHYS 3437
Section 5.7 Numerical Integration. Approximations for integrals: Riemann Sums, Trapezoidal Rule, Simpson's Rule Riemann Sum: Trapezoidal Rule: Simpson’s.
Asymptotic error expansion Example 1: Numerical differentiation –Truncation error via Taylor expansion.
Numerical Integration of Functions
NUMERICAL DIFFERENTIATION AND INTEGRATION
Chapter 7 Numerical Differentiation and Integration
Today’s class Romberg integration Gauss quadrature Numerical Methods
Numerical Integration
Chapter 3, Interpolation and Extrapolation. Interpolation & Extrapolation (x i,y i ) Find an analytic function f(x) that passes through given N points.
ECIV 720 A Advanced Structural Mechanics and Analysis
Numerical Integration Lecture (II)1
ECIV 301 Programming & Graphics Numerical Methods for Engineers Lecture 30 Numerical Integration & Differentiation.
Lecture 3: Integration. Integration of discrete functions
MANE 4240 & CIVL 4240 Introduction to Finite Elements Numerical Integration in 1D Prof. Suvranu De.
Ch 5.1: Review of Power Series
ECIV 301 Programming & Graphics Numerical Methods for Engineers Lecture 29 Numerical Integration.
Chapter 17 Numerical Integration Formulas. Graphical Representation of Integral Integral = area under the curve Use of a grid to approximate an integral.
Chapter 7 Differentiation and Integration
Numerical Integration
MA/CS 375 Fall MA/CS 375 Fall 2002 Lecture 32.
2010/3/11 計算機在工程上的應用 Page 1 Gaussian quadrature Advisor: J. T. Chen Reporter: Jia-Wei Lee Date: Mar., 11, 2010.
CISE-301: Numerical Methods Topic 1: Introduction to Numerical Methods and Taylor Series Lectures 1-4: KFUPM.
NUMERICAL DIFFERENTIATION The derivative of f (x) at x 0 is: An approximation to this is: for small values of h. Forward Difference Formula.
CISE301_Topic7KFUPM1 SE301: Numerical Methods Topic 7 Numerical Integration Lecture KFUPM Read Chapter 21, Section 1 Read Chapter 22, Sections 2-3.
CISE301_Topic71 SE301: Numerical Methods Topic 7 Numerical Integration Lecture KFUPM (Term 101) Section 04 Read Chapter 21, Section 1 Read Chapter.
Quadrature Greg Beckham. Quadrature Numerical Integration Goal is to obtain the integral with as few computations of the integrand as possible.
Computational Methods in Physics PHYS 3437 Dr Rob Thacker Dept of Astronomy & Physics (MM-301C)
Chapter 4 Numerical Differentiation and Integration 1/16 Given x 0, approximate f ’(x 0 ). h xfhxf xf h )()( lim)('    x0x0 x1x1 h x1x1 x0x0.
1 Chapter 5 Numerical Integration. 2 A Review of the Definite Integral.
3. Numerical integration (Numerical quadrature) .
Lecture 19 - Numerical Integration CVEN 302 July 22, 2002.
Numerical Computation
1 Chapter 7 NUMERICAL INTEGRATION. 2 PRELIMINARIES We use numerical integration when the function f(x) may not be integrable in closed form or even in.
1 Numerical Analysis Lecture 12 Numerical Integration Dr. Nader Okasha.
Chapter 9 Function Approximation
MA2213 Lecture 4 Numerical Integration. Introduction Definition is the limit of Riemann sums I(f)
Lecture 22 - Exam 2 Review CVEN 302 July 29, 2002.
MA/CS 375 Fall MA/CS 375 Fall 2002 Lecture 31.
1. Interpolating polynomials Polynomial of degree n,, is a linear combination of Definitions: (interval, continuous function, abscissas, and polynomial)
6. Introduction to Spectral method. Finite difference method – approximate a function locally using lower order interpolating polynomials. Spectral method.
5. Integration 2.Quadrature as Box Counting 3.Algorithm: Trapezoid Rule 4.Algorithm: Simpson’s Rule 5.Integration Error 6.Algorithm: Gaussian Quadrature.
Chap. 11 Numerical Differentiation and Integration
CHAPTER 3 NUMERICAL METHODS
Lecture 22 Numerical Analysis. Chapter 5 Interpolation.
Techniques for Numerical Integration
1/7  4.6 Adaptive Quadrature Methods Chapter 4 Numerical Differentiation and Integration -- Adaptive Quadrature Methods   /2  /4  /8 Predict the.
The purpose of Chapter 5 is to develop the basic principles of numerical integration Usefule Words integrate, integral 积分(的), integration 积分(法), quadrature.
Fourier Approximation Related Matters Concerning Fourier Series.
SE301_Topic 6Al-Amer20051 SE301:Numerical Methods Topic 6 Numerical Integration Dr. Samir Al-Amer Term 053.
Runge Kutta schemes Taylor series method Numeric solutions of ordinary differential equations.
Quadrature – Concepts (numerical integration) Don Allen.
MA2213 Lecture 12 REVIEW. 1.1 on page Compute Compute quadratic Taylor polynomials for 12. Compute where g is the function in problems 11 and 12.
Chapter 4, Integration of Functions
NUMERICAL DIFFERENTIATION Forward Difference Formula
Chapter 3, Interpolation and Extrapolation
Chapter 9 Function Approximation
Class Notes 9: Power Series (1/3)
Taylor and Maclaurin Series
NUMERICAL INTEGRATION
Numerical Integration:
SKTN 2393 Numerical Methods for Nuclear Engineers
Numerical Computation and Optimization
Numerical Integration
Chapter 4, Integration of Functions
Approximation of Functions
Chapter 3, Interpolation and Extrapolation
Presentation transcript:

Chapter 4, Integration of Functions

Open and Closed Formulas x 1 =a x 2 x 3 x 4 x 5 =b Closed formula uses end points, e.g., Open formulas - use interior points only. Extended formulas – piecewise sum of integration formula.

Deriving Integration Formulas A.Given N function values f i, i=1,2,…N, interpolate with the N−1 degree polynomial, and integrate the polynomial analytically. B.Assuming a form Σw i f i, determine the weights w j by requiring that all polynomials of degree N−1 or less integrate exactly.

Closed Newton-Cotes Formulas Equally spaced abscissas, x j =x 1 +(j-1)h Lagrange’s interpolation formula Integrating, gives Where l j (x) is a polynomial of degree N-1 such that l j (x j ) = 1 and l j (x k ) = 0 if k ≠ j.

Special Cases, N=2,3,4 : the Integration Rules Trapezoidal rule Simpson’s rule 3/8 rule linear interpolation parabola

Open Formula in a Single Interval These formulas are useful to construct extended formulas with open interval Open formulas are useful for integrals where the end-point is singular, e.g.,

Extended Formulas Using trapezoidal rule in intervals [x 1,x 2 ], [x 2,x 3 ], [x 3,x 4 ], …, and [x N-1,x N ], we get Using Simpson’s rule in intervals [x 1,x 3 ], [x 3,x 5 ], etc, we get x 1 x 2 x 3 x 4 … x N

Trapezoidal Routine Sequence of points used for each n n = 1 n = 2 n = 3 n = 4 Subdivide the intervals and compute f i only at points that have not computed before. n = …

Recursive Computation of Trapezoidal sum If n = 1 (two points, one interval) else if (n > 1)

trapzd( )

Romberg Integration Compute trapezoidal sum for different values of h, e.g., h 0, h 0 /2, h 0 /4, h 0 /8, etc. Extrapolate T(h) in polynomial of h 2 to h → 0. The justification for this is due to the Euler- Maclaurin formula.

Euler-Maclaurin Summation Formula The important point is that T(h) is in powers of h 2.

qromb( )

Theory of Gaussian Quadrature Find best w j and x j [integrate exactly for all polynomials f(x) up to degree 2N-1]: where the weight function W(x) is assumed positive and continuous.

Orthogonal Polynomials Two polynomials are said orthogonal with respect to a fixed weight function W(x) and fixed interval [a,b], if is zero. One can construct orthogonal polynomial set {p j (x), j=0,1, 2, …}.

Example of Orthogonal Polynomials With weight W(x) = 1 in interval [-1,1], the corresponding orthogonal polynomials are the Legendre polynomials:

Constructing Orthogonal Polynomials Start with the first one, P 0 (x)=1 Let P 1 (x)=c 0 +c 1 x, determine the coefficients by requiring =0, For weight W(x)=1 in interval [-1,1], this gives P 1 (x)=x Determine P 2 (x)= c 0 +c 1 x+c 2 x 2 by requiring =0, =0 In general P j+1 (x) = (x-a j ) P j (x) – b j P j-1 (x)

Abscissas in Gaussian Quadrature For an N-point integration formula, choose the root of N-th orthogonal polynomial x j as the abscissas. Choose w j to satisfy It turns out that the ‘integration equal to 0’ is true also for i up to 2N-1.

Gaussian integration formula is exact for all polynomials of degree 2N-1 Let f(x) be any polynomial of degree 2N-1, we can write f(x) = q(x) P N (x) + r(x) where r(x) and q(x) are degree N-1. Considering the left- and right-hand side of the integration formula with function f(x), show that they are equal.

Solution for the Weight w j This formula assumes that the polynomials are normalized according to Eqs.(4.5.6) & (4.57), page 149 of NR.

Reading, References Read Chapter 4 of NR For an in-depth treatment of numerical methods, see, e.g., J. Stoer and R. Bulirsch, “Introduction to Numerical Analysis”. See also M. T. Heath, “Scientific Computing, an introductory survey”.

Problems for Lecture 4 1. Prove the Euler-Maclaurin summation formula for the first three terms, i.e., where h = (x N -x 1 )/(N-1). (Hint: Taylor expansion.) 2. Use the theory of Gaussian quadrature to find a 3-point integration formula for the weight W(x) = 1 and interval [0, 1]. That is, find the abscissas x j and weights w j such that the formula below is exact for all polynomials of degree 5 or less.