1

I am trying to prove that the explicit midpoint method is consistent of order 2. The 2-step scheme is defined as $$ \frac{y_j - y_{j-2}}{2h} = f(t_{j-1}, y_{j-1}) $$

I have defined the local error as $$ l_j = y(t_j) - y_j = y(t_j) - y(t_{j-2}) - 2hf(t_{j-1}, y(t_{j-1})). $$

Plugging in the Taylor expansion of $y(t_j)$: $$ y(t_j) = y(t_{j-2}) + 2hy'(t_{j-2}) + O(h^2) $$

and cancelling the $y(t_{j-2})$ term gives $$ l_j = 2h(y'(t_{j-2}) - f(t_{j-1}, y(t_{j-1})) + O(h^2). $$

I don't know how to proceed from here. I imagine I somehow need to show that $y'(t_{j-2}) - f(t_{j-1}, y(t_{j-1}))$ either cancel out or are of the order of $O(h^2)$. Any help would be greatly appreciated!

Matej V
  • 13
  • Are you sure that the name is correct for the described method? This looks more like the central Euler method, a multi-step method, while the explicit midpoint method is a one-step Runge-Kutta method often named as RK2. See https://math.stackexchange.com/questions/3067795/deriving-the-central-euler-method-and-intuition, https://math.stackexchange.com/questions/3843375/specific-numerical-scheme-does-not-converge – Lutz Lehmann May 19 '23 at 19:15
  • Well, this is what we were given as a definition in one of the worksheet problems at my university. It is discussed within the section of Linear Multistep Methods. Wikipedia (https://www.wikiwand.com/en/Midpoint_method) defines the explicit midpoint method as $y_{n+1} = y_n + hf(t_n + \frac{h}{2}, y_n + \frac{h}{2} f(t_n, y_n))$, which I believe is equivalent if we take $y_{n+1} = y_j, y_{n} = y_{j-2}, y_n + \frac{h}{2}f(t_n, y_n) = y_{j-1}, h' = \frac{h}{2}$. I admit, I could easily be wrong, feel free to correct me if I missed something. – Matej V May 19 '23 at 20:13
  • Actually, the second link you provided proves exactly what I needed, thank you for that! – Matej V May 19 '23 at 20:38
  • A multi-step method uses always the same formula to get to the next step, using state data from previous steps (and only these), in principle like a filter. So the cited method from wikiwand, which is correctly named, is a one-step or Runge-Kutta method. – Lutz Lehmann May 19 '23 at 22:07
  • 1
    Your error above is that you do not use enough terms in the Taylor expansion. Use at least two more to get some useful insight. – Lutz Lehmann May 19 '23 at 22:13

1 Answers1

0

I got this as a homework question. It's phrased similarly in the text A First Course in Numerical Methods by Uri Ascher and Chen Greif. I'll present my solution as I wrote it, albeit in an abridged fashion. Let's change some indices to make the problem a little friendlier by considering the leapfrog scheme

$$ \frac{y_{i+1} - y_{i-1}}{2h} = f(t_i, y_i) $$

where we assume the grid is uniform. We use the Taylor expansions

$$ y(t_i \pm h) = y(t_i) \pm h y'(t_i) + \frac{h^2}{2} y''(t_i) \pm \frac{h^3}{6} y'''(\eta) $$

where $\eta$ is in some neighborhood of $t_i$ (note that a different $\eta$ can be used for the plus or minus versions separately, but it won't matter in the end).

Let $$E = \frac{y(t_i + h) - y(t_i - h)}{2h} - f(t_i, y(t_i)) $$

which represents the local error in the approximation. If you do the work, you'll observe that

$$ E = \frac{1}{2h} \left( y'(t_i) + \frac{h^2}{6} y'''(\eta) - f(t_i, y(t_i)) \right) = O(h^2) $$

(notice that $f(t_i, y(t_i)) = y'(t_i)$ if $y$ satisfies the ODE). Thus the method is second-order accurate.