{
"cells": [
{
"cell_type": "markdown",
"metadata": {
"button": false,
"new_sheet": false,
"run_control": {
"read_only": false
}
},
"source": [
"\n",
"\n",
"\n",
"*This notebook contains an excerpt from the [Python Programming and Numerical Methods - A Guide for Engineers and Scientists](https://www.elsevier.com/books/python-programming-and-numerical-methods/kong/978-0-12-819549-9), the content is also available at [Berkeley Python Numerical Methods](https://pythonnumericalmethods.berkeley.edu/notebooks/Index.html).*\n",
"\n",
"*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](https://opensource.org/licenses/MIT). If you find this content useful, please consider supporting the work on [Elsevier](https://www.elsevier.com/books/python-programming-and-numerical-methods/kong/978-0-12-819549-9) or [Amazon](https://www.amazon.com/Python-Programming-Numerical-Methods-Scientists/dp/0128195495/ref=sr_1_1?dchild=1&keywords=Python+Programming+and+Numerical+Methods+-+A+Guide+for+Engineers+and+Scientists&qid=1604761352&sr=8-1)!*"
]
},
{
"cell_type": "markdown",
"metadata": {
"button": false,
"new_sheet": false,
"run_control": {
"read_only": false
}
},
"source": [
"\n",
"< [23.3 Finite Difference Method](chapter23.03-Finite-Difference-Method.ipynb) | [Contents](Index.ipynb) | [23.5 Summary and Problems](chapter23.05-Summary-and-Problems.ipynb) >"
]
},
{
"cell_type": "markdown",
"metadata": {
"button": false,
"new_sheet": false,
"run_control": {
"read_only": false
}
},
"source": [
"# Numerical Error and Instability (BVP)"
]
},
{
"cell_type": "markdown",
"metadata": {
"button": false,
"new_sheet": false,
"run_control": {
"read_only": false
}
},
"source": [
"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. \n",
"\n",
"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. \n",
"\n",
"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. "
]
},
{
"cell_type": "markdown",
"metadata": {
"button": false,
"new_sheet": false,
"run_control": {
"read_only": false
}
},
"source": [
"\n",
"< [23.3 Finite Difference Method](chapter23.03-Finite-Difference-Method.ipynb) | [Contents](Index.ipynb) | [23.5 Summary and Problems](chapter23.05-Summary-and-Problems.ipynb) >"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.8"
}
},
"nbformat": 4,
"nbformat_minor": 2
}