Finite Difference Methods
In this chapter, we describe two numerical finite difference methods which are used for solving differential equations, e.g., the Euler method and Euler-Cromer method. The emphasis here is on algorithm errors, and an explanation of what is meant by the “o
- PDF / 247,861 Bytes
- 9 Pages / 439.37 x 666.142 pts Page_size
- 107 Downloads / 248 Views
Finite Difference Methods
Abstract In this chapter, we describe two numerical finite difference methods which are used for solving differential equations, e.g., the Euler method and Euler-Cromer method. The emphasis here is on algorithm errors, and an explanation of what is meant by the “order” of the error. We show that the Euler method introduces an error of order 2, denoted as O(2), while the latter presents errors of order O(3). We finish the chapter by applying the methods to two important physical problems: the physics of the pendulum and the physics of descending parachutes.
2.1 The Objective and Motivation A brief review of the finite difference method in its simplest form will be presented here, in order to provide a contrast to the spectral methods described in Chaps. 3–5. These finite difference methods are based on Taylor’s expansion of the solution, and are denoted in Ref. [1], section 3.7, as Taylor Series Methods. First the finite difference method in general will be reviewed, and two numerical applications are provided subsequently. Finite difference methods for solving a differential or integral equation were introduced in the 1950s. They are taught in most elementary numerical methods courses, and they have many applications [2, 3]. They can also be applied to solving the Schrödinger equation [4] numerically. This is a wave equation which describes the quantum nature of a particle, and has been in existence since 1926 [5], and we still are searching for better methods to solve it.
2.2 Order of the Methods Finite difference methods [6–8] are based on the Taylor expansion of a function f (x) f (x + h) = f (x) + h f (x) +
h 2 h 3 h n (n) f (x) + f (x) + · · · f (x) + · · · , 2 6 n! (2.1)
© Springer Nature Switzerland AG 2018 G. Rawitscher et al., An Introductory Guide to Computational Methods for the Solution of Physics Problems, https://doi.org/10.1007/978-3-319-42703-4_2
7
8
2 Finite Difference Methods
where the primes denote differentiation with respect to x. This expansion is described for example in Ref. [1], Eq. (1.4(vi)). For an equidistant set of mesh points separated by the distance h, a convenient notation is x1 = x, x2 = x + h, . . . , xn = x + (n − 1)h, . . . , and the above equation takes the form f n+1 = f n + h f n + · · ·
h n (n) f + O(h n+1 ), n = ±(1, 2, . . .). n! n
(2.2)
In Eq. (2.2), f n = f (xn ), and O(h n+1 ) denotes the remainder of the expansion that was truncated at order n. Based on the above expressions one can show that fn =
f n+1 − f n + O(h), h
(2.3)
while a smaller error for the derivative, of order h 2 , is given by f n =
f n+1 − f n−1 + O(h 2 ). 2h
(2.4)
Similar equations are also given by [9] in section 3.9.1. The simplest procedure to solve a second order differential equation numerically is to use the Euler method, which will be explained by means of an example given next. The accuracy and stability of this method is investigated extensively in Ref. [8], Chapter 8. An application to Newton’s equation of motion will now be described
Data Loading...