You are on page 1of 46

MAS208 : MATHEMATICAL MODELLING

Contents

How to use these notes / Getting started on Excel 2

L1. Introduction 3

L2-3. Some Simple Models 7

L4-5. Model Derivation 13


Study : Diffusion through a membrane

L5-9. First-order differential equations 18


Study : Bacterial growth in a chemostat
Submit Assignment 1

L10-16. Higher order differential equations 23


Study : Designing a car suspension system oscillations

L17-18. Numerical solution of differential equations 29


Study : Enzyme Kinetics
Submit Assignment 2

L19-22. Laplace Transforms 33

L23-24. Models of Interaction-Matrix Revision 33

L25-27. Linear systems of first-order ODE 34


Submit Assignment 3

L28-36. Models in time and space 35


Submit Assignment 4

1
How to use these notes.

The notes contained in this guide follow the text;

Differential Equations with Boundary-value problems,


by Zill and Wright, 8th edition, Brooks-Cole

Note that previous editions (6th and 7th) of the textbook were authored by Zill and Cullen.
The 6th and 7th editions of the textbook can be used for this unit (however the 7th edition
does not contain the Projects). Annotations are added for the 6th, 7th editions where
relevant as [6th ed. - ..] or [7th ed. ..] after the instructions for the 8th. If this does
not appear, then the editions are the same. Note that the Projects referred to by the 6th
edition do not exist in the 7th edition. For the 8th edition the projects are at the front of
the textbook.
Follow carefully what is written about each section, since it includes instructions about
both what you need to know and what you do not need to know. The lecture numbers are
given only as a guide of how much of the unit is devoted to that subject, and actual lectures
for internal students will not necessarily coincide.
Every now and then there are some small details that the text does not cover. In that
situation some notes have been added to fill in any gaps. The case studies are provided as
examples of complete, real problems. You should read through them and try to understand
what they are doing, but you will not be asked to do a complete problem such as these from
start to finish.
Questions at the end of each section are suggested in this guide. These are carefully cho-
sen to highlight the main ideas that you are expected to know. Answers to odd-numbered
questions are at the back of the book. You should also work through each example in the rel-
evant sections of the text (rather than just reading them). This will help your understanding
develop.
In solving difference equations or differential equations numerically, you should learn how
to use a spreadsheet program such as Excel. These are usually very easy to set up to do these
kinds of calculations. Some basic instructions are given below. Plotting of the results gives
an immediate warning if something is going wrong and also allows you to compare different
schemes. If you need help with this contact your tutor. Actually doing such calculations is
a very important part of understanding.
The text refers to a number of Projects. To do all of these would take a lot of time, but
reading through them will give further insight into the modelling process. However, they are
not essential for completing the unit and are not in the 7th edition of the textbook.

A note on using Excel to follow a difference equation

In order to use Excel to solve the difference equation yk+1 = yk + t (tk /(yk + 1)) with
y0 = 1, which would be the Euler method for dy dt
= t/(y + 1), y(0) = 1, use two columns (A
and B (say)). Column A will be the time, Column B for y. In cell A1 enter 0, then in cell A2
enter =A1+0.1 to indicate that the time step is 0.1. Now click on the bottom right corner

2
of A2 and drag down to fill down adding 0.1 each time. For the B column, enter the initial
value, 1, (y0 = 1) into cell B1. Now enter the formula for the difference equation into B2, i.e.
=B1+0.1*(A1/(B1+1)) (note that this includes the time variable). Again click and drag
to fill down the successive steps of the numerical solution. To plot this output insert a plot
but be careful to use the scatter plot option if you wish to plot column B vs. column A.

3
Lecture 1 Introduction

This course is about mathematical modelling. Why, what is the point ? Surely being
a scientist or engineer involves knowing about the physics, biology, chemistry, ... and this
involves some mathematics, but why mathematical modelling ?
Suppose you are an Environmental Scientist who is asked to perform an Environmental
Impact Study on a particular region of land. If there is limited data available, how can you
possibly consider the changes which might occur in a population of some species of animal
in the future ? If there has been some dramatic shift in the population of some insect, or a
decrease in crop production after spraying for some pest, how can you investigate what has
happened, or what will happen, when you have little or no information ? How can other
information such as economic factors be incorporated into the study ?
If you are working in a factory of some kind, and there is some change in quality of your
product, or there is a change in flow behaviour in some sealed pipes, or change in rate of
an important chemical reaction, how can the data you have be used to try to discover the
reasons behind the changes ? There may even be a recurring problem which you have no
idea about, and just have to live with. One way to try to answer these questions is to use
mathematical modelling.
Here are some examples of situations in which mathematical modelling has been success-
fully applied to show possible reasons for some counter-intuitive behaviour or to resolve
serious (and expensive) problems. The first two are taken from C.S. Hollings Adaptive
environmental assessment and management

Example 1
There is a series of valleys on the coast of Peru formed by streams running from the
high Andes to the Pacific ocean. Many of these valleys are under intensive agriculture and,
because of the low rainfall, are irrigated. As a result, each valley is essentially a self-contained
ecosystem isolated from the others by barren ridges. In one of these valleys, the Ca nete, the
crop was shifted from sugar cane to cotton during the 1920s. Over the years a group of
seven native insects became significant cotton pests. The pest problem was essentially modest
and the farmers of the region lived with the resulting economic damage. In 1949, chlorinated
hydrocarbons like DDT, benzene hexachloride, and toxaphene became widely available, and
the opportunity arose to dramatically decrease pest damage and increase crop yields.
The initial response of the insecticide treatment was a pronounced decline in pests and
a 50 percent increase in cotton production. After two or three years, however, six new
species of insects became as serious a problem as the original seven had been. The reason for
the appearance of these new pests was the elimination of parasites and predators that were
killed by the insecticides. Within six years the original seven insect pests began to develop
resistance to the insecticide, and crop damage increased. In order to control this resurgence,
the concentration of the insecticide had to be increased and the spraying interval reduced from
two weeks to three days. As these control measures began to fail, the chlorinated hydrocarbons
were replaced by organophosphates. But even with this change, the cotton yield plummeted
to well below those realized before synthetic insecticides.

4
The average yield in 1956 was the lowest in more than a decade, and the costs of control were
the highest: the agricultural economy was close to bankruptcy. This forced the development of
a very sophisticated ecological control program that combined changed agricultural practices
with the introduction and fostering of beneficial insects. Chemical control was minimised.
These new practices allowed the re-establishment of the complexity of the food web, with the
result that the number of species of pests was again reduced to a manageable level. Yields
reached the highest level in the history of cotton production in the valley.
The obvious solution of removing the pests using sprays did not work in the long term
because of the interactions between species.

Example 2
The large open-sea fisheries of the North Sea, like herring and mackerel, have been nearly
eliminated by fishing pressure. At the same time, there has been an increase in the number of
bottom fishes. At first thought the spatial separation of these two groups one living in the
upper waters, one living in the lower waters would make such a response unexpected. But
removal of herring and mackerel relaxed the competition with smaller open-sea fishes such
as sand eels, Norway pout, and the young stages of the bottom-feeding fishes. Since these
species, unlike herring, migrate between upper and lower regions, they provide a conduit
that carries energy and material to fishes living near or on the bottom. With their herring
competitors and predators removed, this conduit could carry more resources downward so that
bottom-dwelling populations increased.
In this case there was a surprising interaction between the two species. An initial model
may not have picked this up, but once some data became available, an improved model could
be developed. It also shows that many factors may not be important which might seem to
be at first thought.

Example 3
Data dating back to 1880 shows that in all of the 5 Great Lakes in North America the
7 commercially fished species behaved in a similar way. After a long period of reasonably
similar sized catches there was a dramatic drop in numbers over 2 or 3 years. Some of the
species actually became extinct, while others reached very low numbers. The latter, however,
did not resume the higher levels when predators and fishing pressures were reduced, but stayed
consistently around the new level. It is likely that their role in the ecological system had at
least two equilibrium points; points at which the population remains reasonably stable. We
will later see how these points are defined mathematically.
Could these outcomes have been predicted ? The answer is yes, or at least the behaviour
could have been indicated as one possible outcome of many. In this case the equations may
have been too difficult to solve, but analysis of them would have shown the correct behaviour.
Any model with limited data will have some parameters which are unknown and must be
estimated. Using the model, the effects of these parameters can be gauged. In some cases,
very small changes in the parameter value may lead to very different behaviour (such as
moving from one equilibrium point to another) if near some critical value. In addition, a
good model may lead you to better understand which parameters you need to measure to
study the process correctly. Below is a different kind of example.

