numerical stability
   HOME

TheInfoList



OR:

In the
mathematical Mathematics is a field of study that discovers and organizes methods, Mathematical theory, theories and theorems that are developed and Mathematical proof, proved for the needs of empirical sciences and mathematics itself. There are many ar ...
subfield of
numerical analysis Numerical analysis is the study of algorithms that use numerical approximation (as opposed to symbolic computation, symbolic manipulations) for the problems of mathematical analysis (as distinguished from discrete mathematics). It is the study of ...
, numerical stability is a generally desirable property of
numerical algorithm Numerical analysis is the study of algorithms that use numerical approximation (as opposed to symbolic manipulations) for the problems of mathematical analysis (as distinguished from discrete mathematics). It is the study of numerical methods t ...
s. The precise definition of stability depends on the context: one important context is numerical linear algebra, and another is algorithms for solving ordinary and partial differential equations by discrete approximation. In numerical linear algebra, the principal concern is instabilities caused by proximity to singularities of various kinds, such as very small or nearly colliding
eigenvalues In linear algebra, an eigenvector ( ) or characteristic vector is a vector that has its direction unchanged (or reversed) by a given linear transformation. More precisely, an eigenvector \mathbf v of a linear transformation T is scaled by a ...
. On the other hand, in numerical algorithms for differential equations the concern is the growth of round-off errors and/or small fluctuations in initial data which might cause a large deviation of final answer from the exact solution. Some numerical algorithms may damp out the small fluctuations (errors) in the input data; others might magnify such errors. Calculations that can be proven not to magnify approximation errors are called ''numerically stable''. One of the common tasks of numerical analysis is to try to select algorithms which are ''robust'' – that is to say, do not produce a wildly different result for a very small change in the input data. An opposite phenomenon is instability. Typically, an algorithm involves an approximative method, and in some cases one could prove that the algorithm would approach the right solution in some limit (when using actual real numbers, not floating point numbers). Even in this case, there is no guarantee that it would converge to the correct solution, because the floating-point round-off or truncation errors can be magnified, instead of damped, causing the deviation from the exact solution to grow exponentially.


Stability in numerical linear algebra

There are different ways to formalize the concept of stability. The following definitions of forward, backward, and mixed stability are often used in numerical linear algebra. Consider the problem to be solved by the numerical algorithm as a function  mapping the data  to the solution . The result of the algorithm, say *, will usually deviate from the "true" solution . The main causes of error are
round-off error In computing, a roundoff error, also called rounding error, is the difference between the result produced by a given algorithm using exact arithmetic and the result produced by the same algorithm using finite-precision, rounded arithmetic. Roun ...
and truncation error. The ''forward error'' of the algorithm is the difference between the result and the solution; in this case, . The ''backward error'' is the smallest such that ; in other words, the backward error tells us what problem the algorithm actually solved. The forward and backward error are related by the condition number: the forward error is at most as big in magnitude as the condition number multiplied by the magnitude of the backward error. In many cases, it is more natural to consider the relative error \frac instead of the absolute error . The algorithm is said to be ''backward stable'' if the backward error is small for all inputs . Of course, "small" is a relative term and its definition will depend on the context. Often, we want the error to be of the same order as, or perhaps only a few
orders of magnitude In a ratio scale based on powers of ten, the order of magnitude is a measure of the nearness of two figures. Two numbers are "within an order of magnitude" of each other if their ratio is between 1/10 and 10. In other words, the two numbers are wi ...
bigger than, the
unit round-off Machine epsilon or machine precision is an upper bound on the relative approximation error due to rounding in floating point number systems. This value characterizes computer arithmetic in the field of numerical analysis, and by extension in the ...
. The usual definition of numerical stability uses a more general concept, called ''mixed stability'', which combines the forward error and the backward error. An algorithm is stable in this sense if it solves a nearby problem approximately, i.e., if there exists a such that both is small and is small. Hence, a backward stable algorithm is always stable. An algorithm is ''forward stable'' if its forward error divided by the condition number of the problem is small. This means that an algorithm is forward stable if it has a forward error of magnitude similar to some backward stable algorithm.


Stability in numerical differential equations

