6-quad - Chapter 6 Quadrature The term numerical...

Info iconThis preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon
Chapter 6 Quadrature The term numerical integration covers several different tasks, including numerical evaluation of integrals and numerical solution of ordinary differential equations. So we use the somewhat old-fashioned term quadrature for the simplest of these, the numerical evaluation of a definite integral. Modern quadrature algorithms auto- matically vary an adaptive step size. 6.1 Adaptive Quadrature 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, Z b a f ( x ) dx. The word “quadrature” reminds us of an elementary technique for finding this area—plot the function on graph paper and count the number of little squares that lie underneath the curve. In Figure 6.1, there are 148 little squares underneath the curve. If the area of one little square is 3 / 512, then a rough estimate of the integral is 148 × 3 / 512 = 0 . 8672. Adaptive quadrature involves careful selection of the points where f ( x ) is sam- pled. We want to evaluate the function at as few points as possible while approx- imating the integral to within some specified accuracy. A fundamental additive property of a definite integral is the basis for adaptive quadrature. If c is any point between a and b , then Z b a f ( x ) dx = Z c a f ( x ) dx + Z b c f ( x ) dx. The idea is that if we can approximate each of the two integrals on the right to within a specified tolerance, then the sum gives us the desired result. If not, we February 15, 2008 1
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
2 Chapter 6. Quadrature Figure 6.1. Quadrature. can recursively apply the additive property to each of the intervals [ a,c ] and [ c,b ]. The resulting algorithm will adapt to the integrand automatically, partitioning the interval into subintervals with fine spacing where the integrand is varying rapidly and coarse spacing where the integrand is varying slowly. 6.2 Basic Quadrature Rules The derivation of the quadrature rule used by our Matlab function begins with two of the basic quadrature rules shown in Figure 6.2: the midpoint rule and the trapezoid rule . Let h = b - a be the length of the interval. The midpoint rule, M , approximates the integral by the area of a rectangle whose base has length h and whose height is the value of the integrand at the midpoint: M = hf ± a + b 2 . The trapezoid rule, T , approximates the integral by the area of a trapezoid with base h and sides equal to the values of the integrand at the two endpoints: T = h f ( a ) + f ( b ) 2 . The accuracy of a quadrature rule can be predicted in part by examining its behavior on polynomials. The order of a quadrature rule is the degree of the lowest degree polynomial that the rule does not integrate exactly. If a quadrature rule of order p is used to integrate a smooth function over a small interval of length h , then a Taylor series analysis shows that the error is proportional to h p . The midpoint
Background image of page 2
6.2. Basic Quadrature Rules 3 Midpoint rule
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 02/20/2012 for the course ECON 101 taught by Professor Burkhauser during the Spring '08 term at Cornell University (Engineering School).

Page1 / 21

6-quad - Chapter 6 Quadrature The term numerical...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online