numerical differentiation integration elements of
play

Numerical Differentiation & Integration Elements of Numerical - PowerPoint PPT Presentation

Numerical Differentiation & Integration Elements of Numerical Integration I Numerical Analysis (9th Edition) R L Burden & J D Faires Beamer Presentation Slides prepared by John Carroll Dublin City University c 2011 Brooks/Cole,


  1. Numerical Differentiation & Integration Elements of Numerical Integration I Numerical Analysis (9th Edition) R L Burden & J D Faires Beamer Presentation Slides prepared by John Carroll Dublin City University c � 2011 Brooks/Cole, Cengage Learning

  2. Introduction Trapezoidal Rule Simpson’s Rule Comparison Measuring Precision Outline Introduction to Numerical Integration 1 Numerical Analysis (Chapter 4) Elements of Numerical Integration I R L Burden & J D Faires 2 / 36

  3. Introduction Trapezoidal Rule Simpson’s Rule Comparison Measuring Precision Outline Introduction to Numerical Integration 1 The Trapezoidal Rule 2 Numerical Analysis (Chapter 4) Elements of Numerical Integration I R L Burden & J D Faires 2 / 36

  4. Introduction Trapezoidal Rule Simpson’s Rule Comparison Measuring Precision Outline Introduction to Numerical Integration 1 The Trapezoidal Rule 2 Simpson’s Rule 3 Numerical Analysis (Chapter 4) Elements of Numerical Integration I R L Burden & J D Faires 2 / 36

  5. Introduction Trapezoidal Rule Simpson’s Rule Comparison Measuring Precision Outline Introduction to Numerical Integration 1 The Trapezoidal Rule 2 Simpson’s Rule 3 Comparing the Trapezoidal Rule with Simpson’s Rule 4 Numerical Analysis (Chapter 4) Elements of Numerical Integration I R L Burden & J D Faires 2 / 36

  6. Introduction Trapezoidal Rule Simpson’s Rule Comparison Measuring Precision Outline Introduction to Numerical Integration 1 The Trapezoidal Rule 2 Simpson’s Rule 3 Comparing the Trapezoidal Rule with Simpson’s Rule 4 5 Measuring Precision Numerical Analysis (Chapter 4) Elements of Numerical Integration I R L Burden & J D Faires 2 / 36

  7. Introduction Trapezoidal Rule Simpson’s Rule Comparison Measuring Precision Outline Introduction to Numerical Integration 1 The Trapezoidal Rule 2 Simpson’s Rule 3 Comparing the Trapezoidal Rule with Simpson’s Rule 4 5 Measuring Precision Numerical Analysis (Chapter 4) Elements of Numerical Integration I R L Burden & J D Faires 3 / 36

  8. Introduction Trapezoidal Rule Simpson’s Rule Comparison Measuring Precision Introduction to Numerical Integration Numerical Quadrature Numerical Analysis (Chapter 4) Elements of Numerical Integration I R L Burden & J D Faires 4 / 36

  9. Introduction Trapezoidal Rule Simpson’s Rule Comparison Measuring Precision Introduction to Numerical Integration Numerical Quadrature The need often arises for evaluating the definite integral of a function that has no explicit antiderivative or whose antiderivative is not easy to obtain. Numerical Analysis (Chapter 4) Elements of Numerical Integration I R L Burden & J D Faires 4 / 36

  10. Introduction Trapezoidal Rule Simpson’s Rule Comparison Measuring Precision Introduction to Numerical Integration Numerical Quadrature The need often arises for evaluating the definite integral of a function that has no explicit antiderivative or whose antiderivative is not easy to obtain. � b a f ( x ) dx is called The basic method involved in approximating numerical quadrature. It uses a sum � n i = 0 a i f ( x i ) to approximate � b a f ( x ) dx . Numerical Analysis (Chapter 4) Elements of Numerical Integration I R L Burden & J D Faires 4 / 36

  11. Introduction Trapezoidal Rule Simpson’s Rule Comparison Measuring Precision Introduction to Numerical Integration Quadrature based on interpolation polynomials The methods of quadrature in this section are based on the interpolation polynomials. Numerical Analysis (Chapter 4) Elements of Numerical Integration I R L Burden & J D Faires 5 / 36

  12. Introduction Trapezoidal Rule Simpson’s Rule Comparison Measuring Precision Introduction to Numerical Integration Quadrature based on interpolation polynomials The methods of quadrature in this section are based on the interpolation polynomials. The basic idea is to select a set of distinct nodes { x 0 , . . . , x n } from the interval [ a , b ] . Numerical Analysis (Chapter 4) Elements of Numerical Integration I R L Burden & J D Faires 5 / 36

  13. Introduction Trapezoidal Rule Simpson’s Rule Comparison Measuring Precision Introduction to Numerical Integration Quadrature based on interpolation polynomials The methods of quadrature in this section are based on the interpolation polynomials. The basic idea is to select a set of distinct nodes { x 0 , . . . , x n } from the interval [ a , b ] . Then integrate the Lagrange interpolating polynomial n P n ( x ) = � f ( x i ) L i ( x ) i = 0 and its truncation error term over [ a , b ] to obtain: Numerical Analysis (Chapter 4) Elements of Numerical Integration I R L Burden & J D Faires 5 / 36

  14. Introduction Trapezoidal Rule Simpson’s Rule Comparison Measuring Precision Introduction to Numerical Integration Quadrature based on interpolation polynomials (Cont’d) � b � b � b n n ( x − x i ) f ( n + 1 ) ( ξ ( x )) f ( x ) dx = f ( x i ) L i ( x ) dx + dx � � ( n + 1 )! a a a i = 0 i = 0 � b n n 1 ( x − x i ) f ( n + 1 ) ( ξ ( x )) dx a i f ( x i ) + � � = ( n + 1 )! a i = 0 i = 0 where ξ ( x ) is in [ a , b ] for each x and � b a i = L i ( x ) dx , for each i = 0 , 1 , . . . , n a Numerical Analysis (Chapter 4) Elements of Numerical Integration I R L Burden & J D Faires 6 / 36

  15. Introduction Trapezoidal Rule Simpson’s Rule Comparison Measuring Precision Introduction to Numerical Integration Quadrature based on interpolation polynomials (Cont’d) The quadrature formula is, therefore, � b n f ( x ) dx ≈ a i f ( x i ) � a i = 0 Numerical Analysis (Chapter 4) Elements of Numerical Integration I R L Burden & J D Faires 7 / 36

  16. Introduction Trapezoidal Rule Simpson’s Rule Comparison Measuring Precision Introduction to Numerical Integration Quadrature based on interpolation polynomials (Cont’d) The quadrature formula is, therefore, � b n f ( x ) dx ≈ a i f ( x i ) � a i = 0 where � b a i = L i ( x ) dx , for each i = 0 , 1 , . . . , n a Numerical Analysis (Chapter 4) Elements of Numerical Integration I R L Burden & J D Faires 7 / 36

  17. Introduction Trapezoidal Rule Simpson’s Rule Comparison Measuring Precision Introduction to Numerical Integration Quadrature based on interpolation polynomials (Cont’d) The quadrature formula is, therefore, � b n f ( x ) dx ≈ a i f ( x i ) � a i = 0 where � b a i = L i ( x ) dx , for each i = 0 , 1 , . . . , n a and with error given by � b n 1 ( x − x i ) f ( n + 1 ) ( ξ ( x )) dx E ( f ) = � ( n + 1 )! a i = 0 Numerical Analysis (Chapter 4) Elements of Numerical Integration I R L Burden & J D Faires 7 / 36

  18. Introduction Trapezoidal Rule Simpson’s Rule Comparison Measuring Precision Outline Introduction to Numerical Integration 1 The Trapezoidal Rule 2 Simpson’s Rule 3 Comparing the Trapezoidal Rule with Simpson’s Rule 4 5 Measuring Precision Numerical Analysis (Chapter 4) Elements of Numerical Integration I R L Burden & J D Faires 8 / 36

  19. Introduction Trapezoidal Rule Simpson’s Rule Comparison Measuring Precision Numerical Integration: Trapezoidal Rule Derivation (1/3) Numerical Analysis (Chapter 4) Elements of Numerical Integration I R L Burden & J D Faires 9 / 36

  20. Introduction Trapezoidal Rule Simpson’s Rule Comparison Measuring Precision Numerical Integration: Trapezoidal Rule Derivation (1/3) � b a f ( x ) dx , let x 0 = a , To derive the Trapezoidal rule for approximating x 1 = b , h = b − a Numerical Analysis (Chapter 4) Elements of Numerical Integration I R L Burden & J D Faires 9 / 36

  21. Introduction Trapezoidal Rule Simpson’s Rule Comparison Measuring Precision Numerical Integration: Trapezoidal Rule Derivation (1/3) � b a f ( x ) dx , let x 0 = a , To derive the Trapezoidal rule for approximating x 1 = b , h = b − a and use the linear Lagrange polynomial: P 1 ( x ) = ( x − x 1 ) ( x 0 − x 1 ) f ( x 0 ) + ( x − x 0 ) ( x 1 − x 0 ) f ( x 1 ) Numerical Analysis (Chapter 4) Elements of Numerical Integration I R L Burden & J D Faires 9 / 36

  22. Introduction Trapezoidal Rule Simpson’s Rule Comparison Measuring Precision Numerical Integration: Trapezoidal Rule Derivation (1/3) � b a f ( x ) dx , let x 0 = a , To derive the Trapezoidal rule for approximating x 1 = b , h = b − a and use the linear Lagrange polynomial: P 1 ( x ) = ( x − x 1 ) ( x 0 − x 1 ) f ( x 0 ) + ( x − x 0 ) ( x 1 − x 0 ) f ( x 1 ) Then � b � x 1 � ( x − x 1 ) ( x 0 − x 1 ) f ( x 0 ) + ( x − x 0 ) � f ( x ) dx ( x 1 − x 0 ) f ( x 1 ) dx = a x 0 � x 1 + 1 f ′′ ( ξ ( x ))( x − x 0 )( x − x 1 ) dx . 2 x 0 Numerical Analysis (Chapter 4) Elements of Numerical Integration I R L Burden & J D Faires 9 / 36

  23. Introduction Trapezoidal Rule Simpson’s Rule Comparison Measuring Precision Numerical Integration: Trapezoidal Rule Derivation (2/3) The product ( x − x 0 )( x − x 1 ) does not change sign on [ x 0 , x 1 ] , so the See Theorem can be applied Weighted Mean Value Theorem for Integrals to the error term Numerical Analysis (Chapter 4) Elements of Numerical Integration I R L Burden & J D Faires 10 / 36

Recommend


More recommend