5
Example 4 - BHP (Port Kembla) - Continuous casting of steel.
In this process molten steel is poured into a continuous copper cast, and solidifies on the
outside as it contacts the mould. It then continues to move downward where it is rolled up
when completely solid. A powder material (flux) is used to separate the hot steel from the
mould. The mould oscillates to keep the flux moving downward with the steel. Every now
and then a gap forms in the flux causing the hot metal to stick to the mould, in turn causing
a breakout in which the solid outer skin of metal breaks allowing the molten metal to flow
out. This is very costly to fix as there is solid steel everywhere and the plant must usually
be closed down for several days. This is a different kind of modelling problem. There is
probably a great deal of available data, a lot is known about the process, and the problems
are very specific. There are two questions which one can ask. Is it possible to monitor the
temperature of the cast and thus predict when a breakout is imminent (allowing a shutdown) ?
What is the cause of the formation of the gap in the powder ?
The first question is more difficult to answer than you might think. The thermistors may
be several cm from the actual face of the mould, meaning there is a time lag between the
heat reaching the mould and being measured. Secondly, there is a lot of noise in the signal
due to natural fluctuations in temperature and changes in the thickness of the flux which are
not signalling breakout but may still be significant, and finally the calculations need to be
performed extremely quickly to recognise the problem before it happens. The movement of
heat through the mould to the thermistor can be predicted by solving the diffusion equation,
an equation which is very well understood and arises in many applications (and hence has
been studied very much). In fact the diffusion equation also arises in population spread
(of plants, say), spread of a solute in a solvent, or the flow of water under the ground.
Some standard statistical techniques can be used to filter the data and perhaps recognise the
pattern just before breakout. The combination of these two approaches may lead to a simple
pattern recognition computer program which can operate very quickly.
The answer to the second question is much more difficult to find. Many scientists looked
at the problem over the years with little or no progress. It has been answered in the last two
or three years, and tests are under way to verify this solution.
It wont be possible to look at exactly these problems in this course (they are rather
complicated), but they do indicate situations in which a mathematical model of the process
of interest was developed and used to
1. Examine possible scenarios which might cause the changes or problems, and better direct
the user to collect the right data.
2. Gain a better insight or understanding of the physics/ biology/chemistry of the situation,
in order that a better attempt can be made at identifying the cause of the changes.
3. Model very accurately some process so that the effect of modifications can be assessed
without having to perform expensive and time consuming experiments or field surveys.
Modelling real world situations can be very difficult because of the enormous complexity
of interactions between various events. This is especially true in biological systems and
modelling populations, spread of disease etc. However, the interactions are not always as
strongly coupled as might be expected, allowing some room to manoeuvre. In this situation

6
models are of more use in examining possible scenarios than in actually making accurate
predictions. In many fluid flow or chemical reactions, however, it is possible to develop very
accurate models of the processes involved. An extremely important part of modelling is in
deciding what is important and what is not, e.g. neglecting the viscosity and compressibility
of air makes little difference to the predictions of lift on a wing, but makes the equations
much easier to handle. Modelling is not a process which is possible only from a mathematical
viewpoint, other knowledge must be used, depending on the situation. As a scientist you
should be aware of both the limitations and the uses of any model. All available information
should be utilised in setting up and then validating (or invalidating) the model, since it can
sometimes allow the omission of some parameters which turn out to have little effect on the
behaviour.
There is no such thing as a right model, nor is there a wrong model. There are only
good models and bad models. Ideally we seek the simplest model that retains the essential
features of the problem. Wherever possible models should be compared with available data
and if possible there should be as much input of available information about the process
in question as possible. Sometimes, however, there is no alternative to a full numerical
simulation of the process - which means the solution of highly nonlinear equations using
numerical approximations.
In this course, I hope to look at both kinds of models. How they are derived, tested and
interpreted. In some cases, very different situations may lead to very similar equations with
only some rate constants being different. Models from economics, biology, physics etc. may
all lead to mathematical systems which have very similar equations and behave in the same
ways.
Finally, modelling is an interactive process. We may develop models which when compared
with real data give terrible results and which must then be modified significantly - what
important factors have we forgotten ? Models can be improved as we obtain better data.
The diagram below shows a procedure which might be used in analysing a particular
situation.

Simplifying Mathematical Model


Assumptions usually an equation
Real World Problem
or set of equations

Mathematical
Improve the model? Techniques

Interpretation of the Solution or analysis


results and prediction Model Validation
of the equations
or examination of
possible outcomes.

7
Lectures 2-3 Some simple models

In this section, we consider how to set up models for some reasonably simple processes. We
take the approach of deriving models by using balance equations. This involves considering
the current state of a system and then trying to work out what it will be like a short time
later by considering all of the possible inputs and outputs. This leads to two kinds of models.
Firstly, what are called difference equation or discrete models, in which events are specified
to occur on a fixed time interval, and secondly, continuous or differential equation models
in which events are continually evolving. In this course we will be concentrating mainly on
the second, continuous type models. However, it is necessary to be able to see how the two
models relate and to work out the situations in which they apply. We will see that differential
equations are what is called a limiting case of difference equations.
We will be concentrating on differential equations, so you should read through Zill and
Cullen sections 1.1 and 1.2. These sections give background information and definitions for
differential equations and much of it should be revision.

A discrete population model.

Consider a single cell that divides after some fixed interval of time, say 10 minutes. If we
let Nk be the number of cells after k time intervals have passed, then if every cell divides,
the number at the next time step, Nk+1 will be double the number at the current time, i.e.

Nk+1 = 2Nk , k = 0, 1, .....

for all time intervals. This form of equation is known as a difference equation. In this case
it means that if we start with 1 cell, i.e. N0 = 1, then after one time interval (10 minutes)
there will be N1 = 2N0 = 2, and after 2 intervals (20 minutes), N2 = 2N1 = 4, and so on as
shown below.

60

Population
40

20

0
0 2 4 6
Time (units of 10 min.)

Notice that if we continue iterating we very quickly see a pattern, i.e. N1 = 2N0 , N2 =
2.2N0 , N3 = 2.2.2N0 , N4 = 2.2.2.2N0 and eventually Nk = 2.2.2.....2N0 = 2k N0 . In fact
in this way we can find the solution to this difference equation, i.e. Nk = c.2k where c is
a constant that is determined by the problem. Lets check that this is a solution. If we try
Nk = c.2k , then Nk+1 = 2.Nk = 2.c.2k = c.2k+1 .
It is important to understand the difference between the equation and the solution. The
equation just relates Nk+1 to Nk for k = 0, 1, 2, 3, ..., whereas the solution is an explicit

8
representation of Nk for any k, i.e. if I know the time k, I can compute the population
directly, whereas I can not do this from the equation unless I start from k = 0 and count
upwards for k steps.
This is a very simple model. It seems to make sense, and should give an estimate of the
number of cells at any time in the future by simply stepping forward in time (Excel or similar
spreadsheet computer programs are very good for this kind of calculation). At this point
we should consider what we have assumed to get this model. A major assumption is that
the cells divide after exactly 10 minutes, and that there is no death of cells. We have also
assumed that all cells divide and that there is no limit on their growth. All of these are
model assumptions and are the cause of discrepancies between the predicted population and
the number that might be measured in a real experiment.
Now consider a slightly more general situation. Suppose we are considering some species of
animal, instead of cells. At each time interval, not all of the animals will produce offspring,
so the equation above will no longer apply. The question is whether we can use the same
idea to generate a simple model. If we assume that a certain proportion (, say) of the
population will produce offspring, then the population at the next time will be the current
population plust the number born during that time interval, leading to the equation
Nk+1 = Nk + Nk , k = 0, 1, .....,
where Nk is now the population of animals, not the number of cells. The value of is the
proportion that produce offspring in the designated time period, and it may or may not
be known for a given species in a given environment. The value of may depend on the
population, N , or some other variables such as food availability, or climate, or it may be
constant. Let us assume it is constant for the moment. How can we add a term to the
equation that will model the number of deaths ? If a certain proportion produce offspring,
then it is reasonable to assume that a certain (probably different) proportion will die. If we
let this proportion be , then the model becomes
Nk+1 = (1 + )Nk Nk , k = 0, 1, .....,
or Nk+1 = (1 + )Nk , k = 0, 1, .....,
= Nk , k = 0, 1, .....,
which is just the same model equation as before with 1+ replaced by . This model contains
the full birth-death process, and the information is carried in the value of the constant .
Notice that if is less than , the population will decrease. Does this make sense?
If we step through time as before, we soon see a pattern
N1 = N0 ,
N2 = N1 = 2 N0 ,
N3 = N2 = 3 N0 ,
N4 = N3 = 4 N0 ,
...
Nk = Nk1 = k N0 ,

So a solution to the general first-order difference equation Nk+1 = Nk , k = 0, 1, 2, ... is


Nk = c k , where c is again a constant to be determined, but which usually depends on the
starting value N0 , e.g. if N0 = 100, c = 100 since 0 = 1, and thus Nk = N0 k , k = 0, 1, . . ..

9
A continuous population model.

When the population becomes larger, the interval between births (and deaths) is no longer
fixed, as it was in the cell dividing example. Creatures are being born all of the time, so the
process could be thought of as being continuous. In that case, how can we set up a model for
population growth? The situations arent that different, so perhaps we could follow the same
ideas. Consider the rate at which the population would increase. If P (t) is the population
at any time, t, then again we can argue that the population a short time later, P (t + t),
will be the current value plus a proportion of the population that has resulted from births
in the time t. Thus, we get

P (t + t) = P (t) + rtP (t),

where rt represents the number of births-deaths as a proportion of the total population in


the time t. In other words, r is the birth/death rate, the (nett) number of new individuals
per unit of time. If we now divide through by t and rearrange, we get

P (t + t) P (t)
= rP (t),
t
and as t gets smaller and smaller, i.e we take smaller and smaller time intervals, the right
side becomes the slope of the curve for P (t), i.e the rate of change of P (t) with respect to t,
so that
dP
= rP,
dt
a first-order, separable differential equation for the rate of change of the population. This
equation says that the rate of change of population is proportional to the number of animals
present at the current time. Fortunately, we have met equations like this before, and can
solve it, i.e.
dP
= rP (t), t > 0,
dt
dP
= r dt
P
Integrating ln P = rt + const. ()
P (t) = A exp[rt],
where A is a constant determined (usually) by the starting population.

80

60
Population
40
P (t)
20

0
0 2 4 6
Time (t)

10
Notice the similarity between this curve and that shown earlier for the discrete model. In
fact, we expect that this should be the case because we used the same basic idea to derive
the equations! The only difference was that in the continous model we allowed the time steps
to get smaller and smaller leading to the continous time model. Actually choosing the time
step smaller in the discrete, difference equation model, makes the results look more like the
continous model. Numerical methods for solving differential equations use this idea - replace
the differential equation with a difference equation and use a very small time step. We will
consider this some more later.

Incorporating some data into the model.

