[Math] Heun’s method second order

numerical methodsordinary differential equations

I want to proof for the differential equation $x'=\lambda x$ that the error done by Heun's method in each step is $O(h^3)$.
We have $x_{k+1}=x_{k}+\frac{h\lambda}{2}(x_{k+1}+x_{k})$ as the given algorithm, where k means $t_k$ in the algorithm

Now we compare the error $E=x(t_{k+1})-x_{k+1}=x_k+\lambda x_k \tau + \lambda^2 \frac{x_k^2 \tau^2}{2}+x'''(\xi) \frac{\tau^3}{6}-x_{k+1}$ by using Taylor expansion.

but even if I plug everything in that we know from Heun's method. This does not cancel, so I am wrong here. Is there anybody who can help me?

Best Answer

Looking at your expression again, this still isn't the correct implementation of Heun; check Wiki! You calculate $\tilde x_{n+1}= x_n+h\lambda x_n$ and then $x_{n+1} = x_n+h\lambda/2(x_n+\tilde x_{n+1})$. This is not implicit but explicit so there's no need to solve. You should find that $x_{n+1}$ is simply the first two terms in the Taylor series on expansion.