0% found this document useful (0 votes)
9 views

math modelling intro

This document is a study guide for a unit on mathematical modeling, specifically focusing on optimization. It outlines the process of creating, solving, interpreting, and evaluating mathematical models, with an emphasis on practical exercises and case studies. The guide aims to equip students with the skills necessary to develop their own mathematical models for real-world problems, particularly in inventory management.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

math modelling intro

This document is a study guide for a unit on mathematical modeling, specifically focusing on optimization. It outlines the process of creating, solving, interpreting, and evaluating mathematical models, with an emphasis on practical exercises and case studies. The guide aims to equip students with the skills necessary to develop their own mathematical models for real-world problems, particularly in inventory management.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 64

M373 Optimization

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]

The Open University, Walton Hall, Milton Keynes, MK7 6AA.


First published 2002. Second edition 2009.
Copyright �
c 2002, 2009 The Open University
All rights reserved. No part of this publication may be reproduced, stored in a retrieval system,
transmitted or utilised in any form or by any means, electronic, mechanical, photocopying, record-
ing or otherwise, without written permission from the publisher or a licence from the Copyright
Licensing Agency Ltd. Details of such licences (for reprographic reproduction) may be obtained
from the Copyright Licensing Agency Ltd, Saffron House, 6–10 Kirby Street, London EC1N 8TS;
website http://www.cla.co.uk.
Edited, designed and typeset by The Open University, using the Open University TEX System.
Printed and bound in the United Kingdom by Martins the Printers, Berwick-upon-Tweed.
ISBN 978 0 7492 4945 8
2.1
Contents
Introduction 4

1 Case study: the inventory problem 6

2 Multimedia case study: least squares problems 12


2.1 Minimizing a function of two variables 12
2.2 The case study 18
2.3 Summary of the modelling stages 18
2.4 Evaluating the model: the least squares method 20
2.5 Computer activity 24

3 Case study: aircraft flight optimization 24


4 The skills of modelling 28
4.1 Specify the purpose of the mathematical model 29
4.2 Create the model 30
4.3 Interpret the results 38
4.4 Computer activity 41
5 Revising the inventory model 42
5.1 A review of the first inventory model 43
5.2 Evaluation of the model 44
5.3 Revisions to the model 44

Outcomes 48

Solutions to the exercises 49

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.

Figure 0.1 The mathematical modelling process (or cycle)

4
Introduction

In developing a mathematical model, you may need to go round the loop in


Figure 0.1 several times, improving your model each time. It is usually best
to begin with a simple model, in order to get a feel for the problem. For
example, a baker may wish to determine how often to order raw materials
such as flour, eggs and yeast in order to minimize the total cost of ordering,
delivery and storage. For a first, simple model, the baker may make some
simplifying assumption about how the flour is used: for example, that it
is used at a constant rate. If, in evaluating a simple model, you find that
it is satisfactory for its purpose, then the modelling process is complete.
Otherwise, you will need to identify the reasons why it is deficient and try
to include additional features that address those deficiencies in your next
pass through the modelling loop. For example, the baker’s model may not
be satisfactory if flour is not used at a constant rate: flour may be used
more quickly in the morning than in the afternoon; flour may be used at a
faster rate on Monday, after the weekend, or on Friday, when many people
do their weekly shopping.
It is often the case that a simple model that gives a reasonable approximation
to the real world is more useful than a complicated model. A more complex
model may give a better fit to the available data, but the key processes
which are being modelled may be more difficult to identify. With this in
mind, in the first four sections of this unit only simple models are considered.
In the last section we discuss how to evaluate and improve one of these
simple models. All of the models in this unit can be solved analytically.
However, if they were changed even slightly then we would probably require
the numerical methods that you have seen in Units I.1–I.4 to solve them.
As you become more experienced as a mathematical modeller, you may find
that the above scheme for mathematical modelling is insufficiently flexible
for the model you are developing. The purpose of clearly specifying the
modelling process is simply to try to bring some structure to the subject,
so it should not be seen as a strait-jacket. However, it is recommended that
you use the scheme when you tackle the modelling problems that you will
encounter in this course.
In Section 1 we develop a simple mathematical model in order to demon-
strate how the modelling framework is used. It involves optimizing with
respect to a single variable and is typical of optimization problems that
might involve the techniques developed in Unit I.1.
Section 2 consists largely of a case study, for which you will be asked to do
some of the modelling yourself with the help of a multimedia package. The
model involves a function of two variables which is to be optimized, whose
solution is found by solving a system of linear equations, typical of those
found in Unit I.2. The section begins by looking at stationary points for
functions of two variables.
In Section 3 you will look at an example of problem-solving in which the
mathematical modelling framework was not used. Your task will be to
identify the stages in the modelling process and to develop the underlying
mathematical model. This model involves optimizing with respect to two
variables, whose solution is found by solving a system of non-linear equa-
tions, typical of those found in Unit I.4.
As you work through each of the modelling examples in the first three sec-
tions, you should try to identify the key stages in the modelling process that
are used to tackle different problems.

5
Section 1 Case study: the inventor y problem

In Section 4 you will practise some of the individual skills of mathematical


modelling. This section also discusses two mathematical techniques: dimen-
sional consistency and sensitivity analysis, the latter building on the work
that you did in Unit I.3.
The final section is devoted to using some of those skills in developing an
improvement to the model developed in Section 1. The revised model now
involves optimizing with respect to two variables (rather than the one vari-
able in the first model). Its solution is found by solving a system of non-linear
equations, typical of those found in Unit I.4.
Finally, a word of warning is necessary. Mathematical modelling is unlike
other branches of mathematics. A mathematical model depends critically on
the problem that the model is intended to help solve and on the simplifying
assumptions made about the system being modelled. Consequently, there
are many ways of tackling any modelling problem, and none can be expected
to yield an exact solution. In attempting any of the modelling exercises in
this unit, you may produce a mathematical model that differs from the
one we have suggested; however, provided that your model is justified by
reasoned arguments and assumptions, your model may be just as valid as
ours.

1 Case study: the inventor y problem


This section explores a real-world system where mathematical modelling can
be used to understand what is happening and to predict what will happen
if changes are made to the system. The system that we shall investigate is
fairly complex but, by keeping things as simple and straightforward as we
can, we shall extract sufficient information to obtain a mathematical model
of the system. This simple model will be evaluated and refined in Section 5.
Most retail, wholesale and manufacturing businesses keep a stock of goods,
often called an inventory. For example:
• a shoe manufacturer makes shoes using stocks of raw materials, reorder-
ing when the stocks run down;
• to reduce costs, the manufacturer is likely to produce batches of shoes
in particular styles and sizes, making a new batch when stocks of a
particular size and style are low;
• a shoe wholesaler will buy in stocks of shoes from the manufacturers in
batches for distribution to retailers, reordering when stocks are low;
• a shoe shop will keep stocks of shoes of various styles and sizes, reordering
when stocks are low.
As time passes, stocks of goods or raw materials will diminish through sale
or use and will need to be replenished. The problem is to decide how often
and by how much to replenish the stocks: this problem is referred to as
the inventory problem. Each time restocking occurs there are fixed costs,
such as setup and transportation charges, as well as a variable cost which
depends on the quantity of new stock. To reduce the impact of the fixed
costs it is best to order as much as possible each time you restock. On the
other hand, keeping large stocks of goods ties up capital, which could be
earning money elsewhere, and takes up space. From this point of view, the
smaller the stock of goods the better.

6
Section 1 Case study: the inventor y problem

In this section we are going to formulate a mathematical model that


describes the behaviour of a general inventory system and then use it to
determine the optimal replenishment strategy. We shall do this in five stages,
corresponding to the five stages of the modelling process. We shall use the
following example to help illustrate the process.

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.

Create the model


