Numerical stability: Difference between revisions
m Cleaned up using AutoEd |
|||
Line 6: | Line 6: | ||
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 very small change in the input data. |
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 very small change in the input data. |
||
An [[opposite (semantics)|opposite]] phenomenon is '''instability'''. Typically, an algorithm involves an approximate method, and in some cases one could prove that the algorithm would approach the right solution in some limit. 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.<ref>{{cite book | title=Numerical Algorithms with C | author=Giesela Engeln-Müllges, Frank Uhlig , M. Schon (Translator), F. Uhlig (Translator) | edition=1 |date=2 July 1996 | publisher=Springer | pages=10 | isbn=978- |
An [[opposite (semantics)|opposite]] phenomenon is '''instability'''. Typically, an algorithm involves an approximate method, and in some cases one could prove that the algorithm would approach the right solution in some limit. 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.<ref>{{cite book | title=Numerical Algorithms with C | author=Giesela Engeln-Müllges, Frank Uhlig , M. Schon (Translator), F. Uhlig (Translator) | edition=1 |date=2 July 1996 | publisher=Springer | pages=10 | isbn=978-3-540-60530-0 | url=https://books.google.com/books?id=HurESoDQljcC&pg=PA10#v=onepage&q&f=false}}</ref> |
||
==Stability in numerical linear algebra== |
== 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]]. |
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]]. |
||
[[ |
[[File:Forward and backward error.svg|frame|Diagram showing the '''forward error''' Δ''y'' and the '''backward error''' Δ''x'', and their relation to the exact solution map {{mvar|f}} and the numerical solution {{mvar|f}}*.]] |
||
Consider the problem to be solved by the numerical algorithm as a [[function (mathematics)|function]] {{mvar|f}} mapping the data {{mvar|x}} to the solution {{mvar|y}}. The result of the algorithm, say {{mvar|y}}*, will usually deviate from the "true" solution {{mvar|y}}. The main causes of error are [[round-off error]] and [[truncation error]]. The ''forward error'' of the algorithm is the difference between the result and the solution; in this case, {{math|1=Δ''y'' = ''y''* − ''y''}}. The ''backward error'' is the smallest Δ{{mvar|x}} such that {{math|1=''f'' (''x'' + Δ''x'') = ''y''*}}; 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. |
Consider the problem to be solved by the numerical algorithm as a [[function (mathematics)|function]] {{mvar|f}} mapping the data {{mvar|x}} to the solution {{mvar|y}}. The result of the algorithm, say {{mvar|y}}*, will usually deviate from the "true" solution {{mvar|y}}. The main causes of error are [[round-off error]] and [[truncation error]]. The ''forward error'' of the algorithm is the difference between the result and the solution; in this case, {{math|1=Δ''y'' = ''y''* − ''y''}}. The ''backward error'' is the smallest Δ{{mvar|x}} such that {{math|1=''f'' (''x'' + Δ''x'') = ''y''*}}; 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. |
||
Line 21: | Line 21: | ||
The algorithm is said to be ''backward stable'' if the backward error is small for all inputs {{mvar|x}}. 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]] bigger than, the [[unit round-off]]. |
The algorithm is said to be ''backward stable'' if the backward error is small for all inputs {{mvar|x}}. 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]] bigger than, the [[unit round-off]]. |
||
[[ |
[[File:Mixed stability diagram.svg|thumb|Mixed stability combines the concepts of forward error and backward error.]] |
||
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 Δ{{mvar|x}} such that both Δ{{mvar|x}} is small and {{math|''f'' (''x'' + Δ''x'') − ''y''*}} is small. Hence, a backward stable algorithm is always stable. |
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 Δ{{mvar|x}} such that both Δ{{mvar|x}} is small and {{math|''f'' (''x'' + Δ''x'') − ''y''*}} is small. Hence, a backward stable algorithm is always stable. |
||
Line 27: | Line 27: | ||
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. |
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== |
== 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 equation]]s, a different definition of numerical stability is used. |
The above definitions are particularly relevant in situations where truncation errors are not important. In other contexts, for instance when solving [[differential equation]]s, a different definition of numerical stability is used. |
||
In [[Numerical methods for ordinary differential equations|numerical ordinary differential equations]], various concepts of numerical stability exist, for instance [[Stiff equation#A-stability|A-stability]]. They are related to some concept of stability in the [[dynamical system]]s sense, often [[Lyapunov stability]]. It is important to use a stable method when solving a [[stiff equation]]. |
In [[Numerical methods for ordinary differential equations|numerical ordinary differential equations]], various concepts of numerical stability exist, for instance [[Stiff equation#A-stability|A-stability]]. They are related to some concept of stability in the [[dynamical system]]s sense, often [[Lyapunov stability]]. It is important to use a stable method when solving a [[stiff equation]]. |
||
Yet another definition is used in [[numerical partial differential equations]]. An algorithm for solving a linear evolutionary [[partial differential equation]] is stable if the [[total variation]] 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 and stable (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 method|finite difference |
Yet another definition is used in [[numerical partial differential equations]]. An algorithm for solving a linear evolutionary [[partial differential equation]] is stable if the [[total variation]] 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 and stable (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 method|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. |
||
==See also== |
== See also == |
||
* [[Algorithms for calculating variance]] |
* [[Algorithms for calculating variance]] |
||
* [[Stability theory]] |
* [[Stability theory]] |
||
* [[Chaos theory]] |
* [[Chaos theory]] |
||
==References== |
== References == |
||
{{reflist}} |
{{reflist}} |
||
*{{cite book|author=[[Nicholas J. Higham]]|title=Accuracy and Stability of Numerical Algorithms|publisher= Society of Industrial and Applied Mathematics|location= Philadelphia|date= 1996|isbn= 0-89871-355-2}} |
* {{cite book|author=[[Nicholas J. Higham]]|title=Accuracy and Stability of Numerical Algorithms|publisher= Society of Industrial and Applied Mathematics|location= Philadelphia|date= 1996|isbn= 0-89871-355-2}} |
||
*{{cite book|author1=Richard L. Burden |author2= J. Douglas Faires|title=Numerical Analysis|edition= 8th|publisher= Thomson Brooks/Cole|location= U.S.|date= 2005|isbn= 0-534-39200-8}} |
* {{cite book|author1=Richard L. Burden |author2= J. Douglas Faires|title=Numerical Analysis|edition= 8th|publisher= Thomson Brooks/Cole|location= U.S.|date= 2005|isbn= 0-534-39200-8}} |
||
* {{cite arxiv|eprint=1605.04339 |last1=Mesnard |first1=Olivier |title=Reproducible and replicable CFD: It's harder than you think |last2= Barba |first2=Lorena A. |class=physics.comp-ph |year=2016 }} |
* {{cite arxiv|eprint=1605.04339 |last1=Mesnard |first1=Olivier |title=Reproducible and replicable CFD: It's harder than you think |last2= Barba |first2=Lorena A. |class=physics.comp-ph |year=2016 }} |
||
{{DEFAULTSORT:Numerical Stability}} |
|||
[[Category:Numerical analysis]] |
[[Category:Numerical analysis]] |
Revision as of 17:27, 1 February 2017
This article includes a list of general references, but it lacks sufficient corresponding inline citations. (February 2012) |
In the mathematical subfield of numerical analysis, numerical stability is a generally desirable property of numerical algorithms. The precise definition of stability depends on the context. One is numerical linear algebra and the other 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. On the other hand, in numerical algorithms for differential equations the concern is the growth of round-off errors and/or initially 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 very small change in the input data.
An opposite phenomenon is instability. Typically, an algorithm involves an approximate method, and in some cases one could prove that the algorithm would approach the right solution in some limit. 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.[1]
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 f mapping the data x to the solution y. The result of the algorithm, say y*, will usually deviate from the "true" solution y. The main causes of error are round-off error and truncation error. The forward error of the algorithm is the difference between the result and the solution; in this case, Δy = y* − y. The backward error is the smallest Δx such that f (x + Δx) = y*; 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
instead of the absolute error Δx.
The algorithm is said to be backward stable if the backward error is small for all inputs x. 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 bigger than, the unit round-off.
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 Δx such that both Δx is small and f (x + Δx) − y* 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, various concepts of numerical stability exist, for instance A-stability. They are related to some concept of stability in the dynamical systems sense, often Lyapunov stability. It is important to use a stable method when solving a stiff equation.
Yet another definition is used in numerical partial differential equations. An algorithm for solving a linear evolutionary partial differential equation is stable if the total variation 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 and stable (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.
See also
References
- ^ Giesela Engeln-Müllges, Frank Uhlig , M. Schon (Translator), F. Uhlig (Translator) (2 July 1996). Numerical Algorithms with C (1 ed.). Springer. p. 10. ISBN 978-3-540-60530-0.
{{cite book}}
:|author=
has generic name (help)CS1 maint: multiple names: authors list (link)
- Nicholas J. Higham (1996). Accuracy and Stability of Numerical Algorithms. Philadelphia: Society of Industrial and Applied Mathematics. ISBN 0-89871-355-2.
- Richard L. Burden; J. Douglas Faires (2005). Numerical Analysis (8th ed.). U.S.: Thomson Brooks/Cole. ISBN 0-534-39200-8.
- Mesnard, Olivier; Barba, Lorena A. (2016). "Reproducible and replicable CFD: It's harder than you think". arXiv:1605.04339 [physics.comp-ph].