Stiff equation

From KYNNpedia

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.

Motivating example

Explicit numerical methods exhibiting instability when integrating a stiff ordinary differential equation

Consider the initial value problem

1

 

 

 

 

({{{3}}})

The exact solution (shown in cyan) is

2

 

 

 

 

({{{3}}})

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.

  1. Euler's method with a step size of <math>h = \tfrac14</math> oscillates wildly and quickly exits the range of the graph (shown in red).
  2. Euler's method with half the step size, <math>h = \tfrac18</math>, produces a solution within the graph boundaries, but oscillates about zero (shown in green).
  3. The trapezoidal method (that is, the two-stage Adams–Moulton method) is given by
    3

     

     

     

     

    ({{{3}}})

    where <math>y'=f(t,y)</math>. Applying this method instead of Euler's method gives a much better result (blue). The numerical results decrease monotonically to zero, just as the exact solution does.

One of the most prominent examples of the stiff ordinary differential equations (ODEs) is a system that describes the chemical reaction of Robertson:<ref>Robertson, H. H. (1966). "The solution of a set of reaction rate equations". Numerical analysis: an introduction. Academic Press. pp. 178–182.</ref>

4

 

 

 

 

({{{3}}})

If one treats this system on a short interval, for example, <math>t \in [0, 40]</math> 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.[citation needed] To solve them, the software packages KPP and Autochem can be used.

Stiffness ratio

Consider the linear constant coefficient inhomogeneous system

5

 

 

 

 

({{{3}}})

where <math> \mathbf y, \mathbf f \in \mathbb{R}^n </math> and <math> \mathbf A </math> is a constant, diagonalizable, <math> n \times n </math> matrix with eigenvalues <math> \lambda_t \in \mathbb{C}, t = 1, 2, \ldots , n </math> (assumed distinct) and corresponding eigenvectors <math> \mathbf c_t \in \mathbb{C}^n, t = 1, 2, \ldots , n </math>. The general solution of (5) takes the form

6

 

 

 

 

({{{3}}})

where the <math>\kappa_t</math> are arbitrary constants and <math> \mathbf g(x) </math> is a particular integral. Now let us suppose that

7

 

 

 

 

({{{3}}})

which implies that each of the terms <math> e^{\lambda_t x} \mathbf c_t \to 0 </math> as <math> x \to \infty </math>, so that the solution <math> \mathbf y(x) </math> approaches <math> \mathbf g(x) </math> asymptotically as <math> x \to \infty </math>; the term <math> e^{\lambda_t x} \mathbf c_t </math> will decay monotonically if <math>\lambda_t</math> is real and sinusoidally if <math>\lambda_t</math> is complex.

Interpreting <math>x</math> to be time (as it often is in physical problems), <math display="inline"> \sum_{t=1}^n \kappa_t e^{\lambda_t x} \mathbf c_t </math> is called the transient solution and <math> \mathbf g(x) </math> the steady-state solution. If <math> \left|\operatorname{Re}(\lambda_t)\right| </math> is large, then the corresponding term <math> \kappa_t e^{\lambda_t x} \mathbf c_t </math> will decay quickly as <math>x</math> increases and is thus called a fast transient; if <math> \left| \operatorname{Re}(\lambda_t) \right| </math> is small, the corresponding term <math> \kappa_t e^{\lambda_t x} \mathbf c_t </math> decays slowly and is called a slow transient. Let <math> \overline{\lambda}, \underline{\lambda} \in \{ \lambda_t, t = 1, 2, \ldots , n \} </math> be defined by

<math> \bigl

 

 

 

 

(\operatorname{Re}( \overline{\lambda} ) \bigr)

so that <math> \kappa_t e^{\overline{\lambda} x} \mathbf c_t </math> is the fastest transient and <math> \kappa_t e^{\underline{\lambda} x} \mathbf c_t </math> the slowest. We now define the stiffness ratio as<ref>Lambert (1992, pp. 216–217)</ref>