To obtain a simple model for the inventory problem, we need to make a
number of simplifying assumptions.
(i) Only one type of product is being manufactured, using one type of The wording of these
raw material. assumptions relates to an
inventory system involving
(ii) The raw material is used at a constant rate. the production of goods from
(iii) Each time new stock of the raw material is ordered there is a fixed raw materials. Similar
overhead cost, which includes the cost of administering the order, assumptions would apply for
transportation costs and so on. inventory systems involving,
for example, the buying or
(iv) Stock of the raw material runs out just as the new stock arrives. (In selling of goods.
reality there may be a delay before new stock is delivered, so the
arrival of new stock may not be as predictable as this assumption
implies.)
(v) There is a constant holding cost rate, per unit, associated with storing
the raw material, that takes into account storage space, insurance,
taxes, the cost of tying up the capital and so on. (This assumption
implicitly assumes that the raw material does not deteriorate if stored
for a long time.)
(vi) There is no cost associated with running out of the raw material. (In
reality, workers might have to be laid off, orders might be lost and so
on.)
(vii) There is no limit on the amount of raw material that can be stored
or the money available for purchasing new stock.

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 .

By assumption (vii) there is no limit on the amount that can be stored or


bought, so there is no upper limit on the values that x and C(x) can take.
(We must, however, have x > 0 and C(x) > 0.)
To determine the holding cost, we need to know the stock level s(t) at
time t. By assumption (ii), the stock level varies linearly with time, so,
using assumption (iv), we have a linear relationship of the form
s(t) = x − rt, 0 � t � T (x),

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

Interpret the results



The model predicts that the optimal strategy is to reorder x = 2C1 r/H
tonnes every T (x) = x/r days. This expression for x looks sensible since
it increases if the overhead cost, C1 , or the usage rate, r, increases and
decreases if the holding cost rate, H , increases. It does not depend on
the cost per tonne, c2 , of the raw material, since the daily cost of the raw
material depends only on the constant rate, r, at which it is being used. The
average daily cost D(x) for this optimal solution consists of two terms:
√ the
daily cost, c2 r, of the raw material, and the additional daily cost, 2C1 rH,
of ordering and storing the raw material.
The model also tells us that, in order to determine the optimal reordering
strategy, i.e. to obtain optimal values for x and T (x), we only need values
for the parameters C1 , r and H . If we also want to know the average daily
cost, D(x), we need a value for c2 as well.
For the bakery problem in Example 1.1, suppose that the rate at which flour
is used is r = 3 tonnes per day, the reordering cost is C1 = 100 pounds per
order, the holding cost is H = 3 pounds per tonne per day and the cost of
the flour is c2 = 300 pounds per tonne. The optimal amount to order is then
 
2C1 r 2 × 100 × 3
x= =  14.142 tonnes
H 3
every T (x) = x/r  14.142/3 = 4.714 days, at an average daily cost of
 √
D(x) = c2 r + 2C1 rH = 300 × 3 + 2 × 100 × 3 × 3  £942.43.
This suggests that a sensible reordering strategy for the bakery would be to
have a delivery every fifth day, consisting of x = rT (x) = 3 × 5 = 15 tonnes
of flour. The average daily cost of such a strategy would be
C1 r 100 × 3
D(x) = + c2 r + 12 Hx = + 300 × 3 + 12 × 3 × 15 = £942.50,
x 15
(of which £900 is the cost of the flour), which is only 7 p per day more
expensive than the optimal strategy.

The development of the inventory model has highlighted a number of im-


portant aspects of mathematical modelling. These include the following.
• Representing variables and parameters using symbols enables us to de-
velop models that can be applied in a variety of different situations. You
have seen how the general inventory model can be used for the bakery
example. In Exercises 1.1 and 1.2 you will see how it can be applied to
two rather different examples.
• The simplifying assumptions must be relevant to the model and should
be linked to the mathematical relationships between the variables and
parameters.
• Data for the model should be collected only after it has been established
what data are required. This is usually only possible once the model has
been created and any necessary mathematics has been performed, i.e. at
the interpretation stage. For the inventory model, it only became clear
after doing the mathematics that the values we required to determine
the optimal reordering strategy were the overhead cost, C1 , the usage
rate, r, and the holding cost H , and that an additional value, for the
raw material cost c2 , is necessary to determine the average daily cost.

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

2 Multimedia case study: least squares


problems
The Introduction reminded you of the stages in the mathematical modelling
process, and in Section 1 you saw how some of those stages can be applied
in the context of modelling inventory problems. In this section and the next
you will be asked to use your knowledge of the stages of the mathematical
modelling process to analyse two examples. The purpose of these examples
is to help you to draw out and clarify the mathematical modelling ideas.
The example in this section is designed to be tackled with the help of a
multimedia package, which will also introduce you to an important opti-
mization technique called the least squares method. Since this technique
involves minimizing a function of several variables, we shall begin with a
little background theory.

2.1 Minimizing a function of two variables


In this subsection we consider the problem of minimizing a function of two
variables, and this will involve first and second partial derivatives. The ideas Partial derivatives were
in this subsection will be discussed further and extended to n dimensions in introduced in Unit I.3.
Block III.
A function f (x1 , x2 ) of two variables can be represented graphically in three
dimensions as a surface given by z = f (x1 , x2 ), so that each point (x1 , x2 )
in the domain of f maps to a point on the surface. For example, Figure 2.1
shows the surface given by
z = f (x1 , x2 ) = x21 − 2x1 x2 + 2x22 − x1 .
The graph shows that this function f has a minimum value and our task is
to develop a technique for finding it without the benefit of pictures!
In order to develop such a technique, we first need to make some definitions,
which follow on from corresponding definitions for functions of one variable. Figure 2.1
You may recall that a function f of one variable has a local minimum at
a point α if f (x) � f (α) for all x sufficiently close to α. The point α is Local and global minima and
maxima for a function of one
referred to as a local minimizer for f ; the value f (α) of f at α is a local variable are discussed in
minimum. Similarly, f has a local maximum at α if f (x) � f (α) for all x MST121, M208 and MST209.
sufficiently close to α, in which case α is a local maximizer and f (α) is
a local maximum. Furthermore, recall that f has a global minimum at A global minimum is
α∗ if f (x) � f (α∗ ) for all x in the domain of f . The point α∗ is referred sometimes referred to as an
to as a global minimizer for f ; the value f (α∗ ) of f at α∗ is the global overall minimum, or just a
minimum. Similarly, a global
minimum. Similarly, f has a global maximum at α∗ if f (x) � f (α∗ ) for all x maximum is sometimes
in the domain of f , in which case α∗ is a global maximizer and f (α∗ ) is referred to as an overall
a global maximum. These definitions all extend naturally to functions of maximum , or just a
two variables. maximum.

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.

It is important to keep in mind the distinction between a minimum (or


maximum), which is a value of the function, and a minimizer (or maximizer)
which is the corresponding point in the domain of the function.
You may recall that local and global minima and maxima for a smooth
function f of one variable can only occur at points α in the domain of f In this case, ‘smooth’ means
where f  (α) = 0, i.e. at stationary points of f , or at the endpoints of the differentiable.
domain of f . This result can again be naturally extended to functions of
two variables. For a smooth function of two variables, a stationary point In this case, ‘smooth’ means
is a point (α1 , α2 ) in the domain of f where partially differentiable with
respect to both variables.
∂f ∂f
(α1 , α2 ) = 0 and (α1 , α2 ) = 0.
∂x1 ∂x2
It can be shown that, for a smooth function f of two variables, local and Justification for this result is
global minima and maxima can only occur at stationary points of f or at given in Unit III.1.
boundary points of the domain of f . Thus a first step in trying to minimize
a function of two variables is to find its stationary points.

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

Theorem 2.1 Classification of Stationar y Points


If a function f (x1 , x2 ) has first and second partial derivatives which This method of classification
both exist and are continuous on some region R, then it has a stationary is discussed in MST209.
point at (α1 , α2 ) ∈ R if
∂f ∂f
(α1 , α2 ) = 0 and (α1 , α2 ) = 0.
∂x1 ∂x2
To classify such a stationary point, we consider the symmetric matrix
M of second partial derivatives of f at (α1 , α2 ), given by
⎡ ⎤
∂2f ∂2f
⎢ (α1 , α2 ) (α1 , α2 ) ⎥
⎢ ∂x21 ∂x1 ∂x2 ⎥
M=⎢ ⎥,
⎣ ∂ 2f ∂ 2f ⎦
(α1 , α2 ) 2
(α1 , α2 )
∂x1 ∂x2 ∂x2
which has two real eigenvalues.
(a) If both eigenvalues are positive then f has a local minimum at
(α1 , α2 ).
(b) If both eigenvalues are negative then f has a local maximum at
(α1 , α2 ).
(c) If one eigenvalue is positive and the other is negative then f has a
saddle point at (α1 , α2 ).
(d) If either eigenvalue is zero, further examination of the function f is
required in order to classify the stationary point.

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).

