Download presentation
Presentation is loading. Please wait.
Published byNaomi Bruce Modified over 9 years ago
1
CISE301_Topic71 SE301: Numerical Methods Topic 7 Numerical Integration Lecture 24-27 KFUPM (Term 101) Section 04 Read Chapter 21, Section 1 Read Chapter 22, Sections 2-3
2
CISE301_Topic72 L ecture 24 Introduction to Numerical Integration Definitions Upper and Lower Sums Trapezoid Method (Newton-Cotes Methods) Romberg Method Gauss Quadrature Examples
3
CISE301_Topic73 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
CISE301_Topic74 Fundamental Theorem of Calculus
5
CISE301_Topic75 The Area Under the Curve One interpretation of the definite integral is: Integral = area under the curve ab f(x)
6
CISE301_Topic76 Upper and Lower Sums ab f(x) The interval is divided into subintervals.
7
CISE301_Topic77 Upper and Lower Sums ab f(x)
8
CISE301_Topic78 Example
9
9 Example
10
10 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.
11
CISE301_Topic711 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.
12
CISE301_Topic712 Newton-Cotes Methods Trapezoid Method ( First Order Polynomials are used ) Simpson 1/3 Rule ( Second Order Polynomials are used )
13
CISE301_Topic713 L ecture 25 Trapezoid Method Derivation-One Interval Multiple Application Rule Estimating the Error Recursive Trapezoid Method Read 21.1
14
CISE301_Topic714 Trapezoid Method f(x)
15
CISE301_Topic715 Trapezoid Method Derivation-One Interval
16
CISE301_Topic716 Trapezoid Method f(x)
17
CISE301_Topic717 Trapezoid Method Multiple Application Rule ab f(x) x
18
CISE301_Topic718 Trapezoid Method General Formula and Special Case
19
CISE301_Topic719 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.01.02.03.0 Velocity (m/s)0.0101214 Distance = integral of the velocity
20
CISE301_Topic720 Example 1 Time (s)0.01.02.03.0 Velocity (m/s) 0.0101214
21
CISE301_Topic721 Error in estimating the integral Theorem
22
CISE301_Topic722 Estimating the Error For Trapezoid Method
23
CISE301_Topic723 Example
24
CISE301_Topic724 Example x1.01.52.02.53.0 f(x)2.13.23.42.82.7
25
CISE301_Topic725 Example x1.01.52.02.53.0 f(x)2.13.23.42.82.7
26
CISE301_Topic726 Recursive Trapezoid Method f(x)
27
CISE301_Topic727 Recursive Trapezoid Method f(x) Based on previous estimate Based on new point
28
CISE301_Topic728 Recursive Trapezoid Method f(x) Based on previous estimate Based on new points
29
CISE301_Topic729 Recursive Trapezoid Method Formulas
30
CISE301_Topic730 Recursive Trapezoid Method
31
Example on Recursive Trapezoid CISE301_Topic731 nhR(n,0) 0 (b-a)=/2(/4)[sin(0) + sin(/2)]=0.785398 1 (b-a)/2=/4R(0,0)/2 + (/4) sin(/4) = 0.948059 2 (b-a)/4=/8R(1,0)/2 + (/8)[sin(/8)+sin(3/8)] = 0.987116 3 (b-a)/8=/16R(2,0)/2 + (/16)[sin(/16)+sin(3/16)+sin(5/16)+ sin(7/16)] = 0.996785 Estimated Error = |R(3,0) – R(2,0)| = 0.009669
32
CISE301_Topic732 Advantages of Recursive Trapezoid Recursive Trapezoid: Gives the same answer as the standard Trapezoid method. Makes use of the available information to reduce the computation time. Useful if the number of iterations is not known in advance.
33
CISE301_Topic733 L ecture 26 Romberg Method Motivation Derivation of Romberg Method Romberg Method Example When to stop? Read 22.2
34
CISE301_Topic734 Motivation for Romberg Method Trapezoid formula with a sub-interval h gives an error of the order O(h 2 ). We can combine two Trapezoid estimates with intervals h and h/2 to get a better estimate.
35
CISE301_Topic735 Romberg Method First column is obtained using Trapezoid 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) The other elements are obtained using the Romberg Method
36
CISE301_Topic736 First Column Recursive Trapezoid Method
37
CISE301_Topic737 Derivation of Romberg Method
38
CISE301_Topic738 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
CISE301_Topic739 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
CISE301_Topic740 Example 0.5 3/81/3
41
CISE301_Topic741 Example (cont.) 0.5 3/81/3 11/321/3
42
CISE301_Topic742 When do we stop?
43
CISE301_Topic743 L ecture 27 Gauss Quadrature Motivation General integration formula Read 22.3
44
CISE301_Topic744 Motivation
45
CISE301_Topic745 General Integration Formula
46
CISE301_Topic746 Lagrange Interpolation
47
Example Determine the Gauss Quadrature Formula of If the nodes are given as (-1, 0, 1) Solution: First we need to find l 0 (x), l 1 (x), l 2 (x) Then compute: CISE301_Topic747
48
Solution CISE301_Topic748
49
Using the Gauss Quadrature Formula CISE301_Topic749
50
Using the Gauss Quadrature Formula CISE301_Topic750
51
CISE301_Topic751 Improper Integrals
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.