Numerical Integration Lecture (II)1

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.
Section 5.7 Numerical Integration. Approximations for integrals: Riemann Sums, Trapezoidal Rule, Simpson's Rule Riemann Sum: Trapezoidal Rule: Simpson’s.
Chapter 7 Numerical Differentiation and Integration
Numerical Integration
Dr. Jie Zou PHY Chapter 9 Ordinary Differential Equations: Initial-Value Problems Lecture (I) 1 1 Besides the main textbook, also see Ref.: “Applied.
Dr. Jie Zou PHY Chapter 2 Solution of Nonlinear Equations: Lecture (III)
Newton-Cotes Integration Formula
MANE 4240 & CIVL 4240 Introduction to Finite Elements Numerical Integration in 1D Prof. Suvranu De.
Dr. Jie Zou PHY Chapter 3 Solution of Simultaneous Linear Algebraic Equations: Lecture (II) Note: Besides the main textbook, also see Ref: Applied.
Dr. Jie Zou PHY Chapter 9 Ordinary Differential Equations: Initial-Value Problems Lecture (II) 1 1 Besides the main textbook, also see Ref.: “Applied.
Numerical integration continued --- Simpson’s rules - We can add more segments OR - We can use a higher order polynomial.
Curve Fitting and Interpolation: Lecture (II)
Numerical Integration Lecture (I)1
Dr. Jie Zou PHY Chapter 7 Numerical Differentiation: 1 Lecture (I) 1 Ref: “Applied Numerical Methods with MATLAB for Engineers and Scientists”, Steven.
Numerical Differentiation:1* Lecture (II)
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. 1 ~ Numerical Differentiation and Integration ~ Newton-Cotes.
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.
Numerical Integration Formulas
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Numerical Differentiation and Integration Part 6 Calculus.
Integration. Problem: An experiment has measured the number of particles entering a counter per unit time dN(t)/dt, as a function of time. The problem.
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.
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.
Numerical Computation
1 Numerical Analysis Lecture 12 Numerical Integration Dr. Nader Okasha.
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.
Chapters 5 and 6: Numerical Integration
CSE 330 : Numerical Methods
9/14/ Trapezoidal Rule of Integration Major: All Engineering Majors Authors: Autar Kaw, Charlie Barker
1 Trapezoidal Rule of Integration. What is Integration Integration: The process of measuring the area under a function.
Curve Fitting and Interpolation: Lecture (I)
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Applied Numerical Methods With MATLAB ® for Engineers.
Trapezoidal Rule of Integration
12/1/ Trapezoidal Rule of Integration Civil Engineering Majors Authors: Autar Kaw, Charlie Barker
CSE 330 : Numerical Methods Lecture 15: Numerical Integration - Trapezoidal Rule Dr. S. M. Lutful Kabir Visiting Professor, BRAC University & Professor.
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 5 Integration and Differentiation.
3/12/ Trapezoidal Rule of Integration Computer Engineering Majors Authors: Autar Kaw, Charlie Barker
3/20/ Trapezoidal Rule of Integration Chemical Engineering Majors Authors: Autar Kaw, Charlie Barker
Numerical Integration using Trapezoidal Rule
Trapezoidal Rule of Integration
Air Force Admin College, Coimbatore
Applied Numerical Methods
NUMERICAL DIFFERENTIATION Forward Difference Formula
Part 6 - Chapter 21.
Chapter 7 Numerical Differentiation and Integration
1. 2 What is Integration? Integration The process of measuring the area under a curve. Where: f(x) is the integrand a= lower limit of integration b=
Numerical Integration Formulas
NUMERICAL DIFFERENTIATION AND INTEGRATION
Trapezoidal Rule of Integration
Trapezoidal Rule of Integration
MATH 2140 Numerical Methods
Copyright © Cengage Learning. All rights reserved.
Simpson’s 1/3rd Rule of Integration
Simpson’s 1/3rd Rule of Integration
Simpson’s 1/3rd Rule of Integration
Simpson’s 1/3rd Rule of Integration
Numerical Integration
Numerical Computation and Optimization
Objectives Approximate a definite integral using the Trapezoidal Rule.
Numerical Integration
Air Force Admin College, Coimbatore
Presentation transcript:

