Approximating ODE $y' = f(t,y)$ by using leapfrog method

1k Views Asked by At

The leapfrog method for the ODE $y' = f(t,y)$ is derived like the forward and backward Euler methods, except that centered differencing is used. This yields the formula $$\frac{y_{i+1}-y_{i-1}}{2h}=f(t_i,y_i)$$ Show that this is an explicit linear two-step method that is second order accurate and does not belong to the Adams or BDF families.

So we can get the relation that $y_i'=\frac{y_{i+1}-y_{i-1}}{2h}$. But I am not sure what game I should play with this to derive that it is explicit linear two-step. I.e. do I look for a interpolating polynomial or do I play around with Taylor series and plug this in to show it is second order accurate? Any help is appreciated. Thank you!

1

There are 1 best solutions below

0
On BEST ANSWER

You can use Taylor's formula to get the local truncation error, which is the error in the approximation of $y(t_{i+1})$ by applying the method with exact values for $y_i$ and $y_{i-1}$. \begin{align*} \tilde y_{i+1}-y(t_{i+1})= & y(t_i-h)+2h y'(t_i)-y(t_i+h)\\ = & \left(y(t_i)-hy'(t_i)+\frac{h^2}{2}y''(t_i) + O(h^3)\right)+2hy'(t_i)-\\ & -\left(y(t_i)+hy'(t_i)+\frac{h^2}{2}y''(t_i)+O(h^3)\right) \\ = & O(h^3) \end{align*}

A local truncation error of order 3 will yield a global error of order 2.