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.
Contents
- Motivating example
- Stiffness ratio
- Characterization of stiffness
- Etymology
- A stability
- RungeKutta methods
- Example The Euler methods
- Example Trapezoidal method
- General theory
- Multistep methods
- Example The second order AdamsBashforth method
- References
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. Sometimes the step size is forced down to an unacceptably small level in a region where the solution curve is very smooth. The phenomenon being exhibited here is known as stiffness. In some cases we may have two different problems with the same solution, yet problem one is not stiff and problem two is stiff. Clearly the phenomenon cannot 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. It is thus appropriate to speak of stiff systems.
Motivating example
Consider the initial value problem
The exact solution (shown in cyan) is
We seek a numerical solution that exhibits the same behavior.
The figure (right) illustrates the numerical issues for various numerical integrators applied on the equation.
One of the most prominent examples of the stiff ODEs is a system that describes the chemical reaction of Robertson:
If one treats this system on a short interval, for example,
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
where the κt are arbitrary constants and
which implies that each of the terms
so that
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 steplength 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.
There are other characteristics which are exhibited by many examples of stiff problems, but for each there are counterexamples, so these characteristics do not make good definitions of stiffness. Nonetheless, definitions based upon these characteristics are in common use by some authors and are good clues as to the presence of stiffness. Lambert refers to these as 'statements' rather than definitions, for the aforementioned reasons. A few of these are:
- A linear constant coefficient system is stiff if all of its eigenvalues have negative real part and the stiffness ratio is large.
- Stiffness occurs when stability requirements, rather than those of accuracy, constrain the steplength.
- Stiffness occurs when some components of the solution decay much more rapidly than others.
Etymology
The origin of the term 'stiffness' seems to be somewhat of a mystery. According to Joseph Oakland Hirschfelder, the term 'stiff' is used because such systems correspond to tight coupling between the driver and driven in servomechanisms. According to Richard. L. Burden and J. Douglas Faires,
Significant difficulties can occur when standard numerical techniques are applied to approximate the solution of a differential equation when the exact solution contains terms of the form eλt, where λ is a complex number with negative real part.
...
stiffsystemsFor example, the initial value problem
with m = 1, c = 1001, k = 1000, can be written in the form (5) with n = 2 and
and has eigenvalues
which is fairly large. System (10) then certainly satisfies statements 1 and 3. Here the spring constant k is large and the damping constant c is even larger. (Note that 'large' is a vague, subjective term, but the larger the above quantities are, the more pronounced will be the effect of stiffness.) The exact solution to (10) is
Note that (15) behaves quite nearly as a simple exponential x0e−t, but the presence of the e−1000t term, even with a small coefficient is enough to make the numerical computation very sensitive to step size. Stable integration of (10) requires a very small step size until well into the smooth part of the solution curve, resulting in an error much smaller than required for accuracy. Thus the system also satisfies statement 2 and Lambert's definition.
A-stability
The behaviour of numerical methods on stiff problems can be analyzed by applying these methods to the test equation y' = ky subject to the initial condition y(0) = 1 with
Runge–Kutta methods
Runge–Kutta methods applied to the test equation
Example: The Euler methods
Consider the Euler methods above. The explicit Euler method applied to the test equation
Hence,
The motivating example had
Example: Trapezoidal method
Consider the trapezoidal method
when applied to the test equation
Solving for
Thus, the stability function is
and the region of absolute stability is
This region contains the left-half plane, so the trapezoidal method is A-stable. In fact, the stability region is identical to the left-half plane, and thus the numerical solution of
General theory
The stability function of a Runge–Kutta method with coefficients
where
Explicit Runge–Kutta methods have a strictly lower triangular coefficient matrix
The stability function of implicit Runge–Kutta methods is often analyzed using order stars. The order star for a method with stability function
Multistep methods
Linear multistep methods have the form
Applied to the test equation, they become
which can be simplified to
where z = hk. This is a linear recurrence relation. The method is A-stable if all solutions {yn} of the recurrence relation converge to zero when Re z < 0. The characteristic polynomial is
All solutions converge to zero for a given value of z if all solutions w of Φ(z,w) = 0 lie in the unit circle.
The region of absolute stability for a multistep method of the above form is then the set of all
Example: The second-order Adams–Bashforth method
Let us determine the region of absolute stability for the two-step Adams–Bashforth method
The characteristic polynomial is
which has roots
thus the region of absolute stability is
This region is shown on the right. It does not include all the left half-plane (in fact it only includes the real axis between z = −1 and z = 0) so the Adams–Bashforth method is not A-stable.
General theory
Explicit multistep methods can never be A-stable, just like explicit Runge–Kutta methods. Implicit multistep methods can only be A-stable if their order is at most 2. The latter result is known as the second Dahlquist barrier; it restricts the usefulness of linear multistep methods for stiff equations. An example of a second-order A-stable method is the trapezoidal rule mentioned above, which can also be considered as a linear multistep method.