Local Truncation Error on Improved Euler's Method

1.1k Views Asked by At

I need to reach the conclusion that $$\tau(x,h) = \frac{\phi(x + h) - \phi(x)}{h} - \frac{1}{2}[f(x,\phi(x)) + f(x+h,\phi(x) + h f(x,\phi(x)))] = O(h^2)$$

So I tried using Taylor expansions and reached the following

$$\phi(x+h) = \phi(x) + h\phi'(x) + \frac{h^2}{2}\phi''(x) + O(h^3)$$

$$\frac{\phi(x+h) - \phi(x)}{h} = \phi'(x) + \frac{h}{2}\phi''(x)$$

$$f(x+h,\phi(x) + h f(x,\phi(x))) = f(x,\phi(x)) + hf_x(x,\phi(x)) + hf(x,\phi(x))f_y(x,\phi(x)) $$

$$\frac{1}{2}[f(x,\phi(x)) + f(x+h,\phi(x) + h f(x,\phi(x)))] = f(x,\phi(x)) + \frac{h}{2}[f_x(x,\phi(x)) + f(x,\phi(x))f_y(x,\phi(x))]$$

$$\tau(x,h) = \phi'(x) + \frac{h}{2}\phi''(x) - f(x,\phi(x)) - \frac{h}{2}[f_x(x,\phi(x)) + f(x,\phi(x))f_y(x,\phi(x))]$$

In the end I reach this which is still $O(h)$

$$\tau(x,h) = \frac{h}{2}[\phi''(x) - f_x(x,\phi(x)) - f(x,\phi(x))f_y(x,\phi(x)) ] $$

What am I doing wrong?

1

There are 1 best solutions below

1
On BEST ANSWER

If you compute the derivative of $ϕ'(x)=f(x,ϕ(x))$ you get $$ ϕ''(x)=f_x(x,ϕ(x))+f_y(x,ϕ(x))ϕ'(x)=f_x(x,ϕ(x))+f_y(x,ϕ(x))f(x,ϕ(x)). $$ The term in question cancels to zero, so the next terms are quadratic in $h$.


This is also called Heun's (2nd order) method or explicit trapezoidal method. For a similar question with a slightly different approach see Heun's method: Why is it of second order?