If we were trying to use the continuous model for population growth, we need to know the
value of r, the growth rate. If we were to decide that the model is reasonable, then we would
like to collect data to determine the value of r. Suppose you have collected data every 5
minutes for a population (of organisms or of a chemical in a reaction, since this model could
apply for a chemical reaction also). There will be some scatter in the data, due to errors
in measurement, and to stochastic variations. The important equation to notice is the one
indicated by a (**) above. Let ln P = X, then this equation becomes X = rt + c, which
would be a straight line with slope r. This means that if we plot the logarithm of P against
time, the result should be a straight line with slope r !!!
+
80

60
Population +

P (t) 40

20 +
+
+ +
0
0 2 4 6+
4 +

3
+
ln P (t) +
2
+
1
+
0
0 2 4 6
Time (t)

Notice that the data in the second plot is roughly a straight line - if you work out the slope
of this line, it gives the value of r. For a real data set, there is bound to be some scatter in
the results, but if you plot ln P against time, and then find the line-of-best-fit, it will be a
reasonable approximation to the value of r. The more data you have, the better should be
the approximation.

11
So far we have considered a discrete population model and a continuous model, and con-
sidered how data can be incorporated into the model. Notice, however, that if we didnt
have the model in the first place, we probably wouldnt have known to plot it in that way
to determine the growth rate r. The question of which model to use is sometimes a difficult
one. If the population is small and the time step is clear, as for the dividing cells, then a
discrete model might be the best, but if the populations are large these issues are much less
clear and a continous model is probably best. However, when the populations become large
there are other possible problems. We will come back to this later.

Exercises

1. The continuous model and the discrete model of populations describe the same process, so
they should be reasonably similar. Suppose we have the continuous model

dP
= P (t), (1)
dt
with a constant, and a discrete model,

Pk+1 = (1 + )Pk , k = 0, 1, 2 . . . (2)

Rearrange equation (2) and put it in the form,

Pk+1 Pk
= ( )Pk ,
t t
where t is the size of the time step between successive measurements, i.e. between

successive values of k, then t , can you see why ?
For the case in which = 0.5, and the starting population is P0 = 100 compute the
population after 4 years using the continuous model, and the discrete model several times
with values of time step of 6 months, 1 year and 2 years respectively. Assuming that the
unit of time is 1 year, these correspond to values of t = 21 , 1, 2. Plot the change of each
against time on a set of axes, and compare them with the continuous result. Comment on
what is happening as the time step (t) in the discrete model is reduced. What does this
mean about the difference between the two (discrete and continuous) models ?

2. A bank offers 1% monthly interest. If you put an initial amount P0 in the bank, how much
would there be after 1 month (assuming you added no capital). Write a difference equation
for the amount after k +1 months, i.e. Pk+1 , if you know the amount Pk in the bank after k
months. Assume the interest is compounded (and credited) monthly, i.e. that the interest
is calculated on the current monthly balance. If you started the year with $1000, how much
would you have after 12 months? Would a continuous model be more appropriate here?

3. Mortgage repayments are very similar to the above. In paying off a mortgage, the client
must pay a fixed amount, P , every month. The bank charges interest at r% on the amount
each month. If the amount of money owing after k months is Sk , write a difference equation
for the repayment of the loan from one month to the next. By iterating, try to guess the

12
solution to the difference equation if the starting value of the loan is S0 . You may like to
n
use the result that 1 + x + x2 + x3 + . . . + xn1 = 1x
1x
, x 6= 1, to simplify your answer.
If you had a $90,000 mortgage, and were paying off $800 per month, how long would it
take to pay it off if the annual interest rate were 10% ?

4. Suppose a discrete population model gave Pk+1 = 1.2Pk , k = 0, 1, 2, . . . when the time step
was 10 minutes. What would be the value of r in the continuous equivalent, dP dt
= rP , if
the units of time were minutes?

5. Suppose the population of feral pigs in an outback region is increased each year by 5% of
the population reproducing and decreased by a constant cull of 20 individuals each month.
If the population begins at P (0) = 2000, write a difference equation for this situation and
then by reducing the time step convert this into a continuous model of the situation. Will
the population increase or decrease? (Hint, consider the sign of dP
dt .)

Solutions to Exercises

1. Continuous P (t) = 100e0.5t 739, Discrete t = 0.5 P (4) = P8 596, t = 1


P (4) = P4 506, t = 2 P (4) = P2 400. Plots look more like the continous case as
t gets smaller.
2. Pk+1 = Pk + 0.01Pk = 1.01Pk , P12 = 1000(1.01)12, No, this is definitely a discrete
situation.
1 n
 
n 2 n1 n
3. Sn = S0 P (1 + + + . . . + ) = S0 P , 334 months 28 years.
1
4. r = 0.2/10 = 0.02 units/minute.
dP
5. Discrete Pk+1 = 1.05Pk 240 k = 0, 1, 2, . . ., k in years, Continuous dt
= 0.05P 240
where t is in years. Decrease since dP
dt < 0 to begin.

13
Lectures 4-5 Model Derivation
The models derived above were derived using a balance equation and difference equation
formulation. If a continuous model is appropriate, this can be derived by then taking the
limit as the size of the time step is reduced. Before we go on to summarise this I have
outlined another approach that is more direct. This is used in the text in section 1.3 to
derive model equations for a range of different problems.

A direct approach

In this approach the modeller converts a written description of a situation into a mathe-
matical equation. It is still a balance equation idea, but is done at a higher level. It usually
requires some intuition about the process. In order to use this technique we need to check
some basic definitions.
The rate of change of some quantity P with respect to time t, is the derivative with
dP
respect to time, i.e. .
dt
A quantity A is proportional to another quantity B, i.e. A B if A = B, where is a
constant (the constant of proportionality).

A quantity A is inversely proportional to another quantity B, i.e. A 1/B if A = ,
B
where is a constant (the constant of proportionality).
Examples
1. If the rate of population growth is proportional to the population, this would mean that
dP
P , so the equation would be
dt
dP
= P,
dt
where is to be found from data.
2. If the rate of a chemical reaction of some chemical of concentration C(t) is inversely propo-
dC 1
tional to the square of the concentration, then 2 , i.e. the equation is
dt C
dC
= 2,
dt C
where is the rate constant (determined from experiments).
Now read section 1.3 of Zill and Cullen and try to work out exactly how each equation
comes about. Do questions 1,5,7,13,17 [6th/7th ed. - 1,5,7,13,17]. (Solutions are in the
back of the book).

Difference equation limit approach

If we look back at all of the examples in these notes, they are all forms of balance equation.
The concept is;
The change in some quantity Y, i.e. Y, in a time t
= source of Y - sink of Y + inflow - outflow

14
For example, in the discrete population model, we had
Nk+1 Nk = Nk , k = 0, 1, 2 . . . ,
Change in pop. birth and death (source and sink)

while in the continuous form we had


dP
= rP (t), t > 0
dt
rate of Pop. change birth and death rates combined

In either of these cases we could have included immigration and emigration. What would
these terms have looked like ?

Example

A final example with all terms included, might be a balance equation for the amount of
dissolved oxygen in a lake.
Change in quantity of DO
= source of DO (plant photosynthesis)
- sink of DO (plant and animal respiration)
+ inflow (DO in inflowing streams)
- outflow (DO in outflow and evaporation)

To put actual variables in this equation, we would need to determine or guess on which
factors these terms depend, which would probably involve considerable research.

Exercises

1. The evaporation rate of water is proportional to the surface area of the water exposed
to the air. Write down an equation describing the rate of change of volume of water
V (t) = r 2 h(t) in a cylindrical glass with radius r and depth h(t) for any time and solve
it.

2. The velocity (v) of an object is the rate of change of position (y(t)), and the acceleration is
the rate of change of velocity. If the acceleration of an object falling vertically is constant
and equal to g (9.8 m/s2 ), write a differential equation and initial conditions for the
position of the object and solve it by integrating twice, if the object is stationary at a
height of y0 metres at the starting time.

3. Consider the balance equation approach for the case of the amount of people living on an
island. Try to think of all of the factors that might be incorporated in the balance equation
model. What would the source and sink terms be? Write your equation as a difference
equation and try to convert it to a reasonable continous equation.

15
Solutions to Exercises
dV
1. = kr 2 V (t) = C (kr 2 t)
dt
d2 y
2. = g with y(0) = y0 and y (0) = 0, y(t) = y0 21 gt2 .
dt2
3. A reasonable model might be dP dt
= rP + I E where I and E are immigration and
emigration respectively - assumed to be constant. The birth/death term is a source/sink.

Case Study - Diffusion of dissolved substance through a membrane

In doing this example, I will use the balance equation approach. Suppose there are two
regions of fluid. Assume one contains a certain concentration of some chemical (sodium
chloride, say) which has been dissolved, the other contains none of this chemical. If at some
time a gate between the two is opened, leaving a membrane through which the fluid can
pass, can we come up with a model for what the concentration of salt will be at any time ?
Membrane

Fluid with Clear


dissolved fluid
salts

For those who have no interest in chemistry, you could think of this as being the process of
a group of animals in two separated areas in which one group has a certain percentage with
some disease, or particular colouring, and how that would spread into the other group if the
two areas were suddenly joined.

Plain gnu
Spotted only
and plain gnu

We must think very carefully about how to set up the model. When we did the difference
equation models, we thought about how we could work out what was there a little time
later, and how that would depend on the current amount. Can we do this for this situation ?
Lets make the situation a bit simpler by saying that once molecules of the salt have passed
through the membrane they can not return, but that the total number of molecules passing in
each direction is roughly the same. In fact this amounts to assuming that the other region is
very large, so that once a salt molecule has passed into it, it passes away to a great distance.
Assuming that the concentration of salt does not significantly change the properties of the

