{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

lectfiniteDifference

lectfiniteDifference - Chapter 11 Finite Difference...

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

Chapter 11 Finite Difference Approximation of Derivatives 11.1 Introduction The standard definition of derivative in elementary calculus is the following u 0 ( x ) = lim Δ x 0 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 0 ( 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

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

View Full Document
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 0 ( x i ) u ( x i ) - u ( x i - Δ x ) Δ x = u i - u i - 1 Δ x (11.3) Centered Difference u 0 ( x i ) u ( x i + Δ x ) - u ( x i - Δ x ) x = u i +1 - u i - 1 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 0 ( s ) d s (11.5) Since u ( x ) is arbitrary, the formula should hold with u ( x ) replaced by u 0 ( x ), i.e., u 0 ( x ) = u 0 ( 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 u ( x i ) is constant) we get: u ( x ) = u ( x i ) + ( x - x i ) u 0 ( x i ) + Z x x i Z x x i u 00 ( s ) d s d s (11.7) The process can be repeated with u 00 ( x ) = u 00 ( x i ) + Z x x i u 000 ( s ) d s (11.8) to get: u ( x ) = u ( x i ) + ( x - x i ) u 0 ( x i ) + ( x - x i ) 2 2!

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 ]}

What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern