ODE Taylor series expansion using midpoint Euler method

509 Views Asked by At

I am trying to solve part (c) of the question I attached as a picture as preparation for an exam.

I can see how to get the result in the correct form using a taylor series expansion, however I don't understand where $t+h/2$ has come from in each occurrence. Can anyone explain?

Question

1

There are 1 best solutions below

1
On

The (implicit) midpoint method $$ y_{k+1}=y_k+hf(x+\tfrac12h,\tfrac12(y_{k+1}+y_k)) $$ is the combination of an implicit and explicit Euler half-step. Both half steps are easiest to analyze from the midpoint $m=\tfrac12(y_{k+1}+y_k)$ on. $$ m=y_k+\tfrac12hf(x+\tfrac12h,m)\\ y_{k+1}=m+\tfrac12hf(x+\tfrac12h,m) $$


Also, as the method is symmetric about the midpoint, it makes sense to have the Taylor expansions also about the midpoint, as (anti-)symmetric terms will combine and may simplify (to zero).


Note that for an exact solution $$ m=\tfrac12(y(x_{k+1})+y(x_k))=y(x_k+\tfrac12h)+O(h^2), $$ so that the change from the mean value $m$ to the value $y(x_k+\tfrac12h)$ at the midpoint in the method formula only adds another $O(h^3)$ term.