16
fluid, then the total number of molecules passing through the membrane will not change
significantly with time. This means that the number of salt molecules which pass through
in any time will be some proportion of the total number of molecules. If the amount of salt
in the fluid at any time is S(t), and if the total no. of molecules in the compartment is V ,
which stays roughly constant, then the proportion of the total number of molecules which
are salt is S(t)/V . Consider a small time interval t. In that time interval, how many salt
molecules will pass through ? If R is the number of molecules which pass through from left
to right in 1 unit of time (1 hour, say) then Rt is the total number which pass through
in a time t, and Rt(S/V ) is the number of salt molecules which pass through in one
time unit. This means that the concentration at a time t + t, i.e. S(t + t)/V will be
(S(t) RS(t)t
V
)/V ,i.e.

New number = old number - the number of salt molecules that have passed out

S(t + t) = S(t) RtS(t)/V


or rearranging,
S(t + t) S(t) R
= S(t), (++)
t V
where R is the rate at which molecules are passing through the membrane. Consider what
happens as t approaches zero (remember the formal definition of derivative). In this limit,
the equation becomes
dS R
= S(t), t > 0.
dt V

This equation for the continuous model is a separable, 1st order, ordinary differential
equation. The solution can be found as in the population model provided R and V are
constant, i.e.
dS R
= S(t), t > 0,
dt V
dS R
= dt
S V
R
Integrating ln S = t + const.
V
R
S(t) = A exp[ t].
V
As above, if we believe our model, we can take measurements of salt concentration (spotted
gnu population), plot their log against time and determine the rate of flow of molecules, i.e
the rate constant R, from the slope of the resulting line.
Here, we consider the region that is originally salty, then balance the amount of salt in the
region by considering the amount there to begin and the amount leaving, i.e the number of
molecules of salt in this region at any time is equal to the number that were there to begin
with minus those that have left (since we have assumed none have entered). Thus we have
conserved salt molecules.
Note again that the equation is very similar to that for the continuous population model,
yet we have very different situations. We have looked at a range of fairly simple models for
completely different situations, yet the equations describing them are much the same. It is

17
always possible to argue about the validity of a given model, e.g. discrete or continuous for
populations, but so long as the model is reasonable it gives us something to work on. In each
case we approached the modelling exercise in the same way, i.e we looked at the situation,
thought about what information we had, then made some assumptions, and finally derived
the equations using a balance argument.
In summary, we have covered the following concepts;
1. Some general considerations when modelling.
2. Difference equation or discrete models and how to step through time.
3. Differential equation or continuous models and how to solve them if they are of separable
form.
4. How to incorporate data into the model.
5. Some rules for converting written word into an equation.
6. Balance equations and how to use them to derive a model.
We will be considering only continuous models from now on, although the ideas of using
difference equations will crop up from time to time.

18
Lectures 5-10 First-order Differential equations

Now that we have outlined the basic idea of setting up such models, we will go through
some details about how to analyse and solve differential equations of first order. At this
point it might be a good idea to revise some of the basics of DEs. Scan through Sections 1.1
and 1.2 to refresh your memory.

Solution curves without the solution

In many cases it is not possible to obtain exact solutions to differential equations. Section
2.1 in Zill and Cullen discusses some ways in which information can be obtained. Think
about the idea presented, that you can obtain curves of the solution without actually solving
the differential equation. Do questions 1,3 just to get an idea. See if you can reproduce the
diagram in each case by drawing the lineal elements on a grid of points including the origin
and integer coordinates out to x = y = 2. Spend some time on the section on Autonomous
First-order DEs (starting p38 [6th ed. p42, 7th ed. p37]), and especially note the
definitions of critical and equilibrium points and stable and unstable critical points. Now do
questions 19, 21, 23, 39 and 40 at the end of section 2.1.

Separable variables

The solution of separable DEs is discussed in section 2.2. You should have already seen
these in an earlier course. Read this section and do exercises 1, 5, 15, 17, 23 and 25. Do
some more if you are not confident.

Linear equations

The other kind of first-order DE that we will consider in this course are those known as
linear. Read section 2.3 on Linear equations and do questions 3,5,7,25,27 and 29.

A numerical solution

If all else fails, one can attempt to obtain a numerical solution to a first-order differential
equation by replacing it with a difference equation (back where we started!). Skip sections
2.4 and 2.5 (these will not be considered part of the course), and read section 2.6 on
numerical solution. Concentrate on Eulers method, but scan the other sections to get an
idea of more sophisticated techniques. Do questions 1,3. Do questions 5 and 7, but using
Eulers method only (if you wish to use one of the software packages as well, go ahead. It
will clearly show the better results obtained using such methods). You can do this using any
mathematics package with which you are familiar or by hand. These kind of calculations are
very easy using a spreadsheet program such as Excel. If you cant work out how to do this
(see page 2 of these notes) contact your tutor for some instructions.

19
Some problems with numerical methods.

The Euler method described above is very simple. There are much more sophisticated
numerical methods that are very accurate, and some of these are described in the text.
Computer packages are now available to do most of these kinds of calculations for you. If
you understand what a differential equation is, then you will be able to implement these
schemes without much difficulty. However, difference equations that result from using these
methods can lead to quite strange behaviour, with periodic jumps and even chaos, while
the differential solution should be smooth and well-behaved. This can cause major problems
when trying to approximate differential equations using the methods discussed above, and
one should always be wary of the possible errors.
Read the project problem Wolf Population Dynamics P-8 [or Harvesting Natural Re-
sources, 6th ed. p87].

Applications of first-order DEs

Some applications of linear equations are given in section 3.1. Read through this section to
see how these come about and try questions 1,3,11,13,17 and 19. Some further applications
of first-order DEs are given in 3.2. Read through this section and try questions 3,5,7,9 and
11.
Of course many situations can not be considered as a single independent process. For
example, the population of rabbits might depend on the population of foxes. This leads to
an interaction of two species, and these are then modelled as systems of interacting differential
equations. Read through section 3.3 to see some of these models. We will later return to
look at how we can solve these systems or at least get information from them. Do not do
any questions from this section now.

Case Study - Bacterial growth in a chemostat.

This could also be Algal growth in an estuary or a number of other possible situations.
A chemostat is a device for harvesting bacteria or other micro-organisms for industrial,
laboratory, ..... use.
A culture chamber is fed by a tank of liquid containing nutrients. The nutrients are used
by the bacteria to multiply. Bacteria is drawn off as required. A satisfactory population of
bacteria needs to be maintained, so need to balance the inflow and withdrawal and growth
and supply of nutrients. Ideally, we would like to find a stable equilibrium of the real problem.

Nutrient Supply

Inflow

Culture Chamber

Withdrawal

20
Aside; In the estuary example, the nutrient supply could be superphosphate from farms,
or nitrogen from piggeries etc. The estuary example is more difficult because we have less
control over what happens.
A reasonable model of the chemostat can answer such questions as what concentration is
maintained for given flow and nutrient concentrations and withdrawal and harvesting rate
etc. To begin we need to define some variables of interest, and think about what they might
depend upon. Let
V (t) = volume of liquid in the culture chamber (m3 )
FI = flow into the culture chamber from the nutrient supply (m3 /s)
F0 = flow out of the culture chamber (m3 /s)
C(t) = concentration of bacteria in the chamber (g/m3 )
so that CV is the total mass of bacteria at any time (g)
P (t) = nutrient concentration in chamber(g/m3)
so that PV is the total mass of nutrient at any time (g)
Consider our assumptions so far. Clearly all things could depend on time, e.g. inflow and
outflow rates can be modified, and some may not be continuous, e.g. turning off the inflow
tap suddenly. Also things like concentration may depend on the spatial location as well as
time, e.g. it may be more concentrated near the outlet than the inlet. We will assume these
factors are only minor. In fact these assumptions are quite reasonable for a model of this
kind, and will give us a reasonable starting model. We thus assume that the chamber is
well-mixed.
Try to write a formula for the change of mass of bacteria in the culture chamber, i.e.
d(CV )
= source/sink + inflow outflow
dt 3
(g/s) Birth/Death No bact. in inflow F0 C ( ms mg3 )
The birth death term, provided there is enough nutrient, could be as before for the simple
model, or it could be population limited like the later population model. We will assume
the former, i.e. proportional to the present mass, i.e kCV , where k is the rate, assumed
constant.
Thus the equation for the rate of change in the mass of bacteria becomes
d(CV )
= kCV + 0 F0 C.
dt

Now consider the amount of nutrient.

d(P V )
= source/sink + inflow outflow
dt 3
g
(g/s) Sink is uptake FI PT AN K F0 P ( ms m3 )
by bacteria
where PT AN K is the concentration of nutrient in the feeder tank (not the culture chamber).
Assume the uptake of bacteria is proportional to the mass of bacteria present, i.e CV .
Thus the equation for the rate of change in the mass of bacteria becomes
d(P V )
= CV + PT AN K FI F0 P.
dt

21
We had to introduce two new parameters, k, the proportion of births, which could be
constant or population/nutrient limited. Similarly , the rate at which the bacteria uses
nutrients could be a constant or a function of some other variables. We assume both to be
constant. This gives us two equations;
d(CV )
= kCV F0 C,
dt
and
d(P V )
= CV + PT AN K FI F0 P.
dt
If we now assume F0 = FI = F , i.e inflow=outflow rate, then the volume remains the same
for all time, i.e. V (t) = V .
This is a coupled system of 1st order ODE for P (t) and C(t). Coupled because the de-
pendent variables occur in both equations, or at least in this case C(t) occurs in both.
Fortunately, P (t) does not occur in the equation for C(t), and so we can solve for C(t) and
substitute it into the other equation. The equation for C(t) is separable,
dC F0
= (k )C
dt V
dC F0
= (k )dt
C V
F0
ln C = (k )t + d0
V
F0
C(t) = d1 exp[(k )t]
V
and if the initial concentration in the chamber is C0 , this is
F0
C(t) = C0 exp[(k )t].
V
Now substituting this into the other equation gives
dP F
= C0 et + (PT AN K P ),
dt V
or
dP F F
+ P = C0 et + PT AN K ,
dt V V
F
where = (k V ). This is a linear ODE, and the integrating factor is
F
Z
F
g(t) = exp[ dt] = e V t ,
V
d F F F
(gP ) = PT AN K e V t C0 e(+ V )t + const.
dt V
Integrating gives  
F
V t F
t C0 kt
P (t) = e PT AN K e V e + const.
k
where the constant is determined by the initial concentration in the culture chamber, P0
(say). So the solution for the bacterial and nutrient concentrations is
C0 (k F )t F
P (t) = PT AN K e V + const.e V t ,
k
F
C(t) = C0 exp[(k )t].
V

