{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Chap 9 Numerical Integration

# Chap 9 Numerical Integration - FIRST YEAR CALCULUS W W L...

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

FIRST YEAR CALCULUS W W L CHEN c W W L Chen, 1987, 2005. This chapter originates from material used by the author at Imperial College, University of London, between 1981 and 1990. It is available free to all individuals, on the understanding that it is not to be used for financial gain, and may be downloaded and/or photocopied, with or without permission from the author. However, this document may not be kept on any information storage and retrieval system without permission from the author, unless such system is not accessible to any individuals other than its owners. Chapter 9 NUMERICAL INTEGRATION 9.1. Introduction In Chapters 7 and 8, we have discussed some analytic techniques for evaluating integrals. However, many integrals that arise in science and engineering resist attack by even the most sophisticated analytic techniques. In such instances, we may have to accept a rather poor and perhaps even not entirely satisfactory second best, and attempt to make reasonable approximations by numerical techniques. 9.2. The Trapezium Rule Suppose that we wish to evaluate an integral B A f ( x )d x, where the function f ( x ) is finite and continuous in the closed interval [ A, B ]. If we draw the curve y = f ( x ), then the value of the integral is the same as the area bounded by the curve y = f ( x ) and the lines y = 0, x = A and x = B (the reader should draw a diagram). A first, and rather crude, approximation to the integral is to take the area of the trapezium with vertices at the points ( A, 0), ( B, 0), ( A, f ( A )) and ( B, f ( B )). In other words, we take the approximation (1) B A f ( x )d x 1 2 ( B A )( f ( A ) + f ( B )) . In practice, however, we take more points than just A and B . Consider the dissection A = x 0 < x 1 < . . . < x n = B Chapter 9 : Numerical Integration page 1 of 10

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

View Full Document
First Year Calculus c W W L Chen, 1987, 2005 of the interval [ A, B ]. Clearly we have B A f ( x )d x = n i =1 x i x i 1 f ( x )d x. Suppose now that we make a similar approximation as (1) in each of the subintervals, so that for every i = 1 , . . . , n , we have x i x i 1 f ( x )d x 1 2 ( x i x i 1 )( f ( x i 1 ) + f ( x i )) . Then we have the approximation (2) B A f ( x )d x 1 2 n i =1 ( x i x i 1 )( f ( x i 1 ) + f ( x i )) . Suppose further that the lengths of all the subintervals are the same, so that x i x i 1 = h = B A n for every i = 1 , . . . , n. Then (2) becomes B A f ( x )d x h 2 ( f ( x 0 ) + 2 f ( x 1 ) + 2 f ( x 2 ) + . . . + 2 f ( x n 1 ) + f ( x n )) . This is called the Trapezium rule for n intervals. Example 9.2.1. We wish to estimate the value of log2 by a Trapezium rule approximation to the integral 2 1 1 x d x. Then f ( x ) = 1 /x in the interval [1 , 2]. If we take h = 1 / 2, then we have x 1 3 2 2 f ( x ) 1 2 3 1 2 and so 2 1 1 x d x 1 4 1 + 4 3 + 1 2 = 0 . 7083 (4dp) . If we take h = 1 / 4, then we have x 1 5 4 3 2 7 4 2 f ( x ) 1 4 5 2 3 4 7 1 2 and so 2 1 1 x d x 1 8 1 + 8 5 + 4 3 + 8 7 + 1 2 = 0 . 6970 (4dp) . Chapter 9 : Numerical Integration page 2 of 10
First Year Calculus c W W L Chen, 1987, 2005 9.3. The Midpoint Rule This method is fundamentally similar to the Trapezium rule. Suppose that we wish to evaluate an integral B A f ( x )d x, where the function f ( x ) is finite and continuous in the closed interval [ A, B ].

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

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}