Numerical Integration Lecture (II)1 Chapter 8 Numerical Integration Lecture (II)1 1 Ref.: “Applied Numerical Methods with MATLAB for Engineers and Scientists”, Steven Chapra, 2nd ed., Ch. 17, McGraw Hill, 2008. Dr. Jie Zou PHY3320

Outline Newton-cotes formulas Integration with unequal segments (2) Simpson’s 1/3 rule The single and composite applications of Simpson’s 1/3 rule Integration with unequal segments Example: By hand and Implementation in MATLAB Dr. Jie Zou PHY3320

Simpson’s rules: in general General Simpson’s rules: To use higher-order polynomials to connect the points; the formulas that result from taking the integrals under these polynomials are called Simpson’s rules. Trapezoidal rule Simpson’s rules Dr. Jie Zou PHY3320

Simpson’s 1/3 rule Translate the y axis Simpson’ 1/3 rule: It corresponds to using second-order polynomials. Derivation of the formula: Translate the y axis Using the Lagrange form for a quadratic fit of three points, (-h, f(x0)), (0, f(x1)), (h, f(x2)): Integration over the interval [-h, h]: y’ x’ -h O’ h h h = (b – a)/2 Ref. Fig. 17.11 (a) Simpson’s 1/3 rule consists of taking the area under a parabola connecting three points.

Error of the Simpson’s 1/3 rule For a single application of the Simpson’s 1/3 rule:  lies somewhere in the interval from a to b. The error is proportional to h5(rather than h3 for the trapezoidal rule); Simpson’s 1/3 rule is more accurate than the trapezoidal rule. The error is proportional to the fourth-derivative of the actual function; if f(x) is a cubic polynomial, Et = 0. Dr. Jie Zou PHY3320

Example: Single application of Simpson’s 1/3 rule Ref. Example 17.3: Use Simpson’s 1/3 rule to integrate f(x) = 0.2 + 25x – 200x2 + 675x3 – 900x4 + 400x5 from a = 0 to b = 0.8. Also, find the error Et and t. Compare the result with that found using the Trapezoidal rule (Itrue = 1.640533). By hand. Results: t = 16.6% for the Simpson’s 1/3 rule; t = 89.5% for the Trapezoidal rule. The Simpson’s 1/3 rule (single) Dr. Jie Zou PHY3320 The Trapezoidal rule (single)

The composite Simpson’s 1/3 rule Simpson’s rule can be improved by dividing the integration interval into a number of segments of equal width. Note: The number of segments has to be even. h = step size = (b-a)/n; n = the number of segments. Ref. Fig. 17.12 Composite Simpson’s 1/3 rule

Error of the composite Simpson’s 1/3 rule For a composite application of the Simpson’s 1/3 rule: The error is proportional to 1/n4 (rather than 1/n2 for the composite trapezoidal rule). The average f(4)(x) for the interval:

Example: Composite application of the Simpson’s 1/3 rule Example 17.4 (Ref.): Use the Composite Simpson’s 1/3 rule with n = 4 to estimate the integral of f(x) = 0.2 + 25x – 200x2 + 675x3 – 900x4 + 400x5 from a = 0 to b = 0.8. Also, find the error Et and t (Itrue = 1.640533). By hand. Results: t = 1.04% for the Composite Simpson’s 1/3 rule. n = 4; h = 0.2 Dr. Jie Zou PHY3320

Integration with unequal segments In practice, the data points may be unequally spaced. For example, experimentally obtained data. Numerical integration: One method is to apply the trapezoidal rule to each segment and sum the results: hi = the width (step size) of segment i. Dr. Jie Zou PHY3320

Example: Integration with unequal segments Example 17.6 (Ref.): Determine the integral for the data given in the Table below. Write an M-file, Int_Unequal_Segments.m. (Itrue = 1.640533). Dr. Jie Zou PHY3320