The Islamic University of Gaza Faculty of Engineering

  • Slides: 19
Download presentation
The Islamic University of Gaza Faculty of Engineering Civil Engineering Department Numerical Analysis ECIV

The Islamic University of Gaza Faculty of Engineering Civil Engineering Department Numerical Analysis ECIV 3306 Chapter 23 Numerical Differentiation

Numerical Differentiation 1. Forward difference Taylor series :

Numerical Differentiation 1. Forward difference Taylor series :

Numerical Differentiation 2. Backward difference

Numerical Differentiation 2. Backward difference

Numerical Differentiation 3. Centered difference

Numerical Differentiation 3. Centered difference

High Accuracy Differentiation Formulas • High-accuracy finite-difference formulas can be generated by including additional

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.

Derivation: High-accuracy forwarddifference formula for f`(x) (1) (2) Equ. 1 can be multiplied by

Derivation: High-accuracy forwarddifference formula for f`(x) (1) (2) Equ. 1 can be multiplied by 2 and subtracted from equ. 2: Solve: Second derivative forward finite divided difference

Derivation: High-accuracy forward-difference formula for f`(x) Taylor series expansion Solve for f’(x) Substitute the

Derivation: High-accuracy forward-difference formula for f`(x) Taylor series expansion Solve for f’(x) Substitute the forwarddifference approx. of f”(x) High-accuracy forward-difference formula

Derivation: High-accuracy forward-difference formula for f`(x) Similar improved versions can be developed for the

Derivation: High-accuracy forward-difference formula for f`(x) Similar improved versions can be developed for the backward and centered formulas as well as for the approximations of the higher derivatives.

Higher Order Forward Divided Difference

Higher Order Forward Divided Difference

Higher Order Backward Divided Difference

Higher Order Backward Divided Difference

Higher Order Central Divided Difference

Higher Order Central Divided Difference

First Derivatives - Example: Use forward , backward and centered difference approximations to estimate

First Derivatives - Example: Use forward , backward and centered difference approximations to estimate the first derivative of at x = 0. 5 with h = 0. 5 and 0. 25 (exact sol. = -0. 9125) • Forward Difference • Backward Difference

First Derivatives - Example: • Central Difference

First Derivatives - Example: • Central Difference

Forward Finite-divided differences

Forward Finite-divided differences

Backward finite-divided differences

Backward finite-divided differences

Centered Finite-Divided Differences

Centered Finite-Divided Differences

First Derivatives - Example: Employing the high-accuracy formulas (h=0. 25): xi-2= 0. 0 xi-1=

First Derivatives - Example: Employing the high-accuracy formulas (h=0. 25): xi-2= 0. 0 xi-1= 0. 25 xi = 0. 5 xi+1 = 0. 75 xi+2 = 1. 0 f(0. 0) = 1. 2 f(0. 0) = 1. 103516 f(0. 5) = 0. 925 f(0. 75) = 0. 63633 f(1. 0) = 0. 2 Forward Difference

First Derivatives - Example: l Backward Difference l Central Difference

First Derivatives - Example: l Backward Difference l Central Difference

Summary True value: f`(0. 5) = -0. 9125 Basic formulas High. Accuracy formulas h

Summary True value: f`(0. 5) = -0. 9125 Basic formulas High. Accuracy formulas h = 0. 25 Forward O(h) Backward O(h) Centered O(h 2) Estimate -1. 155 -0. 714 -0. 934 | t| 26. 5% 21. 7% 2. 4% Forward O(h 2) Backward O(h 2) Centered O(h 4) -0. 859375 -0. 878125 -0. 9125 5. 82% 3. 77% 0% h = 0. 25 Estimate | t|