NUMERICAL INTEGRATION. The inverse process to differentiation in calculus is integration. Mathematically, integration is represented by.

Similar documents
Numerical Integration

III. Lecture on Numerical Integration. File faclib/dattab/lecture-notes/numerical-inter03.tex /by EC, 3/14/2008 at 15:11, version 9

CMDA 4604: Intermediate Topics in Mathematical Modeling Lecture 19: Interpolation and Quadrature

Lecture 14: Quadrature

Numerical Analysis. 10th ed. R L Burden, J D Faires, and A M Burden

Advanced Computational Fluid Dynamics AA215A Lecture 3 Polynomial Interpolation: Numerical Differentiation and Integration.

Numerical Analysis: Trapezoidal and Simpson s Rule

DOING PHYSICS WITH MATLAB MATHEMATICAL ROUTINES

Review of Calculus, cont d

APPROXIMATE INTEGRATION

Unit #9 : Definite Integral Properties; Fundamental Theorem of Calculus

Math& 152 Section Integration by Parts

Math 1B, lecture 4: Error bounds for numerical methods

Taylor Polynomial Inequalities

1 The Riemann Integral

NUMERICAL INTEGRATION

How can we approximate the area of a region in the plane? What is an interpretation of the area under the graph of a velocity function?

Z b. f(x)dx. Yet in the above two cases we know what f(x) is. Sometimes, engineers want to calculate an area by computing I, but...

COSC 3361 Numerical Analysis I Numerical Integration and Differentiation (III) - Gauss Quadrature and Adaptive Quadrature

Exam 2, Mathematics 4701, Section ETY6 6:05 pm 7:40 pm, March 31, 2016, IH-1105 Instructor: Attila Máté 1

3.4 Numerical integration

63. Representation of functions as power series Consider a power series. ( 1) n x 2n for all 1 < x < 1

Lecture Note 4: Numerical differentiation and integration. Xiaoqun Zhang Shanghai Jiao Tong University

Definite integral. Mathematics FRDIS MENDELU

Definite integral. Mathematics FRDIS MENDELU. Simona Fišnarová (Mendel University) Definite integral MENDELU 1 / 30

Numerical integration

Chapter 3 Solving Nonlinear Equations

Properties of Integrals, Indefinite Integrals. Goals: Definition of the Definite Integral Integral Calculations using Antiderivatives

Lecture 20: Numerical Integration III

Numerical Integration

Chapter 7 Notes, Stewart 8e. 7.1 Integration by Parts Trigonometric Integrals Evaluating sin m x cos n (x) dx...

COT4501 Spring Homework VII

Numerical quadrature based on interpolating functions: A MATLAB implementation

INTRODUCTION TO INTEGRATION

Orthogonal Polynomials

Chapter 5. Numerical Integration

Review of basic calculus

New Expansion and Infinite Series

1 The Lagrange interpolation formula

P 3 (x) = f(0) + f (0)x + f (0) 2. x 2 + f (0) . In the problem set, you are asked to show, in general, the n th order term is a n = f (n) (0)

Lecture 23: Interpolatory Quadrature

The Riemann Integral

4.4 Areas, Integrals and Antiderivatives

Theoretical foundations of Gaussian quadrature

CBE 291b - Computation And Optimization For Engineers

If u = g(x) is a differentiable function whose range is an interval I and f is continuous on I, then f(g(x))g (x) dx = f(u) du

LECTURE 19. Numerical Integration. Z b. is generally thought of as representing the area under the graph of fèxè between the points x = a and

Abstract inner product spaces

Lecture 17. Integration: Gauss Quadrature. David Semeraro. University of Illinois at Urbana-Champaign. March 20, 2014

Math 8 Winter 2015 Applications of Integration

ACCESS TO SCIENCE, ENGINEERING AND AGRICULTURE: MATHEMATICS 1 MATH00030 SEMESTER /2019

Goals: Determine how to calculate the area described by a function. Define the definite integral. Explore the relationship between the definite

The Regulated and Riemann Integrals

MA 124 January 18, Derivatives are. Integrals are.

Chapter 2. Numerical Integration also called quadrature. 2.2 Trapezoidal Rule. 2.1 A basic principle Extending the Trapezoidal Rule DRAWINGS

Advanced Calculus: MATH 410 Notes on Integrals and Integrability Professor David Levermore 17 October 2004

