Scientific Computing

This module illustrates predictor-corrector methods for numerically solving initial value problems for ordinary differential equations. A numerical method for an ordinary differential equation (ODE) generates an approximate solution step-by-step in discrete increments across the interval of integration, in effect producing a discrete sample of approximate values of the solution function. In each step of a predictor-corrector method, an explicit method (the predictor) supplies an initial guess for the next solution value. A more stable and accurate implicit method (the corrector) is then used to improve the initial guess, solving the implicit equation by functional iteration. In practice the corrector is commonly applied a fixed number of times, often only once (PECE), but the full stability and accuracy of the implicit method are realized only if the corrector is iterated to convergence. The predictors and correctors used in this module are linear multistep Adams-Bashforth and Adams-Moulton methods, respectively, which use approximate solution values at multiple previous steps to compute the approximate solution value at the next step.

The user begins by selecting a differential equation and a specific
predictor-corrector pair from the menus provided. A solution value for
the selected ODE at an initial time is marked with a black dot, and the
exact solution curve for the resulting initial value problem is drawn
in black. Next the user selects the total number of steps to be taken
over the interval of integration. All but the first-order methods used
in this module require multiple previous solution values, so some other
method (e.g., a single-step method) must be used to generate
sufficiently many solution values for a multistep method to become
applicable. Here, clicking *Initial Step* generates these
starting values one at a time using a Runge-Kutta method of the same
order as the selected multistep pair. Results of each such step are
drawn in the graph and recorded in the table below. When sufficiently
many starting values have been generated, *Initial Step* is
disabled and the selected multistep predictor-corrector pair becomes
available.

After completing any necessary initialization, the user advances the
solution through the successive remaining steps using the selected
predictor-corrector pair. Each step is presented as a three-stage
process. Each stage is executed by clicking either *Next* or the
currently highlighted stage:

*Predict*uses the predictor to supply an initial guess for the next solution value, which is drawn on the graph as a red dot.*Correct*allows the user to apply the corrector by clicking*Iterate*one or more times, and the approximate solution value indicated by the red dot moves accordingly. The residual (i.e., the difference between the right and left sides of the implicit equation) is printed as a measure of convergence. After performing the desired number of iterations, the user clicks*Correct*or*Next*, which changes the color of the new solution value from red to black, indicating that its location is now fixed.- The current step is concluded by clicking
*Take Step*or*Next*. The approximate and true solution values at the new point are recorded in the table below, and the exact solution to the ODE passing through the new point is drawn in gray.

**Reference:** Michael T. Heath, *Scientific Computing,
An Introductory Survey*, 2nd edition, McGraw-Hill, New York,
2002. See Section 9.3.8, especially Example 9.14 and Table 9.1.

**Developers:** Evan VanderZee and Michael Heath