22
Together they are a prediction for the state of the physical system at any time. Notice
that whether the culture grows or contracts depends on the relationship between k and VF ,
and similarly for the nutrient population. This is important information - it says that if the
flow rate is too large, there will be a decay in population (flushing out of the tank)
Comments - This model predicts exponential growth (or decay) of bacteria. It is a very
simple model, however, and we could improve it by considering such things as the dependence
on nutrient and population densities of the parameters in the problem, e.g. k(C, P ), (C, P ).
We would expect the nutrient concentration to be limited (when the water becomes satu-
rated) for example. Including all of these factors would lead to more complicated equations.
As before, we can obtain a lot of information by considering equilibrium and stability of the
system. In a coupled system, an equilibrium point will be where

dC dP
= 0, = 0.
dt dt

Summary

In concluding this section, read the essay Harvesting of Renewable Natural Resources to
see an application of a range of ideas from this first section of the course. Work through the
example carefully. Try some of the problems.
So far we have considered;
The derivation of difference and differential equations for different situations - either di-
rectly or using a longer balance equation approach.
The analytical solution of separable and linear equations.
Methods for obtaining information if we are unable to solve the equations directly, including
equilibrium and stability and also numerical methods.
Situations that lead to models using the above equations and then models of interacting
systems (introduction only).

You should now submit Assignment 1

23
Lectures 11-17 Higher order differential equations

In many examples, the second derivative comes into the equations for modelling some
process. In that case we end up with a second-order differential equation. If we eliminate
one of the variables from a system of first-order differential equations we again end up with
a second-order DE. Therefore we must learn how we can solve these as well.
Read section 4.1 paying particular attention to the definition of linear dependence and the
priniciples of superposition and homogeneity. Also note how the solution to nonhomogeneous
equations always contains the solution to the corresponding homogeneous equation. This
idea is very important.
Reduction of order is a process by which if we have one solution to a second-order DE we
can find another. Read section 4.2 and do exercises 1,3,5.

Homogeneous linear equations with constant coefficients

Solving homogeneous differential equations gives what is known as the natural response
of a system, e.g a swing that is moving but is not being pushed. The solution to every
initial-value problem contains the solution to the homogeneous problem, even if it is a non-
homogeneous problem. Read section 4.3 noting the three different possible cases for 2nd-
order differential equations with constant coefficients. This is a very important section and
you should ensure that you know these 3 cases well. Read the section on higher-order
equations, but do not spend too much time on it. We will not be studying these. Do
Exercises 4.3: Q 1,3,5,7,29,31,33. Do the group of questions 43-48 to ensure you understand
what the solutions should look like.

Undetermined Coefficients - Superposition approach.

Nonhomogeneous equations result when there is some extra external forcing applied to
a system, e.g. when someone is pushing on the swing as well. The combination of the
particular solution and the complementary function are both required as part of the solution
to capture the complete behaviour of the system, i.e to capture both the natural and forced
responses. Read section 4.4. Again concentrate on the examples for second-order equations.
Pay particular attention to Table 4.1 on p143 [6th ed. - p154, 7th - p144]. Work carefully
through some examples, then do Exercises 4.4: Q 1,3,5,9,13,29,31,33.
The remaining sections of Chapter 4 are not to be considered in this course.

Designing a car suspension system - Oscillations

The material discussed here is covered in Zill and Wright in section 5.1. What follows is
a single direct application that covers all of the important ideas. You should read this and
only use the text if you run into trouble.
The world is full of situations in which oscillations occur. There are oscillating chemical
reactions, oscillations in predator and prey populations, oscillations in mechanical systems.
A pendulum in a clock, a bridge swaying in a breeze are just two examples. In some ways

24
mechanical oscillations are the easiest to think about intuitively, so below I have worked
through a series of different situations for second-order equations which apply to a suspension
system in a car. The underlying ideas, however, are much broader than this one example.
For example, you might like to think of the displacement of the car as the concentration of
a chemical or an animal population or as the surface of the ocean as the tide passes by.
Car Body, m
Forcing, F(t)

Spring k
k Shock
F(t)
Absorber, c
m
Drag, c

A car can be modelled as a spring with a weight attached. The restoring force is propor-
tional (and opposite in direction) to the displacement from the mean position (provided the
displacement is small). Therefore, if the displacement is y(t), then
Restoring Force = ky(t),
where k is the spring constant in the suspension.
If the car has shock absorbers, this applies a damping to the motion and the drag is a force
opposing the motion, and it is proportional to the velocity, i.e.
dy
Force = c (t), c > 0
dt
where c is a constant (damping coefficient).
Newton mass x accel. = Force, so
d2 y
Force = m .
dt2
Thus a force balance says
mass accel.= restoring force + drag force + any applied external force,
leading to an equation of motion of the form
d2 y dy
m 2 +c + ky(t) = F (t).
dt dt
This is a second order, linear, inhomogeneous DE with constant coefficients.
To any system of this sort there is an electrical analogue.
d2 i di i dE(t)
L 2 +R + =
dt dt C dt
L=inductance mass, i=current displacement, R=Resistance damping,
C=capacitance k1 , E = applied voltage integral of applied force.

R C

E(t) i(t)
L

25
Case 1.

A passive, undamped system, i.e F (t) = 0, c = 0 no forcing (flat road surface), no damping
(no shock absorbers - as in early cars).

d2 y d2 y k
m 2
+ ky = 0 2
+ y=0
dt dt m

r
k 2 k
+ = 0 = i ,
m m

y = A cos 0 t + B sin 0 t,
q
k 2
where 0 = m is the natural radian frequency of the system - so the period is T = 0 .
Pure sinusoidal oscillations which go on forever.
2

2
0 10 20 30

Case 2.

A passive, damped system, i.e. include the damping (shock absorbers attached), c 6= 0,
but F (t) 0 (still a flat road surface).

c k
my + cy + ky = 0 y + y + y=0
m m

Write it as
y + 20 y + 02 y = 0

where 0 = c/m, so = c . The characteristic equation is (try y = et ),


km

2 + 20 + 02 = 0

or, completing the square,

2 + 20 + 2 02 + 02 (1 2 ) = 0

( + 0 )2 = 02 (1 2 ).

26
Assuming < 1,
+ 0 = i0 (1 2 )1/2
= i1 where 1 = 0 (1 2 )1/2
= 0 i1
so that the general solution is

y(t) = Ae0 t cos(1 t) + Be0 t sin(1 t)


= e0 t (A cos(1 t) + B sin(1 t))

Thus get damped simple harmonic motion - decaying oscillations.

0.8

0.4

0.4

0.8
0 10 20 30

This example is clearly not damped enough, so would need to increase the magnitude of
0 = c/m, which means increase c, the damping in the shock absorbers, since the mass is
constant for a particular vehicle.
So what does > 1 mean ? In fact from above we get

= 0 2 where 2 = 0 (2 1)1/2 ,

so we get real solutions, i.e. exponential growth or decay, and whether damping or growth
depends on the values of the constants.

Case 3.
Forced systems. Impose some forcing on the system e.g. driving on a corrugated road.
This might give sinusoidal forcing at frequency , then
c k F0
y + y + y= cos t.
m m m
F0 is the maximum amplitude of the forcing. We saw earlier that the solution to the corre-
sponding homogeneous equation is

yH = e0 t (A cos(1 t) + B sin(1 t))

(sometimes called the complementary function). Note this 0 as t , i.e. this is a


transient effect.
For the particular solution - try yP = C cos t + D sin t. We know that this will work
provided 6= 0 . Solving gives

(02 2 )F0 /m
C=
(02 2 )2 + 4 2 02

27
and
20 F0 /m
D=
(02 2 )2 + 4 2 02
Note that we can write this as yP = (C + D 2 )1/2 cos(t + ) where is some angle. This
2

therefore gives oscillations of frequency - it does not decay and is hence the quasi-steady
state solution, i.e. the transient effects die out just leaving the oscillations due to the forcing.
( is called the phase and simply represents a slight lag in time)

Case 4.
Undamped, forced systems, e.g. take the shock absorbers out and drive on a corrugated
road.
k F0
y + y = cos t.
m m
The complementary function yH = C cos 0 t + D sin 0 t, and for the particular solution, try
yP = C cos t + D sin t, where ( 6= 0 ). Substituting
0 F0 /m
yP = cos t.
(1 ( 0 )2 )
Notice also that the amplitude is a function of and 0 , and that if they are nearly the
same, can get a large forced response. When added to the natural oscillations, sometimes
they combine, and others they cancel. This leads to the effect known as beating.

2.0

1.0

2
0 10 20 30

This effect is what you see in the tides. It is the combination of the natural response of a
bay to the forcing of the moon and sun. Spring tides occur when at the maximum amplitude,
neap tides when at the minimum in amplitude.
However, if = 0 the natural frequency is the same as the forcing frequency and we need
to use a method called variation of parameters to get
F
yP (t) = t sin 0 t,
2m0
i.e. oscillations which grow without bound, called Resonance.
30

20

10

10

20

