Midpoint method

In numerical analysis, a branch of applied mathematics, the midpoint method is a one-step method for numerically solving the differential equation, The explicit midpoint method is given by the formula the implicit midpoint method by for

is the step size — a small positive number,

The explicit midpoint method is sometimes also known as the modified Euler method,[1] the implicit method is the most simple collocation method, and, applied to Hamiltonian dynamics, a symplectic integrator.

Note that the modified Euler method can refer to Heun's method,[2] for further clarity see List of Runge–Kutta methods.

The name of the method comes from the fact that in the formula above, the function

giving the slope of the solution is evaluated at

A geometric interpretation may give a better intuitive understanding of the method (see figure at right).

In the basic Euler's method, the tangent of the curve at

is found where the tangent intersects the vertical line

, or only negative (as in the diagram), the curve will increasingly veer away from the tangent, leading to larger errors as

The diagram illustrates that the tangent at the midpoint (upper, green line segment) would most likely give a more accurate approximation of the curve in that interval.

at the midpoint, then computing the slope of the tangent with

Finally, the improved tangent is used to calculate the value of

This last step is represented by the red chord in the diagram.

Note that the red chord is not exactly parallel to the green segment (the true tangent), due to the error in estimating the value of

The local error at each step of the midpoint method is of order

, giving a global error of order

Thus, while more computationally intensive than Euler's method, the midpoint method's error generally decreases faster as

The midpoint method is a refinement of the Euler method and is derived in a similar manner.

The key to deriving Euler's method is the approximate equality which is obtained from the slope formula and keeping in mind that

For the midpoint methods, one replaces (3) with the more accurate when instead of (2) we find One cannot use this equation to find

The solution is then to use a Taylor series expansion exactly as if using the Euler method to solve for

: which, when plugged in (4), gives us and the explicit midpoint method (1e).

The implicit method (1i) is obtained by approximating the value at the half step

by the midpoint of the line segment from

results in the implicit Runge-Kutta method which contains the implicit Euler method with step size

Because of the time symmetry of the implicit method, all terms of even degree in

of the local error cancel, so that the local error is automatically of order

Replacing the implicit with the explicit Euler method in the determination of

results again in the explicit midpoint method.

Illustration of the midpoint method assuming that equals the exact value The midpoint method computes so that the red chord is approximately parallel to the tangent line at the midpoint (the green line).
Illustration of numerical integration for the equation Blue: the Euler method , green: the midpoint method, red: the exact solution, The step size is
The same illustration for It is seen that the midpoint method converges faster than the Euler method.