Chapter 7 Differentiation and Integration

Slides:



Advertisements
Similar presentations
Numerical Integration
Advertisements

1 Chapter 5 Numerical Integration. 2 A Review of the Definite Integral.
Part 5 Chapter 19 Numerical Differentiation PowerPoints organized by Dr. Michael R. Gustafson II, Duke University All images copyright © The McGraw-Hill.
High Accuracy Differentiation Formulas
Chapter 7 Numerical Differentiation and Integration
2. Numerical differentiation. Approximate a derivative of a given function. Approximate a derivative of a function defined by discrete data at the discrete.
Lecture 18 - Numerical Differentiation
CE33500 – Computational Methods in Civil Engineering Differentiation Provided by : Shahab Afshari
Chapter 19 Numerical Differentiation §Estimate the derivatives (slope, curvature, etc.) of a function by using the function values at only a set of discrete.
Chapter 1 Introduction The solutions of engineering problems can be obtained using analytical methods or numerical methods. Analytical differentiation.
Curve-Fitting Polynomial Interpolation
8-1 Chapter 8 Differential Equations An equation that defines a relationship between an unknown function and one or more of its derivatives is referred.
1 Chapter 6 NUMERICAL DIFFERENTIATION. 2 When we have to differentiate a function given by a set of tabulated values or when a complicated function is.
Dr. Jie Zou PHY Chapter 7 Numerical Differentiation: 1 Lecture (I) 1 Ref: “Applied Numerical Methods with MATLAB for Engineers and Scientists”, Steven.
Chapter 6 Numerical Interpolation
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Numerical Differentiation and Integration Standing.
Numerical Solution of Ordinary Differential Equation
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.
CISE301_Topic71 SE301: Numerical Methods Topic 7 Numerical Integration Lecture KFUPM (Term 101) Section 04 Read Chapter 21, Section 1 Read Chapter.
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.
Chapter 4, Integration of Functions. Open and Closed Formulas x 1 =a x 2 x 3 x 4 x 5 =b Closed formula uses end points, e.g., Open formulas - use interior.
Numerical Integration In general, a numerical integration is the approximation of a definite integration by a “weighted” sum of function values at discretized.
Chapter 4 Numerical Differentiation and Integration 1/16 Given x 0, approximate f ’(x 0 ). h xfhxf xf h )()( lim)('    x0x0 x1x1 h x1x1 x0x0.
1 Chapter 5 Numerical Integration. 2 A Review of the Definite Integral.
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.
EE3561_Unit 7Al-Dhaifallah EE 3561 : Computational Methods Unit 7 Numerical Integration Dr. Mujahed AlDhaifallah ( Term 342)
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.
Trapezoidal Rule of Integration
5. Integration 2.Quadrature as Box Counting 3.Algorithm: Trapezoid Rule 4.Algorithm: Simpson’s Rule 5.Integration Error 6.Algorithm: Gaussian Quadrature.
Engineering Analysis ENG 3420 Fall 2009 Dan C. Marinescu Office: HEC 439 B Office hours: Tu-Th 11:00-12:00.
Engineering Analysis – Computational Fluid Dynamics –
Chap. 11 Numerical Differentiation and Integration
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Part 6 - Chapter 21.
Introduction to Numerical Analysis I
The purpose of Chapter 5 is to develop the basic principles of numerical integration Usefule Words integrate, integral 积分(的), integration 积分(法), quadrature.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Part 5 Integration and Differentiation.
Sec 21: Generalizations of the Euler Method Consider a differential equation n = 10 estimate x = 0.5 n = 10 estimate x =50 Initial Value Problem Euler.
SE301_Topic 6Al-Amer20051 SE301:Numerical Methods Topic 6 Numerical Integration Dr. Samir Al-Amer Term 053.
Quadrature – Concepts (numerical integration) Don Allen.
CPE 332 Computer Engineering Mathematics II Part III, Chapter 11 Numerical Differentiation and Integration Numerical Differentiation and Integration.
SECTION 4-3-B Area under the Curve. Def: The area under a curve bounded by f(x) and the x-axis and the lines x = a and x = b is given by Where and n is.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Chapter 21 Numerical Differentiation.
Numerical Integration
NUMERICAL DIFFERENTIATION Forward Difference Formula
High Accuracy Differentiation Formulas
Chapter 7 Numerical Differentiation and Integration
Numerical Analysis Lecture 42.
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 Analysis Lecture 27.
Chapter 23.
Taylor Polynomials & Approximation (9.7)
NUMERICAL INTEGRATION
Copyright © Cengage Learning. All rights reserved.
Composite Numerical Integration
Numerical differentiation
POLYNOMIAL INTERPOLATION
Numerical Integration:
Copyright © Cengage Learning. All rights reserved.
Numerical Integration
Numerical Computation and Optimization
Objectives Approximate a definite integral using the Trapezoidal Rule.
CPE 332 Computer Engineering Mathematics II
Presentation transcript:

Chapter 7 Differentiation and Integration Finite-difference differentiation

Example: Evaporation Rates Table: Saturation Vapor Pressure (es) in mm Hg as a Function of Temperature (T) in °C T(°C) es(mm Hg) 20 17.53 21 18.65 22 19.82 23 21.05 24 22.37 25 23.75

The slope of the saturation vapor pressure curve at 22°C (3 methods) : The true value is 1.20 mm Hg/°C, so the two-step method provides the most accurate estimate.

Differentiation Using a Finite-difference Table Example: Finite-difference Table for Specific Enthalpy (h) in Btu/lb and Temperature (T) in ºF T h Δh Δ2h Δ3h Δ4h 800 1305 155 1000 1460 -30 125 25 1200 1585 -5 -20 120 5 1400 1705 1600 1825

For example, at a temperature of 1200 ºF, the forward, backward, and two-step methods yield: The rate of change of cp at T= 1200 ºF is

Differentiating an Interpolating Polynomial The derivative: Gregory-Newton interpolation polynomial: It is more difficult to evaluate the derivative:

Differentiation Using Taylor Series Expansion

The second-order approximation: The second-order approximation of the first derivative with forward difference:

The second-order approximation of the second derivative with forward difference: The first-order and second-order approximation of the first derivative with backward difference:

The first-order and second-order approximation of the second derivative with backward difference: How to derive (for reference only)

The first-order and second-order approximation of the first derivative with the two-step method: The first-order and second-order approximation of second derivative with the two-step method:

Example: Evaporation Rates Second-order with forward, backward, two-step: The true value at T = 22ºC is 1.2 mm Hg/ºC

Numerical Integration The area under the curve f(x) between x=a and x=b: Example: the volume rate of flow (Q) of water in a channel or through a pipe is the integral of the velocity (V) and the incremental area (dA):

Interpolation Formula Approach The Gregory-Newton interpolation polynomial:

Trapezoidal Rule

Another way to get the trapezoidal formula The linear polynomial passing the data points:

The absolute value of the upper bound on the error for the Trapezoidal rule is:

Example: Trapezoidal Rule for Integration The trapezoidal rule provides

Example: Flow Rate The flow rate (Q) of an incompressible fluid is given by the integral. in which V is the velocity and A is the area. For a circular pipe of radius r, the incremental area dA is equal to 2πrdr.

Table 6: The Data for Estimating the Flow Rate of a Fluid in a Circular Piple ri (ft) Vi (fps) 1 10.000 2 1/12 9.722 3 1/6 8.889 4 1/4 7.500 5 1/3 5.556 6 5/12 3.056 7 1/2 0.

For a pipe of diameter of 1 ft trapezoidal rule:

Simpson’s Rule where Simpson’s rule: Simpson’s rule can only be applied when there are an even number of subintervals:

Proof of Simpson’s Rule Using a second-order polynomial:

Passing through the three data points: Then, we can obtain the Simpson’s formula.

The absolute value of the upper bound on the error for the Simpson’s rule is estimated by

Example: Flow Rate Problem Applying Simpson’s rule to the data of Table.6

Romberg Integration Denoting the trapezoidal estimate as I01 where a and b are the start and end of an interval. A second estimate I11:

A third estimate I21 can be obtained using three equally spaced intermediate points m1, m2, and m3 and it can be rewritten as

Continuing this subdividing of the interval leads to the following recursive relationship The general extrapolation formula in recursive form is

The values of Iij can be presented in the following upper-triangular matrix form: … I0,N-1 I0,N I0,N+1 I11 I12 I13 . I1,N-1 I1,N I21 I22 I2,N-1 I31 IN-2,3 IN-1,2 IN1

Example: Romberg Method for Integration For the function f(u) = ueku, the integral is Let k = 2, we want to calculate The true value of the integral is 2.097264 (seven significant digits).

We have a=0, b=1.

Table.7 Computations According to the Romberg Method j = 1 2 3 4 5 6 3.69453 2.13760 2.09759 2.09727 2.09726 1 2.52683 2.10009 2.20678 2.09745 2.12478 2.09728 2.10415 2.09899

Similarly for i = 5, I51=2.09899 I02 is computed as following: I03 is computed as following: The Romberg method yields an exact value to six significant digits for the integral of 2.09726