math modelling intro
math modelling intro
Unit I.5
Mathematical modelling
Study guide
This unit is devoted to the study of mathematical modelling. You may well
have done some mathematical modelling before in MST121 and/or MST209
and/or at the MSXR209 Residential School. In this unit, the framework
for the creation, solution, interpretation and evaluation of mathematical
models, introduced in MST121 and MST209, will be re-introduced within
the context of optimization. This will give you a range of modelling skills
that will be useful when you wish to create your own mathematical models.
If you have studied either of these courses then you will find the concepts PC
very familiar, although almost all of the examples and exercises will be
different. Also, if you have studied MSXR209 then you will find much of
the material in Subsection 2.1 familiar.
Ideally, you should study the material in the unit in the order in which it
is presented. However, the second case study, in Section 2, involves work-
ing through a multimedia package. If it is more convenient to study this
multimedia package later, you can interchange Sections 2 and 3.
In addition to the multimedia package, you will need your computer for
activities at the end of Sections 2 and 4.
As with most branches of applied mathematics, mathematical modelling can PC
be learnt only by doing it. For this reason, we have included many exercises,
particularly in Section 4 of this unit. You should plan to spend a substantial
part of your study time on this unit working through Section 4, making sure
that you tackle the exercises. You should make a serious attempt at tackling
the exercises yourself, looking at the solutions only if you are completely
stuck.
There is no prerequisite knowledge required for this unit beyond that needed
for Units I.1–I.4 , though it would be helpful if you could recall the tech-
niques for classifying stationary points of functions of one variable.
This publication forms part of an Open University course. Details of this and other Open Uni-
versity courses can be obtained from the Student Registration and Enquiry Service, The Open
University, PO Box 197, Milton Keynes MK7 6BJ, United Kingdom: tel. +44 (0)845 300 6090,
email [email protected]
Alternatively, you may visit the Open University website at http://www.open.ac.uk where you can
learn more about the wide range of courses and packs offered at all levels by The Open University.
To purchase a selection of Open University course materials visit http://www.ouw.co.uk, or
contact Open University Worldwide, Walton Hall, Milton Keynes MK7 6AA, United King-
dom, for a brochure: tel. +44 (0)1908 858793, fax +44 (0)1908 858787, email ouw-customer-
[email protected]
Outcomes 48
Index 61
Introduction
Introduction
In this unit, our aim is to develop your appreciation of the role of math-
ematics in understanding and predicting the behaviour of the real world
(as opposed to the world of mathematical theories). This process is called
mathematical modelling. The ‘real world’ problems that we shall investi-
gate in this unit will involve optimization in some form. By the end of this
unit, you should be able to develop your own mathematical models of simple
situations.
The mathematical modelling process starts with a problem in the ‘real world’,
which is translated into a mathematical model whose solution, found using
the techniques developed in this course, enables us to provide solutions to
the real-world problem. This model may also enable us to predict what will
happen in the real world if the situation changes. The key stages in the
modelling process are as follows. See MST121 or MSXR209.
1 Specify the purpose of the mathematical model:
define the problem;
decide which aspects of the problem to investigate.
2 Create the model:
state assumptions;
choose variables and parameters; We shall clarify the difference
formulate mathematical relationships. between a variable and a
parameter in Section 1.
3 Do the mathematics:
solve equations;
draw graphs;
derive results.
4 Interpret the results:
collect relevant data;
describe the mathematical solution in words;
decide what results to compare with reality.
5 Evaluate the model:
test the model by comparing its predictions with reality;
criticize the model.
The diagram in Figure 0.1 may help you to remember the five key stages in
the mathematical modelling process. The mathematical modelling
process is sometimes referred
to as the mathematical
modelling cycle.
4
Introduction
5
Section 1 Case study: the inventor y problem
6
Section 1 Case study: the inventor y problem
Example 1.1
A bakery uses flour in large quantities. It buys its flour from a supplier and
uses it to bake bread, cakes, etc. Delivery charges and other overheads are
incurred each time flour is reordered and there is a holding cost for storing
flour on the premises. Determine a mathematical model that can be used These two questions are
to decide how much flour to order each time and how often to reorder. interrelated since the longer
the time between orders, the
greater the quantity that
Specify the purpose of the mathematical model must be ordered each time.
We need to be clear about why we wish to create a mathematical model.
In our example, the bakery wishes to minimize costs, taking into account
overheads and storage charges, while maintaining sufficient stocks of flour.
In creating the mathematical model we could minimize costs over one period,
or cycle, in which stocks are replenished and then used up. However, if we
order more stock each time then the cycle will be longer and fewer orders
will be placed in the course of, say, one year. It is, therefore, more sensible
to minimize the cost over a fixed long time period rather than to minimize
the cost per cycle. This is equivalent to minimizing the average daily cost.
For the general inventory problem, therefore, our purpose is to determine
a reordering strategy that minimizes the average daily cost of replenishing
the stock of goods or raw materials, taking into account the reordering and
storage costs.
7
Section 1 Case study: the inventor y problem
From assumptions (iii) and (v), it is clear that there are two competing re-
quirements. To reduce reordering costs, it is better to order large quantities
less frequently. To reduce storage costs, only small amounts of stock should
be held.
In order to construct a mathematical model, we need to define some vari-
ables and parameters. The variables are quantities that vary within each
particular instance of the model, in this case within each particular inven-
tory system, and so serve to describe the behaviour of the system. The
parameters are quantities that are constant for a particular instance of the
model, in this case for each particular inventory system, but can take dif-
ferent values for different instances.
Each definition of a variable or parameter needs to specify its units of mea-
surement. Different units will be appropriate to different inventory systems.
The units given below correspond to the bakery example.
The variables for the model are:
x the amount, in tonnes, of raw material ordered each time;
t the time, in days, since the last delivery of stock;
T (x) the time, in days, that an amount x of stock lasts before reordering We have written T as a
is necessary; function of x to emphasize
s(t) the stock level, in tonnes, at time t; that the time between orders
depends on the quantity
C(x) the cost, in pounds, over a complete cycle if x tonnes are ordered
ordered.
each time;
D(x) the average daily cost, in pounds, of buying and storing stock if
x tonnes are ordered each time.
The parameters for the model are:
r the (constant) rate, in tonnes per day, at which raw materials are used;
C1 the fixed overhead cost, in pounds, of reordering;
c2 the fixed cost, in pounds per tonne, of buying new stock;
H the fixed holding cost rate, in pounds per tonne per day, associated
with the storage of stock.
In Example 1.1, the bakery orders x tonnes of flour every T (x) days at a
cost of c2 pounds per tonne. The fixed overhead cost of each order is C1
pounds. The stock level of flour t days after the last delivery is s(t) tonnes.
The flour is used at a constant rate of r tonnes per day and can be stored
at a cost of H pounds per tonne per day. The bakery seeks to minimize the
average daily cost of the flour, D(x) pounds.
The next stage in the creation of the mathematical model is to formulate
mathematical relationships between the variables, based on the assumptions.
Using assumptions (i), (iii), (iv) and (vi), the total cost for one complete
cycle of the single raw material is
C(x) = fixed overhead cost + cost of new stock + holding cost
= C1 + c2 x + holding cost .
8
Section 1 Case study: the inventor y problem
as illustrated in Figure 1.1. This pattern will be repeated each time the
stock is replenished. Since, by assumption (iv), s(T (x)) = 0, we have
x = rT (x), so T (x) = x/r.
During a small interval of time [t, t + δt], we can assume that the stock
level is s(t), so the holding cost is Hs(t)δt, where, by assumption (v), H is
constant. Over the complete cycle from t = 0 to t = T (x), we can sum the
holding costs over all these small intervals to obtain the total holding cost
for the cycle as
Figure 1.1
T (x) T (x)
Hs(t) dt = H (x − rt) dt = HxT (x) − 12 HrT (x)2
0 0
= HxT (x) − 12 HxT (x) = 12 HxT (x).
The total cost over a complete cycle of length T (x) is thus
C(x) = C1 + c2 x + 12 HxT (x).
We seek to minimize the average daily cost, given by
C(x) C1 c2 x C1 r
D(x) = = + + 1 Hx = + c2 r + 12 Hx.
T (x) T (x) T (x) 2 x
The function D(x) for x > 0 represents a mathematical model for the
average daily cost of replenishing the raw materials.
Note that we have been careful to link each of the assumptions to the various
relationships that form the mathematical model to make it clear where the
assumptions are needed. All of the assumptions have been used in simpli-
fying the model.
Do the mathematics
A typical graph of the function D(x) for x > 0 is given in Figure 1.2. It has
a single local minimum. Figure 1.2
To determine the value of x > 0 that minimizes the average daily cost, we
need to find the value of x at the local minimum of D(x). We differentiate
to obtain
dD(x) C1 r
= − 2 + 12 H.
dx x
Hence D(x) has stationary points where −C1 r/x2 + 12 H = 0, i.e. at
2C1 r
x=± .
H
Since the model only holds for x > 0, we ignore the negative value and just
consider
2C1 r
x= .
H
At this point we have a local minimum, since
d2 D(x) 2C1 r
2
= >0
dx x3
for C1 , r, x > 0. The minimum average daily cost is thus
⎛ ⎞
2C1 r ⎠ H 2C1 r
D⎝ = C1 r + c2 r + 12 H = c2 r + 2C1 rH.
H 2C1 r H
9
Section 1 Case study: the inventor y problem
10
Section 1 Case study: the inventor y problem
Exercise 1.1
A computer manufacturer assembles system units for PCs using imported
components and locally produced metal casings. There is a plentiful supply
of components, but the metal casings are delivered by van. A van can carry
up to 200 casings and there is a fixed delivery charge of £450 per load,
irrespective of its size; the other costs associated with ordering and delivery
are negligible. It is estimated that the holding cost per metal casing per
week is £5; the cost of each metal casing is £40. The factory produces 320
system units each five-day week.
(a) Do the assumptions for the general inventory model change for the PC
manufacturer’s problem? Are any additional assumptions needed?
(b) Define the variables and parameters for this instance of the inventory
model. What are the values of the parameters?
(c) Are any changes needed to the general inventory model in order to apply
it to this problem?
(d) How many metal casings should be ordered each time, and how often
should deliveries be made, in order to minimize costs?
Exercise 1.2
A shoe shop keeps a stock of Trailblazer shoes. Each type of shoe must
compete with other brands for the available storage and shelf space based on
profit margin and the demand for the shoes. Based on these considerations,
the holding cost rate of Trailblazers is calculated to be £0.24 per pair per
week. When stocks are reordered there is a fixed cost, for dealing with
the paperwork and having the new stock delivered, of £90 per order. The
wholesale price of Trailblazers is £20 per pair and the shop is currently
selling 30 pairs a week.
For the purposes of this exercise, you may ignore the problem of having to
stock different sizes of Trailblazers.
(a) Do the assumptions for the general inventory model change for the shoe
shop’s problem? Are any additional assumptions needed?
(b) Define the variables and parameters for this instance of the inventory
model. What are the values of the parameters?
(c) How many pairs of Trailblazers should be ordered each time, and how
often should deliveries be made, in order to minimize costs?
(d) Suppose that the shop decides that it now wants to change its replen-
ishment strategy to one that maximizes profits instead of one that min-
imizes costs. Explain, briefly, how the model would need to be changed.
We shall return to the inventory model from time to time later in the unit.
In particular, we shall look at possible revisions to the model in Section 5.
11
Section 2 Multimedia case study: least squares problems
12
Section 2 Multimedia case study: least squares problems
Definitions
A function f of two variables, defined on some region R, has a
local minimum f (α1 , α2 ) at (α1 , α2 ) ∈ R if f (x1 , x2 ) � f (α1 , α2 ) for
all (x1 , x2 ) ∈ R sufficiently close to (α1 , α2 ). The point (α1 , α2 ) is called
a local minimizer for f on R. Similarly, f has a local maximum
f (α1 , α2 ) at (α1 , α2 ) if f (x1 , x1 ) � f (α1 , α2 ) for all (x1 , x2 ) ∈ R suffi-
ciently close to (α1 , α2 ), in which case (α1 , α2 ) is a local maximizer
for f on R.
The function f has a global minimum f (α∗1 , α∗2 ) at (α1∗ , α∗2 ) ∈ R if
f (x1 , x2 ) � f (α∗1 , α∗2 ) for all (x1 , x2 ) ∈ R. The point (α∗1 , α∗2 ) is called
a global minimizer for f on R. Similarly, f has a global maxi-
mum f (α∗1 , α∗2 ) at (α∗1 , α∗2 ) if f (x1 , x2 ) � f (α1∗ , α∗2 ) for all (x1 , x2 ) ∈ R,
in which case (α∗1 , α∗2 ) is a global maximizer for f on R.
Example 2.1
Determine the stationary points of the following functions. If no domain is specified then
it can be assumed to be the
(a) f (x1 , x2 ) = x21 + x1 x2 + x22 − 9x1 − 12x2 + 50 whole of R2 .
(b) f (x1 , x2 ) = −x21 − x1 x2 − x22 + 9x1 + 12x2 − 50
Solution
(a) At a stationary point we have
∂f
(x1 , x2 ) = 2x1 + x2 − 9 = 0,
∂x1
∂f
(x1 , x2 ) = x1 + 2x2 − 12 = 0.
∂x2
This system of linear equations has solution x1 = 2, x2 = 5, so there is
a stationary point at (α1 , α2 ) = (2, 5).
(b) Since this function is just the negative of the function in (a), it also has
a stationary point at (α1 , α2 ) = (2, 5).
13
Section 2 Multimedia case study: least squares problems
Exercise 2.1
Determine the stationary points of the function
f (x1 , x2 ) = 2x21 + 3x1 x2 − 2x22 − 23x1 + 14x2 .
You may recall that the stationary points of a function of one variable fall
into three classes: local minimizers, local maximizers and points of inflection.
In a similar way, the stationary points of a function of two variables also fall
into three classes, as illustrated in Figure 2.2.
Figure 2.2
The first class consists of the local minimizers; the function of Exam-
ple 2.1(a) has a single local minimizer, as illustrated in Figure 2.2(a). The
second class consists of the local maximizers; the function of Example 2.1(b)
has a single local maximizer, as illustrated in Figure 2.2(b). The third class
consists of those points that are neither local minimizers nor local maximiz-
ers; these are referred to as saddle points, because of the typical shape
of the surface near them, as illustrated in Figure 2.2(c) in the case of the
stationary point of the function in Exercise 2.1.
In light of this, having found the stationary points of a function of two
variables, the next step is to determine which of the stationary points are
local minimizers. One way of doing this is to use the equivalent of the
second derivative test for functions of one variable, which states that for a
stationary point α of a smooth function f of one variable: ‘Smooth’ here means that f
• if f (α) > 0, then α is a local minimizer; has continuous first and
second derivatives.
• if f (α) < 0, then α is a local maximizer;
• if f (α) = 0, then the test fails, and further examination of the function
f is required to classify the stationary point.
One way of seeing why this test works is to examine the second-order Taylor
polynomial for f about x = α,
p2 (x) = f (α) + f (α)(x − α) + 12 f (α)(x − α)2 .
Close to α, this function very closely matches f (x), so the behaviour of f
and p2 near α will be the same. If α is a stationary point, so that f (α) = 0,
then we can write
f (x) − f (α) p2 (x) − f (α) = 12 f (α)(x − α)2 .
14
Section 2 Multimedia case study: least squares problems
Hence, since 12 (x − α)2 > 0, we have f (x) > f (α) if f (α) > 0 (so α is a
local minimizer) and f (x) < f (α) if f (α) < 0 (so α is a local maximizer).
If f (α) = 0, then we need to look at higher-order terms in the Taylor series
for f about x = α in order to classify the stationary point.
The equivalent test for a smooth function f of two variables can also be ‘Smooth’ here means that f
derived by use of the second-order Taylor polynomial for f about (x1 , x2 ) = has continuous first and
(α1 , α2 ), second partial derivatives.
Taylor polynomials for
∂f ∂f
p2 (x1 , x2 ) = f (α1 , α2 ) + (α1 , α2 )(x1 − α1 ) + (α1 , α2 )(x2 − α2 ) functions of two variables
∂x1 ∂x2 were discussed in Unit I.3.
∂ 2f
+ 1
(α1 , α2 )(x1 − α1 )2
∂x21
2
∂2f
+ (α1 , α2 )(x1 − α1 )(x2 − α2 )
∂x1 ∂x2
∂ 2f
+ 12 2 (α1 , α2 )(x2 − α2 )2 .
∂x2
Close to (α1 , α2 ), this function very closely matches f (x1 , x2 ), so the be-
haviour of f and p2 near (α1 , α2 ) will be the same. If (α1 , α2 ) is a stationary
∂f ∂f
point, so that ∂x 1
(α1 , α2 ) = 0 and ∂x 2
(α1 , α2 ) = 0, then we can write
f (x1 , x2 ) − f (α1 , α2 ) p2 (x1 , x2 ) − f (α1 , α2 )
∂2f
= 12 2 (α1 , α2 )(x1 − α1 )2
∂x1
∂2f
+ (α1 , α2 )(x1 − α1 )(x2 − α2 )
∂x1 ∂x2
∂2f
+ 12 2 (α1 , α2 )(x2 − α2 )2
∂x2
= 2 Ah2 + Bhk + 12 Ck2 ,
1
2
∂2f ∂2f
where A = ∂∂xf2 (α1 , α2 ), B = ∂x1 ∂x2
(α1 , α2 ), C= ∂x22
(α1 , α2 ), h = x1 − α 1
1
and k = x2 − α2 .
Hence we have f (x1 , x2 ) > f (α1 , α2 ) if 12 Ah2 + Bhk + 12 Ck2 > 0 for all small
h and k (so (α1 , α2 ) is a local minimizer) and f (x1 , x2 ) < f (α1 , α2 ) if
1
2
Ah2 + Bhk + 12 Ck2 < 0 for all small h and k (so (α1 , α2 ) is a local max-
imizer). If, for small h and k, 12 Ah2 + Bhk + 12 Ck2 can take both positive
and negative values, then (α1 , α2 ) is a saddle point. If, for small h and k,
1
2
Ah2 + Bhk + 12 Ck2 = 0 then we need to look at higher-order terms in the
Taylor series for f about (α1 , α2 ) in order to classify the stationary point.
Unlike the second derivative test for functions of one variable, classifying
stationary points for functions of two variables using this equivalent test
may seem quite a daunting prospect, requiring as it does checking the value
of 12 Ah2 + Bhk + 12 Ck2 for all small h and k.
Fortunately, however, there is a short cut. First note that we can use matrix
notation to write
A B h
1
2
Ah2 + Bhk + 12 Ck2 = 12 [h, k] = 12 vT Mv,
B C k
where
h A B
v= and M = .
k B C
15
Section 2 Multimedia case study: least squares problems
It can be shown that an expression of the form vT Mv, where M is a sym- There is further discussion of
metric matrix and v is a non-zero vector, is positive if both the eigenvalues expressions of the form
of M are positive, is negative if both the eigenvalues of M are negative, can vT Mv in Block III.
take positive and negative values if the eigenvalues have different signs, and
can be zero if either eigenvalue is zero. (Note that these are the only pos-
sibilities for values of the eigenvalues, since the eigenvalues of a symmetric
matrix with real elements are always all real.) So we need only compute the
eigenvalues of M in order to classify the stationary point.
Example 2.2
Classify the stationary point at (2, 5) for the following functions.
(a) f (x1 , x2 ) = x21 + x1 x2 + x22 − 9x1 − 12x2 + 50 These are the functions of
Example 2.1.
(b) f (x1 , x2 ) = −x21 − x1 x2 − x22 + 9x1 + 12x2 − 50
Solution
(a) We have
∂2f ∂ ∂f ∂
(x1 , x2 ) = (x1 , x2 ) = (2x1 + x2 − 9) = 2, Recall, from Unit I.3, that for
∂x21 ∂x1 ∂x1 ∂x1 well-behaved functions (such
∂ 2f ∂ ∂f ∂ as those we consider here),
(x1 , x2 ) = (x1 , x2 ) = (x1 + 2x2 − 12) = 1, ∂2f ∂2f
∂x1 ∂x2 ∂x1 ∂x2 ∂x1 ∂x1 ∂x2 = ∂x2 ∂x1 , so that we
∂2f ∂ ∂f ∂ could equally well have
(x1 , x2 ) = (x1 , x2 ) = (x1 + 2x2 − 12) = 2. obtained the second of the
∂x22 ∂x2 ∂x2 ∂x2 partial derivatives as
Therefore ∂ ∂f
(x1 , x2 )
∂2f ∂ 2f ∂ 2f ∂x2 ∂x1
A= (2, 5) = 2, B= (2, 5) = 1, C= (2, 5) = 2, ∂
∂x21 ∂x1 ∂x2 ∂x22 = (2x1 + x2 − 9) = 1.
so ∂x2
2 1
M= .
1 2
To find the eigenvalues of M, we solve the characteristic equation
det(M − λI) = 0 for λ. This gives
2−λ 1
det(M − λI) = = (2 − λ)2 − 1
1 2−λ
= λ2 − 4λ + 3 = (λ − 3)(λ − 1).
Hence the eigenvalues of M are 1 and 3, so f has a local minimum at
(2, 5).
(b) Since f here is just the negative of the function in (a), we have
−2 −1
M= .
−1 −2
Hence the eigenvalues of M are −1 and −3, so f has a local maximum
at (2, 5).
16
Section 2 Multimedia case study: least squares problems
Exercise 2.2
Classify the stationary point at (2, 5) of the function
f (x1 , x2 ) = 2x21 + 3x1 x2 − 2x22 − 23x1 + 14x2 . This is the function of
Exercise 2.1.
Exercise 2.3
Show that the function
f (x1 , x2 ) = x1 x2 (1 − x21 − x22 )
has nine stationary points, at (0, 0), (1, 0), (−1, 0), (0, 1), (0, −1), ( 12 , 12 ),
( 12 , − 12 ), (− 21 , 12 ) and (− 21 , − 12 ), and classify these points.
Exercise 2.4
Find and classify the stationary points of the function f (x1 , x2 ) = x21 + x24 .
17
Section 2 Multimedia case study: least squares problems
Exercise 2.5
Consider the symmetric matrix of second partial derivatives of a function f
at (α1 , α2 ), given by
A B
M= ,
B C
∂2f ∂ 2f ∂ 2f
where A = (α1 , α2 ), B = (α1 , α2 ) and C = (α1 , α2 ).
∂x21 ∂x1 ∂x2 ∂x22
(a) Use the characteristic equation det(M − λI) = 0 to deduce that:
a local minimizer if A > 0;
(i) if AC − B 2 > 0, (α1 , α2 ) is This method of classification
a local maximizer if A < 0; is discussed in MST209.
2
(ii) if AC − B < 0, (α1 , α2 ) is a saddle point.
(Hint : Use the fact that the roots λ1 and λ2 of the quadratic equation
λ2 − pλ + q = 0 are such that λ1 + λ2 = p and λ1 λ2 = q.)
(b) Deduce that if the diagonal elements of M are positive and det M > 0,
then (α1 , α2 ) is a local minimizer.
Having found all the stationary points of a function and having determined
which of these are local minimizers, the next step is to determine whether
any of the boundary points of the domain of the function are local mini-
mizers. (If the domain is R2 , then there are no boundary points, and no
further checking is required.) Once the boundary has been checked for local
minimizers, all the local minimizers will have been found (since, as we saw
earlier, local minimizers can only occur at stationary points or at bound-
ary points). The corresponding local minima are then compared, and the
smallest is the global minimum; the corresponding local minimizer(s) are
the global minimizer(s).
Example 2.3
One end of an air-track is raised slightly so that it has a small slope. An
object, called a glider, can then slide easily along the air-track supported on
a cushion of air. Develop a mathematical model of the motion of the glider
along the track. Use your model to estimate a value for the acceleration due
to gravity, g. Figure 2.3
18
Section 2 Multimedia case study: least squares problems
The following summarizes the modelling stages that you worked through in
the multimedia package.
we obtain
mg sin θ = mẍ, We use ẋ and ẍ to denote the
first and second derivatives of
so x with respect to t,
representing the speed and
ẍ(t) = g sin θ. (2.1)
acceleration of the glider
We therefore conclude that the glider moves along the air-track with con- along the air-track
stant acceleration. respectively.
Do the mathematics
Integrating Equation (2.1) and using the initial condition v(0) = v0 gives
ẋ(t) = v(t) = gt sin θ + v0 . (2.2)
Integrating again and using the initial condition x(0) = 0 gives
x(t) = 12 gt2 sin θ + v0 t. (2.3)
Rearranging this equation and substituting x(T ) = X gives an expression
for the acceleration due to gravity, namely
2(X − v0 T )
g= . (2.4)
T 2 sin θ
19
Section 2 Multimedia case study: least squares problems
20
Section 2 Multimedia case study: least squares problems
Now f (a0 , a1 ) is a function of the two variables a0 and a1 . The stationary The method is based on the
points of f occur where ∂f /∂a0 = 0 and ∂f /∂a1 = 0, given by assumption that the
m
observational errors in vi are
∂f random and hence that there
(a0 , a1 ) = 2(a0 + a1 ti − vi ) = 0, is no reason why any of the
∂a0 i=1
observational errors should be
m
∂f larger than the others, with
(a0 , a1 ) = 2ti (a0 + a1 ti − vi ) = 0. the result that each squared
∂a1 i=1
residual is given equal
These two equations, written out in full, divided through by 2 and re- weighting in f (a0 , a1 ). Note,
arranged, to give however, that in this case
m m m
study each vi is estimated by
observing the time δti it takes
1 a0 + t i a1 = vi , for the glider to travel 10 cm
i=1 i=1 i=1 and then estimating
m m m
vi = 0.10/δti , so we might
t i a0 + t2i a1 = ti vi , expect larger observational
i=1 i=1 i=1 errors in vi when δti is very
are called the normal equations. Provided at least two distinct points are small.
used, the matrix of coefficients of the normal equations will be non-singular
and so the equations will have a unique solution, the unique stationary point
of f . It remains to check that this stationary point is a local minimizer. From
Subsection 2.1, we know that we have a local minimizer if the eigenvalues of
the matrix M of second partial derivatives of f at the stationary point are
both positive. We have
m m m
∂2f ∂ 2f ∂2f
(a0 , a1 ) = 2, (a0 , a1 ) = 2ti , (a0 , a1 ) = 2t2i ,
∂a20 i=1
∂a0 ∂a1 i=1
∂a21 i=1
so
⎡ m m
⎤
⎢ 1 ti ⎥
⎢ i=1 ⎥
⎢
M = 2⎢ i=1 ⎥. Notice that M is 2 times the
m m ⎥
⎣ 2⎦ matrix of coefficients of the
ti ti
i=1 i=1
normal equations.
Both eigenvalues must be real since M is symmetric. The characteristic
equation for M is
m
m
2 1−λ 2 ti
i=1 i=1
det(M − λI) = m m
2 ti 2 t2i − λ
i=1 i=1
m
m
m 2
= 2 1−λ 2 t2i −λ −4 ti
i=1 i=1 i=1
m ⎛ m m 2 ⎞
m
m
=λ −2 2
1+ t2i λ + 4⎝ 1 t2 − ti ⎠i
i=1 i=1 i=1 i=1 i=1
= 0.
We know that, if λ1 and λ2 are the roots of this quadratic equation, then See the Hint to Exercise 2.5.
we must have
m ⎛ m m 2 ⎞
m
m
λ1 + λ2 = 2 1+ t2i , λ1 λ2 = 4 ⎝ 1 ti2 − ti ⎠ .
i=1 i=1 i=1 i=1 i=1
21
Section 2 Multimedia case study: least squares problems
From this we can deduce that λ1 and λ2 are both positive. To see this, we
can make use of the Cauchy–Schwartz Inequality, which says that for any The Cauchy–Schwartz
numbers x1 , x2 , . . . , xn and y1 , y2 , . . . , yn we have Inequality was proved in
Unit I.1.
(x1 y1 + x2 y2 + · · · + xn yn )2 � (x21 + x22 + · · · + x2n )(y12 + y22 + · · · + yn2 ).
Putting xi = 1 for all i, yi = ti for all i and n = m, this becomes
m 2 m
m
ti � 1 t2i ,
i=1 i=1 i=1
implying that λ1 λ2 � 0. Now, under our assumption that the matrix of co-
efficients of the normal equations is non-singular, so must M be (as M is
simply 2 times this coefficient matrix), and hence its eigenvalues must be
non-zero. Therefore we must have
λ1 and λ2 both
m 2
positive or both negative.
However, we also know that m i=1 1 > 0 and i=1 ti > 0, and hence that
λ1 + λ2 > 0, so both λ1 and λ2 must be positive. Therefore, the station-
ary point of f obtained by solving the normal equations must be a local
minimizer.
Thus, to use the least squares method to find the straight line that best fits
a set of data points, all we need to do is to obtain and solve the normal
equations for the unknowns a0 and a1 .
Example 2.4
Determine the least squares straight-line fit to the air-track data points
(ti , vi ) in the following table.
i 1 2 3 4 5 6
ti 3.3 5.1 6.3 7.4 8.5 9.3
vi 0.23 0.36 0.48 0.56 0.63 0.67
Use the least squares straight line to evaluate the air-track model.
Solution
The normal equations are
6a0 + 39.9a1 = 2.93
39.9a0 + 290.09a1 = 21.349.
These have solution a0 = −0.012 532 and a1 = 0.075 318. From Figure 2.5 we Figure 2.5
can see that the corresponding straight line v(t) = −0.012 532 + 0.075 318t
does fit the data reasonably well, suggesting that the model is indeed a good
one.
The least squares straight line obtained in Example 2.4 can also be used to
determine an estimate for g, the acceleration due to gravity. From Equa-
tion (2.2) we have
a1 g sin θ,
so that
a1 0.075 318
g = 10.53.
sin θ sin(0.007 156)
This is some way away from the accepted value of g = 9.81 m s−2 , which may
be due to inaccuracies in the observations, particularly at early times.
22
Section 2 Multimedia case study: least squares problems
There is another way of using the least squares method to analyse the exper-
imental results. From Equation (2.3), the model predicts that the distance
x(t) that the glider travels down the air-track varies quadratically with the
time t since the start of the motion. However, if we divide Equation (2.3)
by t, giving
x(t)
= v0 + 12 gt sin θ, (2.5)
t
then the model predicts that x(t)/t varies linearly with t. To test whether
this equation is a good model of reality, we could now take measurements
xi of the distance x(t) at various values ti of the time t as the glider moves
along the air-track, and compute yi = xi /ti for each i. If the data points
(ti , yi ) lie close to a straight line, then our model is likely to be a good one.
Exercise 2.6
Determine the least squares straight-line fit of the form p(t) = a0 + a1 t to
the air-track data points (ti , yi ) in the following table.
i 1 2 3 4 5 6
ti 3.3 5.1 6.3 7.4 8.5 9.3
xi 0.32 0.825 1.37 1.895 2.425 2.955
yi = xi /ti 0.0970 0.1618 0.2175 0.2561 0.2853 0.3177
Use the least squares straight line to evaluate the air-track model. Use
Equation (2.5) and the least squares straight line to determine an estimate
for g.
The least squares method can be used to fit not just straight lines but all
sorts of functions to a set of data points, as you will see in Unit III.2. In
particular, it can be used to fit a quadratic function. This means that instead
of rewriting Equation (2.3) as Equation (2.5) and seeing if the data points
(ti , yi ) lie close to a straight line, we could check whether the data points
(ti , xi ) lie close to a quadratic curve, as you are asked to do in the following
exercise.
Exercise 2.7
The least squares method is to be used to fit a curve of the form
q(t) = a0 t + a1 t2 .
(a) Show that if the residuals are defined as
ri = a0 ti + a1 t2i − xi
then the least squares method gives the normal equations You will see in Unit III.2 that
m m m the stationary point obtained
by solving these normal
t2i a0 + t3i a1 = ti xi ,
equations is a local minimizer.
i=1 i=1 i=1
m m m
t3i a0 + t4i a1 = ti2 xi .
i=1 i=1 i=1
(b) Use the normal equations in (a) to determine the least squares quadratic
fit of the form q(t) = a0 t + a1 t2 to the following air-track data.
i 1 2 3 4 5 6
ti 3.3 5.1 6.3 7.4 8.5 9.3
xi 0.32 0.825 1.37 1.895 2.425 2.955
23
Section 3 Case study: aircraft flight optimization
24
Section 3 Case study: aircraft flight optimization
Let x be the number of flights by EmJet per week and let y be the
number of flights by AlHelvetica per week. Since ‘market share =
flight share’, EmJet will carry approximately 2000x/(x + y) passengers
per week, while AlHelvetica will carry approximately 2000y/(x + y)
passengers. Since there is to be no collusion, EmJet can only vary x,
its number of flights, so the expected weekly profit for EmJet will be a
function of x given by
PE (x) = income − expenditure
2000x x
= 735 × − 30 000x = 1.47 × 106 − 3 × 104 x.
x+y x+y
Similarly, the weekly profit for AlHelvetica will be
2000y y
PA (y) = 735 × − 40 000y = 1.47 × 106 − 4 × 104 y.
x+y x+y
To maximize its profit PE (x), EmJet wants dPE (x)/dx = 0, i.e.
y
1.47 × 106 − 3 × 104 = 0. (3.1)
(x + y)2
Similarly, AlHelvetica wants dPA (y)/dy = 0, i.e.
x
1.47 × 106 − 4 × 104 = 0. (3.2)
(x + y)2
25
Section 3 Case study: aircraft flight optimization
Exercise 3.1
The above example can be generalized to deal with a variety of problems, not
just the operation of aircraft on the London–San Serife route. The purpose
of this exercise is to model the more general situation by drawing out the
main mathematical modelling elements from the account given.
(a) State the purpose of the more general model, and say when it may be
useful.
(b) Write down the assumptions and simplifications that must be made in
the creation of a model of the form given in the account but suited to
the more general situation.
(Hint : There are several assumptions that are not stated explicitly in
the account.)
(c) The basic concern of mathematical modelling is with finding relation-
ships between variables that specify the system under consideration; in
other words, with finding formulae that enable you to calculate some-
thing if you know the value of something else, or that tell you how
something varies with something else. What are the appropriate ‘some-
thing’ and ‘something else’ in this more general model (in words)?
(d) There are quite a few symbols and numerical values floating around in
the description of the London–San Serife model. A mathematical model
should be stated purely in terms of symbols, representing the variables
and parameters of the model, with no numerical values. Define the
variables and parameters of the more general model, stating their units
of measurement.
(e) Determine the more general mathematical model.
(f) Use the same method as in the example to find the analytic solution to
the mathematical model that you obtained in (e).
(g) Use the data in the London–San Serife example to check your calcula-
tions.
One advantage of the more general model obtained in Exercise 3.1 over the
specific model used in the preceding account is that it can more easily be
used to obtain results for different situations, as long as the general model
is applicable to the new situation. One such use is in determining how the
results change if one or more of the parameters of the original situation
changes. The following exercise provides an example of this.
Exercise 3.2
When the transportation optimization model of Exercise 3.1 was used for
the London–San Serife aircraft flight optimization example, the results were
integer values for the numbers of flights for both companies. In most cases,
however, the values for x and y will not be integers. In many non-linear
optimization problems, the integer solutions are close to the non-integer
solutions. Under this assumption, determine the integer solution to the
London–San Serife aircraft flight optimization problem if the number of
potential passengers increases to 3000.
26
Section 3 Case study: aircraft flight optimization
Exercise 3.3
Use the solution to the London–San Serife aircraft flight optimization prob-
lem to determine the solution if assumption (v) is changed to allow collusion
between the two companies and assumption (ii) is removed. (You should
assume that, in reaching an agreement, each company is still aiming to
maximize its own profits, rather than their joint profit.)
Exercise 3.4
Suppose that assumption (ii), that market share is roughly equal to flight
share, is changed so that the relationship between market share and flight Figure 3.1
share is given by the curve in Figure 3.1, which can be represented by the
equation
F2
M= , (3.5)
(1 − F )2 + F 2
where M is the market share and F is the flight share. This new relation-
ship means that a company offering a less frequent service could expect to
persuade even fewer passengers to travel on each of its services than would
be expected from the flight share, compared with a company offering a more
frequent service. All other assumptions remain as before.
(a) Show that the market shares and weekly profits for the two companies
are as follows.
x2 x2
Company 1: M1 = 2 , P 1 (x) = I − C1 x.
x + y2 x2 + y 2
y2 y2
Company 2: M2 = 2 , P 2 (y) = I − C2 y.
x + y2 x2 + y 2
(b) Find algebraic expressions for the optimal numbers of flights, x and y,
and the corresponding profits, P1 and P2 .
(c) Apply your revised model to the London–San Serife aircraft flight op- Do not spend time looking for
timization example to determine how many flights per week each com- the best integer solution.
pany should operate and the corresponding estimated weekly profits.
Comment on your solution.
27
Section 4 The skills of modelling
28
Section 4 The skills of modelling
29
Section 4 The skills of modelling
Exercise 4.1
In Subsection 2.3 you considered a mathematical model for the motion of a
glider on an air-track, which predicted that the motion would be governed
by the differential equation
ẍ = g sin θ, with x = 0 and ẋ = v0 when t = 0,
where θ is the angle that the air-track makes with the horizontal and v0 is
the glider’s initial speed down the slope.
(a) What other purposes could this model have?
(b) Could the model be applied in other situations?
Exercise 4.2
Envelopes come in two basic designs, as illustrated in Figure 4.1. The first
type of envelope is made from a rectangular sheet which is folded in two,
with flaps at the top, side and bottom that are used to seal it. The second
type is made from a diamond-shaped sheet of paper whose corners are folded
in to the centre of the sheet, with flaps along the edges to seal it.
(a) What criteria do you think manufacturers use in deciding which design
to use?
(b) State the purpose of a mathematical model of the two envelope designs. Figure 4.1
Exercise 4.3
In MST209 the athletics field event of putting the shot was considered. By
analysing the motion of a shot, considered as a particle moving in a vertical
plane under the action of gravity alone, the range R of the shot is found to
satisfy the equation
g
− 2 (1 + tan2 θ)R2 + (tan θ)R + H = 0,
2u
where u is the speed with which the shot is launched, θ is the angle at
which it is launched, measured from the horizontal, H is the height above
ground from which it is launched (see Figure 4.2), and g is the (constant) Figure 4.2
acceleration due to gravity.
(a) How could this mathematical model be used to improve a shot-putter’s
performance?
(b) Could the model be applied in other situations?
Exercise 4.4
New supermarkets are being built all over the country. Have you ever won-
dered how the planning departments of supermarket chains decide where to
site new stores and on what size of supermarket to build?
(a) Can you specify the problem in a form that could serve as the starting
point of a mathematical model?
(b) Can you think of any other situations that might lead to a similar prob-
lem?
30
Section 4 The skills of modelling
Exercise 4.5
What simplifying assumptions were made in setting up the shot-putter’s If you haven’t seen problems
problem in Exercise 4.3? involving projectiles, such as
the shot-putter’s problem,
Exercise 4.6 before, don’t worry if you
can’t work out a complete list
In the solution to Exercise 4.2 it was stated that one possible purpose of the of assumptions.
model for the envelope design problem is to find out which design minimizes
the amount of paper used to make an envelope. State four simplifying
assumptions that you would make in creating a mathematical model for
this problem.
Exercise 4.7
For the supermarket problem discussed in Exercise 4.4, write down four
simplifying assumptions that the planners might make in trying to create
a mathematical model of the problem of determining the optimal site and
size of a new supermarket.
31
Section 4 The skills of modelling
Exercise 4.8
For the inventory problem discussed in Section 1, determine the two key
variables and the four key parameters.
Exercise 4.9
For the envelope design problem discussed in Exercises 4.2 and 4.6, deter-
mine the three key variables and the one key parameter.
(Hint : You might find it helpful to sketch the unfolded pieces of paper used
to make each design of envelope, marking the folds and flaps.)
Exercise 4.10
Identify the two key variables for the shot-putter’s problem discussed in
Exercises 4.3 and 4.5, and define them carefully. Identify also the two key
parameters, giving appropriate units.
Exercise 4.11
For the supermarket problem discussed in Exercises 4.4 and 4.7, define key
variables and parameters that would be useful in setting up a mathematical
model that could be used to decide the position and size of new supermar-
kets?
32
Section 4 The skills of modelling
Exercise 4.12
(a) For the envelope design problem discussed in Exercises 4.2, 4.6 and 4.9,
determine expressions for the areas of the rectangular and diamond-
shaped sheets of paper needed for the two designs, in terms of x, y and
t in the first case and in terms of x, y, t and θ in the second.
(b) Under the assumption that the thickness of overlap t is small by compar-
ison with x and y (see assumption (iii) in the solution to Exercise 4.6),
any terms in t2 in the expressions for the areas obtained will be much
smaller than
√ 2the other terms, and√so can be ignored. Also, notice that
sin θ = y/ x + y and cos θ = x/ x2 + y 2 .
2
Use this information to eliminate θ and any terms in t2 from the expres-
sions you obtained in (a).
(c) Use the expressions obtained in (b) to determine when the amount of
paper needed to construct the envelope from a diamond-shaped sheet
is less than that needed to construct the envelope from a rectangular
sheet. Comment on your solution.
Exercise 4.13
Consider the supermarket problem discussed in Exercises 4.4, 4.7 and 4.11.
(a) Use one of the assumptions obtained in the solution to Exercise 4.7 to
obtain expressions that can be used to measure the likelihood of someone
choosing to use a particular supermarket, old or new, in terms of the
attractiveness of the supermarket and the distance to the supermarket.
(b) Explain how these expressions can be used to determine the catchment
area for the new supermarket.
(c) What is the shape of this catchment area?
Dimensional consistenc y
In modelling, we attempt to establish relationships between variables by
using assumptions to develop equations. We are now going to investigate a
technique that can be used to verify that these equations make sense, in that
they are dimensional ly consistent. Such an analysis can never establish that
an equation is correct; but it provides a useful check, and can sometimes
tell us that an equation is wrong.
For example, suppose you are cooking a meringue using egg whites and
sugar. In order to determine the mass, m, of the meringue, you would need
to determine the mass, m1 , of an egg white and the mass, m2 , of the sugar,
all measured in the same units. Then, assuming no mass is lost during
the cooking process, the mass of a meringue using n egg whites is given by
m = nm1 + m2 . Each additive term on the right-hand side of this equation
(nm1 and m2 ) is a mass, and the equation makes sense only if each of these
terms is measured in the same units, giving the overall mass m in the same
units. This is the essence of dimensional consistency.
33
Section 4 The skills of modelling
Definition
Mass, length, time, currency and temperature are fundamental prop-
erties of objects and are referred to as base dimensions. The base
dimension mass is denoted by M, length by L, time by T, currency by
C and temperature by Θ. Θ is the Greek letter capital
theta.
The dimensions of all quantities in this course can be expressed in terms
of the five base dimensions. For example, the dimension of speed (length
divided by time) is LT−1 . To write this more succinctly, we introduce square
brackets to mean ‘the dimension of’ and write
[speed] = LT−1 .
This is read as ‘the dimension of speed is LT−1 ’. Similarly,
[area] = L2 .
The dimensions of other quantities can be expressed in terms of M, L, T, C
and Θ by working from their units of measurement.
34
Section 4 The skills of modelling
Example 4.1
Find the dimensions of profit per unit time, flights per unit time and market
share in the aircraft flight optimization model.
Solution
The weekly profit in the aircraft flight optimization model is measured in
pounds per week, so
[profit per unit time] = CT−1 .
The number of flights per week is measured as a number per unit time,
where a number is a dimensionless quantity, so
[flights per unit time] = T−1 .
The market share for Company 1 is given as the ratio of the number of A similar analysis can be
flights per week by Company 1 divided by the total number of flights per performed for the market
week, so share for Company 2.
x [x] T−1
[market share] = = = −1 = 1,
x+y [x + y] T
i.e. market share is dimensionless.
As the examples have illustrated, we can multiply, divide and take powers
of dimensions using the usual rules of arithmetic and algebra.
Exercise 4.14
(a) What is the dimension of volume?
(b) Given that, in SI units, acceleration is measured in m s−2 , what is the
dimension of acceleration?
(c) The size of an angle θ, measured in radians, can be determined by
assuming that the angle lies at the centre of a circle and that the two
lines defining the angle are radii of the circle, as shown in Figure 4.3. Figure 4.3
If the radii have length r and the arc defined by θ has length l, then
θ = l/r. What is the dimension of angle?
The dimensions of some quantities are given in Table 4.1, where a dimension
of 1 indicates that the quantity is dimensionless. For vector quantities, we find
the dimensions of the
Table 4.1 magnitude of the vector.
quantity dimensions
number 1
angle 1
mass M
length L
time T
currency C
temperature Θ
area L2
volume L3
speed LT−1
acceleration LT−2
In modelling, all equations have to be dimensionally consistent: the
dimensions must be the same for each of the additive terms on either side
of the equation. If they are, then our confidence in the model is increased;
if they are not, then we know that we have made a mistake somewhere in
deriving the equation.
35
Section 4 The skills of modelling
Example 4.2
The period of oscillation τ of a particle of mass m suspended from a fixed
point by a light inextensible string of length l is given by
τ = 2π l/g.
Show that this equation is dimensionally consistent.
Solution
The period τ has dimension T. For the right-hand side we have
12
1 1
[2π l/g] = [2π]([l]/[g]) 2 = 1 × (L/(LT−2 )) 2 = T2 = T.
So both sides of the equation have dimension T and hence the equation is
dimensionally consistent.
Example 4.3
In Solution 4.13, the boundary of the catchment area for the new supermar-
ket was modelled as the locus of points (x, y) such that
2
k1 X k1 k2 X 2
x− + y2 = ,
k1 − k2 (k1 − k2 )2
where k1 and k2 , with k1 = k2 , are the levels of investment in the existing
and new supermarkets, sited at (0, 0) and (X, 0) respectively. Show that
this equation is dimensionally consistent.
Solution
All three additive terms in the equation, (x − k1 X/(k1 − k2 ))2 , y 2 and
k1 k2 X 2 /(k1 − k2 )2 , must have the same dimension if the equation is to be
dimensionally consistent. We have
[k1 X/(k1 − k2 )] = [k1 ][X]/[k1 − k2 ] = CL/C = L,
so that, since [x] = L,
[(x − k1 X/(k1 − k2 ))2 ] = L2 .
We also have
[y 2 ] = L2 ,
[k1 k2 X 2 /(k1 − k2 )2 ] = [k1 ][k2 ][X 2 ]/[k1 − k2 ]2 = CCL2 /C2 = L2 .
All three additive terms have the same dimension, L2 , so the equation is
dimensionally consistent.
Example 4.3 has illustrated that, when checking for dimensional consistency,
each additive term must be checked separately: although we can multiply,
divide and take powers of dimensions, we do not add or subtract them.
Exercise 4.15
Show that the equation for the average daily cost,
C1 r
D(x) = + c2 r + 12 Hx,
x
used in the inventory model in Section 1, is dimensionally consistent.
36
Section 4 The skills of modelling
Exercise 4.16
For the envelope design model discussed in Exercise 4.12, the approximate
areas of the two designs are given by
2xy + (x + 4y)t and 2xy + 4t x2 + y 2 ,
for an envelope of size x × y with overlap thickness t. Show that both
expressions are dimensionally consistent with area.
Exercise 4.17
The x-coordinate at time t of a particle moving around a circle with constant
speed may be written as
x(t) = A cos(ωt + φ).
What dimensions for A, ω and φ would ensure dimensional consistency?
Exercise 4.18
Determine whether the shot-putter’s model, given by the equation
g
− 2 (1 + tan2 θ)R2 + (tan θ)R + H = 0,
2u
is dimensionally consistent, where R is the range of the shot, u is the speed
with which it is launched, θ is the angle at which it is launched, measured
from the horizontal, and H is the height above ground from which it is
launched.
37
Section 4 The skills of modelling
Exercise 4.19
(a) Determine the angle θ that gives the maximum range R for the shot-
putter’s model, given by
g
− 2 (1 + tan2 θ)R2 + (tan θ)R + H = 0.
2u
What is the maximum range that can be achieved?
(b) Use the above equation with H = 0 to determine the optimal angle and
range in the special case where the shot is launched from ground level.
Is this consistent with the general solution of the above equation in the
special case when H = 0?
38
Section 4 The skills of modelling
39
Section 4 The skills of modelling
40
Section 4 The skills of modelling
Exercise 4.20
The solution of the inventory model in Section 1 predicts that the optimal
reorder quantity is given by
2C1 r
x= .
H
For the bakery’s problem in Example 1.1, the rate at which flour is used is
r = 3 tonnes per day, the reordering cost is C1 = 100 pounds per order and
the holding cost is H = 3 pounds per tonne per day.
(a) Determine whether the expression for x is absolutely or relatively sensi-
tive to small changes in any of its parameters in the case of the bakery’s
problem.
(b) Is the problem of determining the reorder quantity absolutely or rela-
tively ill-conditioned in the case of the bakery?
(c) Use Approximation (4.3) to estimate the change in the optimal reorder
quantity if the holding cost increases to £3.10 per tonne per day.
41
Section 5 Revising the inventor y model
End-of-section Exercises
Exercise 4.21
The solution to the aircraft flight optimization model of Section 3 is
IC2 IC1
x= and y = ,
(C1 + C2 )2 (C1 + C2 )2
where x and y are the number of journeys made per week by each company,
I is the total fare income per week, and C1 and C2 are the costs of each
journey for each of the two companies. For the London–San Serife problem
we have I = £1470 000, C1 = £30 000 and C2 = £40 000.
(a) Show that the solution is dimensionally consistent.
(b) Determine whether the solution x = 12, y = 9 to the London–San Serife
problem is absolutely or relatively sensitive to any of its parameters.
(c) Is the London–San Serife problem absolutely or relatively ill-conditioned?
(d) Use your results to estimate what would happen if EmJet’s cost per
flight increased by 10%.
42
Section 5 Revising the inventor y model
43
Section 5 Revising the inventor y model
Do the mathematics
The minimum average daily cost is achieved when
2C1 r
x= ,
H
and the minimum average daily cost is
⎛ ⎞
2C1 r ⎠
D⎝ = c2 r + 2C1 rH.
H
Exercise 5.1
(a) Give two examples in which the inventory model would need to be mod-
ified to take account of the case where there is more than one raw ma-
terial.
(b) Give two examples in which the inventory model would need to be mod-
ified to take account of the case where stocks frequently run out.
44
Section 5 Revising the inventor y model
45
Section 5 Revising the inventor y model
where the first term of the formula, c2 r, is the fixed daily cost of the raw
material and the second term represents the costs associated with reordering
and storage, as in the first model.
46
Section 5 Revising the inventor y model
Exercise 5.2
What happens to the solution of the second inventory model as the penalty
cost, P , becomes very large? Comment on this result.
Exercise 5.3
For the bakery’s problem, the cost of flour is c2 = £300 per tonne, the usage
rate is r = 3 tonnes per day, the reordering cost is C1 = £100 per order
and the holding cost rate is H = £3 per tonne per day. Suppose that the
penalty cost rate of having negative stock is P = £24 per tonne per day.
What is the optimal reorder quantity, the optimal initial stock level and the
minimum average daily cost? Interpret this solution and compare it with
the solution to the first model given in Section 1.
In the final exercise of this unit you are invited to consider alternative revi-
sions to the first model where we take into account the fact that there will
often be a variety of different raw materials that must be ordered.
Exercise 5.4
Consider the first inventory model, outlined in Subsection 5.1. Suppose that
we wish to adapt it to the situation where two raw materials are needed to
manufacture a product.
(a) How could the model be revised to allow for the two raw materials to
be ordered independently?
(b) How could the model be revised if the same supplier delivers both raw
materials?
(c) Suppose that the two raw materials must compete for space. How could
you revise the first inventory model to include this constraint?
47
Outcomes
Outcomes
After studying this unit you should be able to:
• create simple models given a clear statement of the problem;
• write down the simplifying assumptions that underpin a model;
• identify the key variables and parameters of a model;
• obtain mathematical relationships between variables, based on or linking
back to the simplifying assumptions;
• interpret the mathematical solution to a modelling problem in terms of
the original statement of the problem;
• understand the terms local and global maximizer, local and global min-
imizer, and stationary point as applied a function of two variables;
• minimize a function of two variables;
• classify the stationary points of a function of two variables;
• use the least squares method to obtain a straight-line fit to a set of data
points in R2 ;
• identify the stages in the mathematical modelling process implicit in a
given piece of mathematical modelling;
• check that mathematical relationships are dimensionally consistent;
• investigate the sensitivity of the solution to a mathematical model to
small changes in the data;
• determine absolute and relative condition numbers for the problem of
evaluating an expression;
• understand how mathematical models are evaluated and revised.
48
Solutions to the exercises
49
Solutions to the exercises
(c) Using the model, the optimal number of pairs of 2.2 We have
Trailblazers
to be delivered each time is ∂2f ∂ ∂f
(x1 , x2 ) = (x1 , x2 )
2C1 r 2 × 90 × 30 ∂x21 ∂x1 ∂x1
x= = = 150,
H 0.24 ∂
= (4x1 + 3x2 − 23) = 4,
with a time between deliveries of ∂x1
x 150
T (x) = = = 5. ∂2f ∂ ∂f
r 30 (x1 , x2 ) = (x1 , x2 )
Hence the model predicts that the optimal solution is to ∂x1 ∂x2 ∂x1 ∂x2
deliver 150 pairs of Trailblazers every five weeks. The ∂
= (3x1 − 4x2 + 14) = 3,
average weekly cost of such a strategy would be ∂x1
C1 r ∂2f
D(x) = + c2 r + 12 Hx (x1 , x2 ) =
∂ ∂f
(x1 , x2 )
x ∂x22 ∂x2 ∂x2
90 × 30
= + 20 × 30 + 12 × 0.24 × 150 ∂
150 = (3x1 − 4x2 + 14) = −4.
= £636, ∂x2
Therefore
(of which £600 is the cost of the pairs of Trailblazers
4 3
and £36 is the delivery charges plus holding costs). M= ,
3 −4
(d) We want to maximize weekly profit Q(x) = and
P (x)/T (x), where P (x) is the profit over a complete 4−λ 3
cycle. If p is the fixed selling price of a pair of Trail- det(M − λI) =
3 −4 − λ
blazers, then we have
= (4 − λ)(−4 − λ) − 9
P (x) = px − C(x),
= λ2 − 25 = (λ − 5)(λ + 5).
px − C(x)
Q(x) = = pr − D(x), So M has eigenvalues 5 and −5. Since these have op-
T (x)
posite signs, there is a saddle point at (2, 5).
and so, since pr is constant, maximizing Q(x) is the
same as minimizing
D(x). Hence the optimal solution is 2.3 At a stationary point,
to order x = 2C1 r/H pairs every T (x) = x/r weeks,
∂f
giving an average weekly profit of (x1 , x2 ) = x2 (1 − x21 − x22 ) − 2x21 x2
∂x1
Q(x) = pr − c2 r − 2C1 H. = x2 (1 − 3x12 − x22 ) = 0,
However, if maximizing profits rather than minimizing ∂f
costs is the aim, then we ought to think about trying to (x1 , x2 ) = x1 (1 − x21 − x22 ) − 2x1 x22
∂x2
sell more shoes. So we might want to revise the model
to allow for sales of more than 30 pairs of Trailblazers. = x1 (1 − x21 − 3x22 ) = 0.
Also, the shop is likely to lose sales if its stocks dwin- Now x2 (1 − 3x21 − x22 ) = 0 if
dle to zero every five weeks; more sales are likely to be x2 = 0 or 1 − 3x21 − x22 = 0.
made if sufficient stocks of all sizes are available at all Similarly, x1 (1 − x21 − 3x22 ) = 0 if
times. So assumptions (i), (ii), (iv) and (vi) will need
to be revised and a new model developed if the shop x1 = 0 or 1 − x21 − 3x22 = 0.
really does want to maximize its profits. This gives four possibilities:
(a) x2 = 0, x1 = 0, so (0, 0) is a stationary point;
Section 2 (b) x2 = 0, 1 − x21 − 3x22 = 0, so x21 = 1 and there are
two stationary points, at (1, 0) and (−1, 0);
2.1 At a stationary point we have (c) 1 − 3x21 − x22 = 0, x1 = 0, so x22 = 1 and there are
∂f two stationary points, at (0, 1) and (0, −1);
(x1 , x2 ) = 4x1 + 3x2 − 23 = 0,
∂x1 (d) 1 − 3x21 − x22 = 0, 1 − x12 − 3x22 = 0, so x12 = x22 = 41 ,
∂f
(x1 , x2 ) = 3x1 − 4x2 + 14 = 0. giving four stationary points, at (± 12 , ± 12 ).
∂x2
We have
This system of equations has solution x1 = 2, x2 = 5,
so there is a stationary point at (α1 , α2 ) = (2, 5). A = −6x1 x2 , B = 1 − 3x21 − 3x22 , C = −6x1 x2 .
At the stationary point (0, 0), we have
0 1
M=
1 0
which has eigenvalues ±1. Hence this point is a saddle
point.
50
Solutions to the exercises
At the four stationary points (±1, 0) and (0, ±1), we 2.6 The normal equations are
have 6a0 + 39.9a1 = 1.3354,
0 −2
M= 39.9a0 + 290.09a1 = 9.790 33.
−2 0
These have solution a0 = −0.021 868 and
which has eigenvalues ±2. Hence these four points are
a1 = 0.036 757. From the figure we can see that the
all saddle points.
corresponding straight line does fit the data reasonably
At the two stationary points ( 12 , 12 ) and (− 12 , − 12 ), we well, suggesting that model is indeed a good one.
have
− 32 − 12
M=
− 12 − 32
which has eigenvalues −1 and −2. Hence these two
points are local maximizers.
At the two stationary points (− 12 , 12 ) and ( 12 , − 12 ), we
have
3
2 − 12
M=
− 12 3
2
which has eigenvalues 1 and 2. Hence these two points
are local minimizers.
51
Solutions to the exercises
From Equation (2.3) we have (d) The variables, based on those in the account, are:
a1 12 g sin θ, x the number of journeys made by Company 1
so that each week;
2a1 y the number of journeys made by Company 2
g 9.98.
sin θ each week;
(This is a further improvement on the value obtained P1 (x) the profit made by Company 1, in pounds per
in Exercise 2.6.) week;
P2 (y) the profit made by Company 2, in pounds per
week.
Section 3
We also need the following parameters:
3.1 (a) The more general problem is to consider two n the expected number of passengers each week;
(or more) transport operators, such as bus, rail or air f the fare paid by each passenger, in pounds;
companies, competing over the same route. It could be I the total income from fare-paying passengers,
further generalized to parcel delivery services, for ex- in pounds per week;
ample, where the ‘passengers’ are parcels. C1 the cost of each journey made by Company 1,
The purpose of the mathematical model is to enable in pounds;
two transport companies, competing to provide a ser- C2 the cost of each journey made by Company 2,
vice between two places, to maximize their profits. in pounds.
(b) The assumptions, drawn from the list given at the (e) The mathematical model arises from the relation-
beginning of the London–San Serife example, are as fol- ship
lows. profit = income − expenditure.
(i) Market research indicates that a fixed number of Now the total income from fare-paying passengers, from
people wish to travel from A to B each week. assumptions (i) and (iv), is
(ii) Each company’s market share (i.e. its propor- I = nf.
tion of the total number of passengers) will be
So the income for Company 1, using assumptions (ii),
roughly equal to its service share (i.e. its propor-
(vi), (vii), (viii), (ix) and (x), is
tion of the total number of journeys). x
(iii) The cost of each journey is fixed for each com- income = I ,
x+y
pany. while its expenditure, from assumptions (iii), (vi), (vii),
(iv) Each company charges the same passenger fare. (viii) and (ix), is
(v) There will be no collusion between the two com- expenditure = C1 x.
panies. Hence the mathematical model of the weekly profit for
Also, several other assumptions, not stated explicitly Company 1 is
in the account, need to be made. These include the x
P1 (x) = I − C1 x,
following. x+y
(vi) The problem of modelling the service from B to where assumption (v) indicates that P1 is a function of
A, which is likely to be similar, is ignored. x only.
(vii) The only income is the income from passenger Similarly, the mathematical model of the weekly profit
fares and the only expenditure is the operating for Company 2 is
y
cost of the journey. P2 (y) = I − C2 y.
x+y
(viii) The wider problem faced by a company with
many different routes and a limited number of (f ) To find the stationary points, we differentiate the
aircraft/vessels/vehicles can be ignored. profit functions to obtain
dP1 y
(ix) The scheduling of the journeys (i.e. the times of (x) = I − C1 = 0
day and the departure times relative to the other dx (x + y)2
company’s journeys) can be ignored. and
dP2 x
(x) There are sufficient places available on each jour- (y) = I − C2 = 0,
ney for the number of passengers who wish to dy (x + y)2
make that journey. so that
Iy = C1 (x + y)2 and Ix = C2 (x + y)2 .
(c) For each company, the basic problem is to repre-
sent the weekly profit in terms of the total number of Hence C1 x = C2 y, so that, in the second equation,
2
journeys that it makes, so the ‘something’ is the weekly C1
profit and the ‘something else’ is the number of journeys Ix = C2 x + x .
C2
made each week.
52
Solutions to the exercises
Ignoring the spurious solution x = 0, y = 0, we have the i.e. about £700 000 per week, and for AlHelvetica to op-
solution erate 14 flights per week at a profit of about £400 000
IC2 IC1 per week.
x= 2
, y= .
(C1 + C2 ) (C1 + C2 )2
To see that this solution maximizes profits for both com- 3.3 If EmJet and AlHelvetica were permitted to
panies, we calculate the second derivatives collaborate, then they would presumably agree to
d2 P1 y maximize their profits by sharing the passengers on
(x) = −2I a 4:3 basis, since this would have been the ratio
dx2 (x + y)3
had they been in competition. With just enough
and flights to carry all the passengers, i.e. 1143 passen-
d2 P2 x
2
(y) = −2I . gers for EmJet and 857 for AlHelvetica each week,
dy (x + y)3 EmJet would have ten 120-seat flights for a profit of
Both functions are negative for positive values of x 1143 × £735 − £30 000 × 10 £540 000 per week
and y, hence both solutions are local maxima. The and AlHelvetica could take all its passen-
maximum profit for Company 1 is gers on five 180-seat flights for a profit of
IC2 IC2 IC2 857 × £735 − £40 000 × 5 £430 000 per week.
P1 2
= − C1
(C1 + C2 ) C1 + C2 (C1 + C2 )2
IC22 3.4 (a) Company 1’s market share M1 is given by
= . F12
(C1 + C2 )2 M1 = ,
Similarly, the maximum profit for Company 2 is (1 − F1 )2 + F12
IC1 IC12 where F1 is its flight share. Therefore, since
P2 2
= . x
(C1 + C2 ) (C1 + C2 )2 F1 = ,
x+y
(g) With n = 2000 and f = 735, we have we have
I = 1 470 000. With C1 = 30 000 and C2 = 40 000, the x 2
optimal solution is x+y x2
M1 = 2 2 = .
1 470 000 × 40 000 147 × 4 1− x + x x2 + y 2
x+y x+y
x= 2
= = 12
(30 000 + 40 000) 49 Similarly, the market share for Company 2 is
and y = C1 x/C2 = 34 x = 9. The maximum profits for y2
M2 = 2 .
each company are 16 9
49 I = £480 000 and 49 I = £270 000. x + y2
All these results agree with the figures given in the The income for Company 1 is IM1 and its expenditure
London–San Serife example. is C1 x. Hence its profit is
x2
3.2 Increasing n by 50% increases I by 50%. Since the P1 (x) = I 2 − C1 x.
x + y2
optimal flight numbers and profits are just multiples Similarly, the profit for Company 2 is
of I, these will also increase by 50%. Thus the model
y2
predicts that EmJet should operate 18 flights per week P2 (y) = I 2 − C2 y.
while AlHelvetica should operate 13.5 flights per week. x + y2
This is not feasible, since the numbers of flights must (b) To find the stationary points, we differentiate the
both be integers. Under the assumption that the inte- profit functions to obtain
ger solution is close to the non-integer one, we simply dP1 2xy 2
need to compare the profits made by AlHelvetica for (x) = I 2 − C1 = 0
dx (x + y 2 )2
13 and 14 flights while EmJet makes 18 flights. With and
y = 13 and x = 18, we obtain dP2 2x2 y
y (y) = I 2 − C2 = 0,
P2 (y) = I − C2 y dy (x + y 2 )2
x+y so
3000 × 735 × 13
= − 40 000 × 13 2Ixy 2 = C1 (x2 + y 2 )2 and 2Ix2 y = C2 (x2 + y 2 )2 .
18 + 13
= 404 677.4194, Hence C1 x = C2 y, and using this in the second equation
gives
while with y = 14 and x = 18, we obtain 2
P2 (y) 404 687.5. 3 C1 C2
2Ix = C2 x + 12 x2 .
2
C2 C2
So the profit is slightly larger for 14 flights, and hence
the model predicts that the solution is for EmJet to Ignoring the spurious solution x = 0, y = 0, we have the
operate 18 flights per week at a profit of solution
x 2IC1 C22 2IC12 C2
P1 (x) = I − C1 x x= 2 2 and y = .
x+y (C1 + C2 ) 2 (C12 + C22 )2
3000 × 735 × 18
= − 30 000 × 18
18 + 14
= 700 312.5,
53
Solutions to the exercises
To see that this solution maximizes profits for both com- for a car, bike or lorry to freewheel down a hill? How
panies, we calculate the second derivatives fast will a skier be travelling when he or she reaches the
d2 P1 2y 2 (x2 + y 2 )2 − 2xy 2 (x2 + y 2 )4x bottom of a slope?
(x) = I
dx2 (x2 + y 2 )4
2y (y − 3x2 )
2 2 4.2 (a) There are several criteria that manufacturers
=I might use in the design of envelopes. For example, they
(x2 + y 2 )3
may consider the aesthetic qualities of the two designs,
and
or wish to minimize the amount of paper or glue that
d2 P2 2x2 (x2 − 3y 2 )
(y) = I . is used. If the envelopes are to be cut from a large
dy 2 (x2 + y 2 )3 sheet of paper, then it may be important to minimize
Both functions are negative √ for positive
√ values of x the amount of paper that is wasted. Business envelopes
and y provided that y < 3x and x < 3y. Hence both tend to be of the rectangular style, while personal and
solutions will be local maxima if these conditions hold. card envelopes tend to be of the diamond-shaped style.
The maximum profit for Company 1, after some rather
(b) One possible purpose of a mathematical model for
messy algebra, is
the two designs is to permit their comparison in order
2IC1 C22 IC22 (C22 − C12 ) to minimize the amount of paper that is used to manu-
P1 2 2 = .
(C1 + C2 )2 (C12 + C22 )2 facture the envelope.
Similarly, the maximum profit for Company 2 is
2IC12 C2 IC12 (C12 − C22 ) 4.3 (a) The shot-putter’s objective is to throw the
P2 = .
(C12 + C22 )2 (C12 + C22 )2 shot as far as possible. How far he or she can throw
(A glance at these two maximum profits shows that if it depends in part on his or her physique and strength,
C1 < C2 then Company 1 will make a profit while Com- and in part on exactly how the shot is thrown. A math-
pany 2 will make a loss — and vice versa. In general, ematical model of the motion of the shot cannot help
the model predicts that if the two companies compete much with the former, but it can help with the latter.
only on the number of journeys made then only one of One important factor affecting the range of the shot is
them, the one with the lower journey costs, will make a the angle at which it is launched. The formula relating
profit.) the range of the shot to the angle of launch can be used
to find the angle that gives the maximum range. The
(c) With I = 1 470 000, C1 = 30 000 and C2 = 40 000, shot-putter can then train to use this launch angle, and
we have x = 22.5792 and y = 16.9344. This so- so try to ensure that he or she achieves the maximum
lution, while non-integer, does satisfy the √ con- range (assuming that the launch speed of the shot does
straints for a maximum (x = C2 y/C1 = 43 y < 3y and
√ not depend on the angle at which it is launched).
y = C1 x/C2 = 34 x < 3x), with an expected profit of
£263 424 per week for EmJet, and a loss of £148 176 (b) Finding the maximum range of a projectile has a
per week for AlHelvetica. number of military applications: working out whether a
ship is within the range of a gun or missile, for example.
(The optimal integer solution, after some experimenta- There are applications in other sports, such as football,
tion, is for EmJet to operate 23 flights at an expected cricket, golf or basketball, where finding the maximum
weekly profit of about £260 648 and for AlHelvetica to range of the ball might be important, and in the long
operate 17 flights at an expected weekly loss of about jump, triple jump, hammer, discus or javelin events in
£160 648.) athletics.
This alternative method of modelling the market share
has led to many more flights, as the two companies com-
4.4 (a) This problem is concerned with deciding on
pete for customers. It is also clear that, if the model’s
the size and location of a new supermarket. For a given
predictions are correct, AlHelvetica would abandon the
area, there are three main questions which the planners
London–San Serife route unless it could reduce its costs.
will want to ask, all inter-related.
• Is the area already sufficiently well served by super-
Section 4 markets?
4.1 (a) The main purpose of the model for the glider • Where is the best location for a new supermarket, in
on the air-track was to predict a value for g, the ac- order to maximize the number of customers it will
celeration due to gravity. However, you might also be attract without taking customers from the chain’s
interested in using the model to estimate how long it existing sites?
would take the glider to travel from one end of the air- • Under the assumption that the bigger the super-
track to the other and/or what speed it would achieve market the more customers it will attract, how
when it reached the end of the track. much should be invested in the new supermarket?
(b) The model could be applied in a number of situ- Leaving aside such matters as whether people prefer one
ations where friction and air resistance are negligible. supermarket chain to another, one simple assumption is
For example, how long will it take a skier or toboggan that people who use supermarkets will usually shop in
to reach the bottom of a slope? How long will it take the nearest one, provided that all local supermarkets
54
Solutions to the exercises
are equally attractive. For any possible site for a new 4.6 Four possible assumptions for the envelope design
supermarket, there is therefore an area surrounding the problem are as follows.
site such that people living there would tend to use the (i) The envelopes in the two designs are of the same
new supermarket. We call this area the catchment area size.
of the site. The crucial question is: how many people
(ii) The envelope is constructed so that any overlap
live in the catchment area? The supermarket chain will
for gluing or closing the envelope is of the same
probably consider only sites for which the catchment
uniform thickness.
area contains a certain minimum number of people; and
it will attempt to choose the site that maximizes the (iii) The thickness of this overlap is small compared
number of people living in the catchment area. with the dimensions of the envelope.
If there are many supermarkets covering a particular (iv) The design of the envelope involves as much sym-
area, then it will be difficult to determine the catch- metry as possible.
ment area; so one of the key simplifications for a first (You may have thought of other possible assumptions
model will be to assume that there is only one other or have expressed some of the above assumptions dif-
supermarket in the area. ferently.)
Therefore, one fairly simple form of the problem that
could serve as the starting point of a mathematical 4.7 Four possible assumptions for the supermarket
model is to determine the catchment area of a new su- problem are as follows.
permarket given that there is just one other supermar- (i) All distances are measured as the crow flies,
ket in the area and given a particular level of invest- rather than along available roads.
ment.
(ii) The attractiveness of a supermarket can be mea-
(b) This is a problem that has wide application. For sured.
example, any new amenity will need to determine how (iii) There is just one other supermarket in the area.
many people are likely to use it, in order to determine
(iv) The probability of visiting a given supermarket
where it should be and how big it should be. To take
is proportional to the attractiveness of the facil-
another example, a new business that requires skilled
ities and inversely proportional to the square of
workers, who are in short supply, will want to choose a
its distance from the customer’s home.
site that will enable it to attract sufficient skilled work-
ers. (You may have thought of other possible assumptions
or have expressed some of the above assumptions differ-
4.5 The simplifying assumptions for the shot-putter’s ently. For example, you might have assumed that the
problem are as follows. decision on which supermarket to visit is inversely pro-
(i) The shot can be treated as a particle. portional to the distance from the supermarket, rather
(ii) All forces acting on the shot, except the gravita- than to its square.)
tional force, can be ignored.
4.8 The basic problem is to understand how the aver-
(iii) The motion of the shot-putter, before the release age daily cost varies with the amount of raw material
of the shot, can be ignored. ordered. The two key variables are: the average daily
(iv) The horizontal distance travelled by the shot is cost D(x), in pounds; and the amount, x, of raw mate-
measured from the point of release. rial ordered, in tonnes, at the beginning of each cycle.
(v) The ground in front of the shot-putter is flat. The four key parameters are: the rate r, in tonnes per
(vi) The initial velocity of the shot does not depend day, at which the raw material is used; the holding cost
on the angle of release. rate H, in pounds per tonne per day; the fixed cost C1 ,
in pounds, of reordering; and the cost c2 , in pounds per
(You may have thought of additional assumptions or tonne, of buying new stock.
have expressed some of the above assumptions differ-
ently. The above list contains all the key assumptions
for treating the shot as a projectile with a fixed initial
velocity, where air resistance is ignored.)
55
Solutions to the exercises
4.9 The problem is to determine the design that uses The three key parameters are the position X on the
least paper for a given size of envelope. The two designs x-axis, and k1 and k2 , the measured values of the at-
are shown in unfolded form below (the shaded portions tractiveness of the existing and new supermarkets re-
would need to be removed before folding and gluing). spectively. There are several possible units for k1 and
k2 . If we base attractiveness on the level of investment
in each site and on the amount spent on advertising,
say, then they can be measured in pounds.
(Of course, when the catchment area has been defined,
we still need to work out how many people live in this
area; but we shall not tackle this problem here.)
4.12 (a) From assumptions (i), (ii) and (iv) (see Solu-
tion 4.6) and the diagrams in Solution 4.9, we can work
out the two areas.
For the rectangular design, the area of the rectangle is
given as
(x + 2t)(2y + t) = 2xy + (x + 4y)t + 2t2 .
For the diamond-shaped design, we divide the diamond
into four triangles of equal size, one of which is shown.
56
Solutions to the exercises
(b) Using the values of these expressions as the decid- (c) The formula θ = l/r tells us that
ing factor in the choice of supermarket, someone living [angle] = L/L = 1.
at (x, y) will choose the new supermarket if (So angle is a dimensionless quantity and radians are
k2 k1 dimensionless units.)
2 2
> 2 ,
(x − X) + y x + y2
and the existing supermarket if the inequality is re- 4.15 [D(x)] = CT−1 .
versed. Thus the boundary between the catchment ar-
The overhead cost C1 has dimension C, the usage rate
eas occurs where
k2 k1 r has dimension MT−1 and the reorder quantity x has
= 2 . (S.1) dimension M, so
(x − X)2 + y 2 x + y2
C1 r CMT−1
Finding the locus of points satisfying this equation will = = CT−1 .
enable the catchment area for the new supermarket to x M
be determined. The cost c2 of the raw material has dimension CM−1 ,
so
(c) From Equation (S.1), the points on the boundary
of the catchment area satisfy [c2 r] = CM−1 MT−1 = CT−1 .
k2 (x2 + y 2 ) = k1 ((x − X)2 + y 2 ), The holding cost rate H has dimension CM−1 T−1 , so
which can be rearranged as [ 12 Hx] = 1CM−1 T−1 M = CT−1 .
0 = x2 (k1 − k2 ) + y 2 (k1 − k2 ) − 2k1 Xx + k1 X 2 . Hence, since all four terms have the same dimensions,
the equation is dimensionally consistent.
There are two cases to consider: k1 = k2 and k1 = k2 .
If they are both equally attractive, i.e. k1 = k2 , then the
boundary of the catchment area is given by x = 12 X. In 4.16 The dimension of area is L2 .
this case, the boundary is a line at right angles to the For the rectangular design,
x-axis, midway between the two supermarkets, as you [2xy] = 1LL = L2 and [(x + 4y)t] = LL = L2 ,
might expect!
so the whole expression has dimension L2 , as required.
If k1 = k2 then we can divide through by k1 − k2 and
For the diamond-shaped design,
collect up the terms to give √
2 2 [2xy] = L2 and [4t x2 + y 2 ] = 1L L2 = L2 ,
k1 X k1 X k1 X 2
x− − + y2 = − , so the whole expression has dimension L2 , as required.
k1 − k2 k1 − k2 k1 − k2
and hence
2
k1 X k1 k2 X 2
x− + y2 = .
k1 − k2 (k1 − k2 )2
57
Solutions to the exercises
4.17 [x(t)] = L, so for dimensional consistency we Substituting this back into the equation for the optimal
need [A cos(ωt + φ)] = L. Now [cos(ωt + φ)] = 1 pro- angle gives
vided that [ωt + φ] = 1. Hence we need [φ] = 1 and u2 1
[ωt] = 1. Since [t] = T, we must have [ω] = T−1 . tan θ = = ,
gR 1 + 2gH
With [cos(ωt + φ)] = 1, [A cos(ωt + φ)] = L provided u2
that [A] = L. So dimensional consistency is ensured if so ⎛ ⎞
[A] = L, [ω] = T−1 and [φ] = 1. 1
(From this we can deduce that the amplitude has di- θ = arctan ⎝ ⎠. (S.3)
2gH
mension L, the angular frequency has dimension T−1 1+ u2
and the phase has dimension 1.) (b) When H = 0 we have
g
4.18 Each additive term in the equation − 2 (1 + tan2 θ)R2 + (tan θ)R = 0,
2u
g
− (1 + tan2 θ)R2 + (tan θ)R + H = 0 so R = 0 or, with 1 + tan2 θ = sec2 θ = 1/ cos2 θ,
2u2
u2 u2 u2
must have the same dimension. Now [g/(2u2 )] = R= 2 tan θ cos2 θ = 2 sin θ cos θ = sin(2θ).
LT−2 /(LT−1 )2 = L−1 , [1 + tan2 θ] = 1, [R2 ] = L2 , so g g g
g Here we don’t need calculus to tell us that the maximum
[− 2 (1 + tan2 θ)R2 ] = L. value of R is obtained when sin(2θ) = 1, so θ = 14 π with
2u
Also [tan θ] = 1 and [R] = L, so R = u2 /g.
[(tan θ)R] = L. Putting H = 0 in Equations (S.3) and (S.2) also gives
θ = 14 π and R = u2 /g, so the results are consistent with
Finally, [H] = L and so the equation is dimensionally
the general solution.
consistent.
4.19 (a) The optimal angle for putting the shot oc- 4.20 When r = 3, C1 = 100 and H = 3, we saw in Sec-
tion 1 that x 14.142 tonnes.
curs when dR/dθ = 0. Differentiating the equation
g (a) To determine the sensitivity of the reorder quan-
− 2 (1 + tan2 θ)R2 + (tan θ)R + H = 0
2u tity x to small changes in the usage rate r about the
gives value r0 = 3 tonnes per day, we write
g dR 2C1 r
− 2 (2 tan θ sec2 θ)R2 + (1 + tan2 θ)2R x(r) = ,
2u dθ H
dR where we consider C1 and H to be constants, with val-
+ (sec2 θ)R + (tan θ) = 0.
dθ ues C1 = 100 pounds per order and H = 3 pounds per
When dR/dθ = 0 we have day. Thus
g
(tan θ sec2 θ)R2 = (sec2 θ)R,
x (r) =
C1
,
u2 2rH
so R = 0 (a minimum) or
100
u2 u2 ka |x (r0 )| = |x (3)| = 2.357,
tan θ = and θ = arctan . 2×3×3
gR gR
r0 3
This is not quite what we want, since this expression kr ka × 2.357 0.5.
x(r0 ) 14.142
for the angle involves the unknown range R. However,
substituting this value for tan θ back into the original Thus the problem of evaluating x(r) is absolutely
equation gives and relatively well-conditioned with respect to small
2
changes in the value of r, i.e. x is absolutely and rela-
g u2 u2 tively insensitive to small changes in r.
− 2 1+ R2 + R + H = 0,
2u gR gR Similarly, for C1 , we have
so
r
g u2 u2 x (C1 ) = ,
− 2 R2 − + + H = 0. 2C1 H
2u 2g g
Hence, taking the positive value of R, the maximum 3
ka 0.0707,
range is 2 × 100 × 3
100
2u2 u2 kr × 0.0707 0.5.
R= H+ 14.142
g 2g Thus x is absolutely and relatively insensitive to small
changes in C1 .
2
u 2gH
= 1+ 2 . (S.2)
g u
58
Solutions to the exercises
Finally, for H, we have so that ka = 3/70 000 and 18/70 000 respectively. The
C1 r corresponding values of kr are approximately 17 and 78
x (H) = − , respectively. Hence x and y are absolutely and rela-
2H 3
tively insensitive to small changes in C2 .
100 × 3
ka 2.357, (c) The London–San Serife problem is absolutely and
2 × 33
3 relatively well-conditioned since the optimal numbers of
kr × 2.357 0.5. flights are absolutely and relatively insensitive to small
14.142
Thus x is absolutely and relatively insensitive to small changes in any of the parameters.
changes in H. (d) Using Approximation (4.4) we have
(b) From (a), the reorder quantity x is absolutely and δx δC1
kr .
relatively insensitive to small changes in any of its pa- x(C1 ) C1
rameters in the case of the bakery’s problem, i.e. the From (b), kr 67 and, for a 10% change in C1 ,
problem of determining the reorder quantity is abso- |δC1 /C1 | = 0.1. Therefore |δx/x(C1 )| 67 × 0.1
lutely and relatively well-conditioned in the bakery’s 0.086. Thus a 10% change in C1 leads to a change of
case. about 8.6% in x. Furthermore, since increasing C1 de-
(c) Approximation (4.3) tells us that creases x, the 10% increase in C1 decreases x by about
|δx| ka |δH|, 8.6%.
where |δH| = |3.1 − 3| = 0.1 and, from (a), ka 2.357. Similarly, |δy/y(C1 )| 17 × 0.1 0.014. Thus a 10%
Thus change in C1 leads to a change of about 1.4% in y.
Furthermore, since increasing C1 increases y, the 10%
|δx| 2.357 × 0.1 = 0.2357, increase in C1 increases y by about 1.4%.
so a change in the value of H from £3 to £3.10 per Thus the solution x = 12, y = 9 would change to
tonne per day would change the optimal reorder quan-
tity by about 0.2357 tonnes. Since increasing H de- x 12 − 12 × 0.086 = 10.968,
creases x, the optimal reorder quantity would drop from y 9 + 9 × 0.014 = 9.126,
about 14.142 tonnes to about 14.142 − 0.2357 13.906 indicating that EmJet would now operate only 11 flights
tonnes. while AlHelvetica would continue operating 9 flights.
(Substituting the value C1 = 33 000 into the formulae
4.21 (a) [x] = T−1 , [y] = T−1 , for x and y gives x 11.03 and y 9.10, confirming
IC2 [I][C2 ] CT−1 × C the estimates given above.)
= = = T−1 ,
(C1 + C2 )2 [C1 + C2 ]2 C2
IC1 [I][C1 ] CT−1 × C Section 5
= = = T−1 .
(C1 + C2 )2 [C1 + C2 ]2 C2
Hence the solution is dimensionally consistent. 5.1 (a) Examples where there is more than one raw
(b) We have material include:
IC2 IC1 • manufacturing systems (such as the computer man-
x= 2
, y= ,
(C1 + C2 ) (C1 + C2 )2 ufacturers in Exercise 1.1), where products are
where I = 1 470 000, C1 = 30 000 and C2 = 40 000. made using several basic materials;
In the case of I, we have • retail shops (such as the shoe shop in Exercise 1.2)
C2 C1 or wholesale warehouses, where many different
x (I) = , y (I) = , products are competing for a limited amount of
(C1 + C2 )2 (C1 + C2 )2
space;
so that ka 4/490 000 and 3/490 000 respectively. The
corresponding values of kr are approximately 1 and 1 re- • your freezer at home, where there is competition for
spectively. Hence x and y are absolutely and relatively the limited amount of space and you need to decide
insensitive to small changes in I. how often to replenish it.
In the case of C1 , we have (b) Examples where stocks frequently run out include:
IC2 I(C2 − C1 ) • retail shops (such as the shoe shop in Exercise 1.2)
x (C1 ) = −2 , y (C1 ) = ,
(C1 + C2 )3 (C1 + C2 )3 or wholesale warehouses, where customers are of-
so that ka = 24/70 000 and 3/70 000 respectively. The ten told that new deliveries are expected shortly, or
corresponding values of kr are approximately 67 and 71 special orders have to be made;
respectively. Hence x and y are absolutely and rela- • food manufacturers, where the raw materials have
tively insensitive to small changes in C1 . a short shelf life;
In the case of C2 , we have • at home, where supplies of fresh produce frequently
I(C1 − C2 ) IC1 run out.
x (C2 ) = , y (C2 ) = −2 ,
(C1 + C2 )3 (C1 + C2 )3
59
Solutions to the exercises
5.2 As P → ∞, x√→ 2C1 r/H, X → 2C1 r/H and Taking positive square roots gives
D(x, X) → c2 r + 2HC1 r. We note that this is the 2C1 2C1
solution of the first model. x1 = r1 , x2 = r2 ,
H1 r1 + H2 r2 H1 r1 + H2 r2
This is as we would expect, since as the penalty cost so the minimum average daily cost is
increases it should become more and more disadvanta-
2C1
geous to run out of stock, and thus we should get closer D r1 = c21 r1 + c22 r2
and closer to the solution where the stock never runs H1 r1 + H2 r2
out, as in the first model. This provides a useful check + 2C1 (H1 r1 + H2 r2 ).
on the validity of the second model.
The first two terms are the fixed daily costs of the two
raw materials and the last term comprises the costs as-
5.3 Substituting these values into the formulae for x
sociated with ordering and storage.
and X we obtain the optimal solution x = 15 and
X = 40 3 , with a minimum average daily cost of £940
(c) If we suppose that the two raw materials are com-
and a cycle length of 5 days. This can be interpreted peting for space, we can assume that the total volume
as meaning that the optimal solution is to reorder 15 does not exceed V . If the density of raw material i
tonnes of flour every 5 days, where 1 23 tonnes are used is ρi tonnes per cubic metre then the volume occupied
immediately it arrives, giving an initial stock level of by it will be xi /ρi . The space constraint can then be
13 13 tonnes. This flour then runs out again about half modelled as
way through the fifth day, after which there are no flour x1 x2
+ � V.
supplies for the rest of that day. This solution gives a ρ1 ρ2
minimum average daily cost that is slightly less than for (The treatment of constrained optimization problems is
the first model (£942.43). discussed in Block II and in Unit III.3.)
60
Section 5 Index
Index
absolute condition number for expression evaluation local minimizer 12, 13
39 local minimum 12, 13, 17
air-track model 18
aircraft flight optimization 24 mathematical model 4
mathematical modelling 4
base dimensions 34 mathematical modelling cycle 4
mathematical modelling process 4
choose variables and parameters 31 maximum 12
classification of stationary points 17 minimum 12
compare results with reality 38 modelling process 4
create the model 4, 30
Newton’s laws of motion 32
dimensional consistency 33, 35 normal equations 21
dimensionless quantity 35
do the mathematics 4 overall maximum 12
overall minimumv12
evaluate the model 4, 44
parameter 8
formulate relationships 32
relative condition number for expression evaluation
global maximizer 12, 13 40
global maximum 12, 13 residual 20
global minimizer 12, 13 revising the model 42, 44
global minimum 12, 13
saddle point 14, 17
input–output principle 32 second derivative test 14
interpret the results 4, 38 sensitivity analysis 39
inventory model 9, 43 simplify the problem 31
inventory problem 6 specify the purpose 4, 29
stationary point 13, 17
least squares method 20 surface 12
local maximizer 12, 13
local maximum 12, 13, 17 variable 8
61