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

Similar documents
Interpolation and the Lagrange Polynomial

Elementary Matrices. MATH 322, Linear Algebra I. J. Robert Buchanan. Spring Department of Mathematics

Systems of Ordinary Differential Equations

a. Do you think the function is linear or non-linear? Explain using what you know about powers of variables.

Jim Lambers MAT 460/560 Fall Semester Practice Final Exam

Neville s Method. MATH 375 Numerical Analysis. J. Robert Buchanan. Fall Department of Mathematics. J. Robert Buchanan Neville s Method

Row Space, Column Space, and Nullspace

Romberg Integration and Gaussian Quadrature

Linear Independence. MATH 322, Linear Algebra I. J. Robert Buchanan. Spring Department of Mathematics

Evaluating Determinants by Row Reduction

Accelerating Convergence

Properties of Linear Transformations from R n to R m

Logarithmic and Exponential Equations and Change-of-Base

MA 3021: Numerical Analysis I Numerical Differentiation and Integration

Fundamental Trigonometric Identities

MATH 1014 Tutorial Notes 8

Properties of Logarithms

Numerical Integration

Scientific Computing: Numerical Integration

Calculus and Parametric Equations

Extrema of Functions of Several Variables

Taylor and Maclaurin Series

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

Review of Power Series

Numerical Integra/on

Mean Value Theorem. MATH 161 Calculus I. J. Robert Buchanan. Summer Department of Mathematics

Exponential Functions

Absolute Convergence and the Ratio Test

Romberg Rule of Integration

Mean Value Theorem. MATH 161 Calculus I. J. Robert Buchanan. Summer Department of Mathematics

Equations in Quadratic Form

6 Lecture 6b: the Euler Maclaurin formula

Orthonormal Bases; Gram-Schmidt Process; QR-Decomposition

Infinite Series. MATH 211, Calculus II. J. Robert Buchanan. Spring Department of Mathematics

Absolute Convergence and the Ratio Test

Properties of the Determinant Function

Extrapolation in Numerical Integration. Romberg Integration

Solving Quadratic Equations

Mathematics for Engineers. Numerical mathematics

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

Matrices and Vectors

APPM/MATH Problem Set 6 Solutions

Functions: Polynomial, Rational, Exponential

EXAMPLE OF ONE-STEP METHOD

Plane Curves and Parametric Equations

Numerical Integration of Functions

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

Continuity. MATH 161 Calculus I. J. Robert Buchanan. Fall Department of Mathematics

MA2501 Numerical Methods Spring 2015

Chapter 10. Infinite Sequences and Series

Physics 115/242 Romberg Integration

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

Numerical techniques to solve equations

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

April 15 Math 2335 sec 001 Spring 2014

Wave Equation With Homogeneous Boundary Conditions

Bessel s Equation. MATH 365 Ordinary Differential Equations. J. Robert Buchanan. Fall Department of Mathematics

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

Math Numerical Analysis

Chain Rule. MATH 311, Calculus III. J. Robert Buchanan. Spring Department of Mathematics

Rank and Nullity. MATH 322, Linear Algebra I. J. Robert Buchanan. Spring Department of Mathematics

Chapter 5: Numerical Integration and Differentiation

Conic Sections in Polar Coordinates

Sets and Functions. MATH 464/506, Real Analysis. J. Robert Buchanan. Summer Department of Mathematics. J. Robert Buchanan Sets and Functions

Computer Arithmetic. MATH 375 Numerical Analysis. J. Robert Buchanan. Fall Department of Mathematics. J. Robert Buchanan Computer Arithmetic

Green s Theorem. MATH 311, Calculus III. J. Robert Buchanan. Fall Department of Mathematics. J. Robert Buchanan Green s Theorem

Separable Differential Equations

Lecture 10: Finite Differences for ODEs & Nonlinear Equations

Is the sum of two integers positive, negative, or zero? How can you tell? ACTIVITY: Adding Integers with the Same Sign

Fixed-Point Iteration

Heat Equation on Unbounded Intervals

Differentiation and Integration

Name Period. Date: Topic: 9-2 Circles. Standard: G-GPE.1. Objective:

Arc Length and Surface Area in Parametric Equations

lecture 26: Richardson extrapolation

Vectors in the Plane

Diagonalization. MATH 322, Linear Algebra I. J. Robert Buchanan. Spring Department of Mathematics

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

5 Numerical Integration & Dierentiation

Series Solutions Near an Ordinary Point

Series Solutions Near a Regular Singular Point

Differential equations

Direct Methods for Solving Linear Systems. Matrix Factorization

Continuous Random Variables

Solving Systems of Linear and Quadratic Equations

Answers to Homework 9: Numerical Integration

Gregory's quadrature method

Section 5.6. Integration By Parts. MATH 126 (Section 5.6) Integration By Parts The University of Kansas 1 / 10

MA2501 Numerical Methods Spring 2015

Extrema and the First-Derivative Test

Chapter 15 SEQUENTIAL CIRCUITS ANALYSIS, STATE- MINIMIZATION, ASSIGNMENT AND CIRCUIT IMPLEMENTATION

