Professional Documents
Culture Documents
Analysis
Lecture 1
1
Introduction
Example:
1
x dx
a
Mathematical Models
Comparing solutions:
Numerical solution,
60
t=2seg
50
V (m/sec)
40
Exact
solution
30
Numerical solution,
t=1seg
20
10
10
12
T (sec)
14
16
18
20
Error Types
In general, errors can be classified based on
their sources as non-numerical and numerical
errors.
Non-numerical errors:
(1) modeling errors: generated by
assumptions and
limitations.
(2) Rough error or mistakes: human errors
(3) uncertainty in information and data
3- 5
Numerical errors:
(1) round-off errors: due to a limited number of
significant digits
(2) truncation errors: due to the truncated terms
e.g. infinite Taylor series
(3) propagation errors: due to a sequence of
operations. It can be reduced with a good
computational order. e.g.
In summing several values, we can rank the
values in ascending order before performing
the summation.
(4) mathematical-approximation errors:
e.g. To use a linear model for representing a
nonlinear expression.
3- 6
3.14159265...
17 4.123105...
imprecise
11
Error definitions:
True value = approximation + absolute error.
Absolute error = true value - approximation .
Relative error = absolute error / true value .
absolute error
t
100%
true value
In real cases not always one can know the true value, thus:
aproximate error
a
100%
approximat e value
In many occasions, the error is calculated as the difference
between the previous and the actual approximations.
a
100%
12
a s
s prefixed percent tolerance
It is convenient to relate the errors with the number of
significant figures.If the following relation holds, one can be
sure that at least n significant figures are correct.
s (0.5 * 102n )%
13
Numerical systems:
A numerical system is a
convention to represent
quantities. Since we have
10 fingers in our hands, the
most popular numerical
system has basis 10. It
uses 10 different digits.
8 6 4 0 9
a)
9x
1=
9
0x
10 =
0
4 x 100 = 400
6 x 1000 = 6000
8 x 10000 = 80000
86409
27 26 25 24 23 22 21 20
1 0 1 0 1 1 0 1
b)
1x 1= 1
0x 2= 0
1x 4= 4
1x 8= 8
0 x 16 = 16
1 x 32 = 32
0 x 64 = 64
1 x 128 = 128
173
14
Round-off Errors
Background:
Example:
(1011.01)2=1x23+0x22+1x2+1x20+0x2-1+1x2-2=11.25
15
Round-off Errors
Conversion from base 10 to base q.
This is the recipe for conversion:
Example:
(26.1)10=(11010.00011)2
16
Round-off Errors
Example: An 8 bit word representation of the integer "35" is 00100011
or
0
0
1
0
0
0
1
1
26
25
24
23
22
21
20
+
0x26 1x25 0x24 0x23 0x22 1x21 1x20 = 35
32
2
1
Note: We can only represent a finite # of numbers; for our case:
127
to +127
(127 = 27 1)
or a total of 255 numbers (including 0)
17
19