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 formula_4 Here, formula_5 is the "step size" — a small positive number, formula_6 and formula_7 is the computed approximate value of formula_8 The explicit midpoint method is also known as the modified Euler method, the implicit method is the most simple collocation method, and, applied to Hamiltonian dynamics, a symplectic integrator. The name of the method comes from the fact that in the formula above, the function formula_9 giving the slope of the solution is evaluated at formula_10 the midpoint between formula_11 at which the value of formula_12 is known and formula_13 at which the value of formula_12 needs to be found. 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 formula_15 is computed using formula_16. The next value formula_17 is found where the tangent intersects the vertical line formula_18. However, if the second derivative is only positive between formula_11 and formula_13, or only negative (as in the diagram), the curve will increasingly veer away from the tangent, leading to larger errors as formula_5 increases. 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. However, this midpoint tangent could not be accurately calculated because we do not know the curve (that is what is to be calculated). Instead, this tangent is estimated by using the original Euler's method to estimate the value of formula_12 at the midpoint, then computing the slope of the tangent with formula_23. Finally, the improved tangent is used to calculate the value of formula_24 from formula_7. 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 formula_12 at the midpoint. The local error at each step of the midpoint method is of order formula_27, giving a global error of order formula_28. Thus, while more computationally intensive than Euler's method, the midpoint method's error generally decreases faster as formula_29.