Numerical Integration of Functions

Slides:



Advertisements
Similar presentations
Part 1 Chapter 4 Roundoff and Truncation Errors PowerPoints organized by Dr. Michael R. Gustafson II, Duke University All images copyright © The McGraw-Hill.
Advertisements

Part 2 Chapter 6 Roots: Open Methods
Part 2 Chapter 6 Roots: Open Methods
Roots: Bracketing Methods
1 Chapter 5 Numerical Integration. 2 A Review of the Definite Integral.
Numerical Integration of Functions
Part 5 Chapter 19 Numerical Differentiation PowerPoints organized by Dr. Michael R. Gustafson II, Duke University All images copyright © The McGraw-Hill.
Engineering Analysis ENG 3420 Fall 2009 Dan C. Marinescu Office: HEC 439 B Office hours: Tu-Th 11:00-12:00.
Today’s class Romberg integration Gauss quadrature Numerical Methods
Initial-Value Problems
Polynomial Interpolation
Numerical Integration
Chapter 17 Objectives Recognizing that Newton-Cotes integration formulas are based on the strategy of replacing a complicated function or tabulated data.
Chapter 9 Numerical Integration Numerical Integration Application: Normal Distributions Copyright © The McGraw-Hill Companies, Inc. Permission required.
Quadrature Greg Beckham. Quadrature Numerical Integration Goal is to obtain the integral with as few computations of the integrand as possible.
Numerical Integration Formulas
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Numerical Differentiation and Integration Part 6 Calculus.
Numerical Integration UC Berkeley Fall 2004, E77 Copyright 2005, Andy Packard. This work is licensed under the.
Engineering Analysis ENG 3420 Fall 2009
1 Chapter 5 Numerical Integration. 2 A Review of the Definite Integral.
Automatic Integration
3. Numerical integration (Numerical quadrature) .
Integration Integration: is the total value, or summation, of f(x) dx over the range from a to b:
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.
CMPS1371 Introduction to Computing for Engineers NUMERICAL METHODS.
Part 2 Chapter 5 Roots: Bracketing Methods PowerPoints organized by Dr. Michael R. Gustafson II, Duke University All images copyright © The McGraw-Hill.
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 ~ Numerical Differentiation and Integration ~ Integration.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Chapter 22.
Please remember: When you me, do it to Please type “numerical-15” at the beginning of the subject line Do not reply to my gmail,
Part 6 Chapter 21 Adaptive Methods and Stiff Systems PowerPoints organized by Dr. Michael R. Gustafson II, Duke University All images copyright © The McGraw-Hill.
Use of Newton-Cotes Formulas and eventual shortcomings Matlab code to increase number of segments with trapezoid, 1/3 and 3/8 rule.
Techniques for Numerical Integration
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Part 5 Integration and Differentiation.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Part 6 - Chapters 22 and 23.
Quadrature – Concepts (numerical integration) Don Allen.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Chapter 21 Numerical Differentiation.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Chapter 20 Numerical Integration of Functions.
Part 3 Chapter 9 Gauss Elimination
Part 3 Chapter 12 Iterative Methods
Polynomial Interpolation
Matrix Inverse and Condition
Boundary-Value Problems
Numerical Integration Formulas
Chapter 22.
Copyright © The McGraw-Hill Companies, Inc
NUMERICAL DIFFERENTIATION AND INTEGRATION
Numerical Differentiation
Part 2 Chapter 6 Roots: Open Methods
Roundoff and Truncation Errors
Chapter 3 Image Slides Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Chapter 23.
Splines and Piecewise Interpolation
Copyright © Cengage Learning. All rights reserved.
Part 3 Chapter 10 LU Factorization
Roots: Bracketing Methods
MATH 174: NUMERICAL ANALYSIS I
Adaptive Methods and Stiff Systems
SKTN 2393 Numerical Methods for Nuclear Engineers
Copyright © The McGraw-Hill Companies, Inc
Numerical Integration
Romberg Rule of Integration
CHAPTER 6 SKELETAL SYSTEM
Romberg Rule of Integration
Roundoff and Truncation Errors
Roots: Bracketing Methods
Numerical Computation and Optimization
Part 2 Chapter 7 Optimization
Romberg Rule of Integration
Part 2 Chapter 6 Roots: Open Methods
Presentation transcript:

Numerical Integration of Functions Part 5 Chapter 20 Numerical Integration of Functions PowerPoints organized by Dr. Michael R. Gustafson II, Duke University All images copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

Chapter Objectives Understanding how Richardson extrapolation provides a means to create a more accurate integral estimate by combining two less accurate estimates. Understanding how Gauss quadrature provides superior integral estimates by picking optimal abscissas at which to evaluate the function. Knowing how to use MATLAB’s built-in functions quad and quadl to integrate functions.

Richardson Extrapolation Richard extrapolation methods use two estimates of an integral to compute a third, more accurate approximation. If two O(h2) estimates I(h1) and I(h2) are calculated for an integral using step sizes of h1 and h2, respectively, an improved O(h4) estimate may be formed using: For the special case where the interval is halved (h2=h1/2), this becomes:

Richardson Extrapolation (cont) For the cases where there are two O(h4) estimates and the interval is halved (hm=hl/2), an improved O(h6) estimate may be formed using: For the cases where there are two O(h6) estimates and the interval is halved (hm=hl/2), an improved O(h8) estimate may be formed using:

The Romberg Integration Algorithm Note that the weighting factors for the Richardson extrapolation add up to 1 and that as accuracy increases, the approximation using the smaller step size is given greater weight. In general, where ij+1,k-1 and ij,k-1 are the more and less accurate integrals, respectively, and ij,k is the new approximation. k is the level of integration and j is used to determine which approximation is more accurate.

Romberg Algorithm Iterations The chart below shows the process by which lower level integrations are combined to produce more accurate estimates:

MATLAB Code for Romberg

Gauss Quadrature Gauss quadrature describes a class of techniques for evaluating the area under a straight line by joining any two points on a curve rather than simply choosing the endpoints. The key is to choose the line that balances the positive and negative errors.

Gauss-Legendre Formulas The Gauss-Legendre formulas seem to optimize estimates to integrals for functions over intervals from -1 to 1. Integrals over other intervals require a change in variables to set the limits from -1 to 1. The integral estimates are of the form: where the ci and xi are calculated to ensure that the method exactly integrates up to (2n-1)th order polynomials over the interval from -1 to 1.

Adaptive Quadrature Methods such as Simpson’s 1/3 rule has a disadvantage in that it uses equally spaced points - if a function has regions of abrupt changes, small steps must be used over the entire domain to achieve a certain accuracy. Adaptive quadrature methods for integrating functions automatically adjust the step size so that small steps are taken in regions of sharp variations and larger steps are taken where the function changes gradually.

Adaptive Quadrature in MATLAB MATLAB has two built-in functions for implementing adaptive quadrature: quad: uses adaptive Simpson quadrature; possibly more efficient for low accuracies or nonsmooth functions quadl: uses Lobatto quadrature; possibly more efficient for high accuracies and smooth functions q = quad(fun, a, b, tol, trace, p1, p2, …) fun : function to be integrates a, b: integration bounds tol: desired absolute tolerance (default: 10-6) trace: flag to display details or not p1, p2, …: extra parameters for fun quadl has the same arguments