Adams-Bashforth and Adams-Moulton methods

Definitions
Linear multistep methods are used for the numerical solution of ordinary differential equations, in particular the initial value problem
 * $$ y' = f(t,y)\quad\text{with}\quad y(t_0)=y_0\,. $$

The Adams-Bashforth methods and Adams-Moulton methods are described on the Linear multistep method page.

Derivation
There are (at least) two ways that can be used to derive the Adams-Bashforth methods and Adams-Moulton methods. We will demonstrate the derivations using polynomial interpolation and using Taylor's theorem for the two-step Adams-Bashforth method.

Derive the two-step Adams-Bashforth method by using polynomial interpolation
From the Fundamental theorem of Calculus we can get

Set

To get the value of $$A$$, we can use an interpolating polynomial $$P(t)$$ as an approximation of $$f(t,y(t))$$. The interpolation polynomial in the Lagrange form is a linear combination
 * $$L(x) := \sum_{j=0}^{k} y_j \ell_j(x)$$

where
 * $$\ell_j(x) := \prod_{\begin{smallmatrix}0\le m\le k\\ m\neq j\end{smallmatrix}} \frac{x-x_m}{x_j-x_m}\,.$$

Then the interpolation can be
 * $$P(t)= f(t_{n},y_{n})\frac{t-t_{n-1}}{t_{n}-t_{n-1}} + f(t_{n-1},y_{n-1})\frac{t-t_{n}}{t_{n-1}-t_{n}}\,.$$

Thus, ($$) becomes

Integrating and simplifying, the right hand side of equation ($$) becomes
 * $$\begin{array}{rcl}

&&\frac{1}{2}(t_{n}+t_{n+1})(f(t_{n},y_{n})-f(t_{n-1},y_{n-1}))-t_{n-1}f(t_{n},y_{n})+ t_{n}f(t_{n-1},y_{n-1})\\ \\ &=&\frac{1}{2}(t_{n}+t_{n+1}-2t_{n-1})f(t_{n},y_{n}) + \frac{1}{2}(2t_{n}-t_{n+1}-t_{n})f(t_{n-1},y_{n-1})\,. \end{array} $$ Since $$t_{n-1}$$, $$t_{n}$$ and $$t_{n+1}$$ are equally spaced, then $$t_{n}-t_{n-1} = t_{n+1}-t_{n} = h$$. Therefore, the value of $$A$$ is
 * $$A = \frac{3}{2}hf(t_{n},y_{n})-\frac{1}{2}hf(t_{n-1},y_{n-1})$$

Putting this value back to ($$) yields
 * $$ y(t_{n+1}) \approx y(t_{n}) + \frac{3}{2}hf(t_{n},y_{n})-\frac{1}{2}hf(t_{n-1},y_{n-1})\,.$$

Thus, the equation $$ y_{n+1} = y_{n} + \frac{3}{2}hf(t_{n},y_{n})-\frac{1}{2}hf(t_{n-1},y_{n-1})$$ is the two-step Adams-Bashforth method.

Derive the two-step Adams-Bashforth method by using Taylor's theorem
To simplify, let's set $$f_{k}=f(t_{k},y_{k})$$. Then the general form of Adams-Bashforth method is

where $$\sum_{k=1}^r \lambda_{k}=1$$. For the two-step Adams-Bashforth method, let's set $$\lambda_{1}=1-\lambda, \lambda_{2}=\lambda$$. Then ($$) becomes
 * $$\begin{align}y_{n+2}&=y_{n+1}+h((1-\lambda)f_{n+1}+\lambda f_{n})\\

&=y(t_{n+1})+h((1-\lambda)y'(t_{n+1})+\lambda y'(t_{n}))\,.\end{align}$$ By using Taylor's theorem, expand $$y'(t_{n})$$ at $$t_{n+1}$$ to get
 * $$y_{n+2}=y(t_{n+1})+h((1-\lambda)y'(t_{n+1})+\lambda (y'(t_{n+1})-hy''(t_{n+1})+O(h^2))\,.$$

Thus, the simplified form is

Expanding $$y(t_{n+2})$$ at $$y(t_{n+1})$$ yields

Subtracting ($$) from ($$) and then requiring the h^2 term to cancel makes $$\lambda=-\frac{1}{2}$$. The two-step Adams-Bashforth method is then
 * $$ y_{n+2} = y_{n+1} + \frac{3}{2}hf(t_{n+1},y_{n+1})-\frac{1}{2}hf(t_{n},y_{n})$$

Since
 * $$y(t_{n+2})-y_{n+2}=O(h^3)\,.$$

the local truncation error is of order $$O(h^3)$$ and thus the method is second order. (See Linear multistep method and Truncation error)

Exercises
1. Derive three-step Adams-Bashforth method by using polynomial interpolation Solution: The initial problem is $$ y' = f(t,y). $$ Then we can get:

let's set:

Then,we can use P(t) as an interpolation of f(t,y(t)). To derive the three-step Adams-bashforth method, the interpolation polynomial is:

