Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Part 5 Integration and Differentiation.

Slides:



Advertisements
Similar presentations
Numerical Integration
Advertisements

ES 240: Scientific and Engineering Computation. Chapter 17: Numerical IntegrationIntegration  Definition –Total area within a region –In mathematical.
1 Chapter 5 Numerical Integration. 2 A Review of the Definite Integral.
Numerical Integration of Functions
Part 5 Chapter 19 Numerical Differentiation PowerPoints organized by Dr. Michael R. Gustafson II, Duke University All images copyright © The McGraw-Hill.
NUMERICAL DIFFERENTIATION AND INTEGRATION
High Accuracy Differentiation Formulas
Chapter 7 Numerical Differentiation and Integration
Lecture 18 - Numerical Differentiation
Numerical Integration
Numerical Integration Lecture (II)1
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Ordinary Differential Equations Equations which are.
ECIV 301 Programming & Graphics Numerical Methods for Engineers Lecture 30 Numerical Integration & Differentiation.
Newton-Cotes Integration Formula
Chapter 17 Numerical Integration Formulas. Graphical Representation of Integral Integral = area under the curve Use of a grid to approximate an integral.
ECIV 301 Programming & Graphics Numerical Methods for Engineers REVIEW III.
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 181 Interpolation Chapter 18 Estimation of intermediate.
The Islamic University of Gaza Faculty of Engineering Civil Engineering Department Numerical Analysis ECIV 3306 Chapter 22 Integration of Equations.
Numerical Integration
Numerical Integration Lecture (I)1
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Numerical Differentiation and Integration Standing.
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. by Lale Yurttas, Texas A&M University Chapter 171 Least.
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 ~ Numerical Differentiation and Integration ~ Newton-Cotes.
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Numerical Differentiation and Integration Standing.
CISE301_Topic7KFUPM1 SE301: Numerical Methods Topic 7 Numerical Integration Lecture KFUPM Read Chapter 21, Section 1 Read Chapter 22, Sections 2-3.
CISE301_Topic71 SE301: Numerical Methods Topic 7 Numerical Integration Lecture KFUPM (Term 101) Section 04 Read Chapter 21, Section 1 Read Chapter.
Numerical Integration Formulas
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Numerical Differentiation and Integration Part 6 Calculus.
The Islamic University of Gaza Faculty of Engineering Civil Engineering Department Numerical Analysis ECIV 3306 Chapter 21 Newton-Cotes Integration Formula.
Engineering Analysis ENG 3420 Fall 2009
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Applied Numerical Methods With MATLAB ® for Engineers.
1 NUMERICAL INTEGRATION Motivation: Most such integrals cannot be evaluated explicitly. Many others it is often faster to integrate them numerically rather.
Today’s class Numerical Integration Newton-Cotes Numerical Methods
MECN 3500 Inter - Bayamon Lecture Numerical Methods for Engineering MECN 3500 Professor: Dr. Omar E. Meza Castillo
Lecture 19 - Numerical Integration CVEN 302 July 22, 2002.
Integration Integration: is the total value, or summation, of f(x) dx over the range from a to b:
1 Chapter 7 NUMERICAL INTEGRATION. 2 PRELIMINARIES We use numerical integration when the function f(x) may not be integrable in closed form or even in.
CMPS1371 Introduction to Computing for Engineers NUMERICAL METHODS.
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Part 2 Roots of Equations Why? But.
Chapter 9 Numerical Integration Flow Charts, Loop Structures Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Simpson Rule For Integration.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Part 4 Curve Fitting.
Integration Copyright © Cengage Learning. All rights reserved.
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 ~ Numerical Differentiation and Integration ~ Integration.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Chapter 22.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Part 6 - Chapter 21.
Numerical Integration
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Part 7 - Chapter 25.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Part 4 Chapter 17 and 18 Interpolation.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Part 6 - Chapters 22 and 23.
SE301_Topic 6Al-Amer20051 SE301:Numerical Methods Topic 6 Numerical Integration Dr. Samir Al-Amer Term 053.
Quadrature – Concepts (numerical integration) Don Allen.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Chapter 21 Numerical Differentiation.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Chapter 20 Numerical Integration of Functions.
Applied Numerical Methods
Part 6 - Chapter 21.
Chapter 7 Numerical Differentiation and Integration
Numerical Integration Formulas
Chapter 22.
NUMERICAL DIFFERENTIATION AND INTEGRATION
Numerical Differentiation
NUMERICAL DIFFERENTIATION AND INTEGRATION
Chapter 23.
Chapter 7 Numerical Differentiation and Integration
Copyright © Cengage Learning. All rights reserved.
Numerical Integration of Functions
SKTN 2393 Numerical Methods for Nuclear Engineers
SKTN 2393 Numerical Methods for Nuclear Engineers
Numerical Integration
Presentation transcript:

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Part 5 Integration and Differentiation

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 2

3 Part 5 Numerical Differentiation and Integration Calculus is the mathematics of change. Because engineers must continuously deal with systems and processes that change, calculus is an essential tool of engineering. Standing in the heart of calculus are the mathematical concepts of differentiation and integration:

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 4