2.2 The case study


It is now time to study the multimedia package for this unit. While you are
working through this case study, bear in mind the points made in Section 1.
Look out for the purpose of the model, the system that is being modelled,
the simplifying assumptions, the definitions of the variables, the derivation
of the relations between them and the conclusions that are drawn from the
model.
Work through the multimedia package for this unit.
PC
2.3 Summar y of the modelling stages
In the multimedia package you examined the motion of a glider on a sloping
air-track, based on the following example.

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.

Specify the purpose of the mathematical model


The purpose of the model is to describe the motion of a glider on an air-
track, in such a way that the model can be used to estimate a value for the There are much better
acceleration due to gravity, g. methods of estimating g, for
example by calculating the
Create the model period of a simple pendulum.

Here is our list of assumptions.


(i) The glider can be modelled as a particle.
(ii) The only forces acting on the particle are its weight and the normal
reaction (the force exerted by the track on the particle).
(iii) The air-track is straight — it does not bow in the middle.
(iv) The glider is constrained to move only along the air-track.
(v) The acceleration due to gravity does not vary with position.
The variables for the model are:
t the time, in seconds, since the start of the motion;
x(t) the distance travelled by the glider along the air-track, in metres,
during the t seconds it has been in motion;
v(t) the speed of the glider along the air-track, in metres per second,
after t seconds.
The parameters for the model are:
m the mass of the glider, in kilograms;
θ the angle, in radians, of slope of the air-track;
T the time taken, in seconds, for the glider to travel along the air-track;
X the distance, in metres, travelled along the air-track in T seconds;
v0 the initial speed of the glider, in metres per second, along the air-track;
g the acceleration due to gravity, in metres per second per second.

From Newton’s second law, which gives rise to the equation


force = mass × acceleration ,

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

Interpret the results


Equation (2.4) provides a quantitative prediction for g given that the glider
takes T seconds to travel a distance X metres down a slope of angle θ,
starting with a speed of v0 metres per second. Using the data given in
the multimedia package, that θ = 0.007 156, v0 = 0 m s−1 and X = 2.955 m
when T = 9.3 s, it gives g = 9.55 m s−2 . This is a little lower than the nor-
mally accepted value for the acceleration due to gravity, which is 9.81 m s−2 ,
probably due to resistive forces that we have not included in the model.

2.4 Evaluating the model: the least squares method


Although we can use the model given by Equation (2.1), together with its
associated initial conditions, to make quantitative predictions, we do not
yet have any way of evaluating the model to see whether the assumptions
and simplifications that we have made are justified. For example, we have
ignored friction, air resistance and any bowing in the air-track, and these
simplifications led to a model that predicts constant acceleration. Is such a
model justified? The least squares method is a technique that can be used to
test such predictions by enabling us to compare the model with experimental
observations. The method, which involves minimizing a function, is the
subject of this subsection.
From Equation (2.2) the model predicts that the speed v(t) of the glider
varies linearly with the time t since the start of the motion. In the multi-
media package, an experiment is carried out in order to estimate its speed
at various points along the air-track. If the model is a good one, then we
would expect the data obtained from the experiment, when plotted on a
graph of v(t) against t, to lie on — or at least very close to (if we allow
for experimental inaccuracies) — a straight line. But do they? If so, which
straight line do they lie ‘closest’ to? And does this straight line correspond
to the one predicted by the model?
The least squares method can be used to fit the ‘best’ (in a sense to be
explained later) straight line through a set of points. Suppose that we take
m > 2 observations v1 , v2 , . . . , vm at times t1 , t2 , . . . , tm . We wish to fit a
straight line through the points (t1 , v1 ), (t2 , v2 ), . . . , (tm , vm ) of the form
p(t) = a0 + a1 t
for some specified values of a0 and a1 . The residual, ri , defined as the
difference between the value given by the straight-line fit when t = ti and
the observed value vi , is given as
ri = a0 + a1 ti − vi (i = 1, . . . , m).
Figure 2.4 illustrates this idea. Figure 2.4
If the line p(t) = a0 + a1 t is to be a good fit to the data, then we would
expect the magnitudes of the residuals ri to be small. There are several
ways of choosing values of a0 and a1 to try to ensure that each value of
|ri | is small and, of these, the least squares method is the simplest to The least squares method is
implement. The method works by finding values of the unknowns, in this discussed in MST121 and
case a0 and a1 , that minimize the sum of the squares of the residuals, i.e. it MST209. It is discussed
again, in a more general
seeks to minimize context, in Unit III.2.
m
 m

f (a0 , a1 ) = ri2 = (a0 + a1 ti − vi )2 .
i=1 i=1

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

Use the least squares quadratic to determine an estimate for g.

23
Section 3 Case study: aircraft flight optimization

2.5 Computer activity


Activity 2.1
(a) Use the least squares method to determine the straight-line fit of the
form p(t) = a0 + a1 t to the data (ti , yi ) given in Exercise 2.6.
(b) Use the least squares method to determine the quadratic fit of the form
q(t) = a0 t + a1 t2 to the data (ti , xi ) given in Exercise 2.7.
(c) Plot the graphs of q(t)/t and p(t) against t for t > 0 and compare them
with the data values (ti , yi ) from Exercise 2.6.
(d) Plot the graphs of q(t) and t p(t) against t for t > 0 and compare them
with the data values (ti , xi ) from Exercise 2.7.
Hence evaluate the air-track model.

3 Case study: aircraft flight optimization


In the case studies of Sections 1 and 2, the mathematical models were built
using the mathematical modelling framework discussed in the Introduction.
In this section we consider a third case study, taken from another course and
presented here in its original form, which did not make use of the mathemat-
ical modelling framework. All the usual mathematical modelling elements
are present in the case study, but they are not made explicit. It will be
your task, within the content of an extended exercise, to draw out the main
mathematical modelling elements from the account given.
The account is boxed below. Read through it carefully and then attempt
the exercise that follows it.

The London–San Serife route This case study is an example


of a non-linear optimization
Two aircraft companies, EmJet and AlHelvetica, have been licensed to problem. Non-linear
operate the new London–San Serife route. They both wish to determine optimization problems in
how many flights to operate in order to maximize their profits. They general are discussed in
both have access to the following information. Block III.
(i) Market research indicates that 2000 people wish to fly from Lon-
don to San Serife each week.
(ii) Each company’s market share (i.e. their proportion of the total
number of passengers) will be roughly equal to their flight share
(i.e. their proportion of the total number of flights).
(iii) EmJet has 120-passenger aircraft available with estimated
operating costs of £30 000 per flight, while AlHelvetica has
180-passenger aircraft available with estimated operating costs
of £40 000 per flight.
(iv) A condition of the licence is that each company will charge the
same passenger fare of £735.
(v) There will be no collusion between the two companies (i.e. free
competition will prevail).

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

Rearranging Equations (3.1) and (3.2), we obtain the following two


equations for x and y.
49y − (x + y)2 = 0 (3.3)
147x − 4(x + y)2 = 0 (3.4)
These equations can be solved analytically by writing
(x + y)2 = 49y = 147
4
x
so that y = 34 x. Substituting this into Equation (3.4) gives
147x − 4(x + 34 x)2 = 0,
which, in turn, gives x = 0 or x = 12. Now, x = y = 0 is a solution
of Equations (3.3) and (3.4) but is not a solution of Equations (3.1) The creation of spurious
and (3.2). Therefore there is a single stationary point, at x = 12 and solutions by the algebraic
y = 9. Since manipulation of equations
was discussed in Unit I.1.
d2 PE y
(x) = −2.94 × 106
dx2 (x + y)3
and
d2 PA x
(y) = −2.94 × 106
dy 2 (x + y)3
are both negative for this solution, it is a local maximum both for
EmJet and for AlHelvetica. Furthermore, the average number of pas-
sengers for each of the total of 12 + 9 = 21 flights will be 2000/21  95
and this is well within the seating capacity for each type of aircraft,
although the AlHelvetica flights will, on average, be only just over half
full. Hence, for maximum profit, EmJet should operate 12 flights per
week (giving it a weekly profit of £480 000) while AlHelvetica should
operate 9 flights per week (giving it a weekly profit of £270 000). AlHel-
vetica would do much better if it could find smaller aircraft to operate
on the London–San Serife route.

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.2 provides us with an example of one way — by changing param-


