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
10
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
The Midpoint Rule Consider the integral: And the Taylor approximation: The midpoint rule: Its composite rule: because
26
27
28 Example 5.7
29
30
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
Gaussian Quadrature Gaussian quadrature is a very powerful tool for approximating integrals. The quadrature rules are all base on special values of weights and abscissas (called 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 abscissas) equals the number of equations. Taking N=2n will yield a contradiction.
37 Only to find an example
38
39 Finding Gauss Points
40 Theorem 5.3
41 Theorem 5.4
42
43 Other Intervals, Other Rules
44 Example 5.9 Table 5.5
45 Error estimation!! See exercise!!
46 Example 5.10
47
Extrapolation Methods One of the most important ideas in computational mathematics is— We can take the information from a few approximations and Use that to both estimate the error in the approximation and generate a significantly improved approximation In this section we will embark on a more detailed study of some of these ideas.
49 Approximation
50 Estimating p
51 Example 5.11
52
53 Example 5.12
54
55 Error Estimation and an Improved Approximation I2n-InI2n-In
56 Example 5.13
57 Example 5.14 O(h 2 ): Error of trapezoid rule O(h 4 ): Error of Richardson extrapolation