In mathematics, a stiff equation is a differential equation for which certain numerical methods for solving the equation are numerically unstable, unless the step size is taken to be extremely small. It has proven difficult to formulate a precise definition of stiffness, but the main idea is that the equation includes some terms that can lead to rapid variation in the solution.

When integrating a differential equation numerically, one would expect the requisite step size to be relatively small in a region where the solution curve displays much variation and to be relatively large where the solution curve straightens out to approach a line with slope nearly zero. For some problems this is not the case. In order for a numerical method to give a reliable solution to the differential system sometimes the step size is required to be at an unacceptably small level in a region where the solution curve is very smooth. The phenomenon is known as stiffness. In some cases there may be two different problems with the same solution, yet one is not stiff and the other is. The phenomenon cannot therefore be a property of the exact solution, since this is the same for both problems, and must be a property of the differential system itself. Such systems are thus known as stiff systems.

Stiff equation

Motivating example

Consider the initial value problem

The exact solution (shown in cyan) is

We seek a numerical solution that exhibits the same behavior.

Stiff equation

The figure (right) illustrates the numerical issues for various numerical integrators applied on the equation.

Stiff equation

One of the most prominent examples of the stiff ordinary differential equations (ODEs) is a system that describes the chemical reaction of Robertson:

If one treats this system on a short interval, for example, there is no problem in numerical integration. However, if the interval is very large (1011 say), then many standard codes fail to integrate it correctly.

Additional examples are the sets of ODEs resulting from the temporal integration of large chemical reaction mechanisms. Here, the stiffness arises from the coexistence of very slow and very fast reactions. To solve them, the software packages KPP and Autochem can be used.

Stiffness ratio

Consider the linear constant coefficient inhomogeneous system

where and is a constant, diagonalizable, matrix with eigenvalues (assumed distinct) and corresponding eigenvectors . The general solution of () takes the form

where the are arbitrary constants and is a particular integral. Now let us suppose that

which implies that each of the terms

as , so that the solution

approaches asymptotically as ; the term will decay monotonically if is real and sinusoidally if is complex.

Interpreting to be time (as it often is in physical problems), is called the transient solution and the steady-state solution. If is large, then the corresponding term will decay quickly as increases and is thus called a fast transient; if is small, the corresponding term decays slowly and is called a slow transient. Let be defined by

so that is the fastest transient and the slowest. We now define the stiffness ratio as

Characterization of stiffness

In this section we consider various aspects of the phenomenon of stiffness. "Phenomenon" is probably a more appropriate word than "property", since the latter rather implies that stiffness can be defined in precise mathematical terms; it turns out not to be possible to do this in a satisfactory manner, even for the restricted class of linear constant coefficient systems. We shall also see several qualitative statements that can be (and mostly have been) made in an attempt to encapsulate the notion of stiffness, and state what is probably the most satisfactory of these as a "definition" of stiffness.

J. D. Lambert defines stiffness as follows:

If a numerical method with a finite region of absolute stability, applied to a system with any initial conditions, is forced to use in a certain interval of integration a step length which is excessively small in relation to the smoothness of the exact solution in that interval, then the system is said to be stiff in that interval.