lectfiniteDifference

lectfiniteDifference - Chapter 11 Finite Difference...

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

View Full Document Right Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Chapter 11 Finite Difference Approximation of Derivatives 11.1 Introduction The standard definition of derivative in elementary calculus is the following u ( x ) = lim Δ x → u ( x + Δ x )- u ( x ) Δ x (11.1) Computers however cannot deal with the limit of Δ x → 0, and hence a discrete analogue of the continuous case need to be adopted. In a discretization step, the set of points on which the function is defined is finite, and the function value is available on a discrete set of points. Approximations to the derivative will have to come from this discrete table of the function. Figure 11.1 shows the discrete set of points x i where the function is known. We will use the notation u i = u ( x i ) to denote the value of the function at the i-th node of the computational grid. The nodes divide the axis into a set of intervals of width Δ x i = x i +1- x i . When the grid spacing is fixed, i.e. all intervals are of equal size, we will refer to the grid spacing as Δ x . There are definite advantages to a constant grid spacing as we will see later. 11.2 Finite Difference Approximation The definition of the derivative in the continuum can be used to approximate the derivative in the discrete case: u ( x i ) ≈ u ( x i + Δ x )- u ( x i ) Δ x = u i +1- u i Δ x (11.2) where now Δ x is finite and small but not necessarily infinitesimally small, i.e. . This is known as a forward Euler approximation since it uses forward differencing. 77 78 CHAPTER 11. FINITE DIFFERENCE APPROXIMATION OF DERIVATIVES x i-1 x i x i+1 Figure 11.1: Computational grid and example of backward, forward, and central approximation to the derivative at point x i . The dash-dot line shows the centered parabolic interpolation, while the dashed line show the backward (blue), forward (red) and centered (magenta) linear interpolation to the function. Intuitively, the approximation will improve, i.e. the error will be smaller, as Δ x is made smaller. The above is not the only approximation possible, two equally valid approximations are: backward Euler: u ( x i ) ≈ u ( x i )- u ( x i- Δ x ) Δ x = u i- u i- 1 Δ x (11.3) Centered Difference u ( x i ) ≈ u ( x i + Δ x )- u ( x i- Δ x ) 2Δ x = u i +1- u i- 1 2Δ x (11.4) All these definitions are equivalent in the continuum but lead to different approx- imations in the discrete case. The question becomes which one is better, and is 11.3. TAYLOR SERIES 79 there a way to quantify the error committed. The answer lies in the application of Taylor series analysis. We briefly describe Taylor series in the next section, before applying them to investigate the approximation errors of finite difference formulae. 11.3 Taylor series Starting with the identity: u ( x ) = u ( x i ) + Z x x i u ( s ) d s (11.5) Since u ( x ) is arbitrary, the formula should hold with u ( x ) replaced by u ( x ), i.e., u ( x ) = u ( x i ) + Z x x i u 00 ( s ) d s (11.6) Replacing this expression in the original formula and carrying out the integration (since...
View Full Document

This note was uploaded on 01/08/2012 for the course MSC 321 taught by Professor Staff during the Fall '08 term at University of Miami.

Page1 / 16

lectfiniteDifference - Chapter 11 Finite Difference...

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

View Full Document Right Arrow Icon
Ask a homework question - tutors are online