THE HANKEL MATRIX METHOD FOR GAUSSIAN QUADRATURE IN 1 AND 2 DIMENSIONS

A REVIEW OF CALCULUS CONCEPTS FOR JDEP 384H. Thomas Shores Department of Mathematics University of Nebraska Spring 2007

Lecture 6: Singular Integrals, Open Quadrature rules, and Gauss Quadrature

Overview of Calculus I

x = b a n x 2 e x dx. cdx = c(b a), where c is any constant. a b

AN INTEGRAL INEQUALITY FOR CONVEX FUNCTIONS AND APPLICATIONS IN NUMERICAL INTEGRATION

The goal of this section is to learn how to use a computer to approximate definite integrals, i.e. expressions of the form. Z b

1.9 C 2 inner variations

Calculus I-II Review Sheet

Integration Techniques

Tangent Line and Tangent Plane Approximations of Definite Integral

Lecture 19: Continuous Least Squares Approximation

different methods (left endpoint, right endpoint, midpoint, trapezoid, Simpson s).

Construction of Gauss Quadrature Rules

Numerical Integration. Newton Cotes Formulas. Quadrature. Newton Cotes Formulas. To approximate the integral b

Definite Integrals. The area under a curve can be approximated by adding up the areas of rectangles = 1 1 +

Chapters 4 & 5 Integrals & Applications

Math 131. Numerical Integration Larson Section 4.6

Sections 5.2: The Definite Integral

Physics 116C Solution of inhomogeneous ordinary differential equations using Green s functions

31.2. Numerical Integration. Introduction. Prerequisites. Learning Outcomes

n f(x i ) x. i=1 In section 4.2, we defined the definite integral of f from x = a to x = b as n f(x i ) x; f(x) dx = lim i=1

Numerical Methods I Orthogonal Polynomials

Improper Integrals, and Differential Equations

Lecture 12: Numerical Quadrature

Chapter 6 Techniques of Integration

Review of Gaussian Quadrature method

Section 6.1 Definite Integral

Lecture 1: Introduction to integration theory and bounded variation

Indefinite Integral. Chapter Integration - reverse of differentiation

LECTURE. INTEGRATION AND ANTIDERIVATIVE.

Chapter 1. Basic Concepts

Math 360: A primitive integral and elementary functions

Best Approximation. Chapter The General Case

Anti-derivatives/Indefinite Integrals of Basic Functions

7.2 The Definite Integral

Section 7.1 Integration by Substitution

Section 6.1 INTRO to LAPLACE TRANSFORMS

Orthogonal Polynomials and Least-Squares Approximations to Functions

a < a+ x < a+2 x < < a+n x = b, n A i n f(x i ) x. i=1 i=1

Solutions to Assignment #8

We divide the interval [a, b] into subintervals of equal length x = b a n

The Fundamental Theorem of Calculus. The Total Change Theorem and the Area Under a Curve.

Euler, Ioachimescu and the trapezium rule. G.J.O. Jameson (Math. Gazette 96 (2012), )

Transcription:

NUMERICAL INTEGRATION 1 Introduction The inverse process to differentition in clculus is integrtion. Mthemticlly, integrtion is represented by f(x) dx which stnds for the integrl of the function f(x) with respect to the independent vrible x, evluted between the limits x = to x = b. The function f(x) in the integrl is referred to s the integrnd. The vlue of the integrl I(f) is number when nd b re numbers. Grphiclly, the vlue of the integrl corresponds to the shded re under the curve of f(x) between nd b. The function to be differentited or integrted will typiclly be in one of the following three forms: A simple continuous function such s polynomil, n exponentil, or trigonometric function. A complicted continuous function tht is difficult or impossible to integrte directly. A tbulted function where vlues of x nd f(x) re given t number of discrete points, s is often the cse with experimentl or field dt. In the first cse, the derivtive or integrl of simple function my be evluted nlyticlly using clculus. For the second cse, nlyticl solutions re often imprcticl, nd sometimes impossible, to obtin. In these instnces, s well s in the third cse of discrete dt, pproximte methods must be employed. This chpter is devoted to the most common pproches for numericl integrtion. We begin with the Newton-Cotes formuls. These reltionships re bsed on replcing complicted function or tbulted dt with simple polynomil tht is esy to integrte. Three of the most widely used Newton-Cotes formuls re discussed in detil: the trpezoidl rule, Simpson s 1/3 rule, nd Simpson s 3/8 rule. All these formuls re designed for cses where the dt to be integrted is evenly spced. Newton s cotes formuls cn be used for tbulted dt s well s in integrting functions numericlly. where F n (x) is the polynomil of the form f(x) dx F n (x) dx F n (x) = o + 1 x + x +... + n x n Two dditionl techniques when the function is given re lso considered. The first is bsed on Richrdson s extrpoltion, the second method is clled Guss qudrture. 1

