{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

# Chapter06 - CHAPTER 6 NUMERICAL DIFFERENTIATION...

This preview shows pages 1–4. Sign up to view the full content.

6-1 CHAPTER 6 NUMERICAL DIFFERENTIATION Differentiations on simple functions should usually be performed analytically. However, there are situations that we must rely on numerical differentiation methods. For example, the function may come from experimental measurements. The function may also not be expressible analytically, say, when it represents the solutions of iterative solutions. In this chapter, a function f ( x ) is assumed to be differentiable to any order. We examine approaches based on finite-difference , where the independent variable x is discretized. This chapter presents the numerical differentiation using first-order , high- order , and high-accuracy finite-differences. Treatment on data with unequal spacing will also be considered. For the sake of discussion, we consider the following Lorentzian function that is often associated with the description of dispersion effects: 2 1 2 ) ( x x x f + = . Analytically, we can obtain 2 2 2 ) 1 ( 1 2 ) ( x x x f + = . The solution is plotted below. In the following sections, the analytical solution will be compared with the results of various numerical methods. Accuracies of different methods will be compared. EE 3108 Semster B 2007/2008 S C Chan 6-2 -10 -5 0 5 10 -2 -1 0 1 2 x f(x) -10 -5 0 5 10 -3 -2 -1 0 1 x f'(x)

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
6-3 I. First-order finite-difference The first-order derivative of f ( x ) is defined as: h h x f x f h h x f h x f h x f h x f x f h h h ) ( ) ( lim 2 ) ( ) ( lim ) ( ) ( lim ) ( 0 0 0 = + = + = The independent variable x must be continuous, but the result can be approximated by discretizing x in a step size of h . h x f x f x f i i i ) ( ) ( ) ( 1 + Forward difference h x f x f x f i i i i ) ( ) ( ) ( Backward difference h x f x f x f i i i 2 ) ( ) ( ) ( 1 1 + Centered difference 6-4 x x i Slope =f ' ( x i ) x i +1 h Forward difference f ( x ) x x i Slope =f ' ( x i ) x i - 1 h Backward difference f ( x ) x x i Slope =f ' ( x i ) x i - 1 h Centered difference f ( x ) x i +1 h
6-5 The accuracy of the approximation can be derived using the Taylor series expansion. For the forward difference method, we consider: ) ( ) ( ! 1 1 ) ( ) ( ! 2 1 ) ( ! 1 1 ) ( ) ( 2 2 1 h O h x f x f h f h x f x f x f i i i i i + + = + + = + ξ where 1 + < < i i x x ξ . The last term is sometimes abbreviated as O ( h 2 ). It means that the magnitude of the term is on the order of h 2 . The magnitude is bounded by some constant times h 2 . After some rearrangements, we have: ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( 1 2 1 h O h x f x f x f h O x f x f x f h i i i i i i + = + = + + Thus, the error of forward difference is O ( h ) . A similar argument applies to the backward difference and the error is on the same order.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 10

Chapter06 - CHAPTER 6 NUMERICAL DIFFERENTIATION...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online