Content deleted Content added
No edit summary |
No edit summary |
||
Line 12:
The name of the method comes from the fact that in the formula above, the function <math>f</math> giving the slope of the solution is evaluated at <math>t=t_n+h/2= \tfrac{t_n+t_{n+1}}{2},</math> the midpoint between <math>t_n</math> at which the value of <math>y(t)</math> is known and <math>t_{n+1}</math> at which the value of <math>y(t)</math> 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 <math>(t_n, y_n)</math> is computed using <math>f(t_n, y_n)</math>. The next value <math> y_{n+1}</math> is found where the tangent intersects the vertical line <math>t=t_{n+1}</math>. However, if the second derivative is only positive between <math>t_n</math> and <math>t_{n+1}</math>, or only negative (as in the diagram), the curve will increasingly veer away from the tangent, leading to larger errors as <math>h</math> 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
The local error at each step of the midpoint method is of order <math>O\left(h^3\right)</math>, giving a global error of order <math>O\left(h^2\right)</math>. Thus, while more computationally intensive than Euler's method, the midpoint method's error generally decreases faster as <math>h \to 0</math>.
|