../_images/book_cover.jpg

This notebook contains an excerpt from the Python Programming and Numerical Methods - A Guide for Engineers and Scientists, the content is also available at Berkeley Python Numerical Methods.

The copyright of the book belongs to Elsevier. We also have this interactive book online for a better learning experience. The code is released under the MIT license. If you find this content useful, please consider supporting the work on Elsevier or Amazon!

< 23.3 Finite Difference Method | Contents | 23.5 Summary and Problems >

Numerical Error and Instability (BVP)

Boundary value problems also have the two main issues we talked in the previous chapter, the numerical error - accuracy and the stability. Depending on the different methods used, either the shooting or finite difference method, they are different.

For the shooting method, the numerical error is similar to what we described for the initial value problems, since the shooting method is essentially transform the boundary value problem into a series of initial value problems. In terms of the stability of the method, we can see from the example in the chapter 23.02 that even our initial guesses are not close to the true answer, the method returns an accurate numerical solution. This is due to the adding of the rightmost constraint keeps the errors from increasing unboundedly.

In the case of finite difference methods, the numerical error is determined by the order of accuracy of the numerical scheme used. The accuracy of the different scheme used for derivative approximations are discussed in chapter20.02. The accuracy of the finite difference method is determined by the larger of the two truncation errors, the difference scheme used for the differential equation or that of the difference scheme used to discretize the boundary conditions (we see that step size has a strong effect on the accuracy of the finite difference method). Since the finite difference methods essentially turns the BVP into solving a system of equations, therefore, the stability of it depends on the stability of the scheme used to solve the resulting system of equations simultaneously.

< 23.3 Finite Difference Method | Contents | 23.5 Summary and Problems >