Error for Euler's method for higher order ODE

150 Views Asked by At

Consider the IVP $$\frac{dy}{dt}(t)=f(t,y(t)), \quad t\in [a,b], \quad y(a)=\alpha \in \mathbb{R}.$$

One can show that Euler's method, i.e., the scheme $$y_{i+1}=y_i+hf(t_i.y_i), \quad y_0=\alpha, \quad i=0, 1, 2, \ldots $$ has local truncation error $\mathcal{O}(h^2)$ and global error $\mathcal{O}(h).$

For higher order ODEs one can rewrite the ODE as a first order system and then apply Euler as before.

Should the local truncation error still be $\mathcal{O}(h^2 )$?

I tried this for a second order ODE $$y''(t)=f(t,y(t),y'(t)), \quad t\in[a,b], \quad y(a)=\alpha, \quad y'(a)=\beta$$ and arrived at $$y_{i+2}=2y_{i+1}-y_i+h^2f\left(t_i, y_i, f\left(t_i,y_i, \frac{y_{i+1}-y_i}{h}\right)\right).$$

Then the local truncation error is $$y(t_{i+1})-y_{i+1}=\mathcal{O}(h^3).$$

This of course contradicts my expectation that the error would still be $\mathcal{O}(h^2)$.

1

There are 1 best solutions below

0
On BEST ANSWER

Your two-step formula $y_{i+2}-2y_{i+1}+y_i=h^2f(...)$ actually requires two summations to get the values of $y_i$. So if the truncation error of it is $O(h^3)$, then the first summation gives an error of $O(h^2)$ and the second summation an error of $O(h)$ for the final result. There is no magical stuff happening.