Professional Documents
Culture Documents
Mathematical Modeling: My Students February, 2010
Mathematical Modeling: My Students February, 2010
My Students
February, 2010
It
is mostly based on the textbook, Frank R. Giordano, Maurice D. Weir, and William P. Fox, A First Course in
Mathematical Modeling, 3rd Ed and it has been reorganized and retyped by Jae Lee.
Mathematical Modeling
Spring, 2010
Page 2 of 57
C ONTENTS
Modeling Change
1.1 Modeling Change with Difference Equations . . . . . . . . . . . . . . . . . . . . . .
1.2 Approximating Change with Difference Equations . . . . . . . . . . . . . . . . . . . .
Topic I. Discrete Versus Continuous Change . . . . . . . . . . . . . . . . . . . . . . .
Topic II. Model Refinement: Modeling Births, Deaths, and Resources . . . . . . . . .
1.3 Solutions to Dynamical Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Topic I. Method of Conjecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Topic II. Homogeneous Linear Dynamical System an+1 = ran , r constant . . . . . . .
Topic III. LongTerm Behavior of an+1 = ran , r constant . . . . . . . . . . . . . . . .
Topic IV. Nonhomogeneous Linear Dynamical System an+1 = ran + b, r and b constant
Topic V. Finding and Classifying Equilibrium Values . . . . . . . . . . . . . . . . . .
Topic VI. Nonlinear Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.4 Systems of Difference Equation . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
The Modeling Process
2.1 Mathematical Models . . . . . . . . . . . . . . .
2.2 Modeling Using Proportionality . . . . . . . . .
Topic I. Introduction . . . . . . . . . . . . . . .
Topic II. Geometric Interpretation . . . . . . . .
Topic III. Modeling Vehicular Stopping Distance
2.3 Modeling Using Geometric Similarity . . . . . .
Topic I. Introduction . . . . . . . . . . . . . . .
Topic II. Testing Geometric Similarity . . . . . .
2.4 Automobile Gasoline Mileage . . . . . . . . . .
2.5 Body Weight and Height, Strength and Agility . .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
Modeling Fitting
Topic I. Relationship Between Model Fitting and Interpolation
Topic II. Sources of Error in the Modeling Process . . . . . .
3.1 Fitting Models to Data Graphically . . . . . . . . . . . . . . .
Topic I. Visual Model Fitting with the Original Data . . . . . .
Topic II. Transforming the Data . . . . . . . . . . . . . . . .
3.2 Analytic Methods of Model Fitting . . . . . . . . . . . . . . .
Topic I. Chebyshev Approximation Criterion . . . . . . . . .
Topic II. Minimizing the Sum of the Absolute Deviations . . .
Topic III. LeastSquares Criterion . . . . . . . . . . . . . . .
Topic IV. Relating the Criteria . . . . . . . . . . . . . . . . .
3.3 Applying the LeastSquares Criterion . . . . . . . . . . . . .
Topic I. Fitting a Straight Line . . . . . . . . . . . . . . . . .
3
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
5
6
7
7
8
9
9
10
11
11
13
14
14
.
.
.
.
.
.
.
.
.
.
17
17
17
17
17
20
21
21
25
25
25
.
.
.
.
.
.
.
.
.
.
.
.
27
27
28
28
28
29
30
30
31
31
31
33
33
Mathematical Modeling
Spring, 2010
36
37
41
45
45
53
53
53
55
55
57
57
3.4
Page 4 of 57
Chapter 1
Modeling Change
A mathematical model is an idealization of the realworld phenomenon and never a completely accurate
representation. In modeling our world, we are often interested in predicting the value of a variable at some
time in the future such as a population, a real estate value, and the number of people with a communicative
disease.
.Simplification
.RealWorld Data
.Model
.Analysis
.Verification
.Predictions/Explanations
.Interpretation
.Mathematical Conclusions
Figure 1.1: A flow of the modeling process beginning with an examination of realworld data
One very powerful simplifying relationship is proportionality.
Definition 1.0.1. Two variables, x and y, are proportional (to each other) if there is a nonzero constant k such
that y = kx. We write y x.
When x and y are proportional, the graph of y versus x is a straight line passing through the origin. When x
and y are proportional, one of our concerns is to find the constant of proportionality k. Moreover, we observe
x and y are proportional if and only if y/x or x/y or (y/x) p or (x/y) p is constant, where p is any real number.
Example 1.0.2. Consider a springmass system. An experiment gives the following table.
Elongation (e)
1.000
1.875
2.750
3.250
4.375
4.875
5.675
6.500
7.250
8.000
8.750
Mass (m)
50
100
150
200
250
300
350
400
450
500
550
i.e.,
If the pattern of the model is taking place over discrete time periods, the preceding construction leads to
a difference equation. In the case that it is taking place continuously with respect to time, it leads to a
differential equation.
Mathematical Modeling
Spring, 2010
n = 0, 1, 2, . . . .
Geometrically, the first difference represents the vertical change in the graph of the sequence during one time
period.
Example 1.1.2 (Savings Certificate). Consider the value of a savings certificate initially worth $1000 that
accumulates interest paid each month at 1% per month.
Let an be the value of the certificate after n months. Then a0 = 1000 and because of the interest,
a0 = a1 a0 = 0.01a0
a1 = a2 a1 = 0.01a1
..
.
an = an+1 an = 0.01an .
The last equation can be rewritten by
an+1 = an + 0.01an = 1.01an ,
i.e.,
an+1 = 1.01an
with
a0 = 1000,
which is called the dynamical system model and the equation is called the dynamical system.
Example 1.1.3. Consider the value of a savings certificate initially worth $1000 that accumulates interest
paid each month at 1% per month. We withdraw $50 from the account each month.
Let an be the value of the certificate after n months. Then a0 = 1000 and because of the interest and the
withdrawal, we have
an = an+1 an = 0.01an 50,
i.e.,
an+1 = 1.01an 50
with
a0 = 1000.
How to describe a change mathematically? Often it is necessary to plot the change and observe a pattern and
describe the change in mathematical terms. Simply we will try to find
change = an = some function f .
Page 6 of 57
Mathematical Modeling
Spring, 2010
Example 1.1.4 (Mortgaging a Home). Six years ago your parents purchased a home by financing $80, 000
for 20 years paying monthly payments of $880.87 with a monthly interest of 1%. Currently they have made
72 payments. Currently how much do they owe on the mortgage?
A NSWER. Let bn be the amount of money owed to the bank after n months. Then we have
bn = bn+1 bn = 0.01bn 880.87,
i.e.,
with
b0 = 80, 000.
The answer to the raised question is b27 , which can be easily computable.
0
...
72
80000
79919.1
79837.5
79755
71532.1
Month (n)
237
238
239
240
2589.58
1734.6
871.078
1.0814
Month (n)
Based on the table of n and bn , we have the figure 1.3 below from 0 month to 240 months.
a legal agreement by which a bank, building society, etc. lends money at interest in exchange for taking title of
the debtors property, with the condition that the conveyance of title becomes void upon the payment of the debt (Concise Oxford
English Dictionary)
Yeast: a microscopic singlecelled fungus capable of converting sugar into alcohol and carbon dioxide
Page 7 of 57
Mathematical Modeling
Spring, 2010
pn
pn
9.6
8.7
18.3
10.7
29.0
18.2
47.2
23.9
71.1
48.0
119.1
55.5
174.6
82.7
257.3
Here n represents the time in hour, pn observed yeast biomass, and pn = pn+1 pn the change in biomass.
We observe the ratio (pn )/pn is roughly a constant,
pn
= 0.6057,
pn
which is the average of the ratios (pi )/pi , i = 0, 1, 2, . . . , 6. It implies that pn and pn are proportional with
the constant of proportionality 0.6057 so that
pn = 0.6057pn ,
i.e.,
pn+1 = 1.6057pn .
Since the ratio pn+1 /pn = 1.6057 > 1, so the model predicts the population will increase forever. See the
figure 1.4.
Mathematical Modeling
Spring, 2010
with
p0 = 9.6.
(The textbook uses the linear proportionality with the proportionality k = 0.00082.)
Let us solve our model pn+1 = pn + 0.000802886(665 pn )pn with p0 = 9.6 numerically. That is, for each n,
we compute pn and plot the data (n, pn ) and compare the one obtained by the experiment. See the figure 1.5.
with a0 = 1000.
Page 9 of 57
(1.3.1)
Mathematical Modeling
Spring, 2010
0.5 = 0.88n
n=
ln 0.1
= 18.01
ln 0.88
Hence, it takes about 18 hours before the contaminants are reduced to 10% of their original level.
0.1a0 = 0.88n a0
Sewage:
0.1 = 0.88n
Page 10 of 57
n=
Mathematical Modeling
Spring, 2010
Behavior of an
r=0
r=1
The sequence an converges to a0 and so all initial values are constant solutions.
r<0
|r| < 1
|r| > 1
Topic IV. Nonhomogeneous Linear Dynamical System an+1 = ran + b, r and b constant.
Definition 1.3.4. If a dynamical system an+1 = f (an ) has a constant solution an = constant, say an = c, then
the constant c is called an equilibrium value or fixed point of the system.
Example 1.3.5. Consider an+1 = 0.5an + 0.1.
(1) When a0 = 0.1, the given dynamical system implies
a1 = (0.5)(0.1) + 0.1 = 0.15,
......
So we can deduce an = 0.2 = a0 for any integer n. That is, 0.2 is the equilibrium value.
(2) When a0 = 0.3, the given dynamical system implies
a1 = (0.5)(0.3) + 0.1 = 0.25,
......
Mathematical Modeling
Spring, 2010
Figure 1.6: Red (Lower @): a0 = 0.1, Blue (Middle #): a0 = 0.2, Black (Upper ): a0 = 0.3
......
b15 = 100000
So we can deduce bn = 100000 = b0 for any integer n. That is, 100000 is the equilibrium value.
(3) When b0 = 110000, the given dynamical system implies
b1 = (1.01)(110000) 1000 = 110100
b2 = (1.01)(110100) 1000 = 110201
......
b15 = 111610
So we may expect that as n , an 100000.
When we see the graphs of the sequences (1), (2) and (3), we observe that whatever the initial value is, the
sequence does not converge to the equilibrium value 100000. We say this equilibrium value is unstable.
Figure 1.7: Red (Lower): b0 = 90000, Blue (Middle): b0 = 100000, Black (Upper): b0 = 110000
Page 12 of 57
Mathematical Modeling
Spring, 2010
a=
b
1r
(r = 1).
0.1
= 0.2,
1 0.5
b=
1000
= 100000.
1 1.01
Through examples, we can observe the following longterm behavior for an+1 = ran + b, b = 0.
r
LongTerm Behavior
|r| < 1
|r| > 1
r=1
Theorem 1.3.9. The dynamical system an+1 = ran + b has the solution
an = rn c +
b
,
1r
(1.3.2)
b
b
= c+
1r
1r
c = a0
b
.
1r
P ROOF. Substituting the result (1.3.2) into the given system, we have
(
)
b
b
b
n+1
n
an+1 = r c +
,
and
ran + b = r r c +
+ b = rn+1 c +
.
1r
1r
1r
So an given in (1.3.2) satisfies the given system an+1 = ran + b. Therefore, (1.3.2) is the solution.
Page 13 of 57
Mathematical Modeling
Spring, 2010
We observe that the second term in the solution (1.3.2) is the equilibrium value of the given system an+1 =
ran + b.
Example 1.3.10. Solve an+1 = 1.01an 1000.
A NSWER. By the Example 1.3.6 or Example 1.3.8, we recall that the given system has the equilibrium value
100000. The Theorem 1.3.9 above implies the solution
an = 1.01n c + 100000
=
=
a0 = c + 100000 = c = a0 100000
an = 1.01n (a0 100000) + 100000,
which is a nonlinear dynamical system. Letting an = 0.0005306pn and r = 1.5453, the equation can be
rewritten by
an+1 = r (1 an ) an .
In this system, when we play with various rs: r = 1.5453, r = 2.750, r = 3.250, r = 3.525 and r = 3.555,
we have plots showing various longterm phenomena. (See the figure 1.21 on page 32 in the textbook.)
1.4 Systems of Difference Equation.
In the previous section, we have studied the equilibrium value of one linear/nonlinear dynamical system. In
this section, we study the equilibrium value of a pair of dynamical systems involved with each other.
Example 1.4.1 (Car Rental Company). A car rental company has distributorships in Orlando and Tampa.
In analyzing the historical records, it is determined that 60% of the cars rented in Orlando are returned to
Orlando, whereas 40% end up in Tampa. Of the cars rented from the Tampa office, 70% are returned to
Tampa, whereas 30% end up in Orlando.
Questions:
1. Will a sufficient number of cars end up in each city to satisfy the demand for cars in that city?
2. If not, how many cars must the company transport from Orlando to Tampa or from Tampa to Orlando?
A NSWER. Let On and Tn be the number of cars in Orlando and Tampa, respectively, at the end of day n.
Then, we can build the following dynamical system model:
On+1 = 0.6On + 0.3Tn ,
and
Mathematical Modeling
Spring, 2010
......
On = 3000,
......
Tn = 4000.
That is, the system remains at the initial value (On , Tn ) = (3000, 4000) = (O0 , T0 ).
In fact, even if we change the initial values, we observe eventually On 3000 and Tn 4000 (assuming the
total number of cars is 7000).
Case 1
Case 2
Case 3
Case 4
O0
7000
5000
2000
T0
2000
5000
7000
For the various starting values in the table above, the figures 1.8 shows that On and Tn approach to the
equilibrium values, i.e., On 3000 and Tn 4000.
Answers to Question 1 and 2: Even though an office starts with insufficient number of cars, it can satisfy the
demand on that day. Even 2 days later, it can have the ideal number of cars (i.e., equilibrium values). So we
dont have to transport any car from one city to the other.
Mathematical Modeling
Spring, 2010
Let On and Hn denote the size of the spotted owls and hawks population, respectively, at the end of day n.
Then by the assumption on the proportionality, we have
On On
and
Hn Hn
On = k1 On
and
Hn = k2 Hn ,
and
H = 1.3H 0.002OH
Case 2
Case 3
O0
151
149
10
H0
199
201
10
we observe On 150 and Hn 200 in any case. In Case 1, the population of owls grows indefinitely while
the population of hawks goes extinct. In Case 2, the opposite phenomenon occurs. That is, in either case, one
of the two pieces drives the other to extinct. However, it is interesting to see in Case 3 that the population of
hawks grows while owls goes to be vanished. Confer the figure 1.28 on pages 4345 in the textbook.
Let us compare the results on equilibrium values in Examples 1.4.1 (Car Rental Company) and 1.4.2 (Owls
and Hawks). The equilibrium values in Example 1.4.1 (Car Rental Company) are stable and insensitive to
the initial conditions, while those in Example 1.4.2 (Owls and Hawks) are unstable and very sensitive to the
initial conditions.
Page 16 of 57
Chapter 2
x y.
Example 2.2.1.
1.
2.
3.
4.
If we have a case as in the Example 2.2.3, then is it prohibited from assuming the proportionality? No it is
not. In fact, the answer depends on the problem, specifically, the slope. Let us consider two lines having
same slope, L : y = mx and M : y = mx + b, where b = 0. Let (x0 , yL ) and (x0 , yM ) be points on lines L and M,
respectively. That is,
yL = mx0 ,
and
yM = mx0 + b.
17
Mathematical Modeling
Spring, 2010
.Displaced volume y
.
.Added weight x
Figure 2.1: It is not a proportionality because the line fails to pass through the origin.
Then, we can compute
yM yL = mx0 + b mx0 = b,
We divide both sides by yM :
i.e.,
yM yL = b.
yM yL
b
=
.
yM
yM
(2.2.1)
Now we observe:
1. If the slope m is relatively large (e.g., compared to 1), then yM should be relatively large too, which
implies the ratio (2.2.1) is close to zero, i.e.,
yM yL
0,
yM
i.e.,
yM yL 0,
i.e.,
yM yL .
So in this case, we may assume the proportionality for the data fitting the model y = mx + b.
2. If the slope m is relatively small (e.g., compared to 1), then yM should be relatively small too, which
implies the ratio (2.2.1) is not close to zero, i.e.,
yM yL
0,
yM
i.e.,
yM yL 0,
i.e.,
yM yL .
So in this case, we cannot assume the proportionality for the data fitting the model y = mx + b.
In a nutshell, if the data fit to the model y = mx + b and m is relatively large, then we can assume the
proportionality even though b = 0. See the figure 2.2.
Example 2.2.4 (K EPLER S T HIRD L AW). What is the relationship between the orbital period and the mean
distance between the sun and the planet in the solar system?
A NSWER. Method 1. Keplers Third Law:
Keplers Third Law: The square of the orbital period of a planet is directly proportional to the cube of the
semi-major axis of its orbit.
Symbolically, it can be written by
T 2 R3 ,
where T is the orbital period of planet and R is the semimajor axis of the orbit, i.e., mean distance between
the sun and the planet. The proportionality constant is same for any planet around the Sun,
2
2
2
TPlanet
TEarth
TMars
=
=
.
R3Earth R3Mars R3Planet
Page 18 of 57
Mathematical Modeling
.y
Spring, 2010
.y
.y = mx + b
.y = mx
.y = mx + b
.y = mx
.
.x
.x
Computing the ratio for the Earth, TEarth = 365.25 days and REarth = 92.9 millions of miles = 149.508058 millions of k
we have the constant of proportionality,
365.252
= 0.166392 (days2 /millions of miles3 ).
3
92.9
Thus, we deduce that for any planet, T 2 = 0.166392R3 , i.e., T = 0.1663921/2 R3/2 = 0.407912R3/2 .
Method 2. Modeling Method based on Data: The following table is from 1993 World Almanac.
Planet
Mercury
Period (T )
(days)
(millions of miles)
88.0
36.
Venus
224.7
67.25
Earth
365.3
93.
Mars
687.0
141.75
Jupiter
4331.8
483.80
Saturn
10760.0
887.97
Uranus
30684.0
1764.50
Neptune
60188.3
2791.05
Pluto
90466.8
3653.90
When we plot the point (R3/2 , T ), we can approximate a straight line passing through the origin. The slope
(constant of proportionality) can be obtained by choosing any points. However, let us use the leastsquares
criterion in S ECTION 3.3 A PPLYING THE L EASTS QUARES C RITERION. Then we deduce T = 0.40948R3/2 .
Mathematical Modeling
Spring, 2010
Mathematical Modeling
Spring, 2010
Using the collected data on the reaction and braking distances, we observe the proportionalities,
dr v,
db v2 ,
where v is the car speed and dr and db are reaction and braking distances, respectively. Explicitly, we deduce
dr = 1.1v,
db = 0.054v2 ,
d = 1.1v + 0.054v2 ,
Figure 2.4: Red : Given Data, Blue +: Prediction by Model, Black: OCL rule
In the left one of the figure 2.4, the black line is the prediction by the OCL rule of which equation is given by
d = 1.5v, because the rule says d/v = 15/10 (ft/mph). However, as we can see from the figure, it is definitely
useless especially after the car speed 20. So when we take the guideline given in the table,
Speed (mph)
0 10
10 40
40 60
60 75
Guideline (sec)
the modified OCL rule will be better than the original one, as shown in the right one of the figure 2.4.
2.3 Modeling Using Geometric Similarity.
Geometric similarity is a concept related to proportionality and can be useful to simplify the mathematical
modeling process.
Topic I. Introduction.
Definition 2.3.1. Two objects are said to be geometrically similar if there is a onetoone correspondence
between points of the objects such that the ratio of distances between corresponding points is constant for all
possible pairs of points.
Example 2.3.2. Consider two boxes X and X , where each one has length l, l , width w, w , and height h, h ,
respectively. See the figure 2.5. Suppose X and X are geometrically similar so that there is a onetoone
correspondence between points A, B, C, and A , B and C , and other points and the ratio of the distances
between corresponding points is constant. Then it must be true that
w
h
l
= = = k,
l
w
h
Page 21 of 57
Mathematical Modeling
Spring, 2010
.A
C
.
C
.
.A
.
l.
.h
.l
.
h
.
.B
.w
.B
.D
.w
.D
VX = k3VX ,
VX VX .
Similarly, for the total surface areas SX and SX of the boxes X and X , we have
SX
2(lw + wh + hl)
=
= k2 ,
SX
2(l w + w h + h l )
SX SX .
SX = k2 SX ,
Moreover, we can find a relationship between the ratio of volumes and the ratio of surface areas:
VX /VX
k3
= 2 = k,
SX /SX
k
VX
SX
=k
,
VX
SX
VX
SX
.
VX SX
Now let us choose l and l between the dimensions of the boxes. Since l/l = k and SX /SX = k2 , so we have
l2
SX
= k2 = 2 ,
SX
l
SX
SX Aside
= 2
= constant.
2
l
l
It implies
SX = (constant) l 2 ,
SX l 2 ,
similarly
SX l 2 .
VX l 3 .
Remark 2.3.3 (A SIDE). From SX /SX = l 2 /l 2 = constant, how can we deduce SX /l 2 = SX /l 2 = constant?
First it is easy to see
SX
l2
SX
SX
= 2 =
= 2
,
2
SX
l
l
l
Page 22 of 57
Mathematical Modeling
Spring, 2010
by multiplying both sides by SX /l 2 . Let us consider two functions f (x) and g(y) where we have only two
f (x) x
independent variables x and y. Suppose
= = constant. Then, we have
g(y) y
f (x) g(y)
=
.
x
y
Letting F(x) = f (x)/x and G(y) = g(y)/y, the equation says F(x) = G(y). If the function of x and the function
of y are same, then both of them should be a constant, i.e., F(x) = G(y) = constant. (For instance, one may
recall that a polynomial of any independent variable of degree 0 is a constant.) This kind of technique is
typically used under the topic, separation of variables, in PARTIAL D IFFERENTIAL E QUATIONS.
In the Example 2.3.2 above, we have argued on S and V with the length l. We can develop the same argument
with the width w and the height h, i.e.,
S w2 ,
S h2 ,
V w3 ,
V h3 .
Once we choose a dimension (in the Example above, it was the length l), it is called the characteristic
dimension.
Suppose a function f depends on the length l and surface area S and volume V of a box. Then since we
can express S and V in terms of the length l, eventually the function f can be expressed by l, l 2 and l 3 .
For instance, if y = f (l, S,V ) = 3l + S V , then there are some constants k1 and k2 such that S = k1 l 2 and
V = k2 l 3 . So, we have
y = 3l + S V = 3l + k1 l 2 k2 l 3 ,
which is a function of l, l 2 and l 3 .
Example 2.3.4 (R AINDROP FROM A M OTIONLESS C LOUD). Suppose we are interested in the terminal
velocity (i.e., maximum velocity) of a raindrop from a motionless cloud. We assume only two forces exert
on the raindrop, Fd due to the air resistance and Fg due to the gravity. Then the net force F (i.e., sum of all
forces) becomes F = Fg Fd so that it falls down. By Newtons Second Law, the net force F should be equal
to ma, i.e.,
Fg Fd = ma,
where a is the acceleration and m is the mass of the raindrop. Since the maximum velocity occurs when the
acceleration vanishes (i.e., a = 0), the equation for the terminal velocity becomes
Fg Fd = 0,
Fg = Fd .
Question: What is the relationship between the terminal velocity and the mass of the raindrop?
Assumptions:
(A1)
(A2)
(A3)
(A4)
Fd is proportional to the surface area S times the square of its speed v, i.e., Fd Sv2 .
Fg is proportional to weight w, i.e., Fg w.
Mass m is proportional to the weight w, i.e., m w.
All the raindrops are geometrically similar.
A NSWER. Thanks to (A4), we can use the proportionality. We recall in general that the surface area S and
the volume V of an object are proportional to l 2 and l 3 for any characteristic dimension l, i.e.,
S l2,
V l3
S V 2/3 .
Because weight w and mass m are proportional to volume, the transitive rule for proportionality gives
S V 2/3 ,
and V m
Page 23 of 57
S m2/3 .
Mathematical Modeling
Spring, 2010
Fd m2/3 v2 .
i.e.,
and
wm
Fg m.
Since Fd m2/3 v2 and Fg m, there are some positive constants k1 and k2 such that
Fd = k1 m2/3 v2 ,
Fg = k2 m.
m1/3 =
k1 2
v ,
k2
m1/3 v2 ,
m1/6 v.
Thus, the terminal velocity of the raindrop is proportional to its mass raised to the onesixth power.
Remark 2.3.5 (A SIDE : S TOKES L AW ). Droplets falling in a motionless air can be modeled by the differential equation,
d2y
c dy
= 32.2 2 ,
2
dt
D dt
where 32.2 is the gravitational acceleration and c is a fixed constant and D is the diameter of the spherical
raindrop and dy/dt is the velocity of the raindrop. So the terminal velocity can be obtained by solving the
differential equation,
d2y
c dy
dy 32.2 2
0 = 2 = 32.2 2 ,
=
D .
dt
D dt
dt
c
The diameter D is proportional to the radius r of the spherical raindrop and the volume V of the raindrop is
proportional to r3 , so we can deduce
V D3 ,
D2 V 2/3 .
Since the mass m is proportional to the volume V , the result above becomes
D2 V 2/3 ,
V m
D2 m2/3 .
dy
m2/3 ,
dt
i.e., the terminal velocity is proportional to the mass raised to the (2/3) power. This is a quite different result
than the one we deduced in the Example 2.3.4 above. Why? What happened? Its because in formulating
the differential equation, we assume the constant gravitational acceleration 32.2. But in the Example 2.3.4
above, we assume that Fg is not a constant and so Fg is involved with the mass m.
A droplet falling according to the differential equation above never quite reaches its terminal velocity, but gets
closer and closer to it. Unless its fall is interrupted by hitting the ground, the velocity eventually becomes so
close to the solution of the differential equation that for practical purpose, we consider it equal to the terminal
velocity.
From
Page 24 of 57
Mathematical Modeling
Spring, 2010
C1 d1 d1
=
= .
C2 d2 d2
and
(2.3.1)
We recall that the length l of an arc (part of a circle) having the angle in a circle with radius r is given by
l = r . Letting l1 and l2 be the lengths of arcs in circles above having the angles 1 and 2 , respectively, we
have
and
l2 = r2 2 .
l1 = r1 1
If 1 = 2 , then there is no geometric similarity between those two arcs. So assuming 1 = 2 , we deduce
l1 r1
= = 1 = 2 ,
l2 r2
and
l1 2r1 d1
=
= .
l2 2r2 d2
(2.3.2)
i.e.,
C1 l1
= .
C2 l2
From those two equations, it is deduced that the ratio of distances between corresponding points around any
two circles is always the ratio of their diameters.
Example 2.3.6 (M ODELING A BASS F ISHING D ERBY). A sport fishing club wishes to encourage its membership to release their fish immediately after catching them. The club also wishes to grant awards based on
the total weight of fish caught. It is suggested that each individual carry a small portable scale. Question:
How does someone fishing determine the weight of a fish he/she has caught?
Page 25 of 57
Mathematical Modeling
Spring, 2010
Page 26 of 57
Chapter 3
Modeling Fitting
When analyzing a collection of data points, it is suggested to consider the following three tasks.
1. Fitting a selected model type or types to the data.
2. Choosing the most appropriate model from competing types that have been fitted. For example, we
may need to determine whether the bestfitting exponential model is a better model than the bestfitting
polynomial model.
3. Making predictions from the collected data.
In the first two tasks, we do have a model or competing models explaining the observed behavior of the data.
It will be discussed in this chapter under the model fitting. For the third case, since no model can explain the
observed behavior, so we will try to construct an empirical model based on the collected data, which will be
studied in the following chapter.
Topic I. Relationship Between Model Fitting and Interpolation.
Consider the figure 3.1 of the collected data.
27
Mathematical Modeling
Spring, 2010
Figure 3.2: Fitting a parabola y = ax2 + bx + c to the Figure 3.3: Interpolating the data using a smooth polydata points
nomial
Topic II. Sources of Error in the Modeling Process.
For purposes of easy reference, we classify errors under the following category scheme:
1. Formulation error: for instance, in the Example of Stopping Distance, we ignored the road friction for
the braking distance. Because of this ignorance, the model may be less effective.
2. Truncation error: for instance, when we compute the value of sin x, we may use only x x3 /3! + x5 /5
and because of the truncation of the other terms, the computation cannot be accurate.
3. Roundoff error: for instance, rigorously speaking, 0.333333333 1/3 = 0. So if we use 0.333333333,
then we may confront an error.
4. Measurement error: one can understand this error as human error. When we measure an object in a
naked eye, it may not be accurate compared to the one measured by a machine.
3.1 Fitting Models to Data Graphically.
Topic I. Visual Model Fitting with the Original Data.
Figure 3.4: Minimizing the sum of the absolute deviation from the fitted line
Suppose we want to fit the model y = ax + b to the data shown in figure 3.4. All of them cannot be expected
to lie exactly along a single straight line. So there will be some vertical discrepancy between a few of the data
points and any particular line under consideration. These vertical discrepancies are called absolute deviation.
Page 28 of 57
Mathematical Modeling
Spring, 2010
Figure 3.5: Minimizing the largest absolute deviation from the fitted line
8.1
22.1
60.1
165
Transformed Data:
ln y
2.1
3.1
4.1
5.1
Since the data points are suspected to follow the form y = cex , by taking the logarithmic function on each
side, we deduce
ln y = x + ln c,
which is a line on the (x)(ln y)plane such that its slope is 1 and the (ln y)intercept is (x, ln y) = (0, ln c).
Page 29 of 57
Mathematical Modeling
Spring, 2010
i = 1, 2, . . . , m
and so r is the largest deviation and we want to minimize this r. Since r is the maximum value of all |ri |s,
i = 1, 2, . . . , m, it is easy to see
|ri | r = r ri r = 0 r ri
and
0 r + ri
i = 1, 2, . . . , m.
subject to
0 r ri
and
0 r + ri
i = 1, 2, . . . , m.
This kind of problem (finding a maximum/minimum value) is called a linear program or optimization problem.
Strategy: Computer implementation of an algorithm known as Simplex Method. It will be discussed in
Chapter 7 later. In the examples below, we will see how to minimize the largest deviation for a given function
via Mathematica.
Example 3.2.1. For the following data set, formulate the mathematical model that minimize the largest
deviation between the data and the line y = ax + b. (We use Mathematica to estimate a and b.)
x
1.0
2.3
3.7
4.2
6.1
7.0
3.6
3.0
3.2
5.1
5.3
6.8
A NSWER. Let r be the largest absolute deviation between the data and f (x) = ax + b. Then for the following
absolute deviations, |yi f (xi )|, we have
|3.6 f (1.0)| = |3.6 1.0a b| r
= r 3.6 1.0a b r
|3.0 f (2.3)| = |3.0 2.3a b| r
= r 3.0 2.3a b r
|3.2 f (3.7)| = |3.2 3.7a b|
= r 3.2 3.7a b r
|5.1 f (4.2)| = |5.1 4.2a b|
= r 5.1 4.2a b r
|5.3 f (6.1)| = |5.3 6.1a b|
0 r + 1.0a + b 3.6
0 r + 2.3a + b 3.0
0 r + 3.7a + b 3.2
0 r + 4.2a + b 5.1
Page 30 of 57
Mathematical Modeling
Spring, 2010
0 r + 6.1a + b 5.3
0 r + 7.0a + b 6.8
0 r + 1.0a + b 3.6
0 r + 2.3a + b 3.0
0 r + 3.7a + b 3.2
0 r + 4.2a + b 5.1
0 r + 6.1a + b 5.3
0 r + 7.0a + b 6.8.
We want to find a and b, i.e., f (x) = ax + b minimizing the largest absolute deviation r subject to the 12
constraints above.
By the computer, we obtain
f (x) = 0.533333x + 2.14667
and the largest absolute deviation is r = 1.45333 which occurs at the last data (7.0, 6.8).
ri .
i=1
sum r1 + r2 .
of absolute deviations is
ri2.
i=1
i=1
That is, we may interpret the leastsquares criterion as minimizing the magnitude of the vector whose coordinates represent the absolute deviation between the observed and predicted values.
Topic IV. Relating the Criteria.
In the previous topics, we have discussed the geometric interpretations. Now let us compare the criteria
analytically.
Suppose m data, (xi , yi ), i = 1, 2, . . . , m, are given and Chebyshev and leastsquares criterion give the model
y = fC (x) and y = fL (x), respectively. Let
ci = |yi fC (xi )|,
Mathematical Modeling
Spring, 2010
Proof. Because of the parameters of the function y = fC (x) are determined so as to minimize the value
of cmax , it is the minimal largest absolute deviation obtainable.
2. Letting
D=
2
m
i=1 di
,
m
di2 = d12 + d22 + + dm2 c21 + c22 + + c2m c2max + c2max + + c2max = mc2max
i=1
2
m
i=1 di
c2max
D=
2
m
i=1 di
cmax .
m
Through an example, one can apply the criteria and compare the values D, cmax and dmax , which will be
studied in S ECTION 3.4 C HOOSING A B EST M ODEL3.4.
Page 32 of 57
Mathematical Modeling
Spring, 2010
(3.3.1)
i=1
Considering S as a function of two independent variables a and b, finding the minimum value of S is the
problem on the minimum value of S(a, b) in Calculus. From Calculus, we recall
1. A point (a0 , b0 ) is called a critical point of S(a, b) if
(i) (a0 , b0 ) is in the domain of S(a, b) and
(ii) either Sa (a0 , b0 ) = 0 or Sb (a0 , b0 ) = 0 and
(iii) one of both of Sa (a0 , b0 ) and Sb (a0 , b0 ) do not exist.
(Here Sa means the partial derivative of S(a, b) with respect to a.)
2. If S(a, b) has a local extremum at (a, b) = (a0 , b0 ), then (a, b) = (a0 , b0 ) must be a critical point of S(a, b).
(However, the converse is not generally true.)
3. (S ECOND D ERIVATIVE T EST) Suppose that S(a, b) has continuous secondorder partial derivatives in
some open disk containing the point (a0 , b0 ) and that Sa (a0 , b0 ) = 0 = Sb (a0 , b0 ). For the discriminant
D(a, b) for the point (a, b) defined by
D(a, b) = Saa (a, b)Sbb (a, b) [Sab (a, b)]2 ,
(i) if D(a0 , b0 ) > 0 and Saa (a0 , b0 ) > 0, then S has a local minimum at (a0 , b0 ),
(ii) if D(a0 , b0 ) > 0 and Saa (a0 , b0 ) < 0, then S has a local maximum at (a0 , b0 ),
(iii) if D(a0 , b0 ) < 0, then S has a saddle point at (a0 , b0 ),
(iv) if D(a0 , b0 ) = 0, then no conclusion can be drawn.
Let us find the local minimum of S(a, b) defined in (3.3.1). To find the critical point of S, we compute
[
]
m
m (
m
m
m
)
S
0=
= 2 (yi axi b) xi = 2 xi yi axi2 bxi = 2 (xi yi ) a xi2 b xi ,
a
i=1
i=1
i=1
i=1
i=1
[
]
m
m
m
m
S
0=
= 2 (yi axi b) = 2 yi a xi b 1 .
b
i=1
i=1
i=1
i=1
For a simple computation, we introduce vectors x = x1 , x2 , . . . , xm and y = y1 , y2 , . . . , ym and i = 1, 1, . . . , 1.
Then we observe
m
i=1
m
i=1
m
i=1
m
i=1
Page 33 of 57
Mathematical Modeling
Spring, 2010
m = 1 + 1 + + 1 = i i,
where x y is the dot product between vectors x and y. So those equations on Sa and Sb for the critical points
become
0 = x y ax x bx i = ax x + bx i = x y
0 = y i ax i bi i = ax i + bi i = y i.
(3.3.2)
(3.3.3)
The resulting two equations (3.3.2) and(3.3.3) are called the normal equations. Simply,
x (y ax bi) = 0
i (y ax bi) = 0.
and
(Be careful! In general, u v = 0 implies neither u = 0 nor v = 0. So we should not say y ax bi = 0.)
To find the critical points of S, we should solve the normal equations (3.3.2) and (3.3.3) for a and b.
(1) (3.3.2) (i i) (3.3.3) (x i) implies
a [(x x)(i i) (x i)(x i)] = (x y)(i i) (y i)(x i),
i.e.,
a=
(x y)(i i) (x i)(y i)
.
(x x)(i i) (x i)2
i.e.,
b=
(x x)(y i) (x y)(x i)
.
(x x)(i i) (x i)2
(3.3.4)
which is clearly in the domain of S(a, b), i.e., R R under the assumption (x x)(i i) (x i)2 = 0. In fact,
the denominator (x x)(i i) (x i)2 cannot be zero. See below (3.3.5).
Now we use the S ECOND D ERIVATIVE T EST to classify the local extremum at the found critical point
(a0 , b0 ).
m
xi yi axi2 bxi
i=1
Sbb (a, b) = 2 1 = 2i i,
i=1
2
D(a, b) = Saa (a, b)Sbb (a, b) Sab (a, b) = 4(x x)(i i) 4(x i)2
Sab (a, b) = 2 xi = 2x i,
i=1
[
]
= 4 (x x)(i i) (x i)2 .
We observe D(a, b)/4 = (x x)(i i) (x i)2 is the denominator of the critical points. So it cannot be zero.
See below (3.3.5).
As we can see, all of Saa and Sbb and D(a, b) are constants, because they dont have the variables a and b.
Moreover, the C AUCHYS CHWARTZ I NEQUALITY in Calculus says
|u v| uv,
which implies
|u v|2 u2 v2 ,
Personally,
0 u2 v2 |u v|2 ,
0 (u u)(v v) (u v)2 ,
Page 34 of 57
(3.3.5)
Mathematical Modeling
Spring, 2010
where the equality holds for the cases: Case 1. u = 0 or v = 0 and Case 2. u and v are parallel, i.e., u = sv
for some scalar s.
[
]
Since x and i are not parallel, hence, we deduce D(a, b) = 4 (x x)(i i) (x i)2 > 0 for all (a, b) and also
Saa (a, b) = 2x x = 2x2 > 0 for all (a, b). Therefore, by the S ECOND D ERIVATIVE T EST, the function S
has the local minimum at the critical point (a0 , b0 ) found in (3.3.4).
Before we find the local minimum value of S, let us modify the function S using the vectors:
m
m [
]
S(a, b) = [yi axi b]2 = y2i + a2 xi2 + b2 2 (axi yi abxi + byi )
i=1
m
i=1
m
2
= y2i + a2 xi2 + b
i=1
i=1
12
i=1
i=1
i=1
i=1
a (xi yi ) ab xi + b yi
= y y + a x x + b i i 2 (ax y abx i + by i)
= (ax + bi) (ax + bi) 2(ax + bi) y + y y
2
(3.3.6)
10
estimate the parameters of the fitting model y = ax + b by using the LeastSquares criterion.
A NSWER. We use the formulas deduced above. Let x = 1, 5, 8 and y = 1, 10, 6 and i = 1, 1, 1. Then the
objective function S is
S(a, b) = y ax bi2 ,
and by the result (3.3.4), it has the following critical point (a0 , b0 ):
)
(
(x y)i2 (x i)(y i) (y i)x2 (x y)(x i)
(a0 , b0 ) =
,
x2 i2 (x i)2
x2 i2 (x i)2
(
) (
)
99(3) 14(17) 17(90) 99(14)
59 72
=
,
=
,
= (0.797297, 1.94595) .
90(3) 142
90(3) 142
74 37
Putting it into the formula (3.3.6) on the minimum value, we have the minimum value
(
59 72
S
,
74 37
2
59
72
=
y x i
74
37
2
59 72
5(59) 72
8(59) 72
= 1849 = 24.9865.
=
1 , 10
, 6
74 37
74
37
74
37
74
Thus, we conclude that the model y = 0.797297x + 1.94595 gives the minimum value of the sum of the
squares of the absolute deviations and the minimum value is 24.9856.
Remark 3.3.2. 1. The minimum value 24.9856 is obtained analytically by the formula (3.3.6). When we use
the model y = 0.797297x + 1.94595 and the data, we can make the following table.
Page 35 of 57
Mathematical Modeling
Spring, 2010
10
yi 0.797297xi 1.94595
1.74324
4.06757
2.32432
i=1
S = (yi axin )2 .
i=1
(3.3.7)
n and y =
By the similar argument as discussed in Topic I above, we introduce vectors x = x1n , x2n , . . . , xm
y1 , y2 , . . . , ym . Then S becomes the function of one variable a and its critical point is found by
[
]
m
m
m
[
]
S
xy
= 2 (yi axin ) xin = 2 (xin yi ) a xi2n = 2 x y ax2
= a =
.
0=
a
x2
i=1
i=1
i=1
That is, S has the critical point
a0 =
xy
.
x2
i=1
i=1
y2i + a2
i=1
xi2n 2a
i=1
Putting the critical point a = a0 into the resulting function S(a), we have the minimum value
S(a0 ) = y a0 x2 .
Page 36 of 57
Mathematical Modeling
Spring, 2010
Example 3.3.3 (L EASTS QUARES WITH F IXED P OWER n = 2). For the given data,
x
0.5
1.0
1.5
2.0
2.5
0.7
3.4
7.2
12.4
20.1
estimate the parameters of the fitting model y = ax2 by using the LeastSquares criterion.
A NSWER. Let x = 0.52 , 1.02 , 1.52 , 2.02 , 2.52 and y = 0.7, 3.4, 7.2, 12.4, 20.1. Then the objective function
S is
S(a) = y ax2 ,
and it has the following critical point a = a0 :
a0 =
xy
= 3.18693.
x2
If we apply the leastsquares criterion on y = axn directly to the m data, we have to differentiate (yi axin )2
i=1
with respect to a and n to get the critical point. However, it is not easy to get the critical point of such a
function. (One may try to find the critical point!)
The strategy to estimate the parameters of the model y = axn is using the independent substitution on x and y
or simply transformation on the data, Y = ln y and X = ln x. Taking the natural logarithmic function on data
(x, y), we have the transformed data (X,Y ) = (ln x, ln y) and the fitting model becomes
ln y = ln(axn ) = ln a + ln xn = ln a + n ln x
Y = nX + A,
(A = ln a)
(3.3.8)
which is linear in terms of X and Y and whose parameters n and ln a can be estimated by the technique
discussed in Topic I above. The reason why we transform the data and the model by the natural logarithmic
function mainly lies on the properties of the logarithmic function: explicitly, we can pull down the power of
Page 37 of 57
Mathematical Modeling
Spring, 2010
an exponential function so that the exponential model y = axn becomes a linear one Y = nX + ln a. Moreover,
since a logarithmic function is a onetoone correspondence (or a bijection) and a conformal mapping (i.e.,
anglepreserving mapping), the transformation via the function does not change the critical properties (such
as the absolute deviations) inherited in the original data.
Now let us estimate a and n in the exponential model y = axn . We apply the leastsquares criterion developed
in Topic I to the transformed model (3.3.8). Then the objective function S on the transformed data (X,Y ) =
(ln x, ln y) has the independent variables n and A, i.e.,
m
i=1
i=1
i = 1, 1, . . . , 1 .
nX i + Ai i = Y i.
and
(See the equations (3.3.2) and (3.3.3).) Solving the equations for n and A, we find the critical point (n, A) =
(n0 , A0 ),
(
)
(X Y)i2 (X i)(Y i) (Y i)X2 (X Y)(X i)
(n0 , A0 ) =
,
(3.3.9)
X2 i2 (X i)2
X2 i2 (X i)2
(See the result (3.3.4).) Thus S(n, A) has the minimum value
S(n0 , A0 ) = Y n0 X A0 i2 .
(3.3.10)
Since now we know the critical point (n0 , A0 ), those parameters of the exponential model y = axn are obtained
by
n = n0 ,
and
a = eA0 ,
i.e.,
y = eA0 xn0 .
Example 3.3.5 (T RANSFORMED L EASTS QUARES WITH U NFIXED P OWER n (S AME DATA AS IN E XAM PLE 3.3.3)). For the given data,
x
0.5
1.0
1.5
2.0
2.5
0.7
3.4
7.2
12.4
20.1
estimate the parameters of the fitting model y = axn by using the Transformed LeastSquares criterion. (Here
we have two parameters a and n to estimate.)
A NSWER. Since the model is an exponential function, we transform the data and the model by the logarithmic function.
x
0.5
1.0
1.5
2.0
2.5
0.7
3.4
7.2
12.4
20.1
X = ln x
0.693147
0.405465
0.693147
0.916291
Y = ln y
0.356675
1.22378
1.97408
2.5177
3.00072
Page 38 of 57
Mathematical Modeling
Spring, 2010
Y = nX + A,
by setting X = ln x and Y = ln y and A = ln a. Using the results deduced above, the objective function of the
transformed data becomes
S(n, A) = Y nX Ai2 ,
where X, Y, and i are vectors as in the argument above. By the formulas (3.3.9) and (3.3.10), the function S
has the critical point (n0 , A0 ) and the minimum value S(n0 , A0 ):
(
(n0 , A0 ) =
)
= (2.06281, 1.12661) ,
WITH
0.5
1.0
1.5
2.0
2.5
0.7
3.4
7.2
12.4
20.1
AS IN
EX-
estimate the parameters of the fitting model y = ax2 by using the Transformed LeastSquares criterion. (Here
we have two parameters a and n to estimate.)
A NSWER. We follow the exactly same argument in the previous example. The model y = ax2 becomes
ln y = 2 ln x + ln a
Y = 2X + A.
Therefore, we deduce the fitting model y = eA0 x2 = e1.14322 x2 = 3.13684x2 with the minimum value 0.0205521
of the sum of the squares of the absolute deviations.
Remark 3.3.7. For the data given in Example 3.3.3, we have tested three models with different criteria:
1. y = ax2 with LeastSquares (Example 3.3.3): We have deduced y = 3.18693x2 with the minimum value
0.20954.
2. y = axn with Transformed LeastSquares (Example 3.3.5): We have deduced y = 3.08519x2.06281 with the
minimum value 0.014179.
3. y = ax2 with Transformed LeastSquares (Example 3.3.6): We have deduced y = 3.13684x2 with the
minimum value 0.0205521.
Let us make a table on the deviations and compare them.
Page 39 of 57
Mathematical Modeling
Spring, 2010
0.5
1.0
1.5
2.0
2.5
0.7
3.4
7.2
12.4
20.1
1. yi 3.18693xi2
0.0967325
0.21307
0.0294075
0.34772
0.181688
2. yi 3.08519xi2.06281
0.0384383
0.31481
0.0792666
0.489902
0.32474
3. yi 3.13684xi2
0.08421
0.26316
0.14211
0.14736
0.49475
Model
2.
1. yi 3.18693xi2
yi 3.08519xi2.06281
3. yi 3.13684xi2
2
m
i=1 (yi y(xi ))
0.20954
0.34772
0.452326
0.489902
0.363032
0.49475
In the case of the given data, we observe the first model y = 3.18693x2 makes the smallest sum of the
absolute deviations and also smallest sum of the squares of the deviations. So we are allowed to say the
best one between those three models is the first one. We may guess this result before going through all
the computations in those three examples. Simply speaking, when we use the transformation, the data get
damaged and the transformed model also loose some information. Due to these loss, the transformed model
may not be better than the one obtained from the original data. However, such as in the exponential model
y = axn with unfixed power n, we need to transform the data and the model anyway.
We end this section by copying one paragraph in the textbook. The preceding examples illustrate two
facts.
1. If an equation can be transformed to yield an equation of a straight line (Topic I) in the transformed
variable, equations (3.3.2) and (3.3.3) can be used directly to solve for the slope and intercept of the
transformed graph.
2. The leastsquares best fit to the transformed equations does not coincide with the leastsquares best
fit of the original equations. The reason for this discrepancy is that the resulting optimization problems
are different. In the case of the original problem, we are finding the curve that minimizes the sum of the
squares of the deviations using the original data, whereas in the case of the transformed problem we are
minimizing the sum of the squares of the deviations using the transformed variables.
Page 40 of 57
Mathematical Modeling
Spring, 2010
0.5
1.0
1.5
2.0
2.5
0.7
3.4
7.2
12.4
20.1
yi
yi 3.1869xi2
yi 3.1368xi2
yi 3.17073xi2
0.5
0.7
0.0967
0.0842
0.0927
1.0
3.4
0.2131
0.2632
0.2293
1.5
7.2
0.029475
0.1422
0.0659
2.0
12.4
0.3476
0.1472
0.2829
2.5
20.1
0.181875
0.4950
0.28293
[yi y(xi )]
y = 3.1869x2
0.2095
0.3476
Transformed LeastSquares
y = 3.1368x2
0.3633
0.4950
Chebyshev
y = 3.17073x2
0.2256
0.28293
Criterion
Model
LeastSquares
Mathematical Modeling
Spring, 2010
(2) If the model seems reasonable, estimate the parameters a and b of the model graphically.
AND
(2)
IN
of which graph on the ln y versus ln x is a line with the slope b and the (ln y)intercept (0, ln a). A simple
computation gives the transformed data (ln x, ln y). Plotting them, we observe a line. Using two points
(ln 17, ln 19) and (ln 41, ln 294), we have the slope b = 3.11139 and the (ln y)intercept (0, 5.8708), i.e.,
a = 0.00282062 and so we deduce
y = 0.00282062x3.11139 .
A NSWER TO Q UESTIONS 1, 2, AND 3 IN S ECTION 3.4. For the model y = axb , we transform the data and
apply the transformed leastsquares fit:
ln y = b ln x + ln a,
which gives the normal equations with m = 15,
m
m
m m
i=1 ln xi ln yi i=1 ln xi i=1 ln yi
m
2
2
m m
i=1 (ln xi ) (i=1 ln xi )
m
m
m (ln xi )2 m
i=1 ln yi i=1 ln xi i=1 ln xi ln yi
ln a = i=1
.
m
2
2
m m
i=1 (ln xi ) (i=1 ln xi )
b=
17
19
20
22
23
25
28
31
32
33
36
37
38
39
41
19
25
32
51
57
71
113
141
123
187
192
205
252
259
294
Page 42 of 57
Mathematical Modeling
Spring, 2010
Page 43 of 57
Spring, 2010
Mathematical Modeling
yi 0.0028xi3.1114
yi
xi
141
31
yi 0.0028xi3.1114
xi
17.8165
yi 0.0032xi3.0919
yi
10.0625
21.4427
12.9732
123
32
1.4341
0.0001
19
17
28.1397
37.3648
187
33
3.8209
1.8563
25
19
15.8991
4.1592
192
36
1.7741
0.4967
32
20
21.2786
8.6150
8.6215
22
37
5.6514
51
205
8.3356
23
19.9041
4.9701
57
6.2729
252
38
3.6688
7.9215
71
25
7.2763
7.3673
259
39
17.4145
23.2535
113
28
16.8033
0.0022
294
41
Criterion
y = 0.00282062x3.11139
Model
2826.26
3174.81
28.1397
37.3648
yi 0.0032xi3.0919
Transformed Linearity
y = 0.00320603x3.09187
[yi y(xi )]
Transformed LeastSquares
Page 44 of 57
Chapter 4
(Original Pr)
and
z 0.
(4.0.1)
(4.0.2)
(4.0.3)
and we will find the largest value of z and the pair (x1 , x2 ) which gives the largest value of z.
By collecting the coefficients, we record the problem into the socalled Tucker tableau .
In the objective function constraint (4.0.3), we compare the absolute value of the coefficients. Since the
coefficient of x1 has the largest absolute value 3, so we choose x1 as the entering variable.
Compute the ratio of the RHS divided by the column labeled x1 to determine the minimum positive ratio.
Choose y1 corresponding to the minimum positive ratio 3 as the exiting variable.
Pivot Divide the row containing the exiting variable (the first row in this case) by the coefficient of the
Simplex
algorithm was developed in the 1940s by George B. Dantzig. We will employ certain refinements in Dantzigs
original technique developed in the 1960s by A.W. Tucker.
slack: wanting in activity; lacking in completeness, finish, or perfection
Tableau: picture, painting, representation, illustration, image
Pivot: a shaft or pin on which something turns
45
Mathematical Modeling
Spring, 2010
x1
x2
y1
y2
RHS
x2
y1
y2
RHS
x2
y1
y2
RHS
Ratio
3 (= 6/2)
9 (= 9/1)
x2
y1
y2
RHS
1/2
1/2
x1
x2
y1
y2
RHS
1/2
1/2
11
3 1/2
0 1/2
93
3 + 3
1 + 3/2
0 + 3/2
0+9
Simply,
Since there are no negative coefficients in the bottom row, thus x1 = 3 and y2 = 6 (i.e., x2 = 0 by (4.0.2))
gives the extreme point (x1 , x2 ) = (3, 0) at which the optimal objective function value z = 9.
Page 46 of 57
Mathematical Modeling
Spring, 2010
x1
x2
y1
y2
RHS
1/2
1/2
3 (= x1 )
5/2
1/2
6 (= y2 )
1/2
3/2
9 (= z)
(4.0.4)
(4.0.5)
(4.0.6)
By collecting the coefficients, we record the problem into the Tucker tableau:
x1
x2
y1
y2
RHS
20
30
690
120
25
30
In the objective function constraint (4.0.9), we compare the absolute value of the coefficients. Since the
coefficient of x2 has the largest absolute value 30, so we choose x2 as the entering variable.
x1
x2
y1
y2
RHS
20
30
690
120
25
30
Compute the ratio of the RHS divided by the column labeled x2 to determine the minimum positive ratio.
Page 47 of 57
Mathematical Modeling
Spring, 2010
x1
x2
y1
y2
RHS
Ratio
20
30
690
23 (= 690/30)
30 (= 120/4)
25
30
x2
y1
y2
RHS
2/3
1/30
690/30
120
25
30
x1
x2
y1
y2
RHS
2/3
1/30
690/30
5 8/3
44
0 4/30
120 4(690/30)
25 + 30(2/3)
30 + 30
0 + 30/30
0 + 30(690/30)
Simply,
x1
x2
y1
y2
RHS
2/3
1/30
23
7/3
2/15
28
690
Since we have a negative coefficient in the bottom row, we repeat the work by comparing the coefficients of
the absolute values in the bottom row.
Simply,
Page 48 of 57
Mathematical Modeling
Spring, 2010
x1
x2
y1
y2
RHS
2/3
1/30
23
7/3
2/15
28
690
x2
y1
y2
RHS
2/3
1/30
23
2/35 = (2/15)(3/7)
3/7
12 = 28(3/7)
690
x1
x2
y1
y2
RHS
2/3 2/3
1/30 (2/3)(2/35)
0 (2/3)(3/7)
23 (2/3)12
2/35
3/7
12
5 + 5
1 + 5(2/35)
0 + 5(3/7)
690 + 5(12)
x1
x2
y1
y2
RHS
1/14
2/7
15 (= x2 )
2/35
3/7
12 (= x1 )
5/7
15/7
750 (= z)
Since there are no negative coefficients in the bottom row, thus by choosing y1 = 0 = y2 , we get x1 = 12
and x2 = 15 which gives the extreme point (x1 , x2 ) = (12, 15) and the optimal objective function value z =
750.
Example 4.0.3. An electrical firm manufactures circuit boards in two configurations, say configuration #1
and configuration #2. Each circuit board in configuration #1 requires 1A component, 2B component, and 2C
component; each circuit board in configuration #2 requires 2A component, 2B component, and 1C component. The firm has 20A components, 30B components and 25C components available. If the profit realized
upon sale is $200 per circuit board in configuration #1 and $150 per circuit board in configuration #2, how
many circuit boards of each configuration should the electrical firm manufacture so as to maximize profits?
A NSWER. Let x1 and x2 be respectively the number of circuit boards in configuration #1 and #2. Then the
mathematical formulation of the problem is
Maximize 200x1 + 150x2
subject to x1 + 2x2 20
2x1 + 2x2 30
2x1 + x2 25.
Using the slack variables y1 , y2 , y3 and z, we can rewrite the original problem as follows:
x1 + 2x2 + y1 = 20
Page 49 of 57
(4.0.7)
Mathematical Modeling
Spring, 2010
2x1 + 2x2 + y2 = 30
2x1 + x2 + y3 = 25
200x1 150x2 + z = 0
x1 , x2 , y1 , y2 , y3 , z 0,
(4.0.8)
(4.0.9)
(4.0.10)
and we will find the largest value of z and the pair (x1 , x2 ) which gives the largest value of z.
By collecting the coefficients, we record the problem into the Tucker tableau.
x1
x2
y1
y2
y3
RHS
20
30
25
200
150
In the objective function constraint (4.0.10), we compare the absolute value of the coefficients. Since the
coefficient of x1 has the largest absolute value 200, so we choose x1 as the entering variable.
x1
x2
y1
y2
y3
RHS
20
30
25
200
150
Compute the ratio of the RHS divided by the column labeled x1 to determine the minimum positive ratio.
x1
x2
y1
y2
y3
RHS
20 (= 20/1)
15 (= 30/2)
200
150
25/2 (= 25/2)
0
Choose y3 corresponding to the minimum positive ratio 25/2 = 12.5 as the exiting variable.
Pivot Divide the row containing the exiting variable (the third row in this case) by the coefficient of the
entering variable in that row (the coefficient of x1 in this case), giving a coefficient of 1 for the entering
variable in this row. Then eliminate the entering variable x1 from the remaining rows (which do not contain
the exiting variable y3 and have a zero coefficient for it).
Page 50 of 57
Mathematical Modeling
Spring, 2010
x1
x2
y1
y2
y3
RHS
20
30
1/2
1/2
25/2
200
150
x1
x2
y1
y2
y3
RHS
11
2 1/2
0 1/2
20 25/2
22
21
01
30 25
1/2
1/2
25/2
200 + 200
150 + 100
100
0 + (25/2)200
Simply,
x1
x2
y1
y2
y3
RHS
3/2
1/2
15/2
1/2
1/2
25/2
50
100
2500
Since there are no negative coefficients in the bottom row, thus x1 = 3 and y2 = 6 (i.e., x2 = 0 by (4.0.2))
gives the extreme point (x1 , x2 ) = (3, 0) at which the optimal objective function value z = 9.
Page 51 of 57
Mathematical Modeling
Spring, 2010
Page 52 of 57
Chapter 5
5.1 Introduction.
Read the textbook. Studied in class but the lecture note has not been typed.
5.2 Dimensions as Product.
Read the textbook. Studied in class but the lecture note has not been typed.
53
Mathematical Modeling
Spring, 2010
Page 54 of 57
Chapter 6
55
Mathematical Modeling
Spring, 2010
Page 56 of 57
Chapter 7
57