MATH/CSC 381
Numerical Methods
Dr. John Travis
MCC 315
925-3817 (leave voice mail if no answer)
Email: travis@mc.edu
Problems: Good Programs are (a) reliable, (b) robust, (c) portable, and (d) maintainable

Goal: To produce reasonably accurate results in the presence of (1), (2) and (3) above.

Roundoff Errors

Numerical Crimes: Things which lead to loss of significant digits... HOMEWORK PROBLEMS, page 14, #3, 4, 5, 8
 

Ex. Consider quadratic formula in various forms. Notice, mathematically each method is equivalent.
 

Remark: Rounding errors introduce errors in repeated calculations in the same way that incorrect data does.
 

Stability: Small changes in the "initial" data yields correspondingly small changes in the final result.
 

Ex: xn=(2/3)n, n>0 found recursively by one of the four methods:

(a) pn= (2/3)pn-1, which is a stable algorithm, with the relative error "err_p" virtually zero

(b) qn= (7/6)qn-1 - (1/3)qn-2, which is stable, with the relative error "err_q" the next best, only increasing linearly.  Note, the recursion above also has as a solution (1/2)n, where 1/2 < 2/3.

(c) rn= (17/12)rn-1 - (1/2)rn-2, which is "relatively" stable, with the relative error "err_r" increasing exponentially.  Note, the recursion above also has as a solution (3/4)n, where 3/4 > 2/3, but where both solutions still approach zero.

(d) sn= (8/3)sn-1 - (4/3)sn-2, which is unstable, with the relative error "err_s" increasing exponentially at the greatest rate.  Note, the recursion above also has as a solution (2)n, where not only is 2 > 2/3, but the other solution increases as n increases.


This illustrates the effect of roundoff creeping into a calculation.  As successive terms are calculated, roundoff error allows the "other solution" to enter the mix and the computed solution has some of the characteristics of this other solution as well.  Dependent upon how the "other solution" compares to the desired one shows how the relative error will grow.

Another example of roundoff:  Given x>1, consider the following procedure:

In exact arithmetic, one should get what they started with.  Experiment with several various values of n.  Notice, if 1<x<a2, then 1<sqrt(x)<a.  So, each number in the longer interval (1,a2) is mapped non-uniquely to a number in (1,a).


HOMEWORK ASSIGNMENT

COMPUTING ASSIGNMENT

READING ASSIGNMENT
 

Mathematical Problems to Investigate:

1. Finding Roots of equations -- Numerical solution of non-linear equations.

2. Evaluating and Graphing Functions -- Approximation of functions.

3. Integrating Hard Integrals -- Numerical Integration.

4. Finding Hard Derivatives -- Numerical Differentiation

5. Solving Linear Systems of Equations -- Gauss Elimination, Cholesky Factorization, Iterative Methods.

6. Solving Differential Equations -- Numerical O.D.E.s and P.D.E.s.
 

Remark: T is an operator if it maps functions onto other functions. Suppose x and y are functions with T(x)=y. Then we can classify many mathematical problems into one of the following categories:

(a) Direct Problem: Given f and x, find y. (3),(4)

(b) Inversion Problem: Given f and y, find x. (5),(6)

(c) Identification Problem: Given x and y, find f. (2)
 

Types of errors in computational problems:

1. Roundoff Errors - errors from the use of computer generated approximations to non-machine numbers

2. Truncation Errors - errors from the use of discrete mathematical models to approximate continuous or "limiting" problems

3. Convergence Errors - errors from stopping a convergent sequence after a finite number of steps