For a first order differentiation $\frac{\partial f}{\partial t}$, we might have many finite differencing methods.

## Euler Method

For linear first ODE,

we can discretize the equation using a step size $\delta x \cdot$ so that the differential equation becomes

which is also written as

This is also called forward Euler differencing. It is first order accurate in $\Delta t$.

Generally speaking, a simple iteraction will do the work.

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

where we used the definition of step size equation ($\ref{adams-method-step-size-def}$).

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

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.

## Runge-Kutta

This method contains only the even powers of $h$ thus we can gain two orders of precision at a time by calculating one more correction.