# Midpoint method

This online calculator implements explicit midpoint method AKA modified Euler method, which is a second order numerical method to solve first degree differential equation with a given initial value.

You can use this calculator to solve first degree differential equation with a given initial value using **explicit midpoint method** AKA modified Euler method.

To use this method, you should have differential equation in the form

and enter the right side of the equation *f(x,y)* in the *y'* field below.

You also need initial value as

and the point for which you want to approximate the value.

The last parameter of a method - a step size, is literally a step along the tangent line to compute next approximation of a function curve.

If you know the exact solution of a differential equation in the form *y=f(x)*, you can enter it as well. In this case, calculator also plots the solution along with approximation on the graph and computes the absolute error for each step of the approximation.

Method explanation can be found below the calculator.

### Midpoint method

As with the Euler method we use the relation

but compute *f* differently. Instead of using the tangent line at current point to advance to next point, we are using the tangent line at midpoint, that is, approximate value of derivative at the midpoint between current and next points. To do this, we approximate *y* value at the midpoint as

And our relation changes from

to

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 .^{1}

The method is an example of a family of higher-order methods known as Runge–Kutta methods.

## Comments