OR682Math685CSI700 - PowerPoint PPT Presentation

1 / 22
About This Presentation
Title:

OR682Math685CSI700

Description:

Approximation: Example. Area of the earth: Earth is modeled as a sphere ... Value for is approximate. Computations are performed on the computer to limited precision ... – PowerPoint PPT presentation

Number of Views:31
Avg rating:3.0/5.0
Slides: 23
Provided by: stephe129
Category:

less

Transcript and Presenter's Notes

Title: OR682Math685CSI700


1
OR682/Math685/CSI700
  • Lecture 1
  • Fall 2000

2
Basic Information
  • http//iris.gmu.edu/snash/
  • Access to Matlab
  • Campus computer labs
  • Software from www.mathworks.com
  • Access to these lecture notes

Matlab Commands diary, help
3
Scientific Computing
  • Solve and understand mathematical models
  • Approximations
  • Errors
  • Accuracy
  • Efficiency
  • Continuous versus discrete

4
General Approach
  • Replace a difficult problem with an easier one
    that has a similar solution
  • Complicated ? simple
  • Nonlinear ? linear
  • Infinite ? finite
  • Differential ? algebraic

5
Approximation Example
  • Area of the earth
  • Earth is modeled as a sphere
  • Value for radius is measured or estimated
  • Value for ? is approximate
  • Computations are performed on the computer to
    limited precision

Matlab commands pi,
6
Fundamental Sources of Errors
  • Input data are inaccurate
  • Out of our control
  • Computations are inaccurate
  • The subject of this course

7
Ways of Measuring Error
  • Absolute error
  • ltApproximate valuegt - lttrue valuegt
  • Relative error
  • ltAbsolute errorgt / lttrue valuegt
  • Blended error
  • ltAbsolute errorgt / 1 lttrue valuegt

8
Conditioning
  • Is the problem good or bad?
  • Check if cond (condition number) is large, where

9
More on Conditioning
  • Let x be the data (with error h), and f (x) be
    the answer

10
Conditioning Examples
  • Roots of
  • Computation of e x
  • Computation of sin(x)

Matlab commands syms, pretty, roots
11
Forward Backward Error
  • Forward error if I make an error x how large
    is the error in the answer f (x)?
  • If the problem is ill-conditioned then the error
    in the answer will almost always be large, even
    with a good algorithm.
  • Backward error is the answer I computed the
    exact answer to a nearby problem?
  • This will be true for a good algorithm.

12
Conditioning Stability
  • Conditioning applies to problems
  • Well conditioned (forward error is small)
  • Ill conditioned
  • Stability applies to algorithms
  • Stable (backward error is small)
  • Unstable
  • If possible, the algorithm should estimate
    conditioning as it performs the calculation

13
Computer Arithmetic
  • Floating-point arithmetic
  • Machine precision (machine epsilon) relative
    accuracy of computer calculations
  • ?mach (Matlab eps), about 10-16
  • Overflow largest computer number
  • OFL (Matlab realmax), about 10308
  • Underflow smallest positive computer number
  • UFL (Matlab realmin), about 10-308

Matlab commands eps, realmax, realmin
14
Computer Arithmetic (continued)
  • Infinity
  • Result of computations such as 1/0
  • Matlab Inf
  • Not a Number
  • Result of computations such as 0/0
  • Matlab NaN

15
Example Summing a Series
  • Compute the sum

Matlab function my_sum.m not yet written
16
Cancellation
  • Cancellation the subtraction of two nearly equal
    numbers
  • The result is computed accurately (even on the
    computer)
  • Why is this bad?

17
Example Cancellation
  • Estimate
  • Solve

Matlab commands pretty, roots, sqrt, ezplot,
format
18
Estimating Derivatives
  • Finite-difference approximation to a derivative

19
Derivatives (continued)
  • How should we choose h?
  • Cancellation?
  • Accuracy of f (x)?

20
Derivatives Choosing h
  • Taylor series
  • Derivative approximation
  • Balance rounding error and truncation error

21
Choosing h (continued)
  • Rounding error
  • Truncation error
  • Minimize
  • Thus

22
For Next Class
  • Homework see web site
  • Reading
  • Heath chapter 1
  • Heath chapter 2, sections 2.1, 2.2, 2.3
  • Next class on September 13
Write a Comment
User Comments (0)
About PowerShow.com