<math> \frac{ \bigl

 

 

 

 

(\operatorname{Re}( \overline{\lambda} ) \bigr)

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.

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:

  1. A linear constant coefficient system is stiff if all of its eigenvalues have negative real part and the stiffness ratio is large.
  2. Stiffness occurs when stability requirements, rather than those of accuracy, constrain the step length.
  3. Stiffness occurs when some components of the solution decay much more rapidly than others.<ref>Lambert (1992, pp. 217–220)</ref>

Etymology

The origin of the term "stiffness" has not been clearly established. According to Joseph Oakland Hirschfelder, the term "stiff" is used because such systems correspond to tight coupling between the driver and driven in servomechanisms.<ref>Hirshfelder (1963)</ref> 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 <math>e^{\lambda t}</math>, where <math>\lambda</math> is a complex number with negative real part.

. . .

Problems involving rapidly decaying transient solutions occur naturally in a wide variety of applications, including the study of spring and damping systems, the analysis of control systems, and problems in chemical kinetics. These are all examples of a class of problems called stiff (mathematical stiffness) systems of differential equations, due to their application in analyzing the motion of spring and mass systems having large spring constants (physical stiffness).<ref>Burden & Faires (1993, p. 314)</ref>

For example, the initial value problem

10

 

 

 

 

({{{3}}})

with <math>m = 1</math>, <math>c = 1001</math>, <math>k = 1000</math>, can be written in the form (5) with <math>n = 2</math> and

11

 

 

 

 

({{{3}}})

and has eigenvalues <math> \overline{\lambda} = -1000, \underline{\lambda} = -1 </math>. Both eigenvalues have negative real part and the stiffness ratio is

<math> \frac{

 

 

 

 

(-1000)

which is fairly large. System (10) then certainly satisfies statements 1 and 3. Here the spring constant <math>k</math> is large and the damping constant <math>c</math> is even larger.<ref>Kreyszig (1972, pp. 62–68)</ref> (while "large" is not a clearly-defined term, but the larger the above quantities are, the more pronounced will be the effect of stiffness.) The exact solution to (10) is

13

 

 

 

 

({{{3}}})

Equation 13 behaves quite similarly to a simple exponential <math>x_0 e^{-t}</math>, but the presence of the <math>e^{-1000t}</math> 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 <math>y' = ky</math> subject to the initial condition <math>y(0) = 1</math> with <math>k \in \mathbb{C}</math>. The solution of this equation is <math>y(t) = e^{kt}</math>. This solution approaches zero as <math>t\to\infty</math> when <math>\operatorname{Re}(k) < 0.</math> If the numerical method also exhibits this behaviour (for a fixed step size), then the method is said to be A-stable.<ref>This definition is due to Dahlquist (1963).</ref> A numerical method that is L-stable (see below) has the stronger property that the solution approaches zero in a single step as the step size goes to infinity. A-stable methods do not exhibit the instability problems as described in the motivating example.

Runge–Kutta methods

Runge–Kutta methods applied to the test equation <math>y' = k\cdot y</math> take the form <math>y_{n+1} = \phi(hk)\cdot y_n</math>, and, by induction, <math>y_n = \bigl(\phi(hk)\bigr)^n\cdot y_0</math>. The function <math>\phi</math> is called the stability function. Thus, the condition that <math>y_n \to 0</math> as <math>n \to \infty</math> is equivalent to <math>|\phi(hk)| < 1</math>. This motivates the definition of the region of absolute stability (sometimes referred to simply as stability region), which is the set <math>\bigl\{z \in \mathbb{C} \,\big|\,|\phi(z)|< 1 \bigr\}</math>. The method is A-stable if the region of absolute stability contains the set <math>\bigl\{ z \in \Complex \,\big|\, \operatorname{Re}(z) < 0 \bigr\}</math>, that is, the left half plane.

Example: The Euler methods

The pink disk shows the stability region for the Euler method.

Consider the Euler methods above. The explicit Euler method applied to the test equation <math>y' = k\cdot y</math> is

<math>y_{n+1} = y_n + h\cdot f(t_n, y_n) = y_n + h\cdot(ky_n) = y_n + h\cdot k\cdot y_n = (1+h\cdot k)y_n. </math>

Hence, <math>y_n = (1 + hk)^n\cdot y_0</math> with <math>\phi(z) = 1 + z</math>. The region of absolute stability for this method is thus <math>\bigl\{ z \in \mathbb{C} \,\big|\, |1+z| < 1 \bigr\}</math> which is the disk depicted on the right. The Euler method is not A-stable.

The motivating example had <math>k = -15</math>. The value of z when taking step size <math>h = \tfrac14</math> is <math>z = -15\times\tfrac14 = -3.75</math>, which is outside the stability region. Indeed, the numerical results do not converge to zero. However, with step size <math>h = \tfrac18</math>, we have <math>z = -1.875</math> which is just inside the stability region and the numerical results converge to zero, albeit rather slowly.

Example: Trapezoidal method

The pink region is the stability region for the trapezoidal method.

Consider the trapezoidal method

<math> y_{n+1} = y_n + \tfrac{1}{2}h\cdot \bigl(f(t_n,y_n)+f(t_{n+1},y_{n+1})\bigr),</math>

when applied to the test equation <math>y' = k\cdot y</math>, is

<math> y_{n+1} = y_n + \tfrac{1}{2}h\cdot \left(ky_n+ky_{n+1}\right).</math>

Solving for <math>y_{n+1}</math> yields

<math>y_{n+1}=\frac{1+\frac{1}{2}hk}{1-\frac{1}{2}hk}\cdot y_n.</math>

Thus, the stability function is

<math>\phi(z)=\frac{1+\frac12 z}{1-\frac12 z}</math>

and the region of absolute stability is

<math>\left\{ z \in \mathbb{C} \ \left|\ \left| \frac{1+\frac12 z}{1-\frac12 z} \right| < 1 \right.\right\}.</math>

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 <math>y' = k\cdot y</math> converges to zero if and only if the exact solution does. Nevertheless, the trapezoidal method does not have perfect behavior: it does damp all decaying components, but rapidly decaying components are damped only very mildly, because <math> \phi(z) \to 1 </math> as <math> z \to -\infty </math>. This led to the concept of L-stability: a method is L-stable if it is A-stable and <math> |\phi(z)| \to 0 </math> as <math> z \to \infty </math>. The trapezoidal method is A-stable but not L-stable. The implicit Euler method is an example of an L-stable method.<ref>The definition of L-stability is due to Ehle (1969).</ref>

General theory

The stability function of a Runge–Kutta method with coefficients <math>\mathbf A</math> and <math>\mathbf b</math> is given by

<math> \phi(z) = \frac{\det\left(\mathbf{I}-z\mathbf{A}+z\mathbf{e}\mathbf{b}^\mathsf{T}\right)}{\det(\mathbf{I}-z\mathbf{A})}, </math>

where <math>\mathbf e</math> denotes the vector with all ones. This is a rational function (one polynomial divided by another).

Explicit Runge–Kutta methods have a strictly lower triangular coefficient matrix <math>\mathbf A</math> and thus, their stability function is a polynomial. It follows that explicit Runge–Kutta methods cannot be A-stable.

The stability function of implicit Runge–Kutta methods is often analyzed using order stars. The order star for a method with stability function <math>\phi</math> is defined to be the set <math>\bigl\{ z \in \Complex \,\big|\, |\phi(z)| > |e^z| \bigr\}</math>. A method is A-stable if and only if its stability function has no poles in the left-hand plane and its order star contains no purely imaginary numbers.<ref>The definition is due to Wanner, Hairer & Nørsett (1978); see also Iserles & Nørsett (1991).</ref>

Multistep methods

Linear multistep methods have the form

<math>y_{n+1}=\sum_{i=0}^s a_i y_{n-i}+h\sum_{j=-1}^s b_j f\left(t_{n-j},y_{n-j}\right).</math>

Applied to the test equation, they become

<math>y_{n+1}=\sum_{i=0}^s a_i y_{n-i}+hk\sum_{j=-1}^s b_jy_{n-j},</math>

which can be simplified to

<math>\left(1-b_{-1}z\right)y_{n+1}-\sum_{j=0}^s \left(a_j+b_jz\right)y_{n-j}=0</math>

where <math>z = hk</math>. This is a linear recurrence relation. The method is A-stable if all solutions <math>\{ y_n \}</math> of the recurrence relation converge to zero when <math>\operatorname{Re}(z) < 0</math>. The characteristic polynomial is

<math>\Phi(z, w) = w^{s+1}-\sum_{i=0}^s a_iw^{s-i} - z\sum_{j=-1}^s b_jw^{s-j}.</math>

All solutions converge to zero for a given value of <math>z</math> if all solutions <math>w</math> of <math>\Phi(z,w) = 0</math> lie in the unit circle.

The region of absolute stability for a multistep method of the above form is then the set of all <math>z \in \mathbb{C}</math> for which all <math>w</math> such that <math>\Phi(z,w) = 0</math> satisfy <math>|w| < 1</math>. Again, if this set contains the left half-plane, the multi-step method is said to be A-stable.

Example: The second-order Adams–Bashforth method

The pink region is the stability region for the second-order Adams–Bashforth method.

Let us determine the region of absolute stability for the two-step Adams–Bashforth method

<math>y_{n+1} = y_n + h \left( \tfrac32 f(t_n, y_n) - \tfrac12 f(t_{n-1}, y_{n-1}) \right) .</math>

The characteristic polynomial is

<math>\Phi(w,z) = w^2 - \left(1+\tfrac32z\right)w + \tfrac12 z = 0</math>

which has roots

<math>w = \tfrac12 \left(1 + \tfrac32 z \pm\sqrt{1 + z + \tfrac94 z^2}\right), </math>

thus the region of absolute stability is

<math> \left\{ z \in \mathbb{C} \ \left| \ \left| \tfrac12 \left(1 + \tfrac32 z \pm\sqrt{1 + z + \tfrac94 z^2}\right) \right| < 1 \right.\right\}.</math>

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 <math>-1 \le z \le 0</math>) 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.<ref>See Dahlquist (1963).</ref>

See also

Notes

<references/>

References

External links


Lua error in Module:Authority_control at line 181: attempt to index field 'wikibase' (a nil value).