Presentation on theme: "Chapter 7 Differentiation and Integration"— Presentation transcript:
1 Chapter 7 Differentiation and Integration Finite-difference differentiation
2 Example: Evaporation Rates Table: Saturation Vapor Pressure (es) inmm Hg as a Function of Temperature (T) in °CT(°C)es(mm Hg)2017.532118.652219.822321.052422.372523.75
3 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.
4 Differentiation Using a Finite-difference Table Example: Finite-difference Table for Specific Enthalpy (h) in Btu/lb and Temperature (T) in ºFThΔhΔ2hΔ3hΔ4h800130515510001460-301252512001585-5-2012051400170516001825
5 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
6 Differentiating an Interpolating Polynomial The derivative:Gregory-Newton interpolation polynomial:It is more difficult to evaluate the derivative:
8 The second-order approximation: The second-order approximation of the first derivative with forward difference:
9 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:
10 The first-order and second-order approximation of the second derivative with backward difference: How to derive(for reference only)
11 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:
12 Example: Evaporation Rates Second-order with forward, backward, two-step:The true value at T = 22ºC is 1.2 mm Hg/ºC
13 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):
14 Interpolation Formula Approach The Gregory-Newton interpolation polynomial:
20 Example: Flow RateThe 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.
21 Table 6: The Data for Estimating the Flow Rate of a Fluid in a Circular Piple ri (ft)Vi (fps)110.00021/129.72231/68.88941/47.50051/35.55665/123.05671/20.
22 For a pipe of diameter of 1 ft trapezoidal rule:
23 Simpson’s Rule where Simpson’s rule: Simpson’s rule can only be applied when there are an even number of subintervals:
24 Proof of Simpson’s Rule Using a second-order polynomial:
25 Passing through the three data points: Then, we can obtain the Simpson’s formula.
26 The absolute value of the upper bound on the error for the Simpson’s rule is estimated by
27 Example: Flow Rate Problem Applying Simpson’s rule to the data of Table.6
28 Romberg Integration Denoting the trapezoidal estimate as I01 where a and b are the start and end of an interval.A second estimate I11:
29 A third estimate I21 can be obtained using three equally spaced intermediate points m1, m2, and m3 and it can be rewritten as
30 Continuing this subdividing of the interval leads to the following recursive relationship The general extrapolation formula in recursive form is
31 The values of Iij can be presented in the following upper-triangular matrix form: …I0,N-1I0,NI0,N+1I11I12I13.I1,N-1I1,NI21I22I2,N-1I31IN-2,3IN-1,2IN1
32 Example: Romberg Method for Integration For the function f(u) = ueku, the integral isLet k = 2, we want to calculateThe true value of the integral is (seven significant digits).