eter values — that a model can be used in different situations. Sometimes,
also, the same model can be used to obtain a solution to a related problem
in which one or more of the assumptions is altered. The following exercise
provides an example of this.

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.)

An alternative way of answering Exercise 3.3 would be to revise the model


to take into account the changed assumptions. (In this case, that would
mean taking P1 and P2 to be functions of both variables, x and y, which
would have consequences for the location of the stationary points.) In most
cases, a change to an assumption necessitates a revision to the model. The
following exercise provides an example of this approach.

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

Reading and interpreting descriptions of models or of problems to be mod-


elled can be hard work: there is usually a lot of information to absorb, and it
can be difficult to focus on what is really important. For example, the type
of transport (aircraft) in the aircraft flight optimization model does not help
our understanding of the mathematics (though it is of crucial importance to
the operator). The process of coming to terms with a mathematical model
is one of digging away until you find what lies at the root of it all. In the
aircraft flight optimization model it is the maximization of profit that lies at
the root, whereas in the inventory model of Section 1 it is the minimization
of costs and in the air-track model of Section 2 it is the formula for the
equation of motion with constant acceleration down a slope of angle θ given
by Equation (2.1). One of the basic skills in mathematical modelling (as
you will see when you come to construct models for yourself) is to formu-
late the fundamental equation or relationship that describes the process in
which you are interested. There are several points arising from the three
case studies you have encountered so far in this unit that show how this can
be done.
• It is important to pick appropriate variables and parameters, and to
define them carefully.
• It is usually necessary to simplify matters in order to make progress: for
example, recognizing in the London–San Serife problem that the return
flight problem could be postponed, if not ignored.
• It is good practice to record the assumptions you make in deriving the
model: it certainly helps the reader but, more importantly, it clarifies
things for you and it suggests ways of developing the model later.
• It is important, as we saw in Section 2, to collect relevant data, both to
check the predictions of the model and to furnish the values of any pa-
rameters that are needed to apply the model to any particular situation.
• Values for the parameters should only be included once the mathematical
model has been developed.

4 The skills of modelling


Mathematical modelling involves many different skills. To be good at math-
ematical modelling you have to be able to do some mathematics, but you
have to be able to do other things as well. If you tend to think of mathe-
matics as a set of procedures (such as the procedures for solving systems of
linear equations) then you may not think of these additional skills as being
relevant to mathematics. However, most practising mathematicians, con-
cerned with pure as well as applied mathematics, would strongly disagree
with that interpretation. One of the most powerful motivations for studying
mathematics is the desire to solve new problems for which there is no known
solution procedure. The skills required in mathematical modelling include
many general problem-solving skills. To be able to solve mathematical mod-
elling problems is more useful, and more difficult, than simply being able to
solve systems of linear equations by the Gaussian elimination method, for
example. It calls on skills of invention, analysis and interpretation, which
apply to all sorts of problems, not just mathematical ones.

28
Section 4 The skills of modelling

Here is a list of skills that may be required in the solution of a mathematical


modelling problem, listed in the order in which we shall discuss them in this
section. You need to be able to:
• specify the purpose of the mathematical model, by pinning down or
interpreting the problem you are investigating;
• create the model by
– simplifying the problem (by means of appropriate assumptions),
– choosing appropriate variables and parameters,
– formulating relationships between the variables,
– checking that the relationships make sense (by checking their dimen-
sional consistency);
• interpret the results by
– describing them in words and comparing them with reality,
– assessing their sensitivity to changes in the data.
When you come to tackle a modelling problem in earnest, you will have to
call on these skills repeatedly, in a complicated and interactive way. It seems
wise, therefore, to practise these skills individually first, and this is the aim
of this section. Each subsection deals with one of the skills from the list.
The individual skills are illustrated using models from previous sections of
this unit and from elsewhere. There are many exercises, all of which you
should make a serious attempt at tackling; you should only glance at the
solutions if, after some thought, you still do not see how to proceed.

4.1 Specify the purpose of the mathematical model


In mathematical modelling, the problems are rarely posed in a way that
can be translated directly into mathematical form. From the description
of the London–San Serife aircraft flight optimization problem, for example,
you might have thought that, in order to construct a mathematical model,
you would have to know quite a lot about aircraft scheduling. However,
we were able to produce a straightforward non-technical statement of the
underlying problem that could serve as the basis for a model, namely: to
find how company profits vary with the number of journeys made.
It is a good strategy to find out why you want to develop a mathematical
model before you start. Consequently, it is important to establish at the
outset a clear statement of the purpose of the model. For example, the
purpose of the aircraft flight optimization model might be to determine
whether a new route, or an existing route with changed circumstances, will
be profitable. Such a clear statement of the purpose of the model is typical of
the approach that is required in order to get started on a modelling problem.
It is also worth bearing in mind that some models created for a specific
purpose may be applicable in other situations. On the other hand, it may
be possible to save time by modifying a model that has been used for one
situation so that it can be applied in another. For example, the mathemati-
cal model developed to predict the level of profit for the London–San Serife
route could be used to model the potential profits in other situations, such
as parcel deliveries or other delivery services.

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?

4.2 Create the model


There are a number of skills that are needed in building a sensible model
that approximates a real situation. We shall look at four of these skills here.
In creating a model, these skills may be required at a variety of stages and
not necessarily in the order in which they are presented.

30
Section 4 The skills of modelling

Simplify the problem


The aircraft flight optimization model depended on the assumption that
the market share is proportional to the flight share and did not consider
the scheduling of the flights or variations in the pricing of the fares, as a
consequence of which the resulting model was relatively easy to analyse. In
modelling one should always look for as simple a model as possible consistent
with the salient features of the problem. However, it is important to be clear
about the simplifying assumptions that have been made in order to arrive at
that model. This is necessary to ensure that anyone who may be interested
can follow how the model has been derived. Furthermore, if you have an
explicit list of the assumptions that you have made, and you wish to improve
your model, then you have an obvious place to start: review the assumptions
and ask which can and should be modified or relaxed.

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.

Choose appropriate variables and parameter s


The identification of key variables is of paramount importance. If you can
summarize a problem in terms of determining how one quantity varies with
another, or several others, then you should have no difficulty in identifying
key variables. Once these key variables have been identified, it should be
possible to obtain relationships between them, which may throw up sec-
ondary variables and/or parameters. It is good practice to keep a list of
all the variables and parameters, adding to it as necessary, to ensure that
all of them have been consistently defined and used. It pays to be careful
in defining variables and parameters in order to avoid confusion later (for
example, ‘time since the start of the motion of the glider’ is clearer than
just ‘time’).
In the case of the air-track model, there are two key variables: the first is the
time since the start of the motion, and the second is the distance travelled
by the glider since the start of the motion. The creation of the mathematical
model involves identifying relationships between these key variables. In de-
termining the relationships, four key parameters were identified: the angle For convenience, other
of the slope (measured in radians); the initial speed down the slope (in me- variables and parameters were
tres per second); the mass of the glider (in kilograms); and the acceleration introduced after the creation
of the model, while doing the
due to gravity (in metres per second per second). mathematics.

31
Section 4 The skills of modelling

In the aircraft flight optimization model, the problem is to find a relationship


between the estimated profit for each company and the number of journeys
that each of them makes, from which the we can see that the key variables
are the profit (in pounds per week) and the number of journeys per week, for
each company. In determining the relationships between these key variables,
four key parameters were identified: the total number of travellers each week;
the fare for each passenger (in pounds); and the cost (in pounds per journey)
for each of the companies.
In all cases, care must be taken to ensure that the units used for the variables
and parameters match.

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?

Formulate relationships between the variables


