Numerical analysis is that branch of applied mathematics which studies the methods and algorithms to find (approximate) numerical solutions to various mathematical problems, using a finite sequence of arithmetic and logical operations. Most solutions of numerical problems build on the theory of linear algebra.
A good method possesses the following three characteristics:
- Accuracy - the numerical approximation should be as accurate as possible. This requires the algorithm to be numerically stable, as explained in the next section.
- Robustness - the algorithm should solve many problems well. This means that it should warn the user, if the result is inaccurate. Hence it should be possible to estimate the error.
- Speed - the faster the computation, the better is the method.
Often you will hit tradeoffs between these characteristics. For instance, it usually happens that one method is faster, while the other is more accurate. This means that no algorithm is the best in all cases.
While numerical analysis employs mathematical axioms, theorems and proofs in theory, it may use empirical results of computation runs to probe new methods and analyze problems. It has thus a unique character when compared to other mathematical sciences.
Conditioning and stability
A well-conditioned mathematical problem is, roughly speaking, one whose solution changes by only a small amount if the problem data are changed by a small amount. The analogous concept for the numerical algorithm for solving the problem is that of numerical stability: an algorithm for solving a well-conditioned problem is numerically stable if the result of the algorithm changes only a small amount if the data change a little. This means that any error committed in the early stages will not grow in an uncontrolled manner.
An algorithm that solves a well-conditioned problem may or may not be numerically stable. An art of numerical analysis is to find a stable algorithm for solving a mathematical problem.
The study of the generation and propagation of round-off errors in the cause of a computation is an important part of numerical analysis. Subtraction of two nearly equal numbers is an ill-conditioned operation, producing catastrophic loss of significance.
Computers as tools for numerical analysis
Computers are an essential tool in numerical analysis, but the field predates computers by many centuries, and actually computers were invented to a large extent in order to solve numerical problems, not the other way around. Taylor approximation is a product of the seventeenth and eighteenth centuries that is still very important. The logarithms of the sixteenth century are no longer vital to numerical analysis, but the associated and even prehistoric notion of interpolation continues to solve problems for us.
Floating point number representations are used extensively in modern computers: for many problems, their behavior can be unexpected, unless care is taken using numerical analysis to ensure that they will not misbehave.
If a computer is to execute some numerical method, this method has to be implemented in some way. The Netlib repository contains various collections of software routines for numerical problems. Commercial products implementing many different numerical algorithms include the IMSL and NAG libraries; a free alternative is the GNU Scientific Library. A different approach is taken by the Numerical Recipes library, where emphasis is placed on clear understanding of algorithms.
There are a number of computer programs used for performing numerical calculations:
- MATLAB is a widely-used program for performing numerical calculations. It comes with its own programming language, in which numerical algorithms can be implemented.
- GNU Octave is a free near-clone of Matlab.
- R is a widely used system with a focus on data manipulation and statistics. Several hundred freely downloadable specialized packages are available.
- IDL programming language.
Areas of study
Computing values of functions
One of the simplest problems is the evaluation of a function at a given point. But even evaluating a polynomial is not straightforward: the Horner scheme is often more efficient than the obvious method. Generally, it is important to estimate and control round-off errors arising from the use of floating point arithmetic.
Interpolation, extrapolation and regression
Interpolation solves the following problem: given the value of some unknown function at a number of points, what value does that function have at some other point between the given points? A very simple method is to use linear interpolation, which assumes that the unknown function is linear between every pair of successive points. This can be generalized to polynomial interpolation, which is sometimes more accurate but suffers from Runge's phenomenon. Other interpolation methods use localized functions like splines or wavelets.
Extrapolation is very similar to interpolation, except that now we want to find the value of the unknown function at a point which is outside the given points.
Regression is also similar, but it takes into account that the data is imprecise. Given some points, and a measurement of the value of some function at these points (with an error), we want to determine the unknown function. The least squares-method is one popular way to achieve this.
Another fundamental problem is computing the solution of some given equation. Two cases are commonly distinguished, depending on whether the equation is linear or not.
Much effort has been put in the development of methods for solving systems of linear equations. Standard methods are Gauss-Jordan elimination and LU-factorization. Iterative methods such as the conjugate gradient method are usually preferred for large systems.
Root-finding algorithms are used to solve nonlinear equations (they are so named since a root of a function is an argument for which the function yields zero). If the function is differentiable and the derivative is known, then Newton's method is a popular choice. Linearization is another technique for solving nonlinear equations.
Main article: Optimization (mathematics).
Optimization problems ask for the point at which a given function is maximized (or minimized). Often, the point also has to satisfy some constraints.
The field of optimization is further split in several subfields, depending on the form of the objective function and the constraint. For instance, linear programming deals with the case that both the objective function and the constraints are linear. A famous method in linear programming is the simplex method.
The method of Lagrange multipliers can be used to reduce optimization problems with constraints to an unconstrained optimization problems.
Main article: Numerical integration.
Numerical integration, also known as numerical quadrature, asks for the value of a definite integral. Popular methods use some Newton-Cotes formula, for instance the midpoint rule or the trapezoid rule, or Gaussian quadrature. However, if the dimension of the integration domain becomes large, these methods become prohibitively expansive. In this situation, one may use a Monte Carlo method.
Main articles: Numerical ordinary differential equations, Numerical partial differential equations .
Partial differential equations are solved by first discretizing the equation, bringing it into a finite-dimensional subspace. This can be done by a finite element method, a finite difference method, or (particularly in engineering) a finite volume method. The theoretical justification of these methods often involves theorems from functional analysis. This reduces the problem to the solution of an algebraic equation.
Before modern computers were widely available, numerical analysis was done primarily by hand computation. Eventually large books were produced with formulas and tables of data such as interpolation points and function coeficients. Using these tables, often calculated out to 16 decimal places or more for some functions, one could look up values to plug into the formulas given and achieve very good numerical estimates of some functions. The canonical work in the field is the NIST publication edited by Abramowitz and Stegun, an 1000 plus page book of a very large number of commonly used formulas and functions and their values at many points. The function values are no longer very useful when a computer is available, but the large listing of formulas can still be very handy. The book is out of print, but is available in scanned form, with a link provided below.
- Numerical analysis DMOZ category
- Numerical Recipes Homepage - with free, complete downloadable books
- Abramowitz and Stegun book in online, scanned form