Newton s cotes integrtion formuls Closed nd open forms of the Newton-Cotes formuls re vilble. The closed forms re those where the dt points t the beginning nd end of the limits of integrtion re known (prt of figure below). The open forms hve integrtion limits tht extend beyond the rnge of the dt (prt b of sme figure). Open Newton-Cotes formuls re not generlly used for definite integrtion. This chpter emphsizes the closed forms..1 The Trpezoidl rule The trpezoidl rule is the first of the Newton-Cotes closed integrtion formuls. It corresponds to the cse where the polynomil is first-order. recll tht Newton s form of interpolting polynomils with two points x = nd x = b yields ( ) f(b) f() F 1 (x) = f() + f[, b](x ) = f() + (x ) b The re under this stright line is n estimte of the integrl of f(x) between the limits nd b: I(f) ( f(b) f() f() + b ) (x ) dx = f() + f(b) (b ) When we employ the integrl under stright-line segment to pproximte the integrl under curve, we obviously cn incur n error tht my be substntil. An estimte for the locl trunction error of single ppliction of the trpezoidl rule is E t = 1 1 f (η)(b ) 3 where η lies somewhere in the intervl from to b. This eqution indictes tht if the function being integrted is liner, the trpezoidl rule will be exct. Otherwise, for functions with second- nd higherorder derivtives (tht is, with curvture), some error cn occur.

Note: The error in the trpezoidl rule cn be derived using the following theorem: Let p n (x) be n interpolting polynomil for given set of dt points y k = f(x k ), for distinct grid points x k, k = 1,...n + 1. Let = min(x k ) nd b = mx(x k ), nd suppose tht f(x) is n + 1 times differentible. Then for ech x ɛ [, b], there exist η ɛ [, b] such tht f(x) = p n (x) + f (n+1) (η) (n + 1)! (x x 1)...(x x n+1 ) We cn then clculte the error in the integrl for n + 1 = s E = f (η)!.1.1 The Multiple-Appliction Trpezoidl Rule (x )(x b) = f (η) (b )3 1 One wy to improve the ccurcy of the trpezoidl rule is to divide the integrtion intervl from to b into number of segments nd pply the method to ech segment. The res of individul segments cn then be dded to yield the integrl for the entire intervl. The resulting equtions re clled multipleppliction, or composite, integrtion formuls. There re n segments of equl width x x 1 f(x) dx + x3 x f(x) dx +... + xn+1 x n f(x) dx f(x 1) + f(x ) h + f(x ) + f(x 3 ) h +... f(x n) + f(x n+1 ) h or, grouping terms [ ] h n f() + f(b) + f(x i ) An error for the multiple-ppliction trpezoidl rule cn be obtined by summing the individul errors for ech segment to give (b )3 E t = 1n 3 i= n f (η i ) where f (η i ) is the second derivtive t point η i locted in segment i. This result cn be simplified by estimting the men or verge vlue of the second derivtive for the entire intervl s i=1 3

f n f (η i ) (b )3 E t f 1n Thus, if the number of segments is doubled, the trunction error will be qurtered. Notes: i=1 For individul pplictions with nicely behved functions, the multiple-segment trpezoidl rule is just fine for ttining the type of ccurcy required in mny engineering pplictions. If high ccurcy is required, the multiple-segment trpezoidl rule demnds gret del of computtionl effort. Although this effort my be negligible for single ppliction, it could be very importnt when () numerous integrls re being evluted or (b) where the function itself is time consuming to evlute. For such cses, more efficient pproches my be necessry. Finlly, round-off errors cn limit our bility to determine integrls. This is due both to the mchine precision s well s to the numerous computtions involved in simple techniques like the multiplesegment trpezoidl rule. Simpson s rule Aside from pplying the trpezoidl rule with finer segmenttion, nother wy to obtin more ccurte estimte of n integrl is to use higher-order polynomils to connect the points. For exmple, if there is n extr point midwy between f() nd f(b), the three points cn be connected with prbol. If there re two points eqully spced between f() nd f(b), the four points cn be connected with third-order polynomil. The formuls tht result from tking the integrls under these polynomils re clled Simpsons rules...1 Simpson s 1/3 rule n Simpsons 1/3 rule results when second-order interpolting polynomil is substituted into f(x) dx F (x) dx If nd b re designted s x 1 nd x 3 nd F (x) is represented by second-order Lgrnge polynomil, the integrl becomes I(f) x3 x 1 [ (x x )(x x 3 ) (x 1 x )(x 1 x 3 ) f(x 1) + (x x 1)(x x 3 ) (x x 1 )(x x 3 ) f(x ) + (x x ] 1)(x x ) (x 3 x 1 )(x 3 x ) f(x 3) dx 4