In many of the models that we develop in this course we are seeking to for-
mulate relationships between key variables in the form of a function that we
wish to maximize or minimize, perhaps subject to a number of constraints.
For example, in the inventory problem the objective was to minimize costs
and we constructed a function that represented those costs, subject to the
constraint that the time T (x) between orders is given by T (x) = x/r, where
x is the amount ordered each time and r is the usage rate. One common
technique for formulating suitable relationships is the input–output princi-
ple, an example of which is the ‘profit = income − expenditure’ principle The input–output principle is
used in the aircraft flight optimization problem. Another common technique discussed in MS221 and
in applied mathematics for formulating suitable relationships, in the case of MST209.
mechanics problems, is to make use of Newton’s laws of motion, as in the Newton’s laws of motion are
air-track model. discussed in MST209.

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

Another example is provided by the aircraft flight optimization model. Here


the profit
x
P1 (x) = I − C1 x (4.1)
x+y
for Company 1 was measured in pounds per week. For this equation to be
dimensionally consistent, both sides of the equation need to be measured in
the same units. Now I = nf is the airline’s total income in pounds per week,
where n is the number of passengers per week and f is the fare in pounds
per passenger. Hence the equation I = nf is dimensionally consistent. As
long as x and y are measured in the same units, so that x and x + y are
measured in the same units, the market share x/(x + y) is simply a number.
Therefore Ix/(x + y) will be measured in pounds per week. Similarly, C1
is the cost in pounds per flight and x is the number of flights per week, so
the expenditure C1 x will be measured in pounds per week. In consequence,
all additive terms on the right-hand side of Equation (4.1) will be measured
in pounds per week, so the right-hand side as a whole will be measured in
pounds per week, which are the same units as for the left-hand side. Hence
Equation (4.1) is dimensionally consistent.
Now, the choice of measurement units does not affect the quantity being
measured. For example, the cost of a flight, C1 , is the same irrespective of
whether we measure it in pounds or dollars. Similarly, the width of this page
is the same irrespective of whether we measure it in millimetres or inches.
In terms of dimensional consistency, the important property of C1 is that it
is a sum of money and the important property of the width of this page is
that it is a length. Even more fundamentally, an area can be thought of as
a length times a length (i.e. as a length squared). Similarly, no matter what
units we use, the weekly profit P1 (x) must always be expressed as a sum of
money per unit of time. To measure P1 (x) we could use pounds per week,
dollars per hour or francs per day, so long as it is a unit of currency per
unit of time. In these examples, we can think of currency and time as being
fundamental properties, referred to as base dimensions. In this course, we
will use the base dimensions mass, length, time, currency and temperature.

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.

We have now seen how to check for dimensional consistency in equations


where the additive terms involve multiplying, dividing or taking powers.
However, many models will involve functions such as exp, ln, sin, cos, tan
and so on. How does one check for dimensional consistency in such cases?
For example, in the shot-putter’s model, the range R of the shot is found to
satisfy the equation
g
− 2 (1 + tan2 θ)R2 + (tan θ)R + H = 0.
2u
To check for dimensional consistency, we need to be able to find the di-
mension of tan θ. We know that exp, ln, sin, cos, and so on all have real
numbers as their domains and image sets. So if x is a real number then so is
ex , ln x, sin x, cos x, etc. We also know that real numbers are dimensionless.
Therefore, by analogy, provided that the argument x is dimensionless, we
can take ex , ln x, sin x, cos x, tan x and so on to be dimensionless. The key,
then, to checking for dimensional consistency in equations involving such
functions is to ensure that their arguments are dimensionless. In the above
case, we know that angles are dimensionless, so tan θ is dimensionless.
Very often, if the argument of a function in an equation is not dimensionless,
some simple manipulation of the equation can render it so and hence enable
dimensional consistency to be checked. For example, if we were confronted
with ln x − ln y, where x and y were lengths, we could rewrite it as ln(x/y).
The new argument, x/y, is dimensionless.

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

4.3 Inter pret the results


Obtaining a solution to a mathematical modelling problem is not the end
of the modelling process. The solution must then be interpreted in terms of
the original problem posed and a number of checks need to be made. For
example, the model may only be valid for certain ranges of values for the
variables and/or parameters. In this subsection we shall outline some of the
techniques used to interpret solutions and to check their reliability.

Compare the results with reality


Here there are several points to be emphasized.
• It is usually worth checking that the model predicts the kind of results
that you would expect from common sense and experience. For example,
the solution to the inventory problem predicts that the optimal quantity
to reorder is given by

2C1 r
x= ,
H
where C1 is the overhead cost per order, r is the usage rate and H is the
holding cost rate. The fact that x increases if C1 or r increases, or if H
decreases, agrees with our commonsense view of what should happen.
• If possible, you should validate the model by comparing its predictions
with data from an experiment or other reliable source. For example,
the angle predicted by the shot-putter’s model could be checked using
a video of shot-putters in action, measuring the height, speed and angle
of release to check the distance achieved against the predicted range.
• It is good practice to try to reformulate the results so that the relation-
ship to be checked becomes simple, ideally linear. For example, in the
air-track model, measurements were taken at various points during the
glider’s motion down the air-track and used to check the validity of the
model by plotting a graph of x/t against t.
• The model may not directly provide the information you need to solve
the problem, and you may have to do some further mathematics (find
a maximum or minimum or solve a differential equation, for example).
For example, in the London–San Serife problem we had to find a local
maximum for the system of profit functions.
• You may also require some additional data to check an explicit numerical
solution to the problem (the known value of g in the air-track problem,
for example).

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

Assess the sensitivity of the results to changes in the data


In many of the models discussed in this unit, the parameters have been The discussion here follows on
estimated. In this final subsection, we shall investigate how changes in the from the discussion of
parameters of the model might affect the solution. For example, in the ill-conditioning in Unit I.3.
air-track model the value of g was given by
2(X − v0 T )
g= , (4.2)
T 2 sin θ
where T is the time taken for the glider to travel a distance X down an
air-track inclined at an angle θ to the horizontal and v0 is the initial speed
down the slope. Since there are limitations, for example, on how accurately
we can measure the angle θ, we would like to know what implications this
will have on the accuracy of our estimate for g.
So, what we want to know is the sensitivity of the value of g given by Equa-
tion (4.2) to small changes in the value of θ. Following on from the discussion
in Unit I.3, one way to do this is to calculate the absolute and relative con-
dition numbers for the problem of evaluating g using Equation (4.2) when
θ is subject to small changes in value. We have seen, in Units I.3 and I.4 ,
how to determine condition numbers for a variety of problems, but not for
the problem of evaluating an expression. However, following the strategy
of those units, we can obtain the required condition numbers by using a
first-order Taylor polynomial approximation.
Consider the general problem of evaluating an expression h(x) where x is
subject to small changes about the value x0 . The first-order Taylor polyno-
mial approximation to h(x) near x = x0 gives
h(x)  h(x0 ) + h (x0 )(x − x0 ).
Thus for x = x0 + δx0 we have
h(x0 + δx0 )  h(x0 ) + h (x0 )δx0 .
Writing δh = h(x0 + δx0 ) − h(x0 ), we obtain
δh  h (x0 )δx0 ,
and hence
|δh|  |h (x0 )||δx0 |. (4.3)
Recall, from Unit I.3, that the absolute condition number, ka , for a prob-
lem with respect to a particular parameter is the maximum magnification
factor between a small absolute change in that parameter and the resulting
absolute change in the solution. Thus we have the following.

Absolute condition number for expression evaluation


An approximation to the absolute condition number, ka , for the
problem of evaluating an expression h(x) where the parameter x is
subject to small absolute changes |δx0 | about the value x0 , resulting in
corresponding absolute changes |δh| in the value of the expression, is
given by
|δh|
ka = max  |h (x0 )|.
small|δx0 | |δx0 |

39
Section 4 The skills of modelling

Thus, writing Equation (4.2) as


2(X − v0 T )
g(θ) = ,
T 2 sin θ
where T , X and v0 are constants but θ is subject to small changes about
the value θ0 = 0.007 156, we obtain
2(X − v0 T ) cos θ
g  (θ) = − .
T 2 sin2 θ
Therefore, using the data from Section 2 for T , X and v0 , we have T = 9.3 s;
X = 2.955 m;
ka  |g  (0.007 156)|  1334. v0 = 0 m s−1 .
Hence, since ka > 10, by Procedure 1.1 of Unit I.3 the problem of evaluating
g(θ) is absolutely ill-conditioned with respect to small changes in the angle θ.
We can also obtain a relative condition number for expression evaluation by
dividing both sides of Approximation (4.3) by |h(x0 )|, to give
δh δx0 x0 δx0
 |h (x0 )| = |h (x0 )| . (4.4)
h(x0 ) h(x0 ) h(x0 ) x0
Since, from Unit I.3, the relative condition number, kr , for a problem with
respect to a particular parameter is the maximum magnification factor be-
tween a small relative change in that parameter and the resulting relative
change in the solution, we have the following.

Relative condition number for expression evaluation


An approximation to the relative condition number, kr , for the
problem of evaluating an expression h(x) where the parameter x is
subject to small relative changes |δx0 /x0 | about the value x0 , result-
ing in corresponding relative changes |δh/h(x0 )| in the value of the
expression, is given by
δh
h(x0 ) x0 x0
kr = max  |h (x0 )| = ka .
small|δx0 /x0 | δx0 h(x0 ) h(x0 )
x0

Thus, for the problem of evaluating g(θ), we have


θ0 0.007 156
kr  ka  × 1334  1.
g(θ0 ) 9.55
Hence, by Procedure 1.2 of Unit I.3, since kr < 5, the problem of evaluat-
ing g(θ) is relatively well-conditioned with respect to small changes in the
angle θ.
Having obtained absolute and relative condition numbers, we need to inter-
pret them in terms of the model. The first thing to note is that the value
of g obtained using Equation (4.2) is considerably larger than the value of θ
used in obtaining it. We should therefore not be surprised that the absolute
condition number is very large. In general, if the orders of magnitude of
a parameter of and the solution to a problem are different, we should not
expect the absolute condition number to be a good guide to the sensitiv-
ity of the solution to changes in the parameter. Differences in the orders
of magnitude frequently occur if the solution and parameter have different
dimensions. Thus, in most models, the relative condition number will be a
better guide to sensitivity, since it takes into account any differences in the
orders of magnitude of the solution and parameter. Hence, for the problem
of evaluating g using Equation (4.2), we can say that the problem is not

40
Section 4 The skills of modelling

sensitive to small changes in the value of θ; in fact, since kr  1, we can say


that, for example, a 1% change in the value of θ will give rise to a 1% change
in the value of g.
So far we have only considered the case where just one parameter is subject
to change. Often, there are uncertainties in several parameter values and we
may want to check the sensitivity of the solution to changes in each. This
is easily done by checking each in turn using the ideas above.

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.

4.4 Computer activity


Activity 4.1
For the shot-putter’s model (Exercise 4.3), you saw in Exercise 4.19 that
the maximum range of the shot is given by
 PC
u2 2gH
R= 1+ 2 .
g u
Use your computer to do the following.
(a) Determine the maximum range of the shot when its initial speed is
u = 14 m s−1 , the launch height is H = 2.4 m and g = 9.81 m s−2 .
(b) Determine the absolute and relative condition numbers for evaluating
R with respect to small changes in the values for each of u, H and g, in
turn, about the values given in (a). Hence determine the absolute and
relative sensitivity of R to small changes in the values of u, H and g.
(c) Use the absolute condition numbers you obtained in (b) to estimate the
increase in the maximum range resulting from:
(i) increasing u by 0.1 m s−1 ;
(ii) increasing H by 0.1 m;
(iii) competing at altitude, where g = 9.78 m s−2 .

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%.

5 Revising the inventor y model


When modelling complex systems, our first model should be simple, in order
to gain a feel for the problem while keeping the mathematics relatively
straightforward. This simplicity can be achieved by modelling only the
essential elements of the system, though determining what is essential and
what is not is a skill that can only be developed through experience, by
modelling. With such an approach, it is unlikely that a first model (or even
a second) will satisfy the purpose of the model, as specified in the first stage
of the modelling process. Thus, an important step in the modelling process
is a critical evaluation of a model, using a variety of techniques, to assess its
success or failure, and the limitations on its use, and also to consider which
of the assumptions and simplifications that underpin the model may need
to be revised in order to remove some of its deficiencies.
An important feature in the evaluation of a model is to carry out tests or
to use given data to check how good it is. Without such an evaluation
it would be difficult, and rather unwise, to say with any confidence how
successful the model may be in predicting what will happen in other, similar,
circumstances.
Sometimes evaluation may show that a first model is sufficient and can be
used to obtain useful predictions. In such circumstances a revised model
may give no significant improvement and there is then no need to include
the additional complexity. However, in most cases we will have to devise
a revised model in order to obtain a more realistic solution. For example,
in the air-track model described in Section 2, the first model significantly
underestimated the value of g; it would seem necessary, therefore, to try to
revise the model in order to improve its predictive capabilities.
In this final section of the unit we evaluate the inventory model to investigate
its deficiencies and to discuss ways that it can be improved.

42
Section 5 Revising the inventor y model

5.1 A review of the first inventor y model


Below is a summary of the mathematical model for the inventory problem,
discussed in Section 1. Read it through quickly to remind yourself of the
model.

Specify the purpose of the mathematical model


The inventory problem is to predict how often to order new stock and how
much stock to order each time, taking into account the overhead costs of
making and delivering each order, and the holding costs of keeping stock in
store, in order to minimize the average daily cost of the stock.

Create the model


In the model we assume the following.
(i) Only one type of product is being manufactured, using one type of
raw material.
(ii) The raw material is used at a constant rate.
(iii) Each time new stock of the raw material is ordered there is a fixed
overhead cost, which includes the cost of administering the order,
transportation costs and so on.
(iv) Stock of the raw material runs out just as the new stock arrives.
(v) There is a constant holding cost rate, per unit, associated with storing
the raw material, that takes into account storage space, insurance,
taxes, the cost of tying up the capital and so on.
(vi) There is no cost associated with running out of the raw material.
(vii) There is no limit on the amount of raw material that can be stored
or the money available for purchasing new stock.
The variables for the model are:
x the amount, in tonnes, of raw material ordered each time; The units used will reflect the
t the time, in days, since the last delivery of stock; type of inventory problem
that is being modelled. We
T (x) the time, in days, that an amount x of stock lasts before reordering
use tonnes, days and pounds
is necessary; for consistency with Section 1.
s(t) the stock level, in tonnes, at time t;
C(x) the cost, in pounds, over a complete cycle if x tonnes are 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.
The total cost over a complete cycle of length T (x) is
C(x) = C1 + c2 x + 12 HxT (x),
where T (x) = x/r. The mathematical model for the average cost per day,
which is to be minimized, is
C(x) C1 r
D(x) = = + c2 r + 12 Hx.
T (x) x

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

Interpret the results



The model predicts that the optimal strategy is to reorder x = 2C1 r/H
tonnes every T (x) = x/r days. The average daily cost consists of two parts.
The first part, c2 r, is√the fixed daily cost of purchasing the raw material,
and the second part, 2C1 rH, comprises the costs associated with ordering
and storage.

5.2 Evaluation of the model


In trying to see if our model is realistic we need to consider the problem
that we are trying to solve. The problem is to determine how much raw
material we need to order and how often we need to order it in order to
minimize the average daily cost of maintaining a stock. The model can be
used in a variety of different contexts where stock levels vary and need to
be replenished periodically.
One method of evaluating a model is to use real data to compare with the
predictions of the model. The real data can come from experiments or
from published sources. However, there are clearly deficiencies in the model
for situations where there is more than one raw material or where stocks
frequently run out. It is these obvious deficiencies that we shall tackle in
our first revision to the model. In specific applications there may be other
necessary revisions.

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.

5.3 Revisions to the model


Since we have only derived a very simple model, there are a number of ways
in which we could revise and improve it to make it more widely applicable. If
we examine each of the seven assumptions that underpin our first inventory
model and consider cases in which the inventory model might be applied, it
is possible to justify modifications to any of these assumptions. The revision
that we are going to consider in this subsection is to take account of stock
shortages.

44
Section 5 Revising the inventor y model

Suppose that we modify assumption (vi) as follows.


(vi) There is a cost per unit of stock for each unit of time delay associated
with running out of the raw material.
We shall also need the following new assumption.
(viii) There is no holding cost associated with having an empty store.
If we are allowed to run out of raw material, the frequency of the orders can
be decreased, with savings over time on the overhead charges of reordering.
The absence of stock for part of the cycle will mean no holding costs during
that part of the cycle. However, balanced against this will be the cost of
having no raw material in stock. For example, if the bakery runs out of flour,
it will not be able to do any of the jobs associated with preparing bread and
cakes, etc. Another example is provided by retail shops, which would have
to tell customers that, although the item required is out of stock, new stock
will be delivered shortly. There will be paperwork associated with customers
who place orders for items that are out of stock. The longer the delay in
obtaining new stock, the more customers will cancel orders. Customers may
well contact the shop on a regular basis to check if the new order has arrived
and this will require staff time to deal with these queries. When the new
stock arrives, those customers who are waiting will also have to be informed.
Thus there will be a number of costs associated with running out of stock.
To deal with this new situation we need to introduce one new variable and
one new parameter.
The new variable is:
X the initial stock level, in tonnes, immediately after delivery, once all
stock required to cover for stock shortages during the latter part of
the previous cycle has been put aside.
Since we are concerned with stock shortages and not overstocking we can
safely take x � X > 0.
The new parameter is:
P the penalty cost rate, in pounds per tonne per day, of having negative
stock.
By negative stock we mean stock that, had it been available, would have
been used.
The stock level is now given by
s(t) = X − rt, 0 � t < T (x),
as shown in Figure 5.1. This gives a positive stock level for 0 � t < X/r. We Figure 5.1
also still have T (x) = x/r. Since, by assumption (v), holding costs are only
incurred when the stock level is positive, the total holding cost per cycle is
 X/r  X/r  X/r
Hs(t)dt = H (X − rt)dt = H Xt − 12 rt2 0
0 0
2 2 2
HX HX HX
= − = .
r 2r 2r

45
Section 5 Revising the inventor y model

Although, by assumption (viii), there is no holding cost, there will be penalty


costs during the period in which there is no stock. These, by the new
assumption (vi), are given by
 T (x)  T (x)  1 2
T (x)
P (−s(t)) dt = P (rt − X)dt = P 2
rt − Xt X/r
X/r X/r
2
PX P X2
= 12 P rT (x)2 − P XT (x) − +
2r r
P x2 P Xx P X 2
=− + (since T (x) = x/r)
2r r 2r
P (x − X)2
= .
2r
Hence the total cost of one complete cycle is a function of the two variables
x and X, given by
HX 2 P (x − X)2
C(x, X) = C1 + c2 x + + .
2r 2r
The mathematical model for the average cost per day, the quantity that is
to be minimized, is thus
C(x, X) C1 r HX 2 P (x − X)2
D(x, X) = = + c2 r + + .
T (x) x 2x 2x
Since this is a function of two independent variables, we can find its lo-
cal minimizers using the techniques of Subsection 2.1. We first locate its
stationary points, which are the points where
∂D ∂D
(x, X) = 0 and (x, X) = 0.
∂x ∂X
We thus have
∂D C1 r HX 2 1 P X2
(x, X) = − 2 − + 2
P − = 0,
∂x x 2x2 2x2
∂D HX P (x − X)
(x, X) = − = 0.
∂X x x
From the second equation we have x = (H + P )X/P (so x � X, as required,
since H > 0 and P > 0). Multiplying the first equation by x2 and substi-
tuting in this expression for x gives
(H + P )2 X 2 1
−C1 r − 12 HX 2 + − 2 P X 2 = 0.
2P
Collecting up the terms in X 2 and taking the positive square root (since
X > 0) gives
 
2P C1 r 2(H + P )C1 r
X= , and hence x = .
H(H + P ) HP
Thus D(x, X) has a stationary point at these values of x and X. Calculation
of the second derivatives of D(x, X) at this point shows that it is a local
minimizer. We thus have formulae for the optimal initial stock level X and
the optimal reorder quantity x. The corresponding minimum average daily
cost is
⎛  ⎞ 
2(H + P )C1 r 2P C1 r ⎠ 2HP C1 r
D⎝ , = c2 r +
HP H(H + P ) H +P

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

Solutions to the exercises


Section 1 day week, delivery every third day gives T (x) = 35 and
x = rT (x) = 320 × 35 = 192 � 200. So a sensible strat-
1.1 (a) There is nothing in the statement of the prob- egy is to deliver 192 metal casings every third working
lem to indicate that any of the assumptions of the gen- day. The average weekly cost of such a strategy would
eral inventory model do not apply, so we shall assume be
that all of the assumptions apply. (Note that, in this C1 r
D(x) = + c2 r + 12 Hx
instance, the raw materials are the metal casings.) x
450 × 320
We need one further assumption, namely that there is = + 40 × 320 + 12 × 5 × 192
an upper limit on the amount of raw material (the num- 192
ber of metal casings) that can be delivered in one order. = £14 030,
(of which £12 800 is the cost of the metal casings
(b) The variables of the model are:
and £1230 is the delivery charges and holding costs).
x the number of metal casings ordered each This is only £30 more than the average weekly cost of
time; £14 000 (= £12 800 + £1200) for the ‘optimal’ solution.
t the time, in weeks, since the last delivery of
stock; 1.2 (a) For this problem, the product is being sold
T (x) the time, in weeks, that an amount x of stock rather than manufactured and the raw materials are
lasts before reordering is necessary; Trailblazer shoes. We are told to ignore the problem of
s(t) the stock level, in numbers of casings, at stocking different sizes, so we have just one ‘raw mate-
time t; rial’ and assumption (i) of the general inventory model
C(x) the cost, in pounds, over a complete cycle if x still holds. There is nothing in the statement of the
metal casings are ordered; problem to indicate that assumptions (ii)–(vi) do not
D(x) the average weekly cost, in pounds, of buying apply. The problem statement mentions storage space
and storing x metal casings. limitations, but for a selling rate of 30 pairs per week it
The parameters of the model are: is unlikely to be difficult to finding room to store suf-
ficient Trailblazers, so that we can to all intents and
r the (constant) rate, in numbers per week, at purposes keep assumption (vii) unchanged also.
which metal casings are used;
C1 the fixed overhead cost, in pounds, of reorder- There are no additional assumptions required.
ing; (b) The variables of the model are:
c2 the fixed cost, in pounds per metal casing, of
x the number of pairs of Trailblazers ordered
buying new stock;
each time;
H the fixed holding cost rate, in pounds per
t the time, in weeks, since the last delivery of
metal casing per week, associated with the
stock;
storage of stock;
T (x) the time, in weeks, that an amount x of stock
U the upper limit on the number of metal casings
lasts before reordering is necessary;
that can be delivered in one order.
s(t) the stock level, in pairs of Trailblazers, at
The values of the parameters are r = 320 metal cas- time t;
ings per week, C1 = £450, c2 = £40 per metal casing, C(x) the cost, in pounds, over a complete cycle if x
H = £5 per metal casing per week and U = 200 metal pairs of Trailblazers are ordered;
casings. D(x) the average weekly cost, in pounds, of buying
(c) The only change needed is to constrain the values and storing x pairs of Trailblazers.
that x can take to lie in the range 0 < x � U . The parameters are:
(d) Using the unconstrained model, the optimal num- r the (constant) rate, in numbers of pairs per
ber of metal casings to be delivered each time is week, at which Trailblazers are sold;
 
2C1 r 2 × 450 × 320 C1 the fixed overhead cost, in pounds, of reorder-
x= = = 240, ing;
H 5
with a time (in weeks) between deliveries of c2 the fixed cost, in pounds per pair of Trailblaz-
x 240 3 ers, of buying new stock;
T (x) = = = . H the fixed holding cost rate, in pounds per pair
r 320 4
of Trailblazers per week, associated with the
Hence, the model predicts that the optimal solution is storage of stock.
to deliver 240 metal casings every 0.75 weeks, i.e. every
The values of the parameters are r = 30 pairs of Trail-
0.75 × 5 = 3.75 working days. However, this solution
blazers per week, C1 = £90, c2 = £20 per pair of Trail-
exceeds the capacity of the van. Either a larger van is
blazers and H = £0.24 per pair of Trailblazers per week.
required, which would presumably increase the deliv-
ery charge, or the number delivered must be reduced
to 200 or fewer. Since the factory is working a five-

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.

