Numerical Integration of Functions

Similar documents
Numerical Methods School of Mechanical Engineering Chung-Ang University

Numerical Integra/on

Numerical Integration

Numerical Integra/on

18 Numerical Integration of Functions

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

Scientific Computing: Numerical Integration

Extrapolation in Numerical Integration. Romberg Integration

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

Romberg Integration and Gaussian Quadrature

Chapter 5: Numerical Integration and Differentiation

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

Homework set #7 solutions, Math 128A J. Xia

Lecture 8: Calculus and Differential Equations

Lecture 8: Calculus and Differential Equations

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

Chapter 5 - Quadrature

APPM/MATH Problem Set 6 Solutions

Review. Numerical Methods Lecture 22. Prof. Jinbo Bi CSE, UConn

Numerical Methods I: Numerical Integration/Quadrature

Rectilinear Motion. Velocity

Romberg Integration. MATH 375 Numerical Analysis. J. Robert Buchanan. Spring Department of Mathematics

Differentiation and Integration

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

Jim Lambers MAT 460/560 Fall Semester Practice Final Exam

Romberg Rule of Integration

Section 6.6 Gaussian Quadrature

Applied Linear Algebra in Geoscience Using MATLAB

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

2D1240 Numerical Methods II / André Jaun, NADA, KTH NADA

2D Plotting with Matlab

EAD 115. Numerical Solution of Engineering and Scientific Problems. David M. Rocke Department of Applied Science

Let f(x) be a real-valued function of a real variable, defined on a finite interval a x b. We seek to compute the value of the integral,

The iterated sinh transformation

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

Multistage Methods I: Runge-Kutta Methods

Physics 115/242 Romberg Integration

Week 10 TENTATIVE SCHEDULE NUMERICAL APPROXIMATION LECTURE # 10

Chap. 19: Numerical Differentiation

NUMERICAL INTEGRATION. By : Dewi Rachmatin

Numerical Methods with MATLAB

Answers to Homework 9: Numerical Integration

Numerical Integration and Numerical Differentiation. Hsiao-Lung Chan Dept Electrical Engineering Chang Gung University, Taiwan

MA 3021: Numerical Analysis I Numerical Differentiation and Integration

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

MA1023-Methods of Mathematics-15S2 Tutorial 1

Module 6: Implicit Runge-Kutta Methods Lecture 17: Derivation of Implicit Runge-Kutta Methods(Contd.) The Lecture Contains:

PowerPoints organized by Dr. Michael R. Gustafson II, Duke University

Applied Numerical Analysis

Southern Methodist University.

A New Integration Method Providing the Accuracy of Gauss-Legendre with Error Estimation Capability (rev.)

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

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

Preface. 2 Linear Equations and Eigenvalue Problem 22

MA2501 Numerical Methods Spring 2015

Extrapolation Methods for Approximating Arc Length and Surface Area

Fixed point iteration and root finding

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

Romberg Integration: A Symbolic Approach with Mathematica

CS 450 Numerical Analysis. Chapter 9: Initial Value Problems for Ordinary Differential Equations

Numerical Analysis Solution of Algebraic Equation (non-linear equation) 1- Trial and Error. 2- Fixed point

Final Examination. CS 205A: Mathematical Methods for Robotics, Vision, and Graphics (Spring 2016), Stanford University

Polynomial Functions and Their Graphs. Definition of a Polynomial Function: numbers, with a n 0. The function defined by

Eigenvalues. Berlin Chen Department of Computer Science & Information Engineering National Taiwan Normal University

Empirical Models Interpolation Polynomial Models

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

Numerical Methods for Engineers. and Scientists. Applications using MATLAB. An Introduction with. Vish- Subramaniam. Third Edition. Amos Gilat.

PowerPoints organized by Dr. Michael R. Gustafson II, Duke University

Slow Exponential Growth for Clenshaw Curtis Sparse Grids

Solving Linear Systems

Numerical Analysis Fall. Roots: Open Methods

Bindel, Fall 2011 Intro to Scientific Computing (CS 3220) Week 12: Monday, Apr 18. HW 7 is posted, and will be due in class on 4/25.

Computational methods of elementary particle physics

Explicit One-Step Methods

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

Curve Fitting and Interpolation

Numerical Analysis Exam with Solutions

Ordinary differential equations - Initial value problems

ENGINEERING MATHEMATICS 4 (BDA34003)

Research Computing with Python, Lecture 7, Numerical Integration and Solving Ordinary Differential Equations

Numerical Analysis. Introduction to. Rostam K. Saeed Karwan H.F. Jwamer Faraidun K. Hamasalh

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

Computing Gauss-Jacobi quadrature rules

Contents. I Basic Methods 13

Instructions for Matlab Routines

Stat 451 Lecture Notes Numerical Integration

NUMERICAL METHODS FOR ENGINEERING APPLICATION

Excel for Scientists and Engineers Numerical Method s. E. Joseph Billo

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

Numerical Methods. Scientists. Engineers

Numerical Programming I (for CSE)

Outline. 1 Interpolation. 2 Polynomial Interpolation. 3 Piecewise Polynomial Interpolation

MATHEMATICAL METHODS INTERPOLATION

The University of Western Ontario Faculty of Engineering DEPARTMENT OF CHEMICAL AND BIOCHEMICAL ENGINEERING

Theory, Solution Techniques and Applications of Singular Boundary Value Problems

Abstract. 1. Introduction

Lösning: Tenta Numerical Analysis för D, L. FMN011,

GENG2140, S2, 2012 Week 7: Curve fitting

NUMERICAL ANALYSIS SYLLABUS MATHEMATICS PAPER IV (A)

2 Elementary algorithms for one-dimensional integrals

Transcription:

Numerical Integration of Functions Berlin Chen Department of Computer Science & Information Engineering National Taiwan Normal University Reference: 1. Applied Numerical Methods with MATLAB for Engineers, Chapter 20 & Teaching material

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 NM Berlin Chen 2

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

Richardson Extrapolation (2/2) For the cases where there are two O(h 4 ) estimates and the interval is halved (h m =h l /2), an improved O(h 6 ) estimate may be formed using: I 16 15 I m 1 15 I l For the cases where there are two O(h 6 ) estimates and the interval is halved (h m =h l /2), an improved O(h 8 ) estimate may be formed using: I 64 63 I m 1 63 I l NM Berlin Chen 4

Richardson Extrapolation: An Example (1/2) Example 20.1 NM Berlin Chen 5

Richardson Extrapolation: An Example (2/2) Example 20.1 NM Berlin Chen 6

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, I j,k 4 k 1 I j 1,k 1 I j,k 1 4 k 1 1 Where i j+1,k-1 and i j,k-1 are the more and less accurate integrals, respectively, and i j,k is the new approximation. k is the level of integration and j is used to determine which approximation is more accurate NM Berlin Chen 7

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

MATLAB Code for Romberg NM Berlin Chen 9

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 NM Berlin Chen 10

Gauss-Legendre Formulas (1/2) 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: I c f x 0 0 c 1 f x 1 c n 1 f x n 1 Where the c i and x i are calculated to ensure that the method exactly integrates up to (2n-1) th order polynomials over the interval from -1 to 1 NM Berlin Chen 11

Gauss-Legendre Formulas (2/2) NM Berlin Chen 12

Gauss-Legendre: An Example Example 20.3 NM Berlin Chen 13

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 NM Berlin Chen 14

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 NM Berlin Chen 15