# Stiff ODEs

This module compares explicit and implicit methods for solving initial value problems for stiff ordinary differential equations. An ordinary differential equation (ODE) whose solutions decay rapidly towards a common, slowly-varying solution is said to be stiff. Explicit methods are generally inefficient for solving stiff ODEs because their stability region is relatively small, which forces the step size to be much smaller than that required to achieve the desired accuracy. Implicit methods require more work per step, but their significantly larger stability regions permit much larger steps to be taken, so they are often much more efficient than explicit methods of comparable accuracy for solving stiff ODEs. This module illustrates the behavior of the explicit Euler's method and the implicit Backward Euler method in solving stiff ODEs.

The user begins by selecting an ODE from the menu provided. For each ODE, a choice among several initial values is offered. At the initial time, the chosen initial solution value for the selected ODE is marked with a black dot, and the exact solution curve for the resulting initial value problem is drawn in black. The user chooses whether to use the explicit Euler's method or the implicit Backward Euler method to solve the initial value problem.

Starting from the initial value, the user advances the solution through successive steps using the selected method. Each step of the method is presented as a three- or four-stage process, depending on the method. Each stage is executed by clicking either Next or the currently highlighted stage. The stages are the same as those described in the Euler and Backward Euler modules, except that for Backward Euler the implicit equation is automatically solved to convergence rather than iteration-by-iteration under user control. Appropriately for stiff ODEs, the implicit equation is solved using Newton's method with the current value of the approximate solution as starting guess.

The instability of the explicit Euler's method and the strongly contrasting robustness of the implicit Backward Euler method are readily apparent for these stiff ODEs. For solution values that differ even slightly from the slowly-varying solution, subsequent steps generated by the explicit Euler method diverge wildly due to the large derivative values that result from the rapidly decaying transients. By contrast, the implicit Backward Euler method, which uses the derivative value at the target point of each step, homes in on the slowly-varying solution even when started from far away. To retain stability, the explicit Euler method would require much smaller steps, whereas the Backward Euler method remains stable for arbitrarily large step size.

Reference: Michael T. Heath, Scientific Computing, An Introductory Survey, 2nd edition, McGraw-Hill, New York, 2002. See Section 9.3.4, especially Example 9.10 and Figures 9.9 and 9.10.

Developers: Evan VanderZee and Michael Heath