$$P(t)= f(t_{n},y_{n})\frac{(t-t_{n-1})(t-t_{n-2})}{(t_{n}-t_{n-1})(t_{n}-t_{n-2})} + f(t_{n-1},y_{n-1})\frac{(t-t_{n})(t-t_{n-2})}{(t_{n-1}-t_{n})((t_{n-1}-t_{n-2})}+f(t_{n-2},y_{n-2})\frac{(t-t_{n})(t-t_{n-1})}{(t_{n-2}-t_{n})(t_{n-2}-t_{n-1})}$$

Since $$t_{n-2}$$, $$t_{n-1}$$, $$t_{n}$$ and $$t_{n+1}$$ are equally spaced, then

$$t_{n-1}-t_{n-2}=t_{n}-t_{n-1} = t_{n+1}-t_{n} = h$$.

So the integral of each part of P(t) is :

$$\frac{f(t_{n},y_{n})}{2h^2}\int_{t_{n}}^{t_{n+1}} (t-t_{n-1})(t-t_{n-2})\,dt = \frac{23}{12}hf(t_{n},y_{n})$$

$$-\frac{f(t_{n-1},y_{n-1})}{h^2}\int_{t_{n}}^{t_{n+1}} (t-t_{n})(t-t_{n-2})\,dt = -\frac{4}{3}hf(t_{n-1},y_{n-1})$$

$$\frac{f(t_{n-2},y_{n-2})}{2h^2}\int_{t_{n}}^{t_{n+1}} (t-t_{n})(t-t_{n-1})\,dt = \frac{5}{12}hf(t_{n-2},y_{n-2})$$

Thus the approximate value of A is

$$A \approx \frac{23}{12}hf(t_{n},y_{n})-\frac{4}{3}hf(t_{n-1},y_{n-1})+\frac{5}{12}hf(t_{n-2},y_{n-2})$$

Put this value back to ($$)

$$ y(t_{n+1}) \approx y(t_{n}) + \frac{23}{12}hf(t_{n},y_{n})-\frac{4}{3}hf(t_{n-1},y_{n-1})+\frac{5}{12}hf(t_{n-2},y_{n-2})$$

Thus, the three-step Adams-Bashforth method is

$$ y_{n+1} = y_{n} + h \left(\frac{23}{12}f(t_{n},y_{n})-\frac{4}{3}f(t_{n-1},y_{n-1})+\frac{5}{12}f(t_{n-2},y_{n-2})\right)$$

2. Derive the second-order Adams-Moulton method by using Taylor's theorem Solution:

To simplify, note $$f,f'_{t},f'_{y}$$ to represent $$f(t_{n},y_{n}),f'_{t}(t_{n},y_{n}),f'_{y}(t_{n},y_{n})$$.From Taylor expansion of the binary function (Taylor's theorem):

$$f_{n+1}=f(t_{n+1},y_{n+1})=f+hf'_{t}+f'_{y}(y_{n+1}-y_{n})+O[h^2+(y_{n+1}-y_{n})^2]$$

Then by using:

can get:

$$f_{n+1}=f+hf'_{t}+(1-\lambda)hff'_{y}+\lambda hf_{n+1}f'_{y}+O(h^2)$$

Therefore, simplify this equation to get:

$$f_{n+1}=\frac{f+hf'_{t}+(1-\lambda)hff'_{y}+O(h^2)}{1-\lambda hf'_{y}}$$

$$=[f+hf'_{t}+(1-\lambda)hff'_{y}+O(h^2)][1+\lambda hf'_{y}+O(h^2)]$$

$$=f+h(f'_{t}+ff'_{y})+O(h^2)$$

$$=y'(t_{n})+hy''(t_{n})+O(h^2)$$

Thus, subtitute $$f_{n+1}$$ into ($$):

$$y_{n+1}=y_{n}+h[(1-\lambda)f_{n}+\lambda f_{n+1}]$$

$$=y(t_{n})+hy'(t_{n})+\lambda h^2y''(x_{n})+O(h^3)$$

Combining the equation:

$$y(t_{n+1})-y_{n+1}=O(h^3)$$

and Taylor expansion:

$$y(t_{n+1})=y(t_{n})+hy'(t_{n})+\frac{1}{2}hy''(t_{n})+O(h^3)$$

can get $$\lambda = \frac{1}{2}$$. Therefore, the second-order Adams-moulton method is:

$$ y_{n+1} = y_{n} + \frac{h}{2}(f(t_{n+1},y_{n+1})+f(t_{n},y_{n}))$$

Predictor–corrector method
To solve an ordinary differential equation (ODE), a Predictor–corrector method is an algorithm that can be used in two steps. First, the prediction step calculates a rough approximation of the desired quantity, typically using an explicit method. Second, the corrector step refines the initial approximation using another means, typically an implicit method.

Here mainly discuss about using Adams-bashforth and Adams-moulton methods as a pair to construct a predictor–corrector method.

Example: Adams predictor–corrector method
Let's start from the two-step Adams method. The prediction step is to use two-step Adams-bashforth:

$$ P_{n+1} = y_{n} + \frac{3}{2}hf(t_{n},y_{n})-\frac{1}{2}hf(t_{n-1},y_{n-1})$$

Then, by using two-step Adams-moulton the corrector step can be:

$$ y_{n+1} = y_n + \tfrac12 h \big( f(t_{n+1},P_{n+1}) + f(t_n,y_n) \big) $$

Also, by using four-step Adams-bashforth and Adams-moulton methods together, the predictor-corrector formula is:

$$ \begin{cases} P_{n+1}=y_{n}+\frac{h}{24}(55f(t_{n},y_{n})-59f(t_{n-1},y_{n-1})+37f(t_{n-2},y_{n-2})-9f(t_{n-3},y_{n-3})) \\ y_{n+1}=y_{n}+\frac{h}{24}(9f(t_{n+1},P_{n+1})+19f(t_{n},y_{n})-5f(t_{n-1},y_{n-1})+f(t_{n-2},y_{n-2})) \\ \end{cases} $$

Note, the four-step Adams-bashforth method needs four initial values to start the calculation. It needs to use other methods, for example Runge-Kutta, to get these initial values.

Matlab programs
Four-step Adams predictor-corrector method:

Runge-Kutta method: