Lecture Notes 01-Introduction and Error Analysis (Print Version)
Lecture Notes 01-Introduction and Error Analysis (Print Version)
Pavel Ludvk,
<[email protected]>
http://homen.vsb.cz/~lud0016/
E-mail: [email protected]
Office Hours: by appointment
Course information
Evaluation:
Some statistics:
Content languages for websites:
English 53.6%
Spanish 4.9%
Why?
1. Learning process is improved.
2. This semester is extremely short!
About SCILAB:
About SCILAB:
Solved examples:
http://mdg.vsb.cz/wiki/public/ZM_NM_examples.pdf
My web: http://homen.vsb.cz/~lud0016/
Calculus Review
Lecture Notes #01
Calculus Review
Continuity
Convergence
Dierentiability
Taylor's Theorem
Lecture Notes #01
Calculus Review
Limit/Convergence
Denition (Limit)
Continuity/Convergence
Dierentiability
Theorem
Denition
f (x) f (x0 )
f 0 (x0 ) = lim exists.
xx0 x x0
Continuity
If f C [a, b] then
m, M [a, b]x [a, b] : f (m) f (x) f (M).
Taylor's Theorem
Suppose f C [a, b], f (n+1) exists on (a, b) and x0 [a, b]. Then
x (a, b), (x0 , x) with
10 51
X X mk
r = (1)s 2c1023 (1 + m), c= ck 2k , m=
252k
k=0 k=0
Lecture Notes #01
Computer Arithmetic and Finite Precision
10 51
s c1023
X
k
X mk
r = (1) 2 (1 + m), c= ck 2 , m=
252k
k=0 k=0
Remarks:
10
2 = 1024 and (11111111111)2 = 2047.
We cannot represent an exact zero!
Example 1: 3.0
0 10000000000 1000000000000000000000000000000000000000000000000000
(1)0 22 1023 1 + = 1 2 1 = 3 .0
1 3
10
2 2
Lecture Notes #01
Computer Arithmetic and Finite Precision
10 51
X X mk
r = (1)s 2c1023 (1 + m), c= ck 2k , m=
252k
k=0 k=0
2
Example 3: The Largest Positive Real Number
0 11111111110 1111111111111111111111111111111111111111111111111111
2 2 2 2 2
Lecture Notes #01
Computer Arithmetic and Finite Precision
1
3.0, 3.0 +
252
|p p |
Algorithms
Lecture Notes #01
Algorithms
Denition (Algorithm)
Denition (Stability)
Suppose E0 > 0 denotes the initial error, and En represents the error after n
operations.
Linear error growth is usually unavoidable, and in the case where C and
E0 are small the results are generally acceptable. Stable algorithm.
1
n =
np
for some positive value of p.
Lecture Notes #01
Algorithms
Suppose
lim G (h) = 0, and lim F (h) = L.
h0 h0
|F (h) L| K |G (h)|
then
F (h) = L + O(G (h)).
We say that F (h) converges to L with a Rate of convergence O(G (h)).
Note: Usually we consider G (h) = hp for some positive p.
Lecture Notes #01
Algorithms