LECTURE 14 NUMERICAL INTEGRATION. Find

Natural Numbers: Also called the counting numbers The set of natural numbers is represented by the symbol,.

Properties of Matrices

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

Chap. 20: Initial-Value Problems

x x2 2 + x3 3 x4 3. Use the divided-difference method to find a polynomial of least degree that fits the values shown: (b)

I am trying to keep these lessons as close to actual class room settings as possible.

Created: 2/3/96 Modified: September 29, Author: Theresa Julia Zielinski Page 1

Numerical Integra/on

Transcription:

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

Objectives and Background In this lesson we will learn to obtain high accuracy approximations to definite integrals using the Composite Trapezoidal Rule. b f (x) dx = h n 1 f (a) + f (x j ) + f (b) (b a)f (µ) 1 a where h = b a n j=1 and x j = a + jh for j = 0, 1,..., n. h

Objectives and Background In this lesson we will learn to obtain high accuracy approximations to definite integrals using the Composite Trapezoidal Rule. b f (x) dx = h n 1 f (a) + f (x j ) + f (b) (b a)f (µ) 1 a where h = b a n j=1 and x j = a + jh for j = 0, 1,..., n. We will use Richardson s Extrapolation to develop O(h m ) approximations to the definite integral. h

Alternative Truncation Error If f C [a, b] then we may write the truncation error of the Composite Trapezoidal Rule as b f (x) dx = h n 1 f (a) + f (x j ) + f (b) a where the coefficients K i are constants. j=1 + K 1 h + K h 4 + K 3 h 6 + The truncation error contains only even powers of h and we have seen Richardson s extrapolation be very effective in this situation. Extrapolation applied to this quadrature formula is called Romberg integration.

Outline Given b a f (x) dx, use the Composite Trapezoidal rule with n = 1,, 4, 8,..., k,... to form approximations labeled respectively R 1,1, R,1, R 3,1, R 4,1,... R k+1,1,... Since these are O(h ) approximations we can combine them using Richardson s extrapolation to form O(h 4 ) approximations.

Outline Given b a f (x) dx, use the Composite Trapezoidal rule with n = 1,, 4, 8,..., k,... to form approximations labeled respectively R 1,1, R,1, R 3,1, R 4,1,... R k+1,1,... Since these are O(h ) approximations we can combine them using Richardson s extrapolation to form O(h 4 ) approximations. For example, for k =, 3,.... R k, = R k,1 + 1 3 ( Rk,1 R k 1,1 ),

Test Case Throughout this presentation we will use the following definite integral to evaluate the performance of the various approximations. π 0 x cos 3x dx = 1 9 cos 3x + 1 3 x sin 3x π = 9 0. 0

Example (1 of 5) Approximate the definite integral using the Composite Trapezoidal Rule. k R k+1,1 Abs. Err. 0 4.9348 4.7158 1.4674.4518 0.361343 0.1391 3 0.49811 0.075889 4 0.8761 0.0063855

Example ( of 5) Now form the O(h 4 ) approximations using the formula Note that R k, = R k,1 + 1 3 ( Rk,1 R k 1,1 ) k R k+1,1 R k+1, Abs. Err. 0 4.9348 1.4674 1.64493 1.471 0.361343 0.340677 0.56899 3 0.49811 0.1634 0.00958818 4 0.8761 0.1744 0.0004784 R, = R,1 + 1 3 (R,1 R 1,1 ) =.4674 + 1 (.4674 ( 4.9348)) 3 = 1.64493

Example (3 of 5) Now form the O(h 6 ) approximations using the formula R k,3 = R k, + 1 15 ( Rk, R k 1, ) k R k+1,1 R k+1, R k+1,3 Abs. Err. 0 4.9348 1.4674 1.64493 0.361343 0.340677 0.473051 0.69573 3 0.49811 0.1634 0.4951 0.0799 4 0.8761 0.1744 0.351 0.00019087 Note that R 4,3 = R 4, + 1 15 (R 4, R 3, ) = 0.1634 + 1 ( 0.1634 0.340677) 15 = 0.4951

Example (4 of 5) Now form the O(h 8 ) approximations using the formula R k,4 = R k,3 + 1 63 ( Rk,3 R k 1,3 ) k R k+1,1 R k+1, R k+1,3 R k+1,4 Abs. Err. 0 4.9348 1.4674 1.64493 0.361343 0.340677 0.473051 3 0.49811 0.1634 0.4951 0.60991 0.0387686 4 0.8761 0.1744 0.351 0.19 0.00030185 Note that R 4,4 = R 4,3 + 1 63 (R 4,3 R 3,3 ) = 0.4951 + 1 ( 0.4951 0.473051) 63 = 0.60991

Example (5 of 5) Now form the O(h 10 ) approximations using the formula R k,5 = R k,4 + 1 ( ) Rk,4 R k 1,4 55 k R k+1,1 R k+1, R k+1,3 R k+1,4 R k+1,5 Abs. Err. 0 4.9348 1.4674 1.64493 0.361343 0.340677 0.473051 3 0.49811 0.1634 0.4951 0.60991 4 0.8761 0.1744 0.351 0.19 0.1767 0.000455403 Note that R 5,5 = R 5,4 + 1 55 (R 5,4 R 4,4 ) = 0.19 + 1 ( 0.19 ( 0.60991)) 55 = 0.1767

