# SE301:Numerical Methods Topic 6 Numerical Integration - PowerPoint PPT Presentation

View by Category
Title:

## SE301:Numerical Methods Topic 6 Numerical Integration

Description:

### Gives the same answer as the standard Trapezoid method. ... Trapezoid formula with an interval h gives error of the order O(h2) ... – PowerPoint PPT presentation

Number of Views:262
Avg rating:3.0/5.0
Slides: 61
Category:
Tags:
Transcript and Presenter's Notes

Title: SE301:Numerical Methods Topic 6 Numerical Integration

1
SE301Numerical Methods Topic 6 Numerical
Integration
• Dr. Samir Al-Amer
• Term 053

2
Lecture 17 Introduction to Numerical Integration
• Definitions
• Upper and Lower Sums
• Trapezoid Method
• Examples

3
Integration
Indefinite Integrals Indefinite Integrals of a
function are functions that differ from each
other by a constant.
Definite Integrals Definite Integrals are
numbers.
4
Fundamental Theorem of Calculus
5
The Area Under the Curve
One interpretation of the definite integral is
Integral area under the curve
f(x)
a
b
6
Numerical Integration Methods
• Numerical integration Methods Covered in this
course
• Upper and Lower Sums
• Newton-Cotes Methods
• Trapezoid Rule
• Simpson Rules
• Romberg Method

7
Upper and Lower Sums
The interval is divided into subintervals
f(x)
a
b
8
Upper and Lower Sums
f(x)
a
b
9
Example
10
Example
11
Upper and Lower Sums
• Estimates based on Upper and Lower Sums are easy
to obtain for monotonic functions (always
increasing or always decreasing).
• For non-monotonic functions, finding maximum and
minimum of the function can be difficult and
other methods can be more attractive.

12
Newton-Cotes Methods
• In Newton-Cote Methods, the function is
approximated by a polynomial of order n
• Computing the integral of a polynomial is easy.

13
Newton-Cotes Methods
• Trapezoid Method (First Order Polynomial are
used)
• Simpson 1/3 Rule (Second Order Polynomial are
used),

14
Trapezoid Method
f(x)
15
Trapezoid Method Derivation-One interval
16
Trapezoid Method
f(x)
17
Trapezoid Method Multiple Application Rule
f(x)
x
a
b
18
Trapezoid Method General Formula and special case
19
Example
Given a tabulated values of the velocity of an
object. Obtain an estimate of the distance
traveled in the interval 0,3.
Time (s) 0.0 1.0 2.0 3.0
Velocity (m/s) 0.0 10 12 14
Distance integral of the velocity
20
Example 1
Time (s) 0.0 1.0 2.0 3.0
Velocity (m/s) 0.0 10 12 14
21
Estimating the Error For Trapezoid method
22
Error in estimating the integral Theorem
23
Example
24
Example
x 1.0 1.5 2.0 2.5 3.0
f(x) 2.1 3.2 3.4 2.8 2.7
25
Example
x 1.0 1.5 2.0 2.5 3.0
f(x) 2.1 3.2 3.4 2.8 2.7
26
SE301 Numerical Method Lecture 18 Recursive
Trapezoid Method
Recursive formula is used

27
Recursive Trapezoid Method
f(x)
28
Recursive Trapezoid Method
f(x)
Based on previous estimate
Based on new point
29
Recursive Trapezoid Method
f(x)
Based on previous estimate
Based on new points
30
Recursive Trapezoid Method Formulas
31
Recursive Trapezoid Method
32
• Recursive Trapezoid
• Gives the same answer as the standard Trapezoid
method.
• Make use of the available information to reduce
computation time.
• Useful if the number of iterations is not known

33
SE301Numerical Methods 19. Romberg Method
• Motivation
• Derivation of Romberg Method
• Romberg Method
• Example
• When to stop?

34
Motivation for Romberg Method
• Trapezoid formula with an interval h gives error
of the order O(h2)
• We can combine two Trapezoid estimates with
intervals 2h and h to get a better estimate.

35
Romberg Method
R(0,0)
R(1,0) R(1,1)
R(2,0) R(2,1) R(2,2)
R(3,0) R(3,1) R(3,2) R(3,3)
First column is obtained using Trapezoid Method
The other elements are obtained using the
Romberg Method
36
First Column Recursive Trapezoid Method
37
Derivation of Romberg Method
38
Romberg Method
R(0,0)
R(1,0) R(1,1)
R(2,0) R(2,1) R(2,2)
R(3,0) R(3,1) R(3,2) R(3,3)
39
Property of Romberg Method
R(0,0)
R(1,0) R(1,1)
R(2,0) R(2,1) R(2,2)
R(3,0) R(3,1) R(3,2) R(3,3)
Error Level
40
Example 1
0.5
3/8 1/3
41
Example 1 cont.
0.5
3/8 1/3
11/32 1/3 1/3
42
When do we stop?
43
• Motivation
• General integration formula

44
Motivation
45
General Integration Formula
46
Lagrange Interpolation
47
Question
What is the best way to choose the nodes and the
weights?
48
Theorem
49
50
Determining The Weights and Nodes
51
Determining The Weights and Nodes Solution
52
Theorem
53
Determining The Weights and Nodes Solution
54
Determining The Weights and Nodes Solution
55
Gaussian Quadrature See more in Table 22.1 (page
626)
626
56