Documente Academic
Documente Profesional
Documente Cultură
MAT 530
CHAPTER ONE
Mathematical
Modeling Process
At the end of this module, students should be able:
1.1 Introduction
Consider the problems of finding the shortest route from one location to a
destination in a busy city or deciding locations for bus stops in an urban
area so that greater number of passengers can be achieved. These are
some examples of complex real-world problems. In order to obtain the
required solution this person need to investigate necessary questions
about the observed world and give a simplified description of the
problem. He/she can setup equations using mathematical concepts and
language to test some ideas and then solved the model to make
prediction or decision.
Definition 1.1
Mathematical
modeling
is
the
process
of
constructing
MAT 530
The real world problem covers situations which may come from
Mathematical
START
Real-World
Problem
Translate
(Formulate)
Mathematical
Model
FINISH
Validation
and
Verification
Solve /
Analyze
Test /
Analyze
Real-World
Conclusion
or Prediction
Translate
(Interpret)
Simulation
What-If Analysis
Mathematical
Solutions
MAT 530
Real-
verified) against real data to determine the effectiveness of the model (to
MAT 530
test assumptions and for sensitivity analysis). If the solutions agree with
the real system (i.e., makes sense), then the model does indeed capture
correctly important aspects of the real-world situation and thus can be
accepted and used.
Construct
the Model
Compute and
Analyze
Results
Test the
Results
Apply the
Model
Figure 1.2: Mathematical Modeling Process
Definition 1.2
A mathematical model is a system (S) containing a set of
questions (Q) relating to the system and a set of mathematical
statements (M) which can be used to answer the questions
(Velten, 2009).
MAT 530
These
questions, which transpire the purpose of the model, are very focused and
challenging questions and can only be answered with a conclusion based
on the analysis and interpretation of evidence.
These
Models can be categorized into three classes on the basis of their degree
of abstraction, as the following:
a)
MAT 530
c)
A model can be a static or dynamic model. Figure 1.2, 1.3 and 1.4
illustrates some examples of the physical, analogous and symbolic model
in both static and dynamic forms.
MAT 530
MAT 530
accuracy
b)
flexibility
c)
cost.
More accurate model requires higher cost and reduces flexibility. Higher
flexibility model, on the other hand, may jeopardize the accuracy of the
model and may comes at increased cost. In addition, expensive model is
MAT 530
Warm up exercise
Answer: _______________________
Answer: _______________________
Answer: _______________________
Answer: _______________________
MAT 530
Definition 1.5
A deterministic model is a model which is represented by a
function that allows predictions of the dependent variable to be
made based on the independent variable(s).
always predict the same outcome from a given starting point. In other
words, for fixed starting values, a deterministic model will always produce
the same result.
where the outputs are direct consequence of the initial conditions of the
problem.
Definition 1.6
A stochastic model is a model where randomness is present
and variables are not described by unique values, but rather by
probability distributions.
MAT 530
Definition 1.7
A model is known as empirical model if it was constructed from
and based entirely on experimental data only, using no priori
information about the system.
Therefore, it is a
MAT 530
Deterministic
Mechanistic
Stochastic
Empirical
Herd
Individual
Organs
Cells
Low
Molecules
MAT 530
does not account for the element of time whereas a dynamic model is
time dependent.
Definition 1.9
A model is called discrete if the quantities have varied at discrete
times or places (or that we only consider discrete variations even
if they may change continuously).
Definition 1.10
A model is called continuous if there is continuous variation in
quantities.
One further type of model, the system model, is worthy of mention. This
is built from a series of sub-models, each of which describes the essence
of some interacting components. The above method of classification then
refers more properly to the sub-models: different types of sub-models
may be used in any one system model.
MAT 530
Figure 1.t illustrates the flow of interaction of the four main components of the
mathematical modeling process. Problem statement defines the problem and
wishes to are to be achieved by the by the model. The mathematical theory
includes theory related to the application, mathematical theory to be employed
and theories discussed in literature.
MAT 530
Problem
Statement
Computational
Experiments
Mathematical
Model
Mathematical
Theory
Mathematical
Solution
Methods
b)
c)
d)
f)
list all assumptions and ways to verify and validate the model;
g)
h)
MAT 530
i)
j)
k)
l)
m)
carry out the changes in the real system based on the findings and
mechanisms proposed by the model; and
n)
2.
ii.
4.
5.
6.
ii.
Write a report/Conclusion
8.
9.
MAT 530
Modeling Approaches
Construction of a mathematical model includes the following steps:
1.
b.
2.
a.
MAT 530
Input
Variables:
quantities
which
determine
subsequent
Parameters:
All the factors must have suitable algebraic symbols and represent
measurements with certain unit of measurement.
b.
ii.
iii. the forms of relationship between factors this is the heart of the
model.
Appropriate assumptions keep the model simple.
c.
Collect data
Utilize data as much as possible.
i.
ii.
MAT 530
d.
Formulate model
i.
ii.
Assign units.
e.
3.
Plot graphs
Run simulations
Check whether values of variables have the correct sign and size?
b.
4.
5.
MAT 530
b.
Write a report
The following questions can be considered in preparing the report.
Problem Definition
Formulate Model
Modeling
Interpret Solutions
Conclusion
Translation
Write a report
MAT 530
STEPS
1.
Given {the box is to have square base and double thickness top and
bottom; cardboard costs RM1.50 per square meter}, find {the dimension of
the box} such that {the cost is minimized}.
TOP
TOP
w
TOP
h h
SIDE
BOTTOM
SIDE
SIDE
SIDE
SIDE
w
w
BOTTOM
BOTTOM
SIDE
2.
MAT 530
Area of Cardboard
Area of Cardboard (in m2) x price (in RM) per square meter
(1.2)
(1.3)
Substitute equation (1.3) into equation (1.2):
(1.4)
3.
To find the dimension of the box which gives a minimum total cost,
differentiate equation (1.4) with respect to
.
(1.5)
0.37 m or
cm
37 cm.
MAT 530
m
Find the second derivative of
cm
74 cm
with respect to
(1.6)
Substituting
, we conclude that
Since
is minimum when
in equation (1.4), we
7
Cost per Box (in RM)
4.
and
meter and
6
5
4
3
0.3, 2.54
0.4, 2.46
1
(0.37, 2.44)
0
0
0.2
0.4
0.6
0.8
1.2
MAT 530
Conclusion
Based on the mathematical model, the following can be recommended:
Length or width ( )
Height ( )
Cost ( )
But any width between 0.35 m and 0.38 m would be fine, since the cost
m,
m,
Length or width ( )
Height ( )
Cost ( )
m,
m,
MAT 530
, the pairs
are observed. The method easily generalizes to finding the best fit of the
form:
where
must be a linear
Given data,
saying
and
calculus we learn that this requires us to find the values of (a; b) such that
.
.
Differentiating
MAT 530
.
.
and
Define
This, we have
Since the matrix A is invertible, this implies:
MAT 530
26
30
44
50
62
68
74
92
85
78
80
54
51
40
Find the best fit line using least squares method that describes the linear
relationship between y and x.
Solution
1
2
3
4
5
6
7
x
26
30
44
50
62
68
74
y
92
85
78
80
54
51
40
676
900
1936
2500
3844
4624
5476
= -1.03
120.88
Alternatively,
8464
7225
6084
6400
2916
2601
1600
2392
2550
3432
4000
3348
3468
2960
MAT 530
y
100
90
80
70
60
50
y = -1.0344x + 120.88
R = 0.9249
40
30
20
10
0
0
20
40
60
80
Solution
MAT 530
ln y ln a ln ebx
ln a bx ln e
ln e 1)
ln a bx
a0 ln a
Y ln y
n
x
i
i 1
Yi
0
i 1
i 1
a = n
n
1
x i2
x i Yi
i 1
i 1
xi a
a1 b
xi2
0.16
0.64
1.44
2.56
4.00
5.29
xi
0.4
0.8
1.2
1.6
2.0
2.3
yi
800
975
1500
1950
2900
3600
Yi
6.6846
6.8824
7.3132
7.5756
7.9725
8.1887
n
x
i1
8.3
14.09
Yi 44.6170
i1
i1
8.3 14.09
a 0
44.6170
=
63.8555
a1
a0 6.3037 and
a1 0.8187
a1 b 0.8187
6.3037
546 .5906
xi Yi
2.6738
5.5059
8.7759
12.1209
15.9449
18.8340
x Y 63.8555
i i
i1
1.00
1.15
1.40
1.43
1.60
2.00
yi
4.33
4.58
4.98
5.06
5.28
5.80
Solution
y Axk
ln x
a0 a1X
X ln x
=ROUND(LN(C4);4)
Rewrite
ln y = ln A + k ln x
as
Y = a0 + a1 X
a0 ln A
k a1
MAT 530
MAT 530
xi a
Yi
6
i 1 0 = i 1
6
6
2 a1
xi xi
x i Yi
i 1
i 1
i 1
1.9971 a 0
9.6358
6
a = 3.3333
1.9971 0.9620 1
ln A = a0
then
A = e a0
= e1.4649
= 4.327
Hence, the expected function is y = Axk = 4.327x0.4239
Warm up exercise
Find the values of a and b of the form y = aex + be-x to the following data:
X
Y
0
5.02
0.5
5.21
1.0
6.49
1.5
9.54
2.0
16.02
2.5
24.53
MAT 530
previous
section
considered
the
problem
of
least-squares
be a polynomial which
represent the function y = f(x), then the total least squares error is defined
as follows
b
f(x)- Pm (x) dx
2
... ai xi ... am xm
dx
2
0im
Hence,
(1)
(2)
... am xm 2dx 0
... am xm 2dx 0
.
.
.
a f(x) - a
b
(i )
( m)
a1 x ... ai x i ... a m x m 2 dx 0
.
.
.
a f(x) - a
b
a1 x ... ai x i ... a m x m 2 dx 0
, ,
MAT 530
... am xm ( 1)dx 0
... am xm f ( x ) dx 0
b
a
b
a
b
a
b
a
b
Simplifying (2) to (m) using similar procedures yield the normal equations
b
a0 xdx a1 x dx ... ai x
a
i 1
dx ... am x
m 1
dx xf( x )dx
:
.
b
a0 x dx a1 x
a
2m
dx ... ai x
im
dx ... am x
b
2m
dx xm f ( x )dx
a
b
b
dx
xdx
a
ba
b
x 2dx
xdx
a
a
...
...
b
b
i
xi 1dx
x dx
a
a
...
...
b
b
xmdx
xm 1dx
a
a
...
xidx
...
a
b
...
xi 1dx
a
b
...
...
...
...
2i
dx
...
...
im
dx
...
b
...
b
...
xm 1dx
...
xmdx
mi
...
...
b
dx ...
2m
dx
f ( x )dx
ba
a0 xf( x )dx
1 a
.
.
.
.
a b
i
i
. x f ( x )dx
. a
a
.
x f ( x )dx
MAT 530
Compute :
x f ( x)dx for 0 i m
i
Example 5:
Solution
E
E
=
=0
a0 a1
b
f(x)- P1(x) dx
2
f(x)- a0 a1x dx
a0 f(x)- a0 a1x dx 0
2
a
b
a
b
a0 a1x f ( x)dx 0
a
b
a
b
a
b
a0 dx a1 xdx f ( x )dx
a
MAT 530
a1 f(x)- a0 a1x dx 0
2
a
b
a
b
a0 a1x f ( x)xdx 0
a
a0 xdx a1x
a
b
b
2
dx xf( x )dx
a
b
b
b
xdx
f ( x )dx
dx
a
a
a0 a
b
b
b
2 a1
xdx x dx
xf( x )dx
a
a
Solution
2
2
dx
xdx
a
f ( x )dx
0
0
0 0
2
2
2
a
2
1
xdx x dx
xf( x )dx
0
0
56
2 2 a
8 0 3
2
68
a
3 1
3
a0 3.336
a1 5.997
Hence, P1( x) 3.336 5.997 x
MAT 530
Example 7:
Find the least squares polynomial approximation of degree two to f(x) =
ex on the interval [ 0, 1]
Solution
P2(x) = a0 a1x a2 x 2
Write the normal equations in matrix form.
1
dx
0
1
xdx
0
1 2
x dx
0
1 x
2
x dx
e dx
0
0
a0 0
1
1
1
2
3
x
x dx x dx a1 xe dx
0
0
a 0
2 1
1
1
3
4
2 x
x dx x dx
x e dx
0
0
xdx
Compute :
x dx
i
for 0 i 4 and
x f ( x)dx for 0 i m
i
0.5
0.3333 a0 1.7183
1
0.5
0.3333
0.25 a1 1
0.3333
0.25
0.2 a2 0.7183
Solve for the coefficients a0, a1am.
a0 1.0140
a 0.8445
1
a 2 0.8449
previous
section
considered
the
problem
of
least-squares
MAT 530
Definition
The functions listed below are called Legendre polynomials and are
defined for
-1 x 1:
P0(x)
= 1
P1(x)
= x
P2 ( x )
1 2
3x - 1
2
P3 ( x )
1 3
5x - 3x
2
P4 ( x )
1
35x 4 - 30x 2 + 3
8
P5 ( x )
1
63x 5 - 70x 3 + 15x
8
.
.
.
2m + 1
m
Pm 1( x )
Pm -
Pm -1
m +1
m + 1
0 if n m
Pm ( x ) Pn ( x ) dx 2
2n 1 if n m
1
1
1
n
dn
2 n! dx
(x
- 1)n
MAT 530
f(x)- y(x) dx
2
-1
1
-1
(1)
where, Pi (x) is a Legendre polynomial and a i is a constant coefficient.
, , am
to minimize L is that
L
= 0, for each k = , , , m.
ak
a k
dx
-1
-1
1
ak . Pk ( x ) x
-1
y( x) Pk ( x)dx
-1
2
ak
2k 1
y( x) Pk ( x)dx
-1
Thus,
2k 1
ak
2
y(x)Pk (x) dx
-1
Notice that ak calculates the coefficients a0, a1, , am with the condition that
x is defined for y(x) on the interval [-1,1].
MAT 530
Theorem
Suppose y(x) is continuous and defined on [-1,1], then y(x) can be
approximated by a least-squares polynomial f(x) of degree m, using
series of Legendre polynomials such that:
f(x) = a0P0(x) + a1P1(x) + a2P2(x) + . . . + amPm(x)
where, the coefficients a0, a1, , am is be determined by
2k 1
ak
2
y( x) Pk ( x) dx
for k = , , , ,.,m
ak
2k 1
2
, , am
y( x) Pk ( x) dx
for k = , , , ,m
Example 8:
Find the least squares polynomial approximation of degree one to y = x 2 +
4x + 4 on the interval [-1,1].
Solution
Identify the observed function :
y(x) = x 2 + 4x + 4
Determine the Legendre polynomials of degree 1:
f(x) = a0P0(x) + a1P1(x)
= a0 + a1x
where P0(x) = 1 and P1(x) = x
Determined the coefficients a0 and a1:
2k 1
ak
2
y( x) Pk ( x) dx
for k = 0,1
MAT 530
k 0:
2(0) 1
a0
( x 2 4 x 4) P0 ( x ) dx
2
1
( x 2 4 x 4)(1)dx
2
13
3
1
k 1 : a1
2(1) 1
( x 2 4 x 4) P1( x ) dx
2
( x 2 4 x 4)x dx
2
13
+ 4x
3
dx
y( x )dx
xdx
a0
1
1
11
1
1
a
2 1
x dx
xdx
xy( x )dx
1
, , am
for k = 0,1,2,3,..,m
MAT 530
Example 9:
Find the least squares polynomial approximation of degree one to y = x 2
+ 4x + 4 on the interval [0,2]
Solution
Let . x = at + b
Solve for a and b
When x = 0:
t=-1 :
When x = 2:
t=
0 = a(-
+b
=a
+b
and
b=1
Thus
x=t+1
or
t=x1
2k 1
ak
y( t ) P k ( t ) dt
2 1
k 0 : a0
for k = 0,1
2(0) 1 1 2
( t 6t 9) P 0( t ) dt
2
1
11 2
28
( t 6t 9)(1) dt
2 1
3
k 1 : a1
MAT 530
2(1) 1 1
y( t ) P 1( t ) dt
2 1
3 1 2
( t 6t 9)(t ) dt 6
2 1
28
+ 6t
3
28
+ 6(x-1) since t = x 1
3
f(x) =
=
10
+ 6x
3
Example 10:
Find the least squares polynomial approximation of degree two to f(x) =
ex on the interval
a)
[-1, 1]
b) [ 0, 1]
Solution
ao a1x a2 (3x 2 1)
2
since P0 ( x ) 1 ,
1P1( x )
and P2 ( x ) (3x 2 1)
2
ak
2k 1
2
y( x) Pk ( x) dx
for k = 0,1,2
MAT 530
2(0) 1
k 0 : a0
e x P0 ( x ) dx
2
1
e x dx
2
1.1752
1
k 1 : a1
2(1) 1
e x P1( x ) dx
2
3
e x x dx
2
1.1036
1
k 2:
2(2) 1
e x P2 ( x ) dx
2
a1
5
1
e x (3 x 2 1) dx
2
2
0.3578
Hence,
f ( x ) a 0P0 ( x ) a1P1( x ) a 2P2 ( x )
1
a o a1x a 2 (3 x 2 1)
2
b)
Need a suitable linear transformation since x [1, 1 ] and x [0 ,1 ]
Make a suitable linear transformation of x to t:
x [0,1 ] t [1,1 ]
1
and
2
1
2
0 = a(-1) + b = - a + b
=a
+b=a+b
MAT 530
Thus,
1
1 t 1
t
or
2
2
2
2x t 1 t 2x 1
t 1
2
a o a1t a 2 (3t 2 1)
2
ak
2k 1
y( t ) Pk ( t ) dt for k = 0,1,2
2 1
t 1
2(0) 1 1 2
k 0 : a0
e P0 ( t ) dt
2
1
t 1
11
e 2 dt
2 1
1.7183
t 1
2(1) 1 1 2
k 1 : a1
e P1( t ) dt
2
1
t 1
3 1
e 2 t dt
2 1
0.8452
t 1
k 2 : a2
2(2) 1 1 2
e P2 ( t ) dt
2
1
t 1
51
1
e 2 . (3t 2 1) dt
2 1
2
5
0.0559
2
0.1398
Thus,
f (t ) a0P0 (t ) a1P1(t ) a 2P2 (t )
MAT 530
Hence
f ( x ) 1.6484 0.8452(2x 1) 0.8388(2x 1)2
1.3097 14.7872 x 13.0968 x 2
Warm up exercise
Find the least squares polynomial approximation of degree two to:
a) f(x) = sin 2x on the interval [-1,1] and [0, 1]
b) f(x) = ln x on the interval [1,3]
MAT 530
Exercise 4
1.
2.
y
1
2
3
3
4
b)
x
-6
-2
0
2
6
y
-5.3
-3.5
-1.7
0.2
4.0
c)
x
-3
1
3
5
9
y
-6
-4
-2
0
4
x
-3
-1
1
3
y
15
5
1
5
c)
x
-2
-1
0
1
2
Y
2.80
2.10
3.25
6.00
11.50
3.
X
-2
-1
0
1
2
X
2.0
2.3
2.6
2.9
3.2
y
5.1
7.5
10.6
14.4
19.0
b)
The table below shows the time (in seconds) required for water to drain
through a hole in the bottom of a bottle as a function of depth (in meters) to
which the bottle has been filled.
Depth
Time
0.05
65.99
0.10
120.28
0.15
166.69
0.20
207.85
0.30
279.95
0.35
313.04
0.40
344.24
5.
6
22
10
28
14
14
16
22
20
16
22
8
28
8
28
14
36
0
38
4
6.
5
30
0.0
0.0
1.0
2.0
2.0
5.0
3.0
8.0
4.0
12.0
5.0
25.0
6.0
40.0
7.0
57.0
0.0
0.0
1.0
2.0
2.0
5.0
3.0
8.0
4.0
12.0
5.0
25.0
6.0
40.0
7.0
57.0
7.
MAT 530
Find the values of A and B to fit a curve of the following form to the given
data
a) y
8.
1
Ax B
b) y
A
B
x
-1
0.1
6.62
3.94
2.17
1.35
0.89
9.
Temperature F
77
100
185
239
285
Solubility (weight %)
2.4
3.4
7.0
11.1
19.6
One of the following data sets, (x,y1) and (x,y2) , follows an exponential
law y Aebx and the other follows a power law y Axb . Which is which?
Fit the data to the respective model and calculate the sum square errors.
X
2.0
2.5
3.0
3.5
4.0
4.5
5.0
10.
11.
y1
14.79
27.75
47.09
74.07
109.99
156.10
213.69
y2
12.13
19.58
31.59
50.97
82.21
132.59
213.82
1
;
x
c)
f(x)
[-3, -1]
d)
e)
f(x) = x3 1; [0,2]
f)
f(x) = ln x; [1, 2]
f(x) = x3 x + 1; [0, 3]
d)