Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 ~ Numerical Differentiation and Integration ~ Newton-Cotes.

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.
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
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
Lecture 3: Integration. Integration of discrete functions
ECIV 301 Programming & Graphics Numerical Methods for Engineers Lecture 29 Numerical Integration.
Numerical integration continued --- Simpson’s rules - We can add more segments OR - We can use a higher order polynomial.
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 181 Interpolation Chapter 18 Estimation of intermediate.
Numerical Integration Lecture (I)1
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. by Lale Yurttas, Texas A&M University Chapter 181 Interpolation.
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Interpolation Chapter 18.
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.
NUMERICAL DIFFERENTIATION The derivative of f (x) at x 0 is: An approximation to this is: for small values of h. Forward Difference Formula.
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.
Numerical Integration Formulas
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Numerical Differentiation and Integration Part 6 Calculus.
Simpson’s 1/3 rd Rule of Integration. What is Integration? Integration The process of measuring the area under a.
The Islamic University of Gaza Faculty of Engineering Civil Engineering Department Numerical Analysis ECIV 3306 Chapter 21 Newton-Cotes Integration Formula.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Applied Numerical Methods With MATLAB ® for Engineers.
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
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.
1 Simpson’s 1/3 rd Rule of Integration. 2 What is Integration? Integration The process of measuring the area under a curve. Where: f(x) is the integrand.
CSE 330 : Numerical Methods
1 Trapezoidal Rule of Integration. What is Integration Integration: The process of measuring the area under a function.
Simpson Rule For Integration.
Numerical Methods Part: Simpson Rule For Integration.
Integration Copyright © Cengage Learning. All rights reserved.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Chapter.
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.
Trapezoidal Rule of Integration
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 © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Truncation Errors and the Taylor Series Chapter 4.
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. 1 Part 6 - Chapters 22 and 23.
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
NUMERICAL DIFFERENTIATION AND INTEGRATION
NUMERICAL DIFFERENTIATION AND INTEGRATION
Chapter 23.
Chapter 7 Numerical Differentiation and Integration
Copyright © Cengage Learning. All rights reserved.
Simpson’s 1/3rd Rule of Integration
SKTN 2393 Numerical Methods for Nuclear Engineers
SKTN 2393 Numerical Methods for Nuclear Engineers
Simpson’s 1/3rd Rule of Integration
Numerical Integration
Numerical Computation and Optimization
Objectives Approximate a definite integral using the Trapezoidal Rule.
Numerical Integration
Presentation transcript:

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 ~ Numerical Differentiation and Integration ~ Newton-Cotes Integration Formulas Chapter 21

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 2 Calculus is the mathematics of change. Since engineers continuously deal with systems and processes that change, calculus is an essential tool of engineering. Standing at the heart of calculus are the concepts of: Differentiation and Integration

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Based on the strategy of replacing a complicated function or tabulated data with an approximating function that is easy to integrate: Zero order approximation First-order Second-order Newton-Cotes Integration Formulas

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Error: where  lies somewhere in the interval from a to b The Trapezoidal Rule Use a first order polynomial in approximating the function f(x) : The area under this first order polynomial is an estimate of the integral of f(x) between a and b: Trapezoidal rule

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Example 21.1 Single Application of the Trapezoidal Rule f(x) = x – 200x x 3 – 900x x 5 Integrate f(x) from a=0 to b=0.8 Solution: f(a)=f(0) = 0.2 and f(b)=f(0.8) = 0.232

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 6 The accuracy can be improved by dividing the interval from a to b into a number of segments and applying the method to each segment. The areas of individual segments are added to yield the integral for the entire interval. Using the trapezoidal rule, we get: The Multiple-Application Trapezoidal Rule

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 7 Error estimate for one segment is given as: 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. The Error Estimate for The Multiple-Application Trapezoidal Rule

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Simpson’s Rules More accurate estimate of an integral is obtained if a high-order polynomial is used to connect the points. These formulas are called Simpson’s rules. Simpson’s 1/3 Rule: results when a 2 nd order Lagrange interpolating polynomial is used for f(x) a=x 0 x 1 b=x 2

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

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 10 Simpson’s 3/8 Rule Simpson’s 1/3 and 3/8 rules can be applied in tandem to handle multiple applications with odd number of intervals Fit a 3 rd order Lagrange interpolating polynomial to four points and integrate

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 11 Newton-Cotes Closed Integration Formulas PointsName Formula Truncation Error 2Trapezoidal(b-a) * (f(x 0 )+ f(x 1 ))/2(1/12)(b-a) 3 f ” (ξ) 3Simpson’s 1/3 (b-a) * (f(x 0 )+ 4f(x 1 )+f(x 2 ))/6(1/2880)(b-a) 5 f (4) (ξ) 4Simpson’s 3/8 (b-a) * (f(x 0 )+ 3f(x 1 )+ 3f(x 2 )+ f(x 3 ))/8(1/6480)(b-a) 5 f (4) (ξ) 5Boole’s(b-a) * (7f(x 0 ) + 32f(x 1 ) + 12f(x 2 ) + 32f(x 3 ) + 7f(x 4 ))/90 proportional with (b-a) 7 Same order, but Simpson’s 3/8 is more accurate In engineering practice, higher order (greater than 4-point) formulas are rarely used

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 12 Integration with Unequal Segments Example 21.7 xf(x)x Data for f(x)= x-200x x x x 5 which represents a relative error of  = 2.8% Using Trapezoidal Rule

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Compute Integrals Using MATLAB First, create a file called fx.m which contains f(x): function y = fx(x) y = *x-200*x.^2+675*x.^3-900*x.^4+400*x.^5 ; Then, execute in the command window: >> Q=integral('fx', 0, 0.8) % true integral Or >> Q=quad('fx', 0, 0.8) % true integral Q =  true value >> x=[ ] >> y = fx(x) y = >> I = trapz(x,y) % or trapz(x, fx(x)) Integral = Demo: (how I changes wrt n) + (0 th order approx. With large n). xf(x)x