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 8 Chapter 7 Numerical Integration

2 Integration Indefinite Integrals Definite Integrals
Indefinite Integrals of a function are functions that differ from each other by a constant. Definite Integrals Definite Integrals are numbers.

3 Why Numerical Integration?
Very often, the function f(x) to differentiate or the integrand to integrate is too complex to derive exact analytical solutions. In most cases in engineering, the function f(x) is only available in a tabulated form with values known only at discrete points. Numerical Solution

4 Numerical Integration
The general form of numerical integration of a function f (x) over some interval [a, b] is a weighted sum of the function values at a finite number (n) of sample points (nodes), referred to as ‘quadrature’:

5 One interpretation of the definite integral is
Integral = area under the curve f(x) a b

6 Newton-Cotes Integration
Common numerical integration scheme Based on the strategy of replacing a complicated function or tabulated data with some approximating function that is easy to integrate Pn(x) is an nth order polynomial

7 Trapezoidal Rule Corresponds to the case where the polynomial is a first order F(b) h F(a)

8 From the trapezoidal rule we can obtain for the total area of (n-1) intervals
where there are n equally spaced base points.

9

10 Error Estimate in the trapezoidal rule
It can be obtained by integrating the interpolation error we defined in previous chapter for Lagrange polynomial as

11 Example

12 1

13 2 1 1 1/2 1 1 1 2 2 2 1/4 1/2 3/4 1

14 Remark 1: in this example instead of re-computation of some function values when h is changed to h/2 we observe that

15 Simpson’s Rules Simpson’s 1/3 rule can be obtained by passing a parabolic interpolant through three adjacent nodes. The area under the parabola is

16 1 4 2 f(x1), f(xn) f(x2), f(x4), f(x6),.. f(x3), f(x5), f(x7),..
To obtain the total area of (n-1) even intervals we apply the following general Simpson’s 1/3 rule Note: f(x1), f(xn) 1 f(x2), f(x4), f(x6),.. 4 f(x3), f(x5), f(x7),.. 2

17 Remark 2: Simpson’s 1/3 rule requires the number of intervals to be even. If this condition is not satisfied, we can integrate over the first (or last) three intervals with Simpson’s 3/8 rule which can be obtained by passing a cubic interpolant through four adjacent nodes, and defined by The error in the Simpson’s rule is

18 Simpson’s 3/8 rule Simpson’s 1/3 rule Because the number of panels is odd, we compute the integral over the first three intervals by Simpson’s 3/8 rule, and use the 1/3 rule for the last two intervals:

19

20

21

22 To be continued in Lecture 9
Summary Newton Cotes formulae for Numerical integration. Trapezoidal Rule Simpson’s Rules. Romberg Integration Double Integrals To be continued in Lecture 9


Download ppt "Numerical Integration"

Similar presentations


Ads by Google