2.4 The first partial derivatives are


∂f ∂f
(x1 , x2 ) = 2x1 and (x1 , x2 ) = 4x32 ,
∂x1 ∂x2
so there is a single stationary point at (0, 0).
The least squares straight line can also be used to de-
The matrix of second partial derivatives at (0, 0) is termine an estimate for g. From Equation (2.5) we have
M=
2 0
, a1  12 g sin θ,
0 0
so that
which has eigenvalues 2 and 0, so the test in Theo- 2a1
rem 2.1 fails. However, it can be seen that f (0, 0) = 0 g  10.27.
sin θ
and f (x1 , x2 ) > 0 for any point (x1 , x2 ) = (0, 0), so the (This estimate for g is slightly better than that obtained
origin is in fact a local (and global) minimizer. using the different least squares fit of Example 2.4.)

2.5 (a) The characteristic equation is m


 m

(A − λ)(C − λ) − B 2 = 0, 2.7 (a) f (a0 , a1 ) = ri2 = (a0 ti + a1 t2i − xi )2 .
i=1 i=1
so The stationary points of f occur when ∂f /∂a0 = 0 and
λ2 − (A + C)λ + (AC − B 2 ) = 0. ∂f /∂a1 = 0, given by
If λ1 and λ2 are the two (real) roots of this quadratic m
∂f
equation, then λ1 + λ2 = A + C and λ1 λ2 = AC − B 2 . (a0 , a1 ) = 2ti (a0 ti + a1 t2i − xi ) = 0,
∂a0 i=1
The following cases arise.
m
∂f
(i) If AC − B 2 > 0, then the roots must have the same (a0 , a1 ) = 2t2i (a0 ti + a1 t2i − xi ) = 0.
sign. If A > 0 then we must also have C > 0 (since ∂a1 i=1
AC − B 2 > 0) and A + C > 0, so both roots are posi- These two equations, written out in full, divided
tive, indicating a local minimum. through by 2 and rearranged, give
m  m  m
Similarly, if A < 0 then C < 0, A + C < 0 and both   
2
roots are negative, indicating a local maximum. ti a0 + ti3 a1 = ti xi ,
i=1 i=1 i=1
(ii) If AC − B 2 < 0, then the roots must have opposite m  m  m
  
3
sign, indicating a saddle point. ti a0 + t4i a1 = t2i xi ,
(b) If det M = AC − B 2 > 0 and both diagonal ele- i=1 i=1 i=1
ments are positive then, by (a)(i), (α1 , α2 ) is a local as required.
minimizer. (b) The normal equations are
290.09a0 + 2242.341a1 = 76.0115,
2242.341a0 + 18 069.6485a1 = 613.872 75.
These have solution a0 = −0.014 088, a1 = 0.035 721.

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.

To measure the quantity of paper used in each case, we


need to obtain the areas of the two unfolded designs,
for which we need the dimensions x, y and t in the first
case and x, y, t and θ in the second.
Thus the three key variables for the envelope design
model are the length x and height y of the envelope,
measured in centimetres, say, and the angle θ, mea-
sured in radians. The key parameter is the thickness t
of the overlap, also measured in centimetres. Its area is 12 × base × height, so we need values for a
and b. Using the figure, we obtain
4.10 The basic problem for the shot-putter is to de- t t
a= , b= .
termine how the range of the shot varies with the angle cos θ sin θ
of release. Thus the area of the triangle shown is
Hence the two key variables are the range R, in metres, 1 t t
2 x + sin θ y+
cos θ
and the angle of release θ, measured from the horizon-
tal, in radians.  x y  t2
The two key parameters are the speed u, in metres = 12 xy + + t+ ,
cos θ sin θ sin θ cos θ
per second, with which the shot is launched, and the and so the total area is 4 times this, i.e.
height above ground H, in metres, from which the shot  x
is launched. y  t2
2xy + 2 + t+2 .
cos θ sin θ sin θ cos θ
(The acceleration due to gravity, g, is considered to be 2
a constant, not a parameter, for this problem, although (b) Ignoring
 terms in t and using  the facts that
it does vary slightly over the surface of the Earth.) sin θ = y/ x + y and cos θ = x/ x2 + y 2 , we obtain
2 2

the approximate area for the rectangular sheet as


4.11 The basic problem is to decide where to build a 2xy + (x + 4y)t
new supermarket in relation to an existing supermar- and that for the diamond-shaped sheet as
ket. By a suitable choice of coordinate system, we can  
place the existing supermarket at the origin and align 2xy + 4 x2 + y 2 t.
the axes so that the proposed site of the new supermar-
(c) The diamond-shaped design will use less paper
ket is at (X, 0), where X is measured in kilometres, say.
than the rectangular design when
As we saw in Solution 4.4, what we need to determine  
is the catchment area of the new supermarket, which 2xy + 4 x2 + y 2 t < 2xy + (x + 4y)t,
we can do in terms of the coordinates (x, y) of houses
or equivalently when
in the area. 
4 x2 + y 2 < x + 4y.
Thus the two key variables are the coordinates x and y,
measured in kilometres, that will be used to define the Squaring both sides gives
catchment area. 16(x2 + y 2 ) < x2 + 8xy + 16y 2 ,

56
Solutions to the exercises

which leads to This is the equation of a circle, centred on


15x2 < 8xy,  point (k1 X/(k1 − k2 ), 0) and with radius r =
the
k1 k2 X 2 /(k1 − k2 )2 .
and, on dividing through by x (where x > 0), to
8 Below is a sketch of the catchment area of the new su-
15x < 8y, or x < 15 y.
permarket in the case where the new supermarket is
Thus the rectangular design is going to use less paper only half as attractive as the existing one, i.e. k1 =√2k2 .
in most cases, since most envelopes are wider than they In this case, the boundary is a circle of radius 2X
are tall. Only once the height is 15
8 times the width will centred on (2X, 0).
the diamond-shaped design use less paper.

4.13 (a) By assumption (iv) in Solution 4.7, an ex-


pression that can be used to measure the likelihood of
someone choosing a given supermarket is k/d2 , where
k is a measure of the attractiveness of the supermar-
ket (which can be measured by assumption (ii)) and d
is the distance of the person’s home from the super-
market. By Solution 4.11, we can write k = k1 for the
existing supermarket and k = k2 for the new one. Also,
using the notation of Solution 4.11 together with as-
sumption (i) of Solution 4.7, the distanceof a house at
(x, y) from the existing supermarket
 is x2 + y 2 and
from the new supermarket is (x − X)2 + y 2 . Thus
the required expressions are 4.14 (a) [volume] = L3 .
k1 k2
x2 + y 2
and
(x − X)2 + y 2
. (b) [acceleration] = LT−2 .

(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.)

5.4 (a) If the raw materials can be ordered indepen-


dently then we can minimize the average daily cost for
each raw material separately.
(b) If the same supplier delivers both raw materials
then the length of the two cycles should be the same.
We thus make the following additional assumptions.
(viii)The time that stocks last will be the same for each
raw material.
(ix) There will be one overhead charge for each delivery.
We also need to amend assumption (i).
(i) Only one type of product is being manufactured
using two types of raw material.
If we add the subscripts 1 and 2 to the variables and pa-
rameters so that, for example, x1 is the amount of raw
material 1 to reorder and x2 is the amount of raw ma-
terial 2 to reorder then the time of each cycle T is given
by T = x1 /r1 = x2 /r2 , so x2 = r2 x1 /r1 . The average
daily cost is given by
C1 r1
D(x1 , x2 ) = + c21 r1 + 12 H1 x1 + c22 r2 + 12 H2 x2
x1
C1 r1 r2 x1
= + c21 r1 + 12 H1 x1 + c22 r2 + 12 H2 ,
x1 r1
where C1 is the overhead cost for each cycle, c21 and c22
are the purchase costs, r1 and r2 are the usage rates,
and H1 and H2 are the holding cost rates for raw mate-
rials 1 and 2 respectively. Since this can be written as a
function of x1 alone we can write the average daily cost
as D(x1 ). The minimum average daily cost is achieved
when dD/dx1 = 0, i.e.
C1 r1 r2
− 2 + 21 H1 + H2 = 0.
x1 r1

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

You might also like