Numarical Integration

Numarical Integration - Contents 13 Numerical Integration...

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

View Full Document Right Arrow Icon

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

View Full DocumentRight Arrow Icon

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

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

Unformatted text preview: Contents 13 Numerical Integration 187 13.1 Midpoint Rule . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187 13.2 Trapezoidal Rule . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191 13.3 Algorithm for Computing T 2 N from T N . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191 13.4 Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192 13.5 Simpson’s Rule . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194 13.6 A Little Numerical Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195 13.7 Algorithm for Computing S N and D N . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195 2 CONTENTS Chapter 13 Numerical Integration 13.1 Midpoint Rule Divide the interval [ a,b ] into N equal subintervals as shown in the diagram. • a = x • x 1 • x 2 • x 3 • x N- 1 • b = x N Each subinterval has length h = b- a N . The midpoint of the subinterval [ x i ,x i +1 ] is m i = x i + x i +1 2 . • x m × • x 1 m 1 × • x 2 • x N- 1 m N- 1 × • x N Now we draw the graph of f h h b a f x The signed area M N of the shaded rectangles is M N = hf ( m ) + hf ( m 1 ) + ... + hf ( m N- 1 ) = h N- 1 X i =0 f ( m i ) . It is called the midpoint approximation to the definite integral Z b a f ( x ) dx . 188 Numerical Integration The error is given by the formula Z b a f ( x ) dx = M N | {z } approximation + E N | {z } error . If B is a number such that | f 00 ( z ) | ≤ B for all z ∈ [ a,b ] then | E N | ≤ ( b- a ) 3 B 24 N 2 . Note: The approximation and its accuracy depends on the number, N , of subintervals. Example 1 : Approximate I = Z π π 4 sin xdx by the midpoint rule with N = 4 and estimate the accuracy of this approxi- mation. Solution : Step size: h = π- π 4 4 = 3 π 16 . Midpoints: m = π 4 + 3 π 32 = 11 π 32 = 1 . 0799225 m 1 = π 4 + 9 π 32 = 17 π 32 = 1 . 6689711 m 2 = π 4 + 15 π 32 = 23 π 32 = 2 . 2580197 m 3 = π 4 + 21 π 32 = 29 π 32 = 2 . 8470683. Approximation: M 4 = h { sin( m ) + sin( m 1 ) + sin( m 2 ) + sin( m 3 ) } M 4 = 3 π 16 ( . 88192127 + . 99518473 + . 77301046 + . 29028468) = 3 π 16 (2 . 9404011) = 1 . 7320392 Error analysis: f ( x ) = cos x and f 00 ( x ) =- sin x | f 00 ( x ) | = | sin x | ≤ 1 for all x ∈ R ....
View Full Document

This note was uploaded on 09/22/2011 for the course ECON 101 taught by Professor Mr.tull during the Spring '11 term at De La Salle University.

Page1 / 12

Numarical Integration - Contents 13 Numerical Integration...

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

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