{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Asymptotic stability domains for Adams-Bashforth, Adams-Moulton methods, and BDF."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"See here for the schemes\n",
"\n",
"http://en.wikipedia.org/wiki/Linear_multistep_method\n",
"\n",
"For stability we require the roots $w$ of\n",
"$$\n",
"\\rho(w) - z \\sigma(w)\n",
"$$\n",
"to be less than one\n",
"$$\n",
"|w_i(z)| < 1\n",
"$$\n",
"We find the values of $z$ for which $|w|=1$\n",
"$$\n",
"w = e^{i \\theta}, \\qquad z = \\frac{\\rho(e^{i\\theta})}{\\sigma(e^{i\\theta})}\n",
"$$"
]
},
{
"cell_type": "code",
"execution_count": 31,
"metadata": {},
"outputs": [],
"source": [
"%matplotlib inline\n",
"%config InlineBackend.figure_format = 'svg'\n",
"import numpy as np\n",
"from matplotlib import pyplot as plt"
]
},
{
"cell_type": "code",
"execution_count": 32,
"metadata": {},
"outputs": [],
"source": [
"def AB2(theta):\n",
" w = np.exp(1j*theta)\n",
" return (w**2 - w)/(3.0*w/2.0 - 1.0/2.0)\n",
"\n",
"def AB3(theta):\n",
" w = np.exp(1j*theta)\n",
" return (w**3 - w**2)/(23.0*w**2/12.0 - 4.0*w/3.0 + 5.0/12.0)"
]
},
{
"cell_type": "code",
"execution_count": 33,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"/Users/praveen/Applications/anaconda/lib/python3.6/site-packages/matplotlib/cbook/deprecation.py:107: MatplotlibDeprecationWarning: Adding an axes using the same arguments as a previous axes currently reuses the earlier instance. In a future version, a new instance will always be created and returned. Meanwhile, this warning can be suppressed, and the future behavior ensured, by passing a unique label to each axes instance.\n",
" warnings.warn(message, mplDeprecation, stacklevel=1)\n"
]
},
{
"data": {
"image/svg+xml": [
"\n",
"\n",
"\n",
"\n"
],
"text/plain": [
"