After integrtion nd lgebric mnipultion, the following formul results: I(f) h 3 [f(x 1) + 4f(x ) + f(x 3 )] = h + b [f() + 4f( 3 ) + f(b)] where, for this cse, h = (b )/. This eqution is known s Simpson s 1/3 rule. The lbel 1/3 stems from the fct tht h is divided by 3. It cn be shown tht single-segment ppliction of Simpson s 1/3 rule hs trunction error of (b )5 E t = 880 f (4) (η) where η lies somewhere in the intervl from to b. Thus, Simpsons 1/3 rule is more ccurte thn the trpezoidl rule. However, comprison with the error from the trpezoidl rule indictes tht it is more ccurte thn expected. Rther thn being proportionl to the third derivtive, the error is proportionl to the fourth derivtive. Consequently, Simpson s 1/3 rule is third-order ccurte even though it is bsed on only three points. In other words, it yields exct results for cubic polynomils even though it is derived from prbol! Proof: To prove this result we extend the expnsion beyond the intervl for resons tht will be pprent shortly between x 1 =, x = + h, x 3 = + h = b, x 4 = + 3h f(x) = p (x) + f[x 1, x, x 3, x 4 ](x x 1 )(x x )(x x 3 ) + f (4) (η) (x x 1 )(x x )(x x 3 )(x x 4 ) 4 where one cn show tht E t = p (x) = f(x 1 ) + f[x 1, x ](x x 1 ) + f[x 1, x, x 3 ](x x 1 )(x x ) +h +h since h = (b )/ then f[x 1, x, x 3, x 4 ](x x 1 )(x x )(x x 3 ) dx = 0 f (4) (η) (x x 1 )(x x )(x x 3 )(x x 4 ) dx = h5 4 90 f (4) (η) E t = (b )5 90 5 f (4) (b )5 (η) = 880 f (4) (η).. The Multiple-Appliction Simpson s 1/3 Rule 5

Just s with the trpezoidl rule, Simpson s rule cn be improved by dividing the integrtion intervl into number of segments of equl width x3 x 1 f(x) dx + h = b n x5 x 3 f(x) dx +... + xn+1 x n f(x) dx Substituting Simpson s 1/3 rule for the individul integrl then combining yields I(f) h n n f() + 4 f(x i ) + f(x j ) + f(b) 3 i=,4,6 j=3,5,7 Notice tht, n even number of segments must be utilized to implement the method. An error estimte for the multiple-ppliction Simpson s rule is obtined in the sme fshion s for the trpezoidl rule by summing the individul errors for the segments nd verging the derivtive to yield..3 Simpson s 3/8 rule E t (b )5 180n 4 f (4) In similr mnner to the derivtion of the trpezoidl nd Simpson s 1/3 rule, third-order Lgrnge polynomil cn be fit to four points nd integrted: to yield f(x) dx F 3 (x) dx I(f) 3h 8 [f(x 1) + 3f(x ) + 3f(x 3 ) + f(x 4 )] where h = (b )/3. This eqution is clled Simpson s 3/8 rule becuse h is multiplied by 3/8. Simpson s 3/8 rule hs n error of (b )5 E t = 6480 f (4) (η) Becuse the denomintor is lrger thn tht for Simpson s (1/3), the 3/8 rule is somewht more ccurte thn the 1/3 rule. Simpson s 1/3 rule is usully the method of preference becuse it ttins third-order ccurcy with three points rther thn the four points required for the 3/8 version. However, the 3/8 rule hs utility when the number of segments is odd. 6