Remarks Since n increases by a factor of each time, R k+1,1 uses all the function evaluations of R k,1 and adds the function evaluations half-way between the previous nodes. The old function evaluations do not need to be re-computed, only the k new values must be computed.

Remarks Since n increases by a factor of each time, R k+1,1 uses all the function evaluations of R k,1 and adds the function evaluations half-way between the previous nodes. The old function evaluations do not need to be re-computed, only the k new values must be computed. We can express the Composite Trapezoidal rule in a recursive manner.

Recursion Define h k = b a, then k 1 R 1,1 = b a = h 1 [f (a) + f (b)] [f (a) + f (b)]

Recursion Define h k = b a, then k 1 R 1,1 = b a = h 1 R,1 = b a 4 [f (a) + f (b)] [f (a) + f (b)] [ f (a) + f (b) + f = h [f (a) + f (b) + f (a + h )] = 1 [R 1,1 + h 1 f (a + h )] ( a + b a )]

Recursion Define h k = b a, then k 1 R 1,1 = b a = h 1 R,1 = b a 4 [f (a) + f (b)] [f (a) + f (b)] [ f (a) + f (b) + f = h [f (a) + f (b) + f (a + h )] = 1 [R 1,1 + h 1 f (a + h )] ( a + b a )] R 3,1 = 1 {R,1 + h [f (a + h 3 ) + f (a + 3h 3 )]}. R k,1 = 1 k R k 1,1 + h k 1 f (a + (i 1)h k ) i=1

Romberg Table Once we have calculated R k,1 for k = 1,,..., n we use the extrapolation formula below to produce the O(h j k ) approximation. R k,j = R k,j 1 + for k = j, j + 1,.... 1 ( ) Rk,j 1 4 j 1 R k 1,j 1 1 k O(hk ) O(h4 k ) O(h6 k ) O(h8 k ) O(hn k ) 1 R 1,1 R,1 R, 3 R 3,1 R 3, R 3,3 4 R 4,1 R 4, R 4,3 R 4,4........ n R n,1 R n, R n,3 R n,4 R n,n

Romberg Table Once we have calculated R k,1 for k = 1,,..., n we use the extrapolation formula below to produce the O(h j k ) approximation. R k,j = R k,j 1 + for k = j, j + 1,.... 1 ( ) Rk,j 1 4 j 1 R k 1,j 1 1 k O(hk ) O(h4 k ) O(h6 k ) O(h8 k ) O(hn k ) 1 R 1,1 R,1 R, 3 R 3,1 R 3, R 3,3 4 R 4,1 R 4, R 4,3 R 4,4........ n R n,1 R n, R n,3 R n,4 R n,n Remark: calculate the table one row at a time.

Example Add another row to our previously calculated table. k R k+1,1 R k+1, R k+1,3 R k+1,4 R k+1,5 R k+1,6 0 4.9348 1.4674 1.64493 0.361343 0.340677 0.473051 3 0.49811 0.1634 0.4951 0.60991 4 0.8761 0.1744 0.351 0.19 0.1767

Example Add another row to our previously calculated table. k R k+1,1 R k+1, R k+1,3 R k+1,4 R k+1,5 R k+1,6 0 4.9348 1.4674 1.64493 0.361343 0.340677 0.473051 3 0.49811 0.1634 0.4951 0.60991 4 0.8761 0.1744 0.351 0.19 0.1767 5 0.3836 0.194 0.4 0. 0.3 0.3

Example Add another row to our previously calculated table. k R k+1,1 R k+1, R k+1,3 R k+1,4 R k+1,5 R k+1,6 0 4.9348 1.4674 1.64493 0.361343 0.340677 0.473051 3 0.49811 0.1634 0.4951 0.60991 4 0.8761 0.1744 0.351 0.19 0.1767 5 0.3836 0.194 0.4 0. 0.3 0.3 Remark: Romberg integration is efficient since only the entries in the R k,1 column are calculated by evaluating f (x). All others are found by weighted averaging.

Romberg Algorithm INPUT Endpoints a, b and integer n. STEP 1 Set h = b a; set R 1,1 = h (f (a) + f (b)). STEP OUTPUT R 1,1. STEP 3 For i =, 3,..., n do STEPS 4 8. STEP 4 Set R,1 = 1 i R 1,1 + h f (a + (k 0.5)h). STEP 5 For j =, 3,..., i set k=1 R,j = R,j 1 + R,j 1 R 1,j 1 4 j 1. 1 STEP 6 For j = 1,,..., i OUTPUT R,j. STEP 7 Set h = h. STEP 8 For j = 1,,..., i set R 1,j = R,j. STEP 9 STOP.

Homework Read Section 4.5. Exercises: 1ad, 3ad, 5ad, 18, 19