# Adams’ Method¶

Taylor Expansion of Functions

Suppose we have a function \(f(x)\), Taylor expansion arround a point \(x_0\) is

This is also named Maclaurin series.

For linear first ODE,

This equation can always be written as a integral form

which is basically a very general idea of how to numerically solve such an equation, as long as we can solve the integral efficiently and accurately. In other words, we are dealing with

The problem is how exactly do we calculate the integral or the iteraction. Two methods are proposed as explicit method (Adams-Bashforth Method) and implicit method (Adams-Moulton Method).

What can be done is to Taylor expand the integrand. At first order of \(f(x,y)\), we would have

which is the Euler method. For simplicity step size is defined as

Also to simplify the notation, we introduce the notation

For second order, we have at least two different methods to approximate the integral.

Adams-Bashforth method is to approximate the integral using

\[\int_{x_n}^{x_{n+1}} f(x,y) dx \sim \frac{1}{2} ( 3 f( x_n - f( x_{n-1}, y_{n-1} ) , y_n) ) \delta x\]where we used the definition of step size (1).

Adams-Moulton method uses trapezoidal rule, which approximates the integral as

\[\int_{x_n}^{x_{n+1}} f(x,y) dx \sim \frac{1}{2} f( x_{n+1} + f(x_n, y_n) , y_{n+1} ),\]which is similar to backward Euler method but of second order.

In fact the AB and AM methods to the first order are

- Adams-Bashforth Method First Order = Forward Euler Method;
- Adams-Moulton Method First Order = Backward Euler Method.

scipy.odeint

scipy.odeint uses adams for nonstiff equations, where even higher order are used. The return infodictionary entry nqu shows the orders for each successful step.