# Implicit Euler method and explicit Euler method

I wanna know what is the difference between explicit Euler's method and implicit Euler's method. And is the local truncation error for both of them is $O(h)$ and the coefficient of the $O(h)$ term is $h/2$?

• Implicit Euler is explicit Euler backwards. The error term either contains the second derivative or a Lipschitz constant, $h/2$ is not the answer. Apr 19, 2016 at 21:53
• I attached a picture in my problem. Why do some people say the error is $O(h)$ while some say it is $O(h^2)$? Apr 19, 2016 at 23:28
• @J.doe The error in one step (for nice enough problems) is $O(h^2)$. However, to get to a given fixed time $t$, you have to perform $O(1/h)$ steps of size $h$. Thus the error accumulates to $O(h)$ in the process of reaching time $t$.
– Ian
Apr 20, 2016 at 0:03
• $k_1=f(t_n,y_n)$ for runge- kutta, how to taylor expand it? Apr 20, 2016 at 5:02

The error of both explicit and implicit Euler are $O(h)$. So

$$f(x-h) = f(x) - h f'(x) + \frac{h^2}{2} f''(x) - \frac{h^3}{6} f'''(x) + \cdots$$

and

$$f(x+h) = f(x) + h f'(x) + \frac{h^2}{2} f''(x) + \frac{h^3}{6} f'''(x) + \cdots$$

So the backward Euler is

$$f(x) - f(x-h) = h f'(x) - \frac{h^2}{2} f''(x) + \frac{h^3}{6} f'''(x) - \cdots$$

$$f'(x) = \frac{f(x) - f(x-h)}{h} + \frac{h}{2} f''(x) - \frac{h^2}{6} f'''(x) + \cdots$$

the backward Euler is first order accurate

$$f'(x) = \frac{f(x) - f(x-h)}{h} + O(h)$$

And the forward Euler is

$$f(x+h) - f(x) = h f'(x) + \frac{h^2}{2} f''(x) + \frac{h^3}{6} f'''(x) + \cdots$$

the forward Euler is first order accurate

$$f'(x) = \frac{f(x+h) - f(x)}{h} + O(h)$$

We can do a central difference and find

$$f(x+h) - f(x-h) = (h f'(x) + \frac{h^2}{2} f''(x) + \frac{h^3}{6} f'''(x) + \cdots) - (- h f'(x) + \frac{h^2}{2} f''(x) - \frac{h^3}{6} f'''(x) + \cdots)$$

$$f(x+h) - f(x-h) = (h f'(x) + \frac{h^2}{2} f''(x) + \frac{h^3}{6} f'''(x) + \cdots) + (h f'(x) - \frac{h^2}{2} f''(x) + \frac{h^3}{6} f'''(x) - \cdots)$$

$$f(x+h) - f(x-h) = 2 h f'(x) + \frac{h^3}{6} f'''(x) + \cdots$$

$$f'(x) = \frac{f(x+h) - f(x-h)}{2h} - \frac{h^2}{12} f'''(x) + \cdots$$

Therefore, the central difference is second order accurate.

$$f'(x) = \frac{f(x+h) - f(x-h)}{2h} + O(h^2)$$

• So the coefficient of the $O(h)$ term of the implicit Euler's method is $h/2$? Apr 20, 2016 at 3:10
• What I don't get it why isn't the coefficient of the $O(h)$ term of the implicit Euler's method $h/2$? Apr 20, 2016 at 20:35
• Because the leading error term is $\frac{f''(x)}{2} h$. Therefore, when $h \rightarrow \frac{h}{n}$, the global error goes from $\varepsilon \rightarrow \frac{\varepsilon}{n}$. The important part is how it changes with the step size. Apr 21, 2016 at 0:47
• I don't get it.. So what's the coefficient of the $O(h)$ term? Apr 21, 2016 at 1:48