MATH/APPM 4650
Class notes, March 30

Implicit methods

All of the methods we have studied so far are based on the formula
We just have various ways of approximating the integral.
All of these methods have one thing in common: they use previously known values to compute new values, and approximate anything they don't know.

What if we don't approximate? In the simplest case, what if instead of a left-hand sum (which gives the usual forward Euler method), we use the right-hand sum?

The estimate for the integral is then
y(t+h) ≈ y(t) + h f(t+h, y(t + h)).
In principle we can always solve this for y(t + h), although if f is complicated, this may be difficult.

This is called the implicit Euler method, or the backward Euler method: in our usual notation, it would be
wi+1 = wi + h f(ti+1, wi+1).

For example, if the differential equation is
y' = C y
then the (forward) Euler method for a step size h would be
wi+1 = wi + h C wi = (1+hC) wi,
while the backward Euler method for h would be
wi+1 = wi + h C wi+1,
which we would then solve to get
wi+1 = 1/(1-hC) wi.


Why would anyone do this?

There are some equations where the coefficients are very large, and in that case the equation may do very weird things if h is not really small.

Example:
If C = -10 and h = 0.2, then the forward Euler method gives
wi+1 = -wi,
while the backward Euler method gives
wi+1 = wi/3,
The actual solution decays exponentially to zero, no matter what the initial condition. But the forward Euler method oscillates back and forth between the initial value and its negative (so it doesn't look anything like the actual solution), while the backward Euler method decays to zero.

To be fair, if C had been +10 instead of -10, forward Euler would look a lot better and backward Euler would look weird.

Generally one has to customize methods based on the particular equation one has; if it acts weird with one method, try another.

You can get other implicit methods using other formulas. For example if you use the trapezoid rule, you'll get a second-order method (the one-step Adams-Moulton method, also called the trapezoid method).
wi+1 = wi + h/2 [f(ti, wi) + f(ti+1, wi+1)].

Important quirk: The Adams-Moulton method is called one-step because once you solve for wi+1, that quantity only depends on wi. However, it's based on the trapezoid rule, which makes it a second-order method. In general an Adams-Moulton method of n steps has local truncation error of order n+1. You get a better error term ''for free.'' In reality it's not free; the price is of course solving that usually difficult equation.

Higher-order Adams-Moulton methods (the book only lists them starting with the two-step) involve both wi+1 and also wi-1 and possibly earlier terms. So they incorporate aspects of both Adams-Bashforth and the implicit Euler method.
For example, the two-step Adams-Moulton method looks like
wi+1 = wi + h/12 [-f(ti-1, wi-1 + 8f(ti, wi) + 5f(ti+1, wi+1)].
It is third-order. Again we get extra accuracy because we pay for it by solving a possibly difficult equation.