30
0 5 10 15 20 25 30

28
Resonance effects can occur even with some damping in the system, it depends on the
relative magnitudes of the forces. Pushing a person on a swing you use this effect to increase
the amplitude of their swing. It is definitely not desirable in car suspensions. Clearly for a
car suspension system, we need to design the springs and shock absorbers so that the spring
and damping constants give Case 2, and so that the number of oscillations is kept to only
one before being effectively damped out.
There is a particularly interesting example of oscillations in a suspension bridge. Read the
reject in Zill and Wright P-14, The collapse of the Tacoma Narrows suspension bridge.
[6th ed. - p233 The collapse of Galloping Gertie] on this subject.

29
Lectures 18-20 Numerical Solution of differential equations

Earlier in the course we introduced Eulers method to solve first-order initial value prob-
lems. However, we did not discuss how we could decide whether it was accurate enough.
Read section 9.1 paying particular attention to the idea of truncation error. Using Excel
or another package or even your calculator, do questions 1,3,5 in section 9.1. This describes
some methods for solving first-order DEs on the computer.
Skip sections 9.2 and 9.3 - they are not part of this course.
We would really like to be able to solve higher order equations as well. Read section 9.4
on higher order systems. The basic idea is to convert them into systems of first-order DEs.
Concentrate on the Euler method. Do questions 1,5 and 9 but using the Euler method
only. You can test your answers by reducing the time step and doing it again until the
answers stop changing. Again Excel is very good for this.

Boundary-value problems

All of the higher-order DEs we have discussed so far have involved initial conditions, i.e
conditions on y(x) and y (x) at x = 0. These are called initial-value problems. Another kind
of problem that is more difficult has the same equations but the extra conditions are given
at two different points. These are known as two-point boundary value problems. Section
5.2 discusses some applications in which these equations arise. Scan through it to see them.
Methods for solving them can be quite sophisticated, so we will go directly to solving them
numerically. In order to do this, we need to understand the idea of a Taylor series. This is
mentioned in the text, but some further notes are included below.

Taylor Series

The idea of the Taylor series is an extension of the idea that if we are close to a point on a
line we can approximate the line by its tangent. Let f be a function that is continuous and
differentiable at x = 0. Let P0 (x) = f (0).
The best linear approximation to f (x) near
y f(x) x = 0 is
f (x) f (0) + xf (0) = P1 (x)

f(0) Slope f(0)

If f is twice differentiable, then we can write a better approximation that takes into account
the curvature of f (x), i.e.

x2
P2 (x) = f (0) + xf (0) + f (0) .
2!

30
If x is small then including more and more terms will give a better approximation to f (x).
If f is n times differentiable,

f (0) 2 f (n) (0) n


Pn (x) = f (0) + f (0)x + x + ... + x .
2! n!
These polynomials are called the Taylor polynomials (1712 - Brooke-Taylor). As n , an
infinite series is obtained, called the Taylor series.

Example

Find the Taylor series for f (x) = ex ; has derivatives f (x) = ex , f (x) = ex , . . . f (n) (x) =
ex , so f (0) = f (0) = . . . = 1. The nth Taylor polynomial is then

x2 x3 x4 xn
Pn (x) = 1 + x + + + + ... + .
2! 3! 4! n!

Example

Find the Taylor series for f (x) = sin x; f (x) = cos x, f (x) = sin x, f (3) = cos x,
f = sin x . . ., so f (0) = 1, f (0) = 0, f (3) (0) = 1, f (4) (0) = 0, . . ., so
(4)

x3
P0 (x) = 0, P1 (x) = 0 + x, P2 (x) = 0 + x + 0, P3 (x) = 0 + x + 0 ....
3!
Notice that there are only odd terms in the series (this is because sin x is an odd function).
How accurate are these approximations to f (x)?
Taylors Theorem
If f has n + 1 continuous derivatives on the interval I that joins 0 to x, then

f (0) 2 f (n) (0) n


f (x) = f (0) + f (0)x + x + ... + x + Rn+1 (x),
2! n!
where the remainder Rn+1 (x) is given by the formula
1 x (n+1)
Z
Rn+1 (x) = f (t)(x t)n dt.
n! 0

Exercises

1. Show that the Taylor series for ln(1 + x) about x = 0 is given by ln(1 + x) = x 12 x2 +
1 3 1 4
3 x 4 x + . . .. Sketch the function and its polynomial approximation on 0 x 2.
x2 x4 x6
2. Show that the Taylor series for cos x about x = 0 is given by 1 2!
+ 4!
6!
+ . . ..

Back to boundary-value problems

Read section 9.5 on finite difference methods. This section will be important later as
well, so make sure you understand the idea behind the finite difference approximations. Try
questions 1,3,5.

31
Case Study Enzyme kinetics

Below is an example of a complete problem in which we eventually find a numerical solution.


Enzymes are proteins which act as catalysts for biochemical reactions, i.e. a reaction takes
place slowly, if at all, until the enzyme is added, after which it proceeds rapidly. Suppose
we have s = substrate p = product, (Usually both amino acids) s is present in abundance,
but s p proceeds with difficulty. Add an enzyme e in small quantities, e << s. e reacts
with s to form a new chemical c (complex). c breaks down readily, releasing product p
and returns the original c.
k1 k2
s+e c p+e
k-1
where k1 , k2 , k1 are rate constants. Note the reverse arrow - some of c reverts to s and e.
We have 4 quantities, so expect 4 unknowns; need 4 equations.
Law of Mass action - rate at which any reaction takes place is proportional
to the product of the reactants.
(1) Balance Equation

ds
= k1 es + k1 c (1)
dt
i.e. the rate of change of s = forward reaction (product) of e and s, which uses s (negative
sign) + the backward reaction of c which produces s (+ sign).
Similarly,
de
= k1 es + k1 c + k2 c (2)
dt
dc
= k1 es k1 c k2 c (3)
dt
dp
= k2 c (4)
dt
A rather nasty looking problem.
In fact we can simplify it a bit since e0 = e + c = const., i.e. every molecule of e that is used
is replaced by one of c, (conservation - balance equation), so we can eliminate e or c, choose
e. Leaves 3 equations, for s, c, p; but can solve for s and c from (1) and (3) with e eliminated.
Consider
ds
= k1 (e0 c)s + k1 c
dt
dc
= k1 s(e0 c) (k1 + k2 )c
dt
Two equations for s and c; once solved for any time, gives e = e0 c and is easy to
compute p(t) from (4) using numerical methods. Still messy but better. An assumption
(Michaelis-Menten) that is often made is that c is in equilibrium, i.e.
dc
0
dt

32
and this gives
k1 se0 c(k1 s + k1 + k2 ) = 0
k1 se0
or c(t) =
k1 s + k1 + k2
This leaves only one equation.
 
ds k1 se0
= k1 e0 s + (k1 s + k1 ) , with s(0) = s0
dt k1 s + k1 + k2

and once we have solved this we can obtain all of the other quantities (from above), and then
p(t) by numerically integrating dp
dt = k2 c(t) (see original equations).

Thus we must solve a 1st order, nonlinear differential equation for the concentration of s,
the substrate. A diagram of a numerical solution using Eulers method, to one example of
this type is shown below.
1

0.8
s(t)

0.6

p(t)
0.4

0.2

0
0 1 2 3 4
Time

Summary

In this section we have learned about


Homogeneous second-order DEs and how to solve them.
Non-homogeneous equations and how the solution must consist of both the solution to the
homogeneous and nonhomogeneous parts.
Properties of oscillatory solutions.
More numerical methods and a little about the errors involved in using them.

You should now submit Assignment 2

33
Lectures 21-24 Laplace Transforms

There is an alternative method for solving second-order differential equations. One major
application is in electronics and circuits, but there are many other applications where this
method turns out to be better, in particular those where the system undergoes sudden
changes or impulsive forces. The results are slightly surprising; the transform converts a
differential equation into an algebraic equation in a new variable - the problem is converting
back to the original variables! The method even converts some partial differential equations
(which we study later) into ordinary differential equations, thus making them easier to solve.
What is a Laplace Transform? Read section 7.1 to discover how to compute the Laplace
transform. In fact, its pretty rare to have to do this by hand because they are extensively
tabulated. However, it is sometimes necessary to modify the tabulated values using the
theorems in this chapter. Do questions 1,5,11,19,21,27 and 37.
Inverting transforms is one of the major difficulties in this work. This is usually done by
using the tables. To do it directly one needs a knowledge of complex variables beyond the
scope of this course. If we are going to use them to solve differential equations then we need
to know how to transform derivatives. Read section 7.2 on the basics of inversion and how
to use transforms to solve initial-value problems. This is probably the most important part
of this section. Do questions 1,3,7,11,15,21,23 on inversion, and questions 31,33,35, 37 on
solving initial-value problems.
One of the most important advantages of transform methods is discussed in the next
section. Read section 7.3 and do problems 1,3,7,15,19,21,23,25,37,39,43,49-54,61,67,69.
More interesting and useful properties of Laplace transforms are discussed in section 7.4.
Read this section concentrating on the convolution theorem and differentiation of the trans-
form. Do questions 1,3,5,11,13,31,33.
Sections 7.5-6 are not part of this course.
Read through the project Murder at the Mayfair P-18 [6th ed., p327]

Lectures 25-26 Models of Interaction - Matrix Revision.

As discussed earlier, there are often situations, such as the predator-prey model, in which
we end up with two first-order differential equations that are coupled together, i.e. the
equations for the dependent variables have the other variable in them. In order to examine
such problems we first need to revise some basics of matrices. You will have done some of
this before.
Read Appendix II revising the important ideas of matrices including multiplication, addi-
tion, determinants, inverses, differentiation of a matrix and row operations. Note particularly
how to compute eigenvalues and eigenvectors - these are particularly important in what is
to come. Choose problems in the Exercises to check you understand all of these ideas.

