Astrophysics (Index) | About |
Numerical methods are methods making use of equations to calculate quantities, not by solving for those values so as to carry out the equation's specified arithmetic, but by devising a way to get closer and closer to the answer by repeating some arithmetic. Essentially, you devise a different set of equations that are solvable, and which through repeated use, bring you closer to the original equation's answer. This can be useful or vital if algebraically solving the original equation is difficult or impossible. The term brute force is often applicable: it essentially means using a lot of arithmetic rather than using some method to avoid it.
Calculating a square root offers a straightforward example: guess an answer, square it, and adjust your guess up or down as the resulting square indicates. Systematic methods of adjustment can be devised, e.g., if one trial was too big and another too small, use their mean as your next guess. Hitting an exact answer may require luck, but mere persistence gets you as close as you need.
Another class of numerical method, termed numerical integration, is of use if you have no straightforward formula for some function but do have such a formula for the function's slope, and have at least one point, i.e., a number and the functional value associated with that number. Given that first value and the formula for the slope, the strategy is to use them to estimate the value of a nearby point (the functional value of a number near the original one), then repeating the process to map out values of the function over an interval of interest. The slope is calculated repeatedly, each time a small step further, and if you choose to do it with a smaller step size (leading to more calculation), your estimate is better, or rather, the whole procedure is only practical if the function has this property.
In contrast to numerical methods, solving equations algebraically for the quantities you need is called solving analytically, or using analytical methods. With the growth of computer capacity, numerical methods are often used even if a problem could be solved analytically. A third method of tackling math problems, which numerical methods have displaced considerably, is use of analog computers, such as slide rules.
Numerical methods can require orders-of-magnitude more arithmetic than more straightforward methods: a tiny change to an equation that makes it not solvable might easily lead to a calculation requiring a million times more arithmetic. Currently it is natural and common to use computers to do the calculations, which may include calculated methods of producing any necessary "guessing". Often the term computation is used to mean carrying out numerical methods on a computer and in fact, numerical methods were a key motivator in the development of the computer as we know it. The study and development of numerical methods is referred to as numerical analysis, an entire science of much interest, because no matter how much computing capacity is available, more efficient and well-suited methods can solve more problems with that capacity. Models using these methods are termed numerical models.
The use of numerical methods predates computers, but a much more limited set of problems could be tackled in such a manner, even using weeks or years of people doing the arithmetic. Numerical methods were often used for deriving generally useful answers, such as digits of irrational numbers like π and e, values of trigonometric functions for many possible inputs, and of roots, with the answers commonly published as books of tables.
Some of the numerical methods used in astrophysics: