Edit: figure it out, made an errorWe are given that$$y' = f(y,t), y(t_0) = y_0$$We want to use the following method$$\begin{align}u^1_{n+1/2} &= u_n + \frac{h}{2}f(u_n, t_n)\\u^1_{n+1} &= u_{n+1/2} + \frac{h}{2}f(u^1_{n+1/2}, t_n+h/2)\\u^2_{n+1} &= u_n + hf(u_n, t_n)\\u_{n+1} &= \alpha u^1_{n+1} + \beta u^2_{n+1}\end{align}$$The goal is to choose $\alpha$ and $\beta$ such that the above method is second order. I used Taylor expansions for everything and assumed that $f$ is Lipschitz. I can add more details, but assuming I did it correctly I found that the local truncation error $\tau$ is given by$$\tau = (1-\alpha-\beta)u_n + (1-\alpha-\beta)hu_n' +(1-\alpha)\frac{h^2}{2}u_n'' + O(h^3)$$Edit: expression for $\tau$ should have$$(1-\alpha/2)\frac{h^2}{2}u_n''$$Expression above was incorrect.So if we let $\alpha=1, \beta=0$, then we get $\tau= O(h^3)$, thus giving second order convergence. I then implemented this method for two different functions $f$ and only got 1st order convergence.Any ideas? Is those the correct values of $\alpha$ and $\beta$? Thanks.
choosing parameters for extrapolation method to give second order error
numerical analysis;finite difference