1
$\begingroup$

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$?

enter image description here

$\endgroup$
4
  • 1
    $\begingroup$ Implicit Euler is explicit Euler backwards. The error term either contains the second derivative or a Lipschitz constant, $h/2$ is not the answer. $\endgroup$ Apr 19, 2016 at 21:53
  • $\begingroup$ 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)$? $\endgroup$
    – J.doe
    Apr 19, 2016 at 23:28
  • 1
    $\begingroup$ @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$. $\endgroup$
    – Ian
    Apr 20, 2016 at 0:03
  • $\begingroup$ $k_1=f(t_n,y_n)$ for runge- kutta, how to taylor expand it? $\endgroup$
    – J.doe
    Apr 20, 2016 at 5:02

1 Answer 1

2
$\begingroup$

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)$$

$\endgroup$
4
  • $\begingroup$ So the coefficient of the $O(h)$ term of the implicit Euler's method is $h/2$? $\endgroup$
    – J.doe
    Apr 20, 2016 at 3:10
  • $\begingroup$ What I don't get it why isn't the coefficient of the $O(h)$ term of the implicit Euler's method $h/2$? $\endgroup$
    – J.doe
    Apr 20, 2016 at 20:35
  • 1
    $\begingroup$ 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. $\endgroup$ Apr 21, 2016 at 0:47
  • $\begingroup$ I don't get it.. So what's the coefficient of the $O(h)$ term? $\endgroup$
    – J.doe
    Apr 21, 2016 at 1:48

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .