Title: Lecture 27 Numerical Integration
1Lecture 27 - Numerical Integration
- CVEN 302
- October 31, 2001
2Lectures Goals
- Trapezoidal Rule
- Simpsons Rule
- Romberg
- Gaussian Quadrature
Composite Numerical Integration
3Composite Trapezoid Example
4Composite Simpsons Rule
Piecewise Quadratic approximations
f(x)
...
x
x0
x2
x4
h
h
xn-2
h
xn
h
x3
x1
xn-1
5Composite Simpsons Rule
- Multiple applications of Simpsons rule
6Composite Simpsons Rule
- Evaluate the integral
- n 2, h 2
- n 4, h 1
7Composite Simpsons Example
8Composite Simpsons Rule with Unequal Segments
- Evaluate the integral
- h1 1.5, h2 0.5
9Richardson Extrapolation
- Use trapezoidal rule as an example
- subintervals n 2j 1, 2, 4, 8, 16, .
10Richardson Extrapolation
- For trapezoidal rule
- kth level of extrapolation
11Romberg Integration
- Accelerated Trapezoid Rule
12Romberg Integration
- Accelerated Trapezoid Rule
13Romberg Integration Example
14Gaussian Quadratures
- Newton-Cotes Formulae
- use evenly-spaced functional values
- Gaussian Quadratures
- select functional values at non-uniformly
distributed points to achieve higher accuracy - change of variables so that the interval of
integration is -1,1 - Gauss-Legendre formulae
15Gaussian Quadrature on -1, 1
x2
x1
-1
1
- Choose (c1, c2, x1, x2) such that the method
yields exact integral for f(x) x0, x1, x2, x3
16Gaussian Quadrature on -1, 1
- Exact integral for f x0, x1, x2, x3
- Four equations for four unknowns
17Gaussian Quadrature on -1, 1
x3
x1
x2
-1
1
- Choose (c1, c2, c3, x1, x2, x3) such that the
method yields exact integral for f(x) x0, x1,
x2, x3,x4, x5
18Gaussian Quadrature on -1, 1
19Gaussian Quadrature on -1, 1
- Exact integral for f x0, x1, x2, x3, x4, x5
20Gaussian Quadrature on a, b
- Coordinate transformation from a,b to -1,1
t2
t1
a
b
21Example Gaussian Quadrature
- Evaluate
- Coordinate transformation
- Two-point formula
22Example Gaussian Quadrature
- Three-point formula
- Four-point formula
23Summary
- Integration Techniques
- Trapezoidal Rule Linear
- Simpsons 1/3-Rule Quadratic
- Simpsons 3/8-Rule Cubic
- Booles Rule Fourth-order
- Gaussian Quadrature
24Homework
- Check the Homework webpage