1 Predictor-corrector methods
We have seen that when using an implicit linear multistep method there is an additional difficulty because we cannot, in general, solve simply for the newest approximate -value . A general -step implicit method involves, at the time step,
and if depends on in a complicated way then it is not obvious how to dig out of .
One solution to this problem would be to only ever use explicit methods in which . But this is not a good solution, for implicit methods generally have better properties than the explicit ones (for example, the implicit trapezium is second order while the explicit Euler is only first order).
Another solution involves a so-called predictor-corrector method. This involves
- The predictor step. We use an explicit method to obtain an approximation to .
- The corrector step. We use an implicit method, but with the predicted value on the right-hand side in the evaluation of . We use to denote this approximate (predicted) value of .
- We can then go on to correct again and again. At each step we put the latest approximation to in the right-hand side of the scheme ( via ) to generate a new approximation from the left-hand side.
(This is not unlike an implementation of Newton-Raphson. In that method we require an initial guess (we “predict") and then the Newton-Raphson approach tells us how to iterate (or “correct") our latest approximation. The main difference here is that we have a systematic way of obtaining the initial prediction.)
It is sufficient for our purposes to illustrate the idea of a predictor-corrector method using the simplest possible pair of methods. We use Euler’s method to predict and the trapezium method to correct.
Example 12
Suppose that is the solution to the initial value problem
Use Euler’s method and the trapezium method as a predictor-corrector pair (with one correction at each time step). Take the time step to be so as to obtain approximations to and .
Solution
Euler’s method, , is the explicit method so we use that to predict . For the first time step we require and therefore
We now use this predicted value of to obtain a “predicted" value for which we can use in the implicit trapezium method. We find . We now correct using the trapezium method in the form
This completes prediction and one correction for the first time step.
For the second time step we require and therefore
which is the predicted value for . We now correct it with
We conclude that
If correction is repeated until the corrected values settle down to a converged number then the approximation inherits all the (nice) properties of the implicit scheme. So, in the example above we would have second order accurate results obtained by a procedure which gets around the implicit nature of the trapezium method. Of course in the hand-calculations done above we only corrected once, rather than repeatedly to convergence.
The example above is such that the dependence of on is very simple and we could use the approach seen in Section 32.1 to implement the trapezium method. It turns out that the true trapezium method approximations to and are and respectively, to 6 decimal places. The predictor-corrector method will produce these values if enough corrections are taken.
As noted in the last paragraph, the example above was one in which it is possible to get around the implicit nature of the trapezium method easily because of the simple way in which the right-hand side of the differential equation depends on . This is not true of the next example.
Example 13
Suppose that is the solution to the initial value problem
Use Euler’s method and the trapezium method as a predictor-corrector pair (with one correction at each time step). Take the time step to be so as to obtain approximations to and .
Solution
Euler’s method, , is the explicit method so we use that to predict. For the first time step we require and therefore
We now use this predicted value to obtain a “predicted" value for which we can use in the implicit trapezium method. We find . We now correct using the trapezium method in the form
This completes prediction and one correction for the first time step.
For the second time step we require and therefore
which is the predicted value for . We now correct it with
We conclude that
Task!
Suppose that is the solution to the initial value problem
Use Euler’s method and the trapezium method as a predictor-corrector pair (with one correction at each time step). Take the time step to be so as to obtain approximations to and .
Euler’s method, , is the explicit method so we use that to predict. For the first time step we require and therefore We now use this predicted value to obtain a “predicted" value for which we can use in the implicit trapezium method. We find . We now correct using the trapezium method in the form which completes the prediction and one correction for the first time step.
For the second time step we require and therefore
which is the predicted value for . We now correct it with
We conclude that to six decimal places.
Exercise
Suppose that is the solution to the initial value problem
Use Euler’s method and the trapezium method as a predictor-corrector pair (with one correction at each time step). Take the time step to be so as to obtain approximations to and .
Euler’s method, , is the explicit method so we use that to predict. For the first time step we require and therefore
We now use this predicted value to obtain a “predicted" value for which we can use in the implicit trapezium method. We find . We now correct using the trapezium method in the form
This completes prediction and one correction for the first time step.
For the second time step we require and therefore
which is the predicted value for . We now correct it with
We conclude that to six decimal places.