For $y'=f(t,y),y(t_0)=y_0$ consider method $y_{i+1}=y_i+h(αf_i+(1-α)f_{i-1})$ where $f_k=f(t_k,y_k),α\in \mathbb R$. Find order of accuracy of method.

115 Views Asked by At

For the initial value problem $y'=f(t,y),\;y(t_0)=y_0,$ consider the methods $$y_{i+1}=y_i+h(\alpha f_i+(1-\alpha)f_{i-1})$$ where $f_k = f(t_k, y_k)$ and $\alpha $ a real number and $h$ is time step. Find the order of accuracy of the method as a function of $\alpha$.


Here is my work, which was marked as $\color{red}{WRONG}$. Where is the mistake?

enter image description here

1

There are 1 best solutions below

0
On BEST ANSWER

Why are you computing the difference $y(t_{i+1})-y_{i}$? It does not make much sense... The local truncation error is given by $y(t_{i+1})-y_{i+1}$, where in the calculation of $y_{i+1}$ we assume that $y_i$ and $y_{i-1}$ are exact.

\begin{align*} y(t_{i+1})-y_{i+1}=&y_i + h y'_i+\frac 12 h^2 y''_i + O(h^3)-y_i-h \alpha f_i -h (1-\alpha)f_{i-1}\\ =& hy'_i +\frac 12 h^2 y''_i -\alpha h y'_i -h(1-\alpha)(y'_i-h y''_i + O(h^2))+O(h^3)\\ =& (\frac 12+1-\alpha)h^2 y''_i+O(h^3) \end{align*}

So, if you take $\alpha = \frac 32$ the local truncation error is $O(h^3)$, otherwise it is $O(h^2)$. The global error should be one order lower.