..4 The Multiple-Appliction Simpson s 3/8 Rule When the domin [, b] is divided into n subintervls (where n is t lest 6 nd divisible by 3) Simpson s (3/8) rule cn be generlized to n n X X 3h I(f ) f () + 3 [f (xi ) + f (xi+1 )] + f (xj ) + f (b) 8 i=,5,8 j=4,7,10 3 Guss Qudrture Guss qudrture is technique tht is bsed on evluting the integrl using weighted ddition of the vlues of f (x) t different points (clled Guss points) within the intervl [, b]. Guss qudrture is n open method where the guss points re not eqully spced nd do not include the end points. The loction of the points nd the weights re determined in such wy to minimize the error (in wy tht the right side of the eqution below is exctly equl to the left side when f (x) = 1, x, x,...). Z b f (x)dx I(f ) = n X Ci f (xi ) i=1 The tble below lists the vlues of the coefficients Ci nd the loction of the Guss points xi for i = 1,...6 for = nd b = 1 7

exmple: for n =, = nd b = 1 where f(x)dx C 1 f(x 1 ) + C f(x ) cse f(x) = 1 (1)dx = = C 1 + C cse f(x) = x (x)dx = 0 = C 1 x 1 + C x cse f(x) = x (x )dx = 3 = C 1x 1 + C x cse f(x) = x 3 (x 3 )dx = 0 = C 1 x 3 1 + C x 3 Since some of these equtions re not liner, multiple solutions cn exist. If however, we dd nother condition, sy x 1 nd x should be symmetriclly locted bout the origin (x = x 1 ) then the solution is unique nd note: C 1 = 1 C = 1 x 1 = 3 = 0.5773507 x = 1 3 = 0.5773507 If or b re different thn -1 nd 1 respectively, chnge of vrible cn be mde to chnge the originl bounds to -1 nd 1. x = 1 [t(b ) + + b] dx = 1 (b )dt where f(x) dx = f(x) dx = b ( ) t(b ) + + b (b ) f dt h(t) dt b ( ) t(b ) + + b h(t) = f C i h(t i ) i 4 Richrdson extrpoltion This technique is quite similr to the one used in the previous chpter. estimtes of n integrl to compute third more ccurte estimte. It is bsed on the use of two When n integrl is numericlly evluted with method whose trunction error cn be written in terms of even powers of h, strting with h p, where p is n even number, then the true (unknown) vlue of the integrl I(f) cn be expressed s the sum of the estimte I pp (h) nd the error ccording to f(x)dx = I pp (h) + Ch p + Dh p+ +... 8

Assume the expnsion coefficients to be constnt. We cn get two estimtes of the sme integrl by reducing the size h to h/ f(x)dx = I pp (h/) + C ( ) p ( ) p+ h h + D +... Combining the lst two equtions we get third pproximtion of the integrl of order h p+ I(f) p I pp (h/) I pp (h) p 1 For exmple, consider the estimte nd error ssocited with the ppliction of the composite trpezoidl method I n + E(h) where I(f) is the exct vlue of the integrl, I n is the pproximtion from n n-segment ppliction of the trpezoidl rule with step size h = (b )/n, nd E(h) is the trunction error. (b ) E(h) = f 1 h If we mke n dditionl estimte by reducing the size of the step size from h to h/ doubling by tht the number of intervls between nd b we get fter elimintion of the error, n pproximtion of order h 4 5 Romberg integrtion I(f) I n I n 1 Romberg integrtion is technique tht is bsed on the successive ppliction of the composite trpezoidl rule to obtin more ccurte estimte of the vlue of n integrl. The method cn be explined following the digrm in the figure below The vlue of the integrl is clculted with the composite trpezoidl method severl times. In the first time, the number of subintervls is n nd in ech clcultion tht follows the number of subintervls is doubled. 9

Richrdson s extrpoltion formul, is used for obtining improved estimtes for the vlue of the integrl from the vlues listed in the first column nd the process is repeted in the third nd the rest of the columns To pply Romberg integrtion use the following steps 1. Using the composite trpezoidl method find n estimte of I(f) using n, 1 n, n, 3 n,... intervls. These estimtes re lbeled I i,j, where j is the column number nd i is the row number, of squre mtric or dimension k k I i,j = (j) I i+1,j I i,j (j) 1 10