Download presentation
1
Numerical Integration
Basic Numerical Integration We want to find integration of functions of various forms of the equation known as the Newton Cotes integration formulas. Trapezoidal Rule Simpson’s Rule 1/3 Rule 3/8 Rule Midpoint Gaussian Quadrature
2
Basic Numerical Integration
Weighted sum of function values f(x) x x0 x1 xn-1 xn
3
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
4
Numerical Integration
Newton-Cotes Closed Formulae -- Use both end points Trapezoidal Rule : Linear Simpson’s 1/3-Rule : Quadratic Simpson’s 3/8-Rule : Cubic Boole’s Rule : Fourth-order Newton-Cotes Open Formulae -- Use only interior points midpoint rule
5
Trapezoid Rule Straight-line approximation f(x) L(x) x x0 x1
6
Trapezoid Rule Lagrange interpolation
7
Trapezoid Rule Integrate to obtain the rule
8
Example:Trapezoid Rule
Evaluate the integral Exact solution Trapezoidal Rule
9
Simpson’s 1/3-Rule Approximate the function by a parabola L(x) f(x) x
10
Simpson’s 1/3-Rule
11
Simpson’s 1/3-Rule Integrate the Lagrange interpolation
12
Simpson’s 3/8-Rule Approximate by a cubic polynomial L(x) f(x) x x0 h
13
Simpson’s 3/8-Rule
14
Example: Simpson’s Rules
Evaluate the integral Simpson’s 1/3-Rule Simpson’s 3/8-Rule
15
Midpoint Rule Newton-Cotes Open Formula f(x) x a xm b
16
Two-point Newton-Cotes Open Formula
Approximate by a straight line f(x) x x0 h x1 h x2 h x3
17
Three-point Newton-Cotes Open Formula
Approximate by a parabola f(x) x x0 h x1 h x2 h x3 h x4
18
Better Numerical Integration
Composite integration Composite Trapezoidal Rule Composite Simpson’s Rule Richardson Extrapolation Romberg integration
19
Apply trapezoid rule to multiple segments over integration limits
Two segments Three segments Four segments Many segments
20
Composite Trapezoid Rule
f(x) x x0 h x1 h x2 h x3 h x4
21
Composite Trapezoid Rule
Evaluate the integral
22
Composite Trapezoid Example
23
Composite Trapezoid Rule with Unequal Segments
Evaluate the integral h1 = 2, h2 = 1, h3 = 0.5, h4 = 0.5
24
Composite Simpson’s Rule
Piecewise Quadratic approximations f(x) …... x x0 h x1 h x2 h x3 h x4 xn-2 xn-1 xn
25
Composite Simpson’s Rule
Multiple applications of Simpson’s rule
26
Composite Simpson’s Rule
Evaluate the integral n = 2, h = 2 n = 4, h = 1
27
Composite Simpson’s Example
28
Composite Simpson’s Rule with Unequal Segments
Evaluate the integral h1 = 1.5, h2 = 0.5
29
Richardson Extrapolation
Use trapezoidal rule as an example subintervals: n = 2j = 1, 2, 4, 8, 16, ….
30
Richardson Extrapolation
For trapezoidal rule kth level of extrapolation
31
Romberg Integration Accelerated Trapezoid Rule
32
Romberg Integration Accelerated Trapezoid Rule
33
Romberg Integration Example
34
Gaussian Quadratures Newton-Cotes Formulae Gaussian Quadratures
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
35
Gaussian Quadrature on [-1, 1]
x1 x2 -1 1 Choose (c1, c2, x1, x2) such that the method yields “exact integral” for f(x) = x0, x1, x2, x3
36
Gaussian Quadrature on [-1, 1]
Exact integral for f = x0, x1, x2, x3 Four equations for four unknowns
37
Gaussian Quadrature on [-1, 1]
x1 x2 x3 -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
38
Gaussian Quadrature on [-1, 1]
39
Gaussian Quadrature on [-1, 1]
Exact integral for f = x0, x1, x2, x3, x4, x5
40
Gaussian Quadrature on [a, b]
Coordinate transformation from [a,b] to [-1,1] a t1 t2 b
41
Example: Gaussian Quadrature
Evaluate Coordinate transformation Two-point formula
42
Example: Gaussian Quadrature
Three-point formula Four-point formula
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.