Lecture Notes 01-Introduction and Error Analysis
Lecture Notes 01-Introduction and Error Analysis
Pavel Ludvk,
<pavel.ludvik@vsb.cz>
Department of Mathematics and Descriptive Geometry
VB-TUO
http://homen.vsb.cz/~lud0016/
The Professor
Pavel Ludvk
Oce
Oce phone number
E-mail
Web
Oce Hours
A832
59 732 4179
pavel.ludvik@vsb.cz
http://homen.vsb.cz/~lud0016/
by appointment
Course Information
Expectations
Please be on time.
Expectations
Please be on time.
Please pay attention.
Expectations
Please be on time.
Please pay attention.
Students are expected and encouraged to ask questions in class!
Expectations
Please be on time.
Please pay attention.
Students are expected and encouraged to ask questions in class!
Students are expected and encouraged to make use of consultations
with the instructor!
Title:
Authors:
Edition:
Publisher:
Numerical Analysis
Richard L. Burden, John D. Faires
9
Cengage Learning, 2011
Other materials:
Title:
Authors:
Edition:
Publisher:
Other materials:
Title:
Authors:
Edition:
Publisher:
Solved examples:
http://mdg.vsb.cz/wiki/public/ZM_NM_examples.pdf
Other materials:
Title:
Authors:
Edition:
Publisher:
Solved examples:
http://mdg.vsb.cz/wiki/public/ZM_NM_examples.pdf
My web: http://homen.vsb.cz/~lud0016/
Other materials:
Title:
Authors:
Edition:
Publisher:
Solved examples:
http://mdg.vsb.cz/wiki/public/ZM_NM_examples.pdf
My web: http://homen.vsb.cz/~lud0016/
Qaurteroni, A., Sacco, R., Saleri, F.:
2007.
Numerical Mathematics.
Springer,
Other materials:
Title:
Authors:
Edition:
Publisher:
Solved examples:
http://mdg.vsb.cz/wiki/public/ZM_NM_examples.pdf
My web: http://homen.vsb.cz/~lud0016/
Qaurteroni, A., Sacco, R., Saleri, F.:
Numerical Mathematics.
Springer,
2007.
Sli, E., Mayers, D.:
Cambridge
Software tools
Software tools
http://mdg.vsb.cz/wiki/public/soubory/qtoctave0.7.2_
octave3.0.0_Portable_win32.zip
Software tools
http://mdg.vsb.cz/wiki/public/soubory/qtoctave0.7.2_
octave3.0.0_Portable_win32.zip
Software tools
http://mdg.vsb.cz/wiki/public/soubory/qtoctave0.7.2_
octave3.0.0_Portable_win32.zip
http://www.mathworks.com/videos/
getting-started-with-matlab-68985.html.
Using Basic Plotting Functions http://www.mathworks.com/
videos/using-basic-plotting-functions-69018.html.
Writing a MatLab Program http://www.mathworks.com/videos/
writing-a-matlab-program-69023.html.
Program of Lectures I
Program of Lectures I
Program of Lectures I
Program of Lectures I
Program of Lectures I
Program of Lectures I
Program of Lectures I
Program of Lectures I
Program of Lectures II
Program of Lectures II
9
10
Program of Lectures II
10
11
Program of Lectures II
10
11
12
Multistep Methods.
Program of Lectures II
10
11
12
Multistep Methods.
13
Higher Order.)
Program of Lectures II
10
11
12
Multistep Methods.
13
14
Higher Order.)
Stand by.
Calculus Review
calculus?
In numerical mathematics??
calculus?
In numerical mathematics??
calculus?
In numerical mathematics??
calculus?
In numerical mathematics??
calculus?
In numerical mathematics??
calculus?
In numerical mathematics??
calculus?
In numerical mathematics??
calculus?
In numerical mathematics??
calculus?
In numerical mathematics??
calculus?
In numerical mathematics??
calculus?
In numerical mathematics??
calculus?
In numerical mathematics??
Limit/Convergence
Denition (Limit)
A function
dened on a set
f (x ) = L
number
Limit/Convergence
Denition (Limit)
A function
dened on a set
f (x ) = L
number
continuous at x0 if
lim
x x0
X R, and x0 X .
f (x ) = f (x0 ).
Then
is
Continuity/Convergence
Denition (Continuity (in an interval))
A function
is
continuous on a set X
x X.
(i.e.,
f C (X )) if it is
Continuity/Convergence
Denition (Continuity (in an interval))
A function
is
continuous on a set X
x X.
(i.e.,
f C (X )) if it is
{xn }
n=1
converges to x
x ) if
x = x.
lim n
n
{xn }
n=1
Dierentiability
Theorem
(a) f is continuous at x0
(b) If {xn }
n=1 is any sequence in X converging to x0 , then limn f (xn ) = f (x0 ).
Dierentiability
Theorem
(a) f is continuous at x0
(b) If {xn }
n=1 is any sequence in X converging to x0 , then limn f (xn ) = f (x0 ).
Denition
Let
f 0 (x0 ) =
If the limit exists, we call
lim
x x0
f (x ) f (x0 )
x x0
f 0 (x0 ) a derivative of f
exists.
at
x0 .
(i.e.,
Continuity/Rolle's Theorem
Theorem (Dierentiability
Continuity)
Continuity/Rolle's Theorem
Theorem (Dierentiability
Continuity)
If f C [a, b] then
m, M [a, b]x [a, b] : f (m) f (x ) f (M ).
f (b) f (a)
.
ba
f (b) f (a)
.
ba
Taylor's Theorem
Theorem (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 f (x ) = Pn (x ) + Rn (x ) where
Pn (x ) =
n
X
f (k ) (x0 )
k =0
k!
(x x0 )k ,
Rn (x ) =
f n+1 ((x ))
(x x0 )n+1 .
(n + 1)!
Taylor's Theorem
Theorem (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 f (x ) = Pn (x ) + Rn (x ) where
Pn (x ) =
n
X
f (k ) (x0 )
k =0
k!
(x x0 )k ,
Rn (x ) =
f n+1 ((x ))
(x x0 )n+1 .
(n + 1)!
Bits
Description
11
52
The mantisa
c=
10
X
k =0
ck 2k ,
m=
51
X
mk
k =0
252k
r=
(1)s 2c 1023 (1
+ m),
c=
10
X
ck 2 ,
k =0
Remarks:
2
10
= 1024
and
(11111111111)2 = 2047.
m=
51
X
mk
k =0
252k
r=
(1)s 2c 1023 (1
+ m),
c=
10
X
ck 2 ,
k =0
m=
51
X
mk
k =0
252k
Remarks:
2
10
= 1024
and
(11111111111)2 = 2047.
Example 1: 3.0
0 10000000000 1000000000000000000000000000000000000000000000000000
10
1
3
(1)0 22 1023 1 +
= 1 2 1 = 3 .0
2
2
c=
10
X
k =0
ck 2k ,
m=
51
X
mk
k =0
252k
= (1)0 22
1023 1 + 1
252
c=
10
X
ck 2k ,
k =0
m=
51
X
mk
k =0
252k
= (1)0 22
1023 1 + 1
252
1
1
1
1
= (1)0 21023 1 + + 2 + + 51 + 52
2 2
2
2
1
= 21023 2 52 10308
2
3.0, 3.0
251
Let
be an approximation to
p , then
|p p |
Let
be an approximation to
p , then
|p p |
Denition (The Relative Error)
|p p |
|p | ,
p 6= 0
96410 = 1.0000
96410 = 1.0000
96410 = 0.0000
Algorithms
Denition (Algorithm)
An
Denition (Algorithm)
An
Denition (Stability)
An algorithms is said to be
Denition (Stability)
An algorithms is said to be
conditionally stable.
Suppose
operations.
If
En C E0 n
growth is
If
linear.
(for a constant
which is independat of
Linear error growth is usually unavoidable, and in the case where C and
E0 are small the results are generally acceptable. Stable algorithm.
Exponential error growth is unacceptable. Regardless of the size of E0 the
error grows rapidly. Unstable algorithm.
= {n }
n=1 converges to zero, and = {n }n=1
converges to a number .
We write
n = + O(n )
= {n }
n=1 converges to zero, and = {n }n=1
converges to a number .
We write
n = + O(n )
Note:
The sequence
= {n }
n =1
is usually chosen to be
n =
for some positive value of
p.
np
n )
n = sin
Then
n = O
n3
K > 0h < H
G (h ) = 0 ,
(for some
and lim
h0
F (h) = L.
H > 0):
|F (h) L| K |G (h)|
then
We say that
K > 0h < H
G (h ) = 0 ,
(for some
and lim
h0
F (h) = L.
H > 0):
|F (h) L| K |G (h)|
then
We say that
Note:
Usually we consider
G (h) = hp
p.
(h) = sin(h) .
Then
(h) = O(h3 ).