Presentation is loading. Please wait.

Presentation is loading. Please wait.

Numerical Integration

Similar presentations


Presentation on theme: "Numerical Integration"— Presentation transcript:

1 Numerical Integration
Lecture 7 Numerical Integration

2 Numerical Integration

3 Numerical Integration, simple approach

4 Numerical Integration: Rectangular rule
Objective: to approximate the integral on a given interval [a,b] using a series of piecewise polynomials of degree zero.

5 Numerical Integration: Trapezoid rule
Objective: to approximate the integral on a given interval [a,b] using a series of piecewise polynomials of degree one.

6 Truncation error in trapezoid rule
Error per segment is: Error can be reduced by reducing the value of (b-a)

7 Error analysis of trapezoid rule
Example: Evaluate integral on the interval [0,2], what is the estimated error using 8 segments and what is the actual error?

8 Composite-trapezoid Error in a single trapezoid: Total Error:
Actual Error:

9 Composite-trapezoid example
Approximate the integral of f(x)=x2 on the interval [0,2] with 2,4 and 8 segments. n In I Error 2 3.0 2.6667 4 2.75 8 2.6875

10 Other methods: Newton-Cotes rules
Simpson’s rule (3 points) Simpson’s 3/8th rule (4 points) Booles’ rule (5 points)

11 Simpson’s rule Given the interval [a,b], h=(b-a)/2 and find the quadratic interpolating polynomial passing through (a,f(a)),(a+h,f(a+h)) and (b,f(b)).

12 Simpson’s 3/8th rule Given interval [a,b], h=(b-a)/3, find the cubic polynomial interpolating the four points (a,f(a)),(a+h,f(a+h)), (a+2h,f(a+2h)) and (b,f(b)) and integrate it.

13 Gauss Quadrature Powerful method of numerical integration with higher accuracy than Newton Codes formulas. No useful to integrate functions given in tabular form. Most popular is Gauss-Legendre quadrature.

14 Gauss Quadrature Powerful method of numerical integration in 2 and 3 dimensions


Download ppt "Numerical Integration"

Similar presentations


Ads by Google