 1 Chapter 5 Numerical Integration. 2 A Review of the Definite Integral.

Presentation on theme: "1 Chapter 5 Numerical Integration. 2 A Review of the Definite Integral."— Presentation transcript:

1 Chapter 5 Numerical Integration

2 A Review of the Definite Integral

3 Riemann Sum  A summation of the form is called a Riemann sum.

4 5.2 Improving the Trapezoid Rule  The trapezoid rule for computing integrals:  The error:

5 5.2 Improving the Trapezoid Rule  So that  Therefore,  Error estimation:  Improvement of the approximation: the corrected trapezoid rule

6 Example 5.1

7 Example 5.2

8 h4h4

9 Approximate Corrected Trapezoid Rule p. 176

10

11 5.3 Simpson’s Rule and Degree of Precision

12 let

13

14 Example 5.3

15

16 The Composite Rule Assume Example 5.4

17

18 Example 5.5 h4h4 It’s OK!!

19 Discussion  From our experiments:  From the definition of Simpson’s rule:  Why? Why Simpson’s rule is “more accurate than it ought to be”?

20

21

22

23

24 Example 5.6

25 5.4 The Midpoint Rule  Consider the integral:  And the Taylor approximation:  The midpoint rule:  Its composite rule: because

26

27

28 Example 5.7 f (1/4)f (3/4)

29 h2h2

30

31 5.5 Application: Stirling’s Formula  Stirling’s formula is an interesting and useful way to approximate the factorial function, n !, for large values of n. Use Stirling ’ s formula to show that for all x. Example

32 5.6 Gaussian Quadrature  Gaussian quadrature is a very powerful tool for approximating integrals.  The quadrature ( 求面積 ) rules are all base on special values of weights and Gauss points.  The quadrature rule is written in the form weights Gauss points

33

34 Example 5.8

35 Question k

36 Discussion  The high accuracy of Gaussian quadrature then comes from the fact that it integrates very-high-degree polynomials exactly.  We should choose N=2n-1, because a polynomial of degree 2n-1 has 2n coefficients, and thus the number of unknowns ( n weights plus n Gauss points) equals the number of equations.  Taking N=2n will yield a contradiction.

37 Only to find an example

38 Finding weights

39 Finding Gauss Points

40 Legendre polynomials

41 Orthogonal polynomials

42 Theorem 5.3

43 Theorem 5.4 Any polynomial of degree n-1 can be interpolated by Lagrange interpolation with n data points

44

45 Other Intervals, Other Rules

46 Example 5.9 Table 5.5

Download ppt "1 Chapter 5 Numerical Integration. 2 A Review of the Definite Integral."

Similar presentations