1 / 11

Chapter 7

Chapter 7. Numerical Differentiation: 1* Lecture (II). 1* Ref: “Applied Numerical Methods with MATLAB for Engineers and Scientists”, Steven Chapra, 2 nd ed., Ch. 19 , McGraw Hill, 2008. Outline. Numerical differentiation (2) High-accuracy differentiation formulas

zinnia
Download Presentation

Chapter 7

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Chapter 7 Numerical Differentiation:1* Lecture (II) 1* Ref: “Applied Numerical Methods with MATLAB for Engineers and Scientists”, Steven Chapra, 2nd ed., Ch. 19, McGraw Hill, 2008.

  2. Outline • Numerical differentiation • (2) High-accuracy differentiation formulas • (3) Derivatives of unequally spaced data

  3. High-accuracy differentiation formulas • High-accuracy finite-difference formulas can be generated by including additional terms from the Taylor series expansion. • An example: High-accuracy forward-difference formula for the first derivative (see derivation on the next slide)

  4. Forward Taylor series expansion Solve for f’(x) Substitute the forward-difference approx. of f”(x) High-accuracy forward-difference formula Accuracy improved to O(h2) Derivation: High-accuracy forward-difference formula for f’(x)

  5. Forward finite-difference formulas • Note: Two versions • Upper: Basic • Lower: High-accuracy

  6. Backward finite-difference formulas • Note: Two versions • Upper: Basic • Lower: High-accuracy

  7. Centered finite-difference formulas • Note: Two versions • Upper: Basic • Lower: High-accuracy

  8. Example • Example 19.1 (Ref.): Repeat the computation in Example 4.4 to estimate f’(x) at x = 0.5 with a step size h = 0.25. Employ the high-accuracy formulas for the forward, centered, and backward-difference approximations. f(x) = -0.1x4 – 0.15x3 – 0.5x2 – 0.25x + 1.2

  9. Results (Example 19.1) True value: f’(0.5) = -0.9125 High-Accuracy formulas Basic formulas

  10. Derivatives of unequally spaced data • Experimental data are often measured at unequal intervals. Previous formulas can be used only for equally spaced data. • How to deal with unequally spaced data? • One method: • (i) Fit a Lagrange Interpolating Polynomial to a set of adjacent points that bracket the point at which the derivative needs to be evaluated; • (ii) Differentiate the Interpolating Polynomial analytically and evaluate the derivate at the required point.

  11. Example • Example 19.3 (Ref.): As in Fig. 19.6, a temperature gradient can be measured down into the soil. The heat flux at the soil-air interface can be computed with Fourier’s law: where q(x) = heat flux (W/m2), k = coefficient of thermal conductivity for soil [=0.5 W/(m·K)], T = temperature (K), and z = distance measured down from the surface into the soil (m). Note that a positive value of the flux means that heat is transferred from the air to the soil. Use numerical differentiation to evaluate the gradient at the soil-air interface and employ this estimate to determine the heat flux into the ground • Answer: f’(0) = -133.333 K/m and q(z = 0) = 66.667 W/m2.

More Related