Numerical Methods Module 2 - Errors
Numerical Methods Module 2 - Errors
References:
Numerical Methods for Scientists and Engineers by Amos Gilat and Vish Subramaniam
Numerical Methods for Engineers 6th Ed. By S. C. Chapra and R. P. Canale
E.B.P.
Approximations
For many applied engineering problems, we cannot obtain analytical
solutions. Therefore, we cannot compute exactly the errors associated
with our numerical methods. In these cases, we must settle for
approximations or estimates of the errors.
E.B.P.
Approximations
The two major forms of numerical error:
1. Round-off error result when numbers having limited significant
figures are used to represent exact numbers
2. Truncation error is the discrepancy introduced by the fact that
numerical methods may employ approximations to represent exact
mathematical operations and quantities.
E.B.P.
Significant figures
Whenever we employ a number in a computation, we must have
assurance that it can be used with confidence
An automobile speedometer and
The concept of a significant figure, odometer illustrating the concept of
a significant figure
or digit, has been developed to
formally designate the reliability of
a numerical value. The significant
digits of a number are those that
can be used with confidence
E.B.P.
Significant figures
The concept of significant figures has two important implications for
our study of numerical methods:
E.B.P.
Significant figures
The concept of significant figures has two important implications for
our study of numerical methods:
E.B.P.
Accuracy and precision
Accuracy refers to how closely a
computed or measured value agrees
with the true value.
Precision refers to how closely
individual computed or measured
values agree with each other
An example from marksmanship illustrating the
concepts of accuracy and precision.
(a) Inaccurate and imprecise;
(b) accurate and imprecise;
(c) inaccurate and precise;
(d) accurate and precise
E.B.P.
Error definitions
For both round-off and truncation errors, the relationship between the
exact, or true, result and the approximation can be formulated as
E.B.P.
Error definitions
One way to account for the magnitudes of the quantities being
evaluated is to normalize the error to the true value
E.B.P.
Error definitions
Example 1: Suppose that you have the task of measuring the lengths of a
bridge and a rivet and come up with 9999 and 9 cm, respectively. If the
true values are 10,000 and 10 cm, respectively, compute
(a) the true error and
(b) the true percent relative error for each case.
Solution.
(a) For the bridge For the rivet
E.B.P.
Error definitions
(b) percent relative error for the bridge
Thus, although both measurements have an error of 1 cm, the relative error for the rivet is much
greater.We would conclude that we have done an adequate job of measuring the bridge, whereas
our estimate for the rivet leaves something to be desired.
E.B.P.
Error definitions
E and ε with a subscript t signify that the error is normalized to the
true value. However, in actual situations such true value is rarely
available. An alternative is to normalize the error using the best available
estimate of the true value, that is, to the approximation itself, as in,
Where the subscript a signifies that the error is normalized to an approximate value
E.B.P.
Error definitions
One of the challenges of numerical methods is to determine error
estimates in the absence of knowledge regarding the true value. For
example, certain numerical methods use an iterative approach to
compute answers. In such an approach, a present approximation is made
on the basis of a previous approximation. This process is performed
repeatedly, or iteratively, to successively compute (we hope) better and
better approximation. Percent relative error is
E.B.P.
Error definitions
Often, when performing computations, we may not be concerned with
the sign of the error, but we are interested in whether the percent
absolute value is lower than a prespecified percent tolerance εs .
The equation below can be employed to determine the error criterion that
ensures a result is correct to at least three significant figures
E.B.P.
Error definitions
In mathematics, functions can often be represented by infinite series. For
example, the exponential function can be computed using
Thus, as more terms are added in sequence, the approximation becomes a better
and better estimate of the true value of ex . This equation is called a Maclaurin
series expansion
E.B.P.
Error definitions
Example 2: Note that the true value for e0.5 = 1.648721...Add terms
until the absolute value of the approximate error estimate εa falls below
a prespecified error criterion εs conforming to three significant figures
Solution.
To determine the error criterion that ensures a result is correct to at
least three significant figures.
Thus, we will add terms to the series until εa falls below this level
E.B.P.
Error definitions
First estimate is equal to McLauren series with one term.
The second estimate is then generated by adding the second term, as in.
E.B.P.
Error definitions
The process is continued until εa < εs. The entire computation can be
summarized as
E.B.P.
Practice Problem
The Maclaurin series expansion for cos x is
Starting with the simplest version, cos x = 1, add terms one at a time
to estimate cos(π/3). After each new term is added, compute the true
and approximate percent relative errors. Add terms until the absolute
value of the approximate error estimate falls below an error criterion
conforming to two significant figure
E.B.P.
END
E.B.P.