Lecture 19 Numerical Integration - PowerPoint PPT Presentation

1 / 47
About This Presentation
Title:

Lecture 19 Numerical Integration

Description:

Lecture 19 - Numerical Integration. CVEN 302. July 22, 2002. Lecture's ... Numerical ... Numerical Integration. Newton-Cotes Open Formulae -- Use only interior ... – PowerPoint PPT presentation

Number of Views:435
Avg rating:3.0/5.0
Slides: 48
Provided by: San59
Category:

less

Transcript and Presenter's Notes

Title: Lecture 19 Numerical Integration


1
Lecture 19 - Numerical Integration
  • CVEN 302
  • July 22, 2002

2
Lectures Goals
  • Trapezoidal Rule
  • Simpsons Rule
  • 1/3 Rule
  • 3/8 Rule
  • Midpoint
  • Gaussian Quadrature

Basic Numerical Integration
3
Basic Numerical Integration
We want to find integration of functions of
various forms of the equation known as the Newton
Cotes integration formulas.
4
Basic Numerical Integration
Weighted sum of function values
f(x)
x
x0
x1
xn
xn-1
5
Numerical Integration
Idea is to do integral in small parts, like the
way you first learned integration - a
summation Numerical methods just try to make it
faster and more accurate
6
Numerical Integration
  • Newton-Cotes Closed Formulae -- Use both end
    points
  • Trapezoidal Rule Linear
  • Simpsons 1/3-Rule Quadratic
  • Simpsons 3/8-Rule Cubic
  • Booles Rule Fourth-order

7
Numerical Integration
  • Newton-Cotes Open Formulae -- Use only interior
    points
  • midpoint rule

8
Trapezoid Rule
  • Straight-line approximation

f(x)
L(x)
x
x0
x1
9
Trapezoid Rule
  • Lagrange interpolation

10
Trapezoid Rule
  • Integrate to obtain the rule

11
ExampleTrapezoid Rule
  • Evaluate the integral
  • Exact solution
  • Trapezoidal Rule

12
Simpsons 1/3-Rule
  • Approximate the function by a parabola

L(x)
f(x)
x
x0
x1
x2
h
h
13
Simpsons 1/3-Rule
14
Simpsons 1/3-Rule
Integrate the Lagrange interpolation
15
Simpsons 3/8-Rule
  • Approximate by a cubic polynomial

f(x)
L(x)
x
x0
x1
x2
h
h
x3
h
16
Simpsons 3/8-Rule
17
Example Simpsons Rules
  • Evaluate the integral
  • Simpsons 1/3-Rule
  • Simpsons 3/8-Rule

18
Midpoint Rule
  • Newton-Cotes Open Formula

f(x)
x
a
b
xm
19
Two-point Newton-Cotes Open Formula
  • Approximate by a straight line

f(x)
x
x0
x1
x2
h
h
x3
h
20
Three-Point Newton-Cotes Open Formula
  • Approximate by a parabola

f(x)
x
x0
x1
x2
h
h
x3
h
h
x4
21
Better Numerical Integration
  • Composite integration
  • Composite Trapezoidal Rule
  • Composite Simpsons Rule
  • Richardson Extrapolation
  • Romberg integration

22
Apply trapezoid rule to multiple segments over
integration limits
23
Composite Trapezoid Rule
f(x)
x
x0
x1
x2
h
h
x3
h
h
x4
24
Composite Trapezoid Rule
  • Evaluate the integral

25
Composite Trapezoid Example
26
Composite Trapezoid Rule with Unequal Segments
  • Evaluate the integral
  • h1 2, h2 1, h3 0.5, h4 0.5

27
Composite Simpsons Rule
Piecewise Quadratic approximations
f(x)
...
x
x0
x2
x4
h
h
xn-2
h
xn
h
x3
x1
xn-1
28
Composite Simpsons Rule
  • Multiple applications of Simpsons rule

29
Composite Simpsons Rule
  • Evaluate the integral
  • n 2, h 2
  • n 4, h 1

30
Composite Simpsons Example
31
Composite Simpsons Rule with Unequal Segments
  • Evaluate the integral
  • h1 1.5, h2 0.5

32
Richardson Extrapolation
  • Use trapezoidal rule as an example
  • subintervals n 2j 1, 2, 4, 8, 16, .

33
Richardson Extrapolation
  • For trapezoidal rule
  • kth level of extrapolation

34
Romberg Integration
  • Accelerated Trapezoid Rule

35
Romberg Integration
  • Accelerated Trapezoid Rule

36
Romberg Integration Example
37
Gaussian 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

38
Gaussian 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

39
Gaussian Quadrature on -1, 1
  • Exact integral for f x0, x1, x2, x3
  • Four equations for four unknowns

40
Gaussian Quadrature on -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

41
Gaussian Quadrature on -1, 1
42
Gaussian Quadrature on -1, 1
  • Exact integral for f x0, x1, x2, x3, x4, x5

43
Gaussian Quadrature on a, b
  • Coordinate transformation from a,b to -1,1

t2
t1
a
b
44
Example Gaussian Quadrature
  • Evaluate
  • Coordinate transformation
  • Two-point formula

45
Example Gaussian Quadrature
  • Three-point formula
  • Four-point formula

46
Summary
  • Integration Techniques
  • Trapezoidal Rule Linear
  • Simpsons 1/3-Rule Quadratic
  • Simpsons 3/8-Rule Cubic
  • Booles Rule Fourth-order
  • Gaussian Quadrature

47
Homework
  • Check the Homework webpage
Write a Comment
User Comments (0)
About PowerShow.com