34
Lectures 27-29 Linear systems of first-order ODE

This is historically a very important area of mathematics. Scan through section 3.3 again
to remind yourself of the applications. Much of the theory parallels that of second order
differential equations. Read section 8.1 and note the form of the solutions in particular.
However, do not spend too long on this because the best way to get to understand it is to
do it! Do a few of the questions from 1-16 just to make sure you have the idea.
The most important section here is 8.2 and the 3 cases it considers. As for second order
DEs we get a characteristic type equation to determine the behaviour of the solution. Notice
that we can make qualitative predictions about the solution once we know the eigenvalues.
This section introduces the idea of the phase plane. In the phase plane x and y, which might
represent two animal populations, are plotted against each other instead of each against time.
This is often a better way to examine the solution curves, and for nonlinear autonomous
systems it may be the only way to do it without using computer simulations. Do problems
1,3,5,9,19,21,33,35,37, and have a go at drawing the phase portraits for the solutions to 1,3,5.
Do not consider sections 8.3 and 8.4.
Read through the project, Earthquake shaking of multi-storey buildings P-21 to see an
interesting application of this work. [6th ed. - p365 Designing for Earthquakes]

Summary

In this section we have considered the use of Laplace transforms to solve differential equa-
tions and how to solve systems of differential equations.

You should now submit Assignment 3

35
Lectures 30-39 Models in time and space

Many processes are not so simple as to depend only on a single variable. They may depend
on time and place as well. For example, the temperature in a room depends on where you
are and what time it is. It is continually changing from time to time and place to place. Even
things like animal populations will depend on location and time. The amount of infection of
a disease such as rabies in the UK fox population will depend on space and time. Therefore
we need to know how to work with functions that depend on more than one independent
variable. The interaction of such quantities with these independent variables is modelled
using what are called partial differential equations. The solutions of these are generally more
difficult to obtain than solutions to ordinary differential equations, but through history a
number of techniques have been developed. Unfortunately, we do not have enough time to
look at these in any detail, so we will content ourselves with learning a few basic methods.

Functions of several variables

Before we begin to look at partial differential equations we need to learn about functions
of several variables and the basic ideas of calculus that allow us to develop the models.

Example

Some functions of several variables are;


(i) Elevation above sea level (contour maps), i.e. H = H(x, y), each point on the ground has
a height above (or below) sea level, i.e height is a function of distance north and distance
east.
(ii) Weather maps - pressure at a fixed height above the ground vs. location. Wind strength
depends on P P
x , y .

(iii) Temperature in the room is a function of 4 variables T (x, y, z, t), i.e. it depends on the
time, and on where in the room.
In many cases they can be written in functional form, e.g.
p
T (x, y) = x2 + y 2 or f (x, y) = A sin x + B cos y, A, B constant.

All of these are functions of several variables. x, y, z, ... may not be a location, but can be
parameters of a particular problem. May be 2,3 or hundreds of independent variables.

Level Curves and Level Surfaces

On a weather map isobars are examples of level curves - lines of constant pressure. On a
contour map - each line is where height is constant, i.e. H(x, y) = 10, 20, 30m. Each line is
called a level curve.
10
20
H 30

36
The temperature in the room at some fixed time, t = t0 , i.e. T (x, y, z, t0 ) has 3 independent
variables (x, y, z), so we get a surface of constant T , called a level surface. e.g. a linear
vertical temperature gradient in the room would mean the level surfaces were horizontal
planes.

Example

Suppose H(x, y) = x2 + y 2 describes the height of the land in a valley. This is a function
of two variables, how do we draw the level curves ? Suppose z = H(x, y), then can plot as
below; a level curve is when H =const.,
i.e. H = 1 m x2 + y 2 = 1, a circle of radius
1.
H = 2 m x2 + y 2 = 2, a circle of radius 2.
H = 3 m x2 + y 2 = 3, a circle of radius 3.
This is a paraboloid of revolution - z = x2 rotated about the zaxis. To do a 3-d plot is
messy.

y z

H=3
y
H=1 H=2 x

Plotting a function of 3 variables directly is not possible because p we would need 4 di-
mensions. We can, however, draw p level surfaces. e.g. g(x, y, z) = x2 + y 2 + z 2 , for level
surfaces, g(x, y, z) = const., i.e. x2 + y 2 + z 2 = C - gives a set of concentric spheres.

Example

Sketch level curves of the function f (x, y) = y x2 .


Level curves are where f (x, y) =constant, so when f (x, y) = y x2 = C, so if C = 0, the
level curve with f = 0 is y = x2 . If C = 1, the level curve with f = 1 is y = x2 + 1, and if
C = 1, the level curve with f = 1 is y = x2 1. The level curves are therefore a set of
quadratic curves. f=1

f=0

f=-1

Partial Derivatives

For functions of one variable, the rate of change of a function with respect to x is
df f (x + h) f (x)
f (x) = = lim .
dx h0 h

37
Consider the temperature field in a room, T (x, y, z, t), a function of 4 variables.
At some fixed point, how is the temperature changing with time ?
T (x0 , y0 , z0 , t + h) T (x0 , y0 , z0 , t) T
lim = = Tt .
h0 h t
This is the partial derivative of T with respect to t. This is the same as in 1-d except that
the other variables are just held constant, i.e. at a fixed point in space.
At a fixed time, how is the temperature changing as we move in the xdirection ?
T T (x + h, y0 , z0 , t0 ) T (x, y0 , z0 , t0 )
= Tx = lim .
x h0 h
T T
Similarly, we can determine that Ty = y
and Tz = z
.

Example

Find first partial derivatives of f (x, y) where


f (x, y) = 3x2 y 5x cos y.
Differentiate wrt the appropriate variable - treat the others as constants.
f
= fx = 6xy 5 cos y
x
f
= fy = 3x2 + 5x sin y
y

Example

The volume of the shape below is V (R, r, h) = 1/3h(R2 +rR+r 2 ), and R = 8, r = 4, h = 6.


Find the rate of change of volume wrt each of its dimensions if the other dimensions are held
constant. (This shows how the independent variables need not always be time and location.)

r
V
For R : R
= 31 h(2R + r)
h
V
For r : r = 31 h(R + 2r)
V
For h : h
= 13 (R2 + rR + r 2 ) R
So that the rate of change wrt
R : VR (8, 4, 6) = 40
r : Vr (8, 4, 6) = 32
112
h : Vh (8, 4, 6) = 3

We can differentiate to any order with respect to all of the variables, e.g. for f (x, y) to
second order,
f 2f f 2f
( )= = f xx , ( ) = = fxy
x x x2 y x yx
f 2f f 2f
( )= = fyy , ( )= = fyx
y y y 2 x y xy

38
What is the difference between fxy and fyx ?
Example f (x, y) = sin(x2 y)
fx = cos(x2 y).2xy
fy = cos(x2 y).x2
fxx = 2y cos(x2 y) sin(x2 y).2xy.2xy
fyy = x2 sin(x2 y).x2 = x4 sin(x2 y)
fxy = 2x cos(x2 y) 2x3 y sin(x2 y)
fyx = 2x cos(x2 y) 2x3 y sin(x2 y)
Note that fyx = fxy ; is this always true ? The answer is NO, but it is true if the functions
are continuous and smooth. Note also that throughout these calculations I have been using
things like the product rule and chain rule to perform the differentiations. So long as we
are careful, this is OK. A slightly different form of the Chain rule is given below - it applies
when you have a single function of two variables which both depend on some other variable.

Chain Rule for functions of several variables.

For a function of one variable, W (x(t)), the chain rule says dW dW dx


dt = dx dt . There are many
situations in which this idea might be useful for functions of multiple variables. Suppose we
are interested in the temperature T of a parcel of air located at (x(t), y(t)), i.e the parcel is
moving around. What is the expression for the change in temperature with respect to time?

Theorem
Let w = f (x, y) be continuous and have continuous 1st partial derivatives at every point
of a domain D in the xy-plane. Let x = x(t) and y = y(t) be differentiable functions of a
variable t in some interval T such that for each t T , the point [x(t), y(t)] lies in D. Then
w = f (x(t), y(t)) is differentable for all t T and

dw w dx w dy
= +
dt x dt y dt

Example
dw x+y
Find , where w(x, y) = and x = sin t2 and y = cos t2 .
dt xy
(i) Directly
sin t2 + cos t2
w=
sin t2 cos t2
dw 2t(cos t2 sin t2 ) 2t(sin t2 + cos t2 )(sin t2 + cos t2 )
=
dt sin t2 cos t2 (sin t2 cos t2 )2
.
.
4t
=
(sin t2 cos t2 )2

39
(ii) Using the Chain Rule
x+y
w(x, y) = and x = sin t2 and y = cos t2
xy
dw w dx w dy
= +
dt x dt y dt
dx dy
= 2t cos t2 , = 2t sin t2
dt dt
w 1 x+y xyxy 2y
= 2
= 2
=
x x y (x y) (x y) (x y)2
w 1 x+y xy+x+y 2x
= + = =
y x y (x y)2 (x y)2 (x y)2
so that
dw 2t 2 2
 4t 2 2 2 2

= 2y cos t 2x sin t = cos t + sin t
dt (x y)2 (sin t2 cos t2 )2
4t
= as before.
(sin t2 cos t2 )2

Exercises

1. Sketch contours of the functions; (a) f (x, y) = 2x2 y (b) H(x, y) = x2 + 2y 2 .

2. Calculate the partial derivatives fx , fy , fxx , fxy , fyy of the following functions of two vari-
ables.
(a) f (x, y) = e2x (x + y 2 ) (b) f (x, y) = x sin(x + y)
(c) f (x, y) = 4x1/2 y 2 (d) f (x, y) = 3x2 y + y tan x.

