question about deriving the midpoint method

438 Views Asked by At

http://en.wikipedia.org/wiki/Midpoint_method

$y'(t) \approx \frac{y(t+h) - y(t)}{h} \qquad\qquad (3)$

For the midpoint method, one replaces (3) with the more accurate

$ y'\left(t+\frac{h}{2}\right) \approx \frac{y(t+h) - y(t)}{h} $

I'm trying to understand this point of the derivation for the midpoint method on Wikipedia. What happens to the $\frac{h}{2}$ when doing the approximation? I was expecting this:

$ y'\left(t+\frac{h}{2}\right) \approx \frac{y(t+\frac{h}{2}) - y(t)}{\frac{h}{2}} $

Does the $h$ on the right represent a generic incremental value?

The use of $h$ is confusing to be because the next line in the derivation is

$ y(t+h) \approx y(t) + hf\left(t+\frac{h}{2},y\left(t+\frac{h}{2}\right)\right). \qquad\qquad (4)$

It looks like $(4)$ is just saying we're advancing our approximation by a half-step instead of a full step, like we did for Euler's method.

1

There are 1 best solutions below

0
On BEST ANSWER

Actually, you assume $y'$ to be constant on $[t, t+h]$ with a value of $$y'|_{[t,t+h]} \approx y'(t+\frac{h}{2})= f\left(t+\frac{h}{2}, y(t + \frac{h}{2})\right)$$ This choice is more or less arbitrary. One justification might be, that the quadrature formula obtained by this is optimal in a sense of maximum order (midpoint is of order $2$, it exactly integrates any polynomials of degree $\leq 1$, which is optimal for single-point quadrature)
Subsequent integration gives $$\begin{align*}y(t+h) & = y(t) + \int_{t}^{t+h} y'(\tau) d\tau \\ & \approx y(t) +\int_{t}^{t+h} f\left(t+\frac{h}{2}, y(t + \frac{h}{2})\right) d\tau \\ & = y(t) + hf\left(t+\frac{h}{2}, y(t + \frac{h}{2})\right)\end{align*}$$