CISE301_Topic7KFUPM1 SE301: Numerical Methods Topic 7 Numerical Integration Lecture KFUPM Read Chapter 21, Section 1 Read Chapter 22, Sections 2-3
CISE301_Topic7KFUPM2 L ecture 24 Introduction to Numerical Integration Definitions Upper and Lower Sums Trapezoid Method (Newton-Cotes Methods) Romberg Method Gauss Quadrature Examples
CISE301_Topic7KFUPM3 Integration Indefinite Integrals Indefinite Integrals of a function are functions that differ from each other by a constant. Definite Integrals Definite Integrals are numbers.
CISE301_Topic7KFUPM4 Fundamental Theorem of Calculus
CISE301_Topic7KFUPM5 The Area Under the Curve One interpretation of the definite integral is: Integral = area under the curve ab f(x)
CISE301_Topic7KFUPM6 Upper and Lower Sums ab f(x) The interval is divided into subintervals.
CISE301_Topic7KFUPM7 Upper and Lower Sums ab f(x)
CISE301_Topic7KFUPM8 Example
CISE301_Topic7KFUPM9 Example
CISE301_Topic7KFUPM10 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.
CISE301_Topic7KFUPM11 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.
CISE301_Topic7KFUPM12 Newton-Cotes Methods Trapezoid Method ( First Order Polynomials are used ) Simpson 1/3 Rule ( Second Order Polynomials are used )
CISE301_Topic7KFUPM13 L ecture 25 Trapezoid Method Derivation-One Interval Multiple Application Rule Estimating the Error Recursive Trapezoid Method Read 21.1
CISE301_Topic7KFUPM14 Trapezoid Method f(x)
CISE301_Topic7KFUPM15 Trapezoid Method Derivation-One Interval
CISE301_Topic7KFUPM16 Trapezoid Method f(x)
CISE301_Topic7KFUPM17 Trapezoid Method Multiple Application Rule ab f(x) x
CISE301_Topic7KFUPM18 Trapezoid Method General Formula and Special Case
CISE301_Topic7KFUPM19 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) Velocity (m/s) Distance = integral of the velocity
CISE301_Topic7KFUPM20 Example 1 Time (s) Velocity (m/s)
CISE301_Topic7KFUPM21 Estimating the Error For Trapezoid Method
CISE301_Topic7KFUPM22 Error in estimating the integral Theorem
CISE301_Topic7KFUPM23 Example
CISE301_Topic7KFUPM24 Example x f(x)
CISE301_Topic7KFUPM25 Example x f(x)
CISE301_Topic7KFUPM26 Recursive Trapezoid Method f(x)
CISE301_Topic7KFUPM27 Recursive Trapezoid Method f(x) Based on previous estimate Based on new point
CISE301_Topic7KFUPM28 Recursive Trapezoid Method f(x) Based on previous estimate Based on new points
CISE301_Topic7KFUPM29 Recursive Trapezoid Method Formulas
CISE301_Topic7KFUPM30 Recursive Trapezoid Method
CISE301_Topic7KFUPM31 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.
CISE301_Topic7KFUPM32 L ecture 26 Romberg Method Motivation Derivation of Romberg Method Romberg Method Example When to stop? Read 22.2
CISE301_Topic7KFUPM33 Motivation for Romberg Method Trapezoid formula with an interval h gives an error of the order O(h 2 ). We can combine two Trapezoid estimates with intervals 2h and h to get a better estimate.
CISE301_Topic7KFUPM34 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
CISE301_Topic7KFUPM35 First Column Recursive Trapezoid Method
CISE301_Topic7KFUPM36 Derivation of Romberg Method
CISE301_Topic7KFUPM37 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)
CISE301_Topic7KFUPM38 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
CISE301_Topic7KFUPM39 Example /81/3
CISE301_Topic7KFUPM40 Example 1 (cont.) 0.5 3/81/3 11/321/3
CISE301_Topic7KFUPM41 When do we stop?
CISE301_Topic7KFUPM42 L ecture 27 Gauss Quadrature Motivation General integration formula Read 22.3
CISE301_Topic7KFUPM43 Motivation
CISE301_Topic7KFUPM44 General Integration Formula
CISE301_Topic7KFUPM45 Lagrange Interpolation
CISE301_Topic7KFUPM46 Question What is the best way to choose the nodes and the weights?
CISE301_Topic7KFUPM47 Theorem
CISE301_Topic7KFUPM48 Weighted Gaussian Quadrature Theorem
CISE301_Topic7KFUPM49 Determining The Weights and Nodes
CISE301_Topic7KFUPM50 Determining The Weights and Nodes Solution
CISE301_Topic7KFUPM51 Determining The Weights and Nodes Solution
CISE301_Topic7KFUPM52 Determining The Weights and Nodes Solution
CISE301_Topic7KFUPM53 Gaussian Quadrature See more in Table 22.1 (page 626)
CISE301_Topic7KFUPM54 Error Analysis for Gauss Quadrature
CISE301_Topic7KFUPM55 Example
CISE301_Topic7KFUPM56 Example
CISE301_Topic7KFUPM57 Improper Integrals