3. Show that u = 4x1/2 y 2 is a solution to the partial differential equation


y 1
xuxx + uyy + uxy uy = 0.
4 y

dw
4. Find dt
if (a) w = x + y, x = 4(t2 1), y = ln t (b) w = x2 + y 2 , x = et , y = sin 2t

Solutions

1.(a) Set of quadratic curves (b) Set of ellipses centered at (0, 0).
2.(a) fx = e2x (1 + 2(x + y 2 )), fy = 2ye2x , fxx = 4e2x (1 + x + y 2 ), fyy = 2e2x , fxy = fyx = 4ye2x
(b) fx = sin(x + y) + x cos(x + y), fy = x cos(x + y), fxx = 2 cos(x + y) x sin(x + y),
fyy = x sin(x + y), fxy = fyx = cos(x + y) x sin(x + y)
(c) fx = 2x1/2 y 2 , fy = 8x1/2 y, fxx = x3/2 y 2 , fyy = 8x1/2 , fxy = fyx = 4x1/2 y
(d) fx = 6xy+y sec2 x, fy = 3x2 +tan x, fxx = 6y+y tan x sec x, fyy = 0, fxy = fyx = 6x+sec2 x
dw dw
4.(a) dt
= 8t + 1/t (b) dt
= 2e2t + 4 sin 2t cos 2t

40
An application for partial derivatives - the grad or operator.

When dealing with functions of several variables, there are times when we need to be able
to work out the gradient in a particular direction. Imagine standing on the side of a hill and
asking In which direction is the steepest descent? One way we can answer this is to use
the gradient operator. This operator has the form

i +j +k
x y z
where i, j and k are unit vectors in the x, y and z directions, respectively. Thus the gradient
of a function f (x, y, z) is
f f f
f = i +j +k ,
x y z
and if you think about what this means, you can see that it must be the gradient vector of f ,
i.e. it will line up with the slope of the function at a particular point. But, which direction
will it line up with, since at any point, you can get a different value of the slope depending
on which direction you move? Suppose you move in a direction given by the vector b. The
slope in this direction turns out to be
f b
dd = = f ,
b |b|

where the is the usual dot product of two vectors (Recall a b = a1 b1 + a2 b2 + c1 c3 ) and
b
represents the magnitude of the component of f in the direction of b. Note that |b| is a
unit vector in the direction of b, and the quantity dd is known as the directional derivative
of f in the direction of b; it is the magnitude of the slope in the direction of b.

Example

Find the rate of change of the function f (x, y) = 3x2 y 2 in the direction
given by b = (1, 2)
at the point (2, 1). The unit vector in the direction of b is (1, 2)/ 5, f = 6xi2yj, which
at (2, 1) is f (2, 1) = 12i 2j, so the rate
of change of f at the point (2, 1) in the
direction of (1, 2) is (12, 2) (1, 2)/ 5 = 16/ 5.
To find the direction of maximum slope, we note that

b b
f = |f | cos = |f | cos ,
|b| |b|
where is the angle between f and b and that this is a maximum when cos = 1, i.e b and
f are pointing in the same direction! This means that the vector f gives the direction of
the maximum rate of increase of the function f (x, y, z).

Example

Find the direction of the maximum gradient in the function f (x, y) = 3x2 y 2 at the point
(3, 1).
f = i(6x) + j(2y) = 6xi 2yj f (3, 1) = 18i 2j
This means if you dropped a ball at this point, it would head off in the opposite of this
direction, down the steepest slope.

41
The quantity f is sometimes also written as grad f . Now that we have defined it, it
turns out to have some other interesting uses in functions of several variables. Firstly, we
recall that a local minimum for a function of one variable, y(x) is where y (x) = 0. At a
local maximum of a function of two variables, f (x, y), one would expect that derivatives in
all directions would be zero, and it turns out that this is true if fx = fy = 0, i.e. if f = 0.

Another application is to note that if we draw contours of the function f (x, y), the di-
rection of the line of steepest slope is always perpendicular to the contours, and so f is
perpendicular to the contours of f at any point. This would be useful if you were trying to
find the direction to get to the bottom of a hill as fast as possible on a contour map.

Exercises
1. Compute the gradient of the following functions.

(a) f (x, y) = 3xy 2 2yx2 (b) g(x, y, z) = z sin(xy)

2. Find a unit vector in the direction of maximum steepness of the functions in Q1, at (1, 2, 1).

3. In Q1(a), find the rate of change of f at;

(a) (2, 2) in the direction (1, 1) (b) (1, 3) in the direction (1, 1)

4. Sketch the contours of g(x, y) = y+ 12 x2 . Find g and indicate its direction on the contours.

Solutions

1. (a) f = (3y 2 4xy)i + (6xy 2x2 )j (b) g = zy cos(xy)i + zx cos(xy)j + sin(xy)k



2. (a) (4i + 10j)/ 116 (b) (2 cos 2i + cos 2j + sin 2k) / 1 + 4 cos2 2
20
19
3. Directional derivatives (a) (4, 16) (1, 1)/ 2 = 2
(b) (39, 20) (1, 1)/ 2 = 2

4. g = xi + j see figure below (sketch only)

42
Partial Differential equations

Whats the point of all this? Almost every real, physical system can be described by
partial differential equations, e.g. the diffusion of heat in a metal bar, or solute in solvent,
or spread of disease in an animal population into surrounding areas can be shown to satisfy
(approximately)
T 2T
= 2,
t x
where is called the diffusivity. (Also could write Tt = Txx .)
First lets consider some differences between partial and ordinary differential equations.
Suppose the temperature in a room satisfies the equation
2T
=0
x2
where T (x, y, z, t), i.e. the temperature depends on x, y, z and time. This is a partial differ-
ential equation, but there are only derivatives with respect to x. Thus we can integrate it
twice, i.e
2T T
2
=0 = f (y, z, t)
x x
T (x, y, z, t) = f (y, z, t)x + g(y, z, t)
This is very important. Notice that if I take the partial derivative twice I end up with the
original equation, so this is definitely a solution. The difference between this and ODE is
that what were once arbitrary constants are now functions of the other variables. In other
words, when solving partial differential equations we end up with unknown functions (which
are determined by the boundary conditions) rather than unknown constants. If you think
carefully about the geometry of these problems, then this must be so.

Example

Suppose u(x, t), i.e u depends on x and time, t, satisfies uxx u = 0. Find the general
solution for u.
Since there are only derivatives with respect to x we can solve this as we would an ODE
in x, but we must remember that any constants we get will actually be functions of t.
Solving as before (try u = f (t)ex) gives 2 1 = 0 = 1 u(x, t) = f (t)ex + g(t)ex.
Thus we can solve a pde that has derivatives with respect to one variable only.
This highlights the fact that a solution to a partial differential equation contains arbitrary
functions that are only determined by satisfying the boundary conditions and initial condi-
tions. A function of a single variable only has ends to worry about, e.g f (0) = 1, f (1) = 0,
but a problem on a square sheet of metal has four boundaries around the outside plus the
initial configuration. You should keep this in mind as you read through the next section.

Separable Partial differential equations

Read section 12.1 and do questions 1,3,5,17,19,21. The separation of variables method is
only part of a complete procedure that we will not be considering in this course. However,
it is interesting to see how it works in obtaining a general solution of a pde.

43
Classical Equations and boundary-value problems

The applications in which pde arise are too numerous to mention. Fortunately, some
equations arise time and again in different applications, and the three types discussed in
section 12.2 as examples of hyperbolic, elliptic and parabolic are fundamental to a number
of different disciplines. Read through this section to get a feeling for how such equations can
be derived. Try a couple of the odd numbered exercises to see if you understand the basic
ideas of setting up the problems. Make sure you understand what each of the different types
of boundary conditions mean.
The rest of this chapter (Sections 12.3-12.8) will not be considered. It is devoted to finding
the solution to these equations using a method known as orthogonal function expansions.
This is quite a sophisticated technique requiring a knowledge of Fourier series, which we have
not covered in this course.

Numerical solution of pde

Here we will briefly consider one way of getting numerical solutions to a partial differential
equation. We will only use one method on one equation, but the ideas are more general.
Read section 15.2 on numerical solution of Parabolic equations [6th-7th ed. - The Heat
Equation], but only up to the top of p543 [6th ed. p 552, 7th ed. p520], i.e up to the
beginning of the section on the Crank-Nicholson method (do not include it). Work carefully
through Example 1 and try to set up the same table. Do question 1, but do it trying various
sized time and space increment, i.e. different values of . Try values of = 1, 0.5, 0.25 and
compute the form of u(x, 1) for each case. You should see that the results dont make much
sense for the case with = 1, but for the other two the solution looks reasonable. This is
an example of a numerical instability. These are a major problem in using finite difference
methods, and one must always be careful to deal with these issues. There is not time in this
course to deal either with this or with other methods of solving pde numerically, but at least
you now have an introduction. If you ever need to do something like this, you will have the
basic knowledge to find out more for yourself.

44
Closing remarks

In this course we have only scratched the surface of the subject of mathematical modelling
of real systems. Using difference, differential and partial differential equations, we have
looked at how to set up the equations, and how to make a start on solving them, and (in
some ways more importantly) how to analyse them when they are too difficult to solve.
There are a lot of new ideas in this work, and I have tried to convey the main ones at a
reasonable level. You should know enough to be able to read about these ideas if you ever
need to extend them.
In any real modelling situation, it is best to use a combination of the approaches outlined
above. Analysis of the equations, direct solution where possible, numerical techniques and
the phase plane ideas can all be extended to consider what is happening, and to verify
that any solutions you have are correct. Even deriving the equations can lead to a better
understanding of the process.
I hope that you have gained a feeling for what these methods can be used, and that
mathematical models are a useful tool in a scientists toolkit.

Submit Assignment 4 now

45
.

46

You might also like