The LTE of an implicit Euler method is $O(h^2)$ because the method has order $O(h)$, but I'm not sure where to get started in proving this arithmetically. Any help would be appreciated. Thank you!
-
How are the sequence $(y_k)$ and the function $y(t)$ related? – Lutz Lehmann Apr 19 '16 at 21:50
-
I believe $y_k$ is y at time $t_k$. Is that correct? – mil10 Apr 19 '16 at 22:57
-
You should be able to verify that in a proper definition of the local error. Now use that $f(t_{k+1},y(t_{k+1})) = y'(t_{k+1})$ to establish a Taylor formula. – Lutz Lehmann Apr 19 '16 at 23:08
2 Answers
Part one
Before you read further, remember this golden rule:
Compute error by expanding in Taylor series.
Unfortunately, there are two competing definitions of truncation error. Your textbook (or class) appears to use one of them. I'll address this issue later. Your textbook/class definition of $\tau_{n+1}$ is
$$h \tau_{n+1} := LHS - RHS$$
assuming that the exact solution $y$ is used. Here by $LHS$ and $RHS$, I mean the left-hand side and right-hand side of the finite-difference method. This gives you the first equation they have, which is
$$ h \tau_{n+1} = y_{n+1} - y_n - h f(t_{n+1}, y_{n+1})$$
From here, you have to decide what you want to expand in Taylor series. Because $f(t_{n+1}, y_{n+1}) = y'(t_{n+1})$, it makes sense that we should expand a Taylor series around the point $t_{n+1}$. Since $y_{n+1} = y(t_{n+1})$, there's nothing to expand around $t_{n+1}$, so it follows that we should be expanding $y_n$ around $t_{n+1}$. Then, by Taylor's theorem,
$$y(t_n) = y(t_{n+1}) + y'(t_{n+1})(t_{n} - t_{n+1}) + \frac{1}{2}y''(\xi) (t_n - t_{n+1})^2 $$
for some $\xi \in (t_n, t_{n+1})$. This simplifies to
$$y_n = y_{n+1} - h f(t_{n+1}, y_{n+1}) + \frac{h^2}{2} y''(\xi) $$
Plug this in to your expression for $\tau_{n+1}$ to obtain the result they wanted.
Part two
This is an optional part of my answer, because of a pet peeve I have. The answer I gave above assumes that the truncation error is defined in the way that you gave in your original question. However, this is not how the truncation error should be defined, in my opinion. The correct definition should be
$$ h\tau_{n+1} = y_{n+1} - \Phi(t_n, y_n),$$
where $\Phi(t_n, y_n)$ is the approximate value of $y_{n+1}$ obtained assuming we have the exact value of the true solution $y_n = y(t_n)$. For an explicit method, this definition gives the same truncation error computation as with the first definition. However, for an implicit method, the results differ, though to lowest-order the two definitions will still coincide.
Using this second (and, in my opinion, better) definition, we have
$$ h \tau_{n+1} = y_{n+1} - y_n - h f(t_{n+1}, \Phi(t_n, y_n))$$
Applying Taylor series as before to $y_n$, we obtain
$$ h \tau_{n+1} = h f(t_{n+1}, y_{n+1}) - h f(t_{n+1}, \Phi(t_n, y_n)) - \frac{h^2}{2} y''(\xi)$$
We then expand $f(t_{n+1}, \Phi(t_n, y_n))$ around the point $(t_{n+1}, y_{n+1})$, which yields
\begin{align*} h \tau_{n+1} & = f_y(t_{n+1}, \psi) (y_{n+1} - \Phi(t_n, y_n)) - \frac{h^2}{2} y''(\xi) \\ & = h^2 f_y(t_{n+1}, \psi) \tau_{n+1} - \frac{h^2}{2} y''(\xi), \end{align*}
where $\psi$ is some unknown value between $y_{n+1}$ and $\Phi(t_n, y_n)$, and $f_y$ indicates the partial derivative of $f$ with respect to the second variable. Solving for $\tau$ yields
$$ \tau_{n+1} = - \left(\frac{h}{2}\right) \frac{ y''(\xi) }{1 - h f_y(t_{n+1}, \psi)} $$
To lowest-order in $h$ this expression is still the same as the previous result for $\tau_{n+1}$ using the other definition, since we can expand the denominator via geometric series and the first terms coincide.
- 23,293
-
I believe there is a small mistake in last step where you solve for $\tau$. The $h$ should be removed from the denominator. – Jeroen Oct 20 '18 at 16:18
-
-
One aspect of your answer: the implicit Euler method is only defined (typically) when $h$ is small enough. So your second estimate seems more natural. – shuhalo May 03 '20 at 04:46
-
Another aspect of your answer, less pleasant: you essentially show that implicit Euler has a local truncation error worse than the explicit Euler method, don't you? – shuhalo May 03 '20 at 05:06
-
@shuhalo In terms of the size of the local error, I think the above answer suggests that it should depend on the sign of $f_y$; However, the above answer also implicitly assume a more stringent condition that f shall be differentiable in y, in this sense, the implicit Euler may be 'worse'. – Jake ZHANG Shiyu Sep 18 '21 at 08:19
The process should be similar to how you derive it for forward Euler, except that you might need to apply Taylor expansion twice:
\begin{align*} \tau_{n+1} & = y(t_{n+1}) - y_{n+1} \\ & = y(t_n) + hy'(t_n) + \frac{h^2}{2}y''(\xi) - (y_n + hf(t_{n+1}, y_{n+1})) \\ & = y(t_n) + hy'(t_n) + \frac{h^2}{2}y''(\xi) - (y(t_n) + hy'(t_{n+1})) \\ & = h(y'(t_n) - y'(t_{n+1})) + \frac{h^2}{2}y''(\xi) \\ & = h(y'(t_n) - (y'(t_n) + hy''(\xi))) + \frac{h^2}{2}y''(\xi) \\ & = (h^2 + \frac{h^2}{2})y''(\xi) \\ & \sim O(h^2) \end{align*}
- 1
-
1If $y(t_n)=y_n$, then almost always you have $y_{n+1}\ne y(t_{n+1})$. The midpoints of the different Taylor expansion are not the same. You should first make the exact substitutions and simplify, and postpone the Taylor expansions as long as possible. At the moment the calculation is less correct and informative than the introductory sentence. – Lutz Lehmann Jan 21 '24 at 07:55