The above definitions are particularly relevant in situations where truncation errors are not important. In other contexts, for instance when solving differential equations, a different definition of numerical stability is used. In
numerical ordinary differential equations Numerical methods for ordinary differential equations are methods used to find Numerical analysis, numerical approximations to the solutions of ordinary differential equations (ODEs). Their use is also known as "numerical integration", although ...
, various concepts of numerical stability exist, for instance A-stability. They are related to some concept of stability in the
dynamical system In mathematics, a dynamical system is a system in which a Function (mathematics), function describes the time dependence of a Point (geometry), point in an ambient space, such as in a parametric curve. Examples include the mathematical models ...
s sense, often Lyapunov stability. It is important to use a stable method when solving a
stiff equation 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 ...
. Yet another definition is used in numerical partial differential equations. An algorithm for solving a linear evolutionary
partial differential equation In mathematics, a partial differential equation (PDE) is an equation which involves a multivariable function and one or more of its partial derivatives. The function is often thought of as an "unknown" that solves the equation, similar to ho ...
is stable if the
total variation In mathematics, the total variation identifies several slightly different concepts, related to the (local property, local or global) structure of the codomain of a Function (mathematics), function or a measure (mathematics), measure. For a real ...
of the numerical solution at a fixed time remains bounded as the step size goes to zero. The Lax equivalence theorem states that an algorithm converges if it is
consistent In deductive logic, a consistent theory is one that does not lead to a logical contradiction. A theory T is consistent if there is no formula \varphi such that both \varphi and its negation \lnot\varphi are elements of the set of consequences ...
and
stable A stable is a building in which working animals are kept, especially horses or oxen. The building is usually divided into stalls, and may include storage for equipment and feed. Styles There are many different types of stables in use tod ...
(in this sense). Stability is sometimes achieved by including numerical diffusion. Numerical diffusion is a mathematical term which ensures that roundoff and other errors in the calculation get spread out and do not add up to cause the calculation to "blow up". Von Neumann stability analysis is a commonly used procedure for the stability analysis of finite difference schemes as applied to linear partial differential equations. These results do not hold for nonlinear PDEs, where a general, consistent definition of stability is complicated by many properties absent in linear equations.


Example

Computing the square root of 2 (which is roughly 1.41421) is a well-posed problem. Many algorithms solve this problem by starting with an initial approximation ''x''0 to \sqrt, for instance ''x''0 = 1.4, and then computing improved guesses ''x''1, ''x''2, etc. One such method is the famous Babylonian method, which is given by ''x''''k''+1 = (''xk''+ 2/''xk'')/2. Another method, called "method X", is given by ''x''''k''+1 = (''x''''k''2 − 2)2 + ''x''''k''. A few iterations of each scheme are calculated in table form below, with initial guesses ''x''0 = 1.4 and ''x''0 = 1.42. Observe that the Babylonian method converges quickly regardless of the initial guess, whereas Method X converges extremely slowly with initial guess ''x''0 = 1.4 and diverges for initial guess ''x''0 = 1.42. Hence, the Babylonian method is numerically stable, while Method X is numerically unstable. Numerical stability is affected by the number of the significant digits the machine keeps. If a machine is used that keeps only the four most significant decimal digits, a good example on loss of significance can be given by the two equivalent functions : f(x)=x\left(\sqrt-\sqrt\right) and g(x)=\frac. :Comparing the results of :: f(500)=500 \left(\sqrt-\sqrt \right)=500 \left(22.38-22.36 \right)=500(0.02)=10 :and : \beging(500)&=\frac\\ &=\frac\\ &=\frac=11.17 \end by comparing the two results above, it is clear that loss of significance (caused here by catastrophic cancellation from subtracting approximations to the nearby numbers \sqrt and \sqrt, despite the subtraction being computed exactly) has a huge effect on the results, even though both functions are equivalent, as shown below : \begin f(x)&=x \left(\sqrt-\sqrt \right)\\ &=x \left(\sqrt-\sqrt \right)\frac\\ &=x\frac\\ &=x\frac \\ &=x\frac \\ &=\frac \\ &=g(x) \end The desired value, computed using infinite precision, is 11.174755...


See also

* Algorithms for calculating variance *
Stability theory In mathematics, stability theory addresses the stability of solutions of differential equations and of trajectories of dynamical systems under small perturbations of initial conditions. The heat equation, for example, is a stable partial differ ...
*
Chaos theory Chaos theory is an interdisciplinary area of Scientific method, scientific study and branch of mathematics. It focuses on underlying patterns and Deterministic system, deterministic Scientific law, laws of dynamical systems that are highly sens ...
* Propagation of uncertainty


Notes


References

* * * {{Linear algebra Numerical analysis