Slope 5 x 1, y 1 x 2, y 2 y x

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Graphical Representation of a Derivative 6 As ∆x approaches 0 the difference approximation becomes the derivative

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Derivatives 7

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Graphical Representation of the integral of f(x) 8

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Part 5 Organization Chapter 19 – Numerical Integration of Data –Newton-Cotes formulas Chapter 20 – Numerical Integration of Functions –Romberg Integration –Gauss Quadrature Chapter 21 – Numerical Differentiation –High Accuracy Finite Difference Approaches –Richardson Extrapolation 9

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 10 Chapter 19A Numerical Integration Formulas

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Objectives Understand and use single and multiple application Newton-Cotes formulas to find the integral 11

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 12 Methods for Differentiation and Integration The function to be differentiated or integrated will typically be in one of the following three forms: –A simple continuous function such as polynomial, an exponential, or a trigonometric function. –A complicated continuous function that is difficult or impossible to differentiate or integrate directly. –A tabulated function where values of x and f(x) are given at a number of discrete points, as is often the case with experimental or field data.

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. A simple continuous function such as polynomial, an exponential, or a trigonometric function. A complicated continuous function that is difficult or impossible to differentiate or integrate directly. A tabulated function where values of x and f(x) are given at a number of discrete points, as is often the case with experimental or field data. Evaluate Analytically –By Hand –Using MATLAB’s Symbolic capability Approximate Methods are required 13

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 14 Analytical Approach

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Graphical Integration Count the number of grid squares Figure PT6_05.jpg

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Graphical Integration Strip Technique Figure PT6_06.jpg

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 17 Consider this function Try to integrate using MATLAB’s symbolic capability

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 18 So… this won’t work!! We’ll need an approximate approach

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 19 Consider this function Try to integrate using MATLAB’s symbolic capability Evaluate at discrete points Plot Estimate the integral using the strip technique

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 20

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 21 Newton-Cotes Integration Formulas The Newton-Cotes formulas are the most common numerical integration schemes. They are based on the strategy of replacing a complicated function or tabulated data with an approximating function that is easy to integrate:

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Approximation of an Integral based on a simple polynomial approximation 22 A single straight lineA single parabola

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Approximation based on multiple application of a straight line 23

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 24 The Trapezoidal Rule The Trapezoidal rule is the first of the Newton-Cotes closed integration formulas, corresponding to the case where the polynomial is first order: The area under this first order polynomial is an estimate of the integral of f(x) between the limits of a and b: Trapezoidal rule

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 25

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 26 Error of the Trapezoidal Rule/ When we employ the integral under a straight line segment to approximate the integral under a curve, error may be substantial: where  lies somewhere in the interval from a to b.

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 27

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 28 The Multiple Application Trapezoidal Rule/ One way to improve the accuracy of the trapezoidal rule is to divide the integration interval from a to b into a number of segments and apply the method to each segment. The areas of individual segments can then be added to yield the integral for the entire interval. Substituting the trapezoidal rule for each integral yields:

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 29

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 30

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 31 An error for multiple-application trapezoidal rule can be obtained by summing the individual errors for each segment: Thus, if the number of segments is doubled, the truncation error will be quartered.

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 32

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 33

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 34 Single Segment Two Segments

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 35 Single Segment Two Segments Eight Segments Eight Segments, using the built-in function

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. trapz The built-in function trapz accepts an array of x and y values They do not need to be evenly spaced 36

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. trapz Can be used to integrate a function, by evaluating it at a number of x’s Can be used to integrate data, even if you don’t know the function. 37

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 38 Chapter 19B Numerical Integration Formulas

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 39 Simpson’s Rules More accurate estimate of an integral is obtained if a high-order polynomial is used to connect the points. The formulas that result from taking the integrals under such polynomials are called Simpson’s rules.

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Simpson’s 1/3 Rule Results when a second-order interpolating polynomial is used. 40 Simpson’s 1/3 Rule

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Simpson’s 3/8 Rule Results when a 3 rd order interpolating polynomial is used 41 Simpson’s 3/8 Rule

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 42 Simpson’s 1/3 Rule Single segment application of Simpson’s 1/3 rule has a truncation error of: Simpson’s 1/3 rule is more accurate than trapezoidal rule.

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 43 The Multiple-Application Simpson’s 1/3 Rule Just as the trapezoidal rule, Simpson’s rule can be improved by dividing the integration interval into a number of segments of equal width. Yields accurate results and considered superior to trapezoidal rule for most applications. However, it is limited to cases where values are equispaced. Further, it is limited to situations where there are an even number of segments and odd number of points.

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 44 even number of segments and odd number of points.

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 45

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 46

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 47 Single application of the Simpson 1/3 rule Multiple application of the Simpson 1/3 rule

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 48 Simpson’s 3/8 Rule/ An odd-segment-even-point formula used in conjunction with the 1/3 rule to permit evaluation of both even and odd numbers of segments. More accurate

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display points and 5 segments

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 50

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Which Technique Should We Choose? 51 # Points# Segments Trapezoidal Rule21 Simpson’s 1/332 Simpson’s 3/843 Multiple Simpson’s 1/354 Composite 1/3 and 3/865 Multiple Simpson’s 1/376 Composite 1/3 and 3/887

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Higher Order Newton-Coates Formulas Check out Table 19.2 Usually a combination of the Simpson 1/3 rule and the Simpson 3/8 rule is used. 52

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 53

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 54

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Double and Triple Integration quad quadl dblquad triplequad 55 All are built-in Matlab techniques to integrate functions