Professional Documents
Culture Documents
Week01 - Introduction To Numerical
Week01 - Introduction To Numerical
NUMERICAL METHODS
AND OPTIMIZATION
WEEK 1
LESSON OUTCOMES
At the end of this topic, the students will be able:
INTERPRETATION
SOLUTION
Suitable numerical methods
are then selected to solve
the mathematical equations
Mathematical modeling
Is the use of mathematics to
Engineering
Physics
Physiology
Ecology
Wildlife management Chemistry
Economics
Sports
Etc
Dependent variable
Observed behaviour/state/phenomenon of a system
Characteristic that reflects behaviour or state of the system
i.e. y, f(x), f(t)
Independent variable
Dimension that determine a system i.e. time, t , x
Parameter
Quantity that serves to relate to functions and variables
Reflective of the systems properties or composition (ex: T, P, pH)
Forcing functions
External influence that acts on system i.e. acceleration gravity, g
8
Example
dx
dt
F = ma
dv
F
dt
or
d 2x
m 2 F
dt
10
Example
Assume that interested to predict the velocity of the falling parachutist with time
11
acceleration a
dv
dt
dv
dt
F FD FU
FD m g
FU cv
Model relates acceleration of falling
object to the forces acting on it,
dv
dt
mg cv
m
c
m
(differential equation)
12
forcing functions
t,s
v,(m/s)
0.00
16.40
27.77
35.64
41.10
10
44.87
12
47.87
independent variable
parameter
13
53.39
14
dv
dt
dv
dt
v( t
m g cv
m
v
t
i 1 )
v( t
v( t )
i
ti 1 ti
i 1 )
c
m
v( t )
i
ti 1 ti
g
c
m
v(t )
i
Approximate or
numerical solution
15
Numerical solution
t,s
v,(m/s)
0.00
19.60
32.00
39.85
44.82
10
47.97
12
49.96
53.39
v(ti1 )
v( ti ) g v( ti ) (ti 1 ti )
m
16
98
2 significant figures
98.09
4 significant figures
0.0098
2 significant figures
17
18
Increasing precision
19
Error definitions
Error
True value
Approximation
value
True value = Error + Approximation value
20
(1)
(2)
(3)
Calculation of errors
True value of length of a bridge is 10,000 cm.
When you measure, the length recorded is
9,999 cm. Compute the true error and true
percentage relative error of the bridge.
22
Answer
25
Round-off errors
27
28
Taylor series
Provides a means to predict a function value at one point in terms of the
function value and its derivative at another point
Zero order
First order
Second
order
nth order
29
(6)
f ( n 1) ( ) n 1
Rn
h
(7)
(n 1)!
30
31
Rn O (h n 1 )
Let say we truncated the Taylor series expansion after zero-order term to
yield
f ( xi1 ) f ( xi )
Remainder term, Rn for zero order version
R0 f '( xi ) h
f ' '( xi )
3
f
( xi )
h2
h 3 ...
2!
3!
R0 f '( xi ) h
This result is still inexact because neglected second and higher order terms.
32
33
34
Numerical
differentiation
Forward finite divided difference
35
Where,
(15)
h
h
f
f'(xi ) i O(h)
h
f'(xi )
Where,
(16)
h xi xi 1
h xi 1 xi xi xi 1
36
37
Exercise
Use forward and backward and a centered difference to estimate the first
derivative of the function
Higher derivatives
39
Error propagation
This section is to study how errors in numbers can
propagate through mathematical functions. If we multiply
two numbers that have errors, we would like to estimate
the error in the product.
If a function f is dependent on
(a) a single independent variable x : f(x)
(b) two independent variables x and y : f(x, y)
(c) several independent variables x1, x2, x3, ... ,xn : f(x1 , x2 ,..., xn ).
40
where
(21)
Example
Given a value of x* = 2.5 with an error of x* = 0.01, estimate the
resulting error in the function, f(x)=x3.
Solution
Exercise
Knowing a value of x* = 2.0 with an error of x* = 0.01, estimate the resulting
error in the function
f(x) = 0.5x3-0.1x2+0.8x-0.7
43
(23)
44
Relative error
Refer section 4.2.3
for example
Condition number
45
47
48