Chapter 1
What Is Numerical Analysis?
ALGORITHMS
The objective of numerical analysis is to solve complex numerical problems using only the simple operations of arithmetic, to develop and evaluate methods for computing numerical results from given data. The methods of computation are called algorithms.
Our efforts will be focused on the search for algorithms. For some problems no satisfactory algorithm has yet been found, while for others there are several and we must choose among them. There are various reasons for choosing one algorithm over another, two obvious criteria being speed and accuracy. Speed is clearly an advantage, though for problems of modest size this advantage is almost eliminated by the power of the computer. For larger scale problems speed is still a major factor, and a slow algorithm may have to be rejected as impractical. However, other things being equal, the faster method surely gets the nod.
EXAMPLE 1.1. Find the square root of 2 to four decimal places.
More than one algorithm, using only the four basic operations of arithmetic, exists. The favorite is without much doubt
$latex
x_1=1 \quad x_{n+1}=\frac{1}{2}\left(x_n+\frac{2}{x_n}\right)
$
from which a few mental calculations quickly manage
$latex
x_2=\frac{3}{2} \quad x_3=\frac{17}{12} \quad x_4=\frac{1}{2}\left(\frac{17}{12}+\frac{24}{17}\right)
$
or, rounded to four decimal places,
$larex
x_2=1.5000 \quad x_3=1.4167 \quad x_4=1.4142
$
the last being correct to all four places. This numerical algorithm has a long history, and it will be encountered again in Chapter 25 as a special case of the problem of finding roots of equations.
ERROR
The numerical optimist asks how accurate are the computed results; the numerical pessimist asks how much error has been introduced. The two questions are, of course, one and the same. Only rarely will the given data be exact, since it often originates in measurement processes. So there is probably error in the input information. And usually the algorithm itself introduces error, perhaps unavoidable roundoffs. The output information will then contain error from both of these sources.
EXAMPLE 1.2. Suppose the number .1492 is correct to the four decimal places given. In other words, it is an approximation to a true value that lies somewhere in the interval between .14915 and .14925 . The error is then at most five units in the fifth place, or half a unit in the fourth. In such a case the approximation is said to have four significant digits. Similarly, 14.92 has two correct decimal places and four significant digits provided its error does not exceed .005 .
EXAMPLE 1.3. The number .10664 is said to be rounded to four decimal places when abbreviated to .1066 , while .10666 would be rounded to .1067 . In both cases the error made by rounding is no more than .00005 , assuming the given figures are correct. The first is an example of rounding down, the second of rounding up. A borderline case such as .10665 is usually rounded to the nearest even digit, here to .1066 . This is to avoid long-range prejudice between the ups and downs.
EXAMPLE 1.4. When 1.492 is multiplied by 1.066 , the product is 1.590472 . Computers work to a fixed “word
1
2
WHAT IS NUMERICAL ANALYSIS?
[CHAP. 1
length,” all numbers being tailored to that length. Assuming a fictitious four-digit machine, the above product