+ All Categories
Home > Documents > MS327 Unit 1 - Open UniversityFILE/ms327unit1.pdf · Introduction equationsfor the positions of...

MS327 Unit 1 - Open UniversityFILE/ms327unit1.pdf · Introduction equationsfor the positions of...

Date post: 27-Apr-2018
Category:
Upload: truongdien
View: 221 times
Download: 2 times
Share this document with a friend
56
Unit 1 Introduction and differential equations
Transcript

Unit 1

Introduction and differential equations

Introduction

Introduction

Welcome to MS327, Deterministic and stochastic dynamics. The term‘dynamics’ suggests that we are concerned with studying motion. The mostbasic questions in dynamics concern the motion of one small object, suchas understanding the motion of a ball thrown into the air. The objective isto be able to describe the motion in mathematical terms, analyse theequations, and predict the behaviour of other balls thrown in other ways.This module starts by reminding you of some of the basics about classicaldynamics, but builds towards including modern developments that wereunderstood only at the end of the twentieth century.

(b)(a)

Figure 1 (a) The Vasa was designed without the aid of mathematics. Itsank in Stockholm harbour on its maiden voyage in 1628. (b) Expertise inthe mathematical analysis of dynamics helped to ensure that the Boeing747 aircraft would fly safely.

Why dynamics is important

It is the ability to describe and predict that makes the study ofdynamics an essential element of human culture.

The Vasa (Figure 1(a)) was to have been the pride of the Swedishnavy. It was designed in the pre-scientific age using tables ofproportion passed down within a medieval guild. It was unstable andsank less than a mile into its maiden voyage. (The image shows ascale model of the salvaged ship.)

A Boeing 747 aircraft (Figure 1(b)) has thousands of moving parts,and later models can weigh over 400 tons when they take to the air.The predictive power of applied mathematics to model dynamicalproblems enabled this highly sophisticated machine to go safely fromthe drawing board into the sky.

The scientific study of dynamics was originally directed towardsunderstanding mechanical problems, but nowadays it encompasses almostany time-dependent quantity that can be subjected to mathematical

3

Unit 1 Introduction and differential equations

investigation. Non-mechanical examples include models for the spread ofdiseases, the behaviour of the economy, development of the populations ofanimals and the prices of commodities, and this module will touch on someof these areas. The term ‘dynamics’ also applies to some more challengingproblems in physical science that must be described by fields (i.e. functionsof position and time) rather than discrete variables. These areas, such asfluid dynamics where the motion is described by a velocity field, arebeyond the scope of this module.

Obviously, the coverage cannot be comprehensive, and specialised topicssuch as the design of aircraft cannot be addressed. The topics treated inthis module have been chosen with two objectives in mind. One of theguiding principles of science is that you understand something by startingwith simple examples. We always use the simplest example that issufficient to illustrate an idea. The other principle underlying this moduleis that we want to give you a perspective on the entire field of moderndynamics, so that even if your knowledge is a little superficial, you willhave some insight into how to approach a wide range of problems. Even ifyou have not mastered the details of the techniques to solve a given type ofproblem, you may know how to classify it and describe it, so that youcould search more advanced texts for information.

Figure 2 The populations of the Canadian lynx (left) and the snowshoehare (right) can be described by a simple dynamical system

Population dynamics

Most ecosystems are very complex, involving the populations of manydifferent species. A rather simple example occurs in the Canadianarctic. The populations of snowshoe hares and lynxes (Figure 2) inCanada are correlated with each other and show approximatelyperiodic variations. This phenomenon has been explained bymodelling the populations of these species as a simple dynamicalsystem, such as the Lotka–Volterra model, which is discussed in thismodule.

After seeing mechanics discussed in earlier modules, you will be aware thatthe mathematical description of mechanical processes uses differential

4

Introduction

equations for the positions of particles, obtained from Newton’s secondlaw. The description of other dynamical processes, such as the populationof a species of animal, also uses differential equations. You might expectthat a module on dynamics would consist of a discussion about how toidentify the correct differential equations, and how to find their solution.Of course, it becomes harder to find exact solutions as the differentialequations become more complicated. In fact, there are rather fewdynamical systems that can be analysed by finding exact solutions of thecorresponding differential equations. Much of this module is concernedwith how to get useful information without finding exact solutions of thedifferential equations.

The study of dynamical systems was pivotal to the development of themathematical analysis of differential equations. But because of thelimitations of finding exact solutions of differential equations, it alsoinspired seminal developments in other areas of mathematics: dynamicshas stimulated developments in the calculus of variations, geometry,topology and approximation theory. Some of these connections arediscussed in this module.

(a) (b) x(t)

x(t)

0

0

y(t)

z(t)

40

30

20

20

15

10

10−20−15 −10 −5 5

t

15

10

5

−5

−10

−15

02015105

Figure 3 Plots of two different trajectories of the Lorenz equations with very similar initial conditions,shown in red and black. The trajectories separate from each other, and both show erratic behaviour.These are characteristics of ‘chaotic’ motion. (a) A graph showing one of the coordinates as a function oftime. (b) A three-dimensional graph showing the region explored by the trajectories.

Chaotic motion

Apparently simple equations can produce highly unpredictableoutcomes. Figure 3 illustrates the solution of a system of threecoupled equations known as the Lorenz equations, designed by ameteorologist as a simple model for the atmosphere.

5

Unit 1 Introduction and differential equations

The Lorenz attractor was one of the first chaotic dynamical systemsto be explored. The possibility of observing chaotic behaviour wasunderstood by a small number of mathematicians and physicists fromthe end of the nineteenth century, but its importance was widelyappreciated only in the latter half of the twentieth century. Onereason for this is that computers made it possible for scientists toinvestigate dynamical systems in a very direct way, by numericalsolutions. Figure 3 uses the results of computer investigation of theLorenz equations.

A remarkable property of many dynamical systems is that they can exhibithighly erratic and essentially unpredictable behaviour, termed ‘chaotic’.This module gives an introduction to defining and describing the chaoticbehaviour of dynamical systems. Much of what we know about chaoticmotion was discovered by using computers to investigate solutions ofdifferential equations. In this module we encourage you to make your ownexplorations, by modifying some simple computer code. However, theexam paper will require only pencil-and-paper calculations.

All of the systems that have been mentioned so far are deterministic,meaning that the system has a solution that is determined uniquely interms of the initial conditions. Chaotic systems often appear as if theirbehaviour has a random element, despite the fact that there is nothingrandom in their equations of motion. Another important class ofdynamical processes consists of those that have randomness ‘built in’ totheir definitions. These systems are described as being stochastic, which isa synonym for random. Stochastic processes are also relatively easy toanalyse, once the fundamental concepts have been understood.Understanding how to deal with randomness in modelling and dynamicalsystems is a very valuable skill. A substantial part of this module isconcerned with understanding random dynamical systems.

Stochastic processes

The most basic example of a stochastic process is the random walk :you repeatedly toss a coin, and take one step to the right if it falls‘heads’, and a step to the left for ‘tails’ (see Figure 4(a)). The randomwalk and other stochastic (i.e. random) dynamical processes findnumerous applications, some in unexpected areas. One example isunderstanding the mechanism that determines which metals are goodconductors of electricity, where the motions of the electrons that carrythe electrical current are modelled by random walks.

6

Introduction

The price of a traded commodity shows erratic and apparentlyrandom fluctuations (see Figure 4(b)), which are modelled by a typeof random walk. Understanding how these price fluctuations can bemanipulated to make a reliable profit is key to the success of somefinancial institutions.

800

(a) (b)

Tails Heads

X − 1 X X + 1

Price of gold(US$/ounce)

Trading days from 1 January 1998

340

320

300

280

0 200 400 600

Figure 4 (a) The random walk is the simplest type of random process: a particle is moved one step to theright if a coin falls heads up, and one step to the left if it falls tails up. (b) Random-walk-type models areused to model a vast range of phenomena, including the fluctuations of the prices of traded commoditiessuch as gold.

The study materials for the module are supplied as three texts. This book,Fundamental concepts of dynamics, discusses the fundamental concepts,some of which may be partly revision. The second and third books dealwith more advanced topics in Deterministic dynamics and Stochasticdynamics and diffusion.

The study of dynamical systems is eclectic, and brings together manydifferent skills and abilities. The ability to think geometrically, and insightabout physical processes and concepts about randomness andunpredictability, all play a role. There may be parts of the material thatdo not match your existing strengths, and perhaps there will be some areasthat you will always find difficult. We believe that the assessmentmaterials will allow students with a good performance on a Level 2 appliedmathematics module to perform well on this one. While it may challengeyou, it should not defeat you.

7

Unit 1 Introduction and differential equations

Computing and dynamics

Computers are a very powerful tool for analysing dynamical problems. Inthis module we aim to give you an insight into how computer packages canbe useful, without requiring very deep knowledge. Because software andthe technology of the devices that run it are developing very rapidly, thetext will simply refer you to the Computer Exploration Worksheet, whichgives detailed guidance about how to approach the exercises, includingsample programs and computer code. The first two units make very lightuse of computer resources, but we encourage you to start to experimentwith the software while you study these units. In Unit 3 there will beexercises where the use of the software is essential.

There will be exercises in most units that involve the use of the computer,flagged with an icon like the one shown here. They are marked essential,recommended or optional as appropriate. The optional exercises willdeepen your understanding of the material and of the use of the computerpackage.

Introduction to Unit 1

This first unit introduces two typical examples of dynamical process,showing that in each case the problem reduces to finding a solution of adifferential equation. In each case an exact solution of the differentialequation is obtained. Section 1 discusses the logistic equation forpopulation growth, and Section 2 considers the equation of the dampedharmonic oscillator.

An important theme of the study of dynamics is that exact solutions of thedifferential equations are usually not possible. A wide variety of methodsand ideas have been developed that give qualitative and approximateinformation about the behaviour of dynamical systems. Section 3introduces two of these concepts, namely fixed points and stability, byre-examining the logistic equation. Section 4 introduces the concepts ofphase space and constants of motion by re-examining the dampedharmonic oscillator.

A great deal can be understood by considering how to classify dynamicalsystems. When you meet a new example of a dynamical system, it is veryvaluable to ask whether its equations of motion share the samecharacteristics as other examples that have already been analysed.Section 4 also starts the process of setting up a taxonomy of dynamicalsystems by discussing the classification of the logistic equation and thedamped oscillator.

Because dynamics is ultimately concerned with understanding solutions ofdifferential equations, this unit concludes in Sections 5 and 6 with arevision and summary of the most useful techniques for solving differentialequations, together with exercises to practise the methods. The earlierparts of the unit do use some techniques for solving differential equations.If you find these sections challenging, then you may wish to studySection 5 first.

8

1 Modelling population growth: the logistic equation

1 Modelling population growth: thelogistic equation

Dynamics is not solely concerned with mechanical systems. The sameprinciples are used to understand how many other types of system vary intime. Problems of this type are referred to as dynamical systems, whichare usually specified as one or more equations of motion (normally,these are differential equations), describing how the different quantitiesdepend on time t. The number of dependent variables (or dynamicalvariables) is called the number of degrees of freedom.

Our first example of a dynamical system is an equation that models howthe number of individuals in a population might be expected to vary as afunction of time. This model is called the logistic equation. It is chosenbecause it is a very simple equation that illustrates several generalprinciples.

1.1 Deriving the logistic equation

Suppose that we are interested in the size of a particular population ofanimals, and in how it varies over time. This will be described by afunction x(t), so that the number of animals at time t is x(t). Of course,the number of animals at any time should be an integer. But let usimagine that we are concerned with a very large population, so that x(t)might measure the number of thousands of millions of individuals. In thiscase, x(t) can be regarded as a continuous function of time. Because thereis just one variable x describing the population, the dynamical system willhave one degree of freedom.

The development of the population will be analysed by specifying adifferential equation for the rate of change of the population. In a shorttime δt, the population changes by a small amount δx, which is thenumber of individuals joining the population minus the number ofindividuals leaving. The ‘joiners’ may include individuals being born ormoving into the region where the population is located, and the ‘leavers’could result from individuals dying or leaving the region. As long as δt issufficiently small, we expect that δx is proportional to δt.

If the change in the population δx over a short time δt is proportionalto δt, this means that the derivative

dx

dt= lim

δt→0

δx

δt

exists. This time derivative will often be denoted by x.

9

Unit 1 Introduction and differential equations

The simplest assumption is that the rate of change of the population isproportional to the number of individuals, so that we would write

dx

dt= Rx, (1)

where R is a constant coefficient called the growth rate of thepopulation. This differential equation is the simplest model for the growthof a population, and our first example of an equation of motion for adynamical system. Its solution is

x(t) = x(0) exp(Rt), (2)

where x(0) is the initial population at time t = 0. Equation (1) is knownas the exponential model for population growth. The fact that itpredicts that the population can grow without limit indicates that weshould try to improve the model, by making the growth rate R depend onthe size of the population.

Exercise 1

According to equation (2), what happens to the population after a longtime if R is positive? What happens if R is negative?

Exercise 2

If the density of individuals is very small, then the rate of growth of apopulation can be limited by the rate at which individuals of the oppositesex meet each other. The rate at which any individual meets another in ascattered population might be expected to be proportional to the numberof individuals present. This suggests putting R = Cx for the growth ratein equation (2), so that this equation becomes

dx

dt= Cx2,

where C > 0 is a constant.

Find the solution of this equation, and describe the consequences for thepopulation x(t) as t increases.

The model in Exercise 2 predicts that the population grows without limitin a finite time, which is not reasonable, because the animals would beexpected to run out of food or other resources. Consider a more generalform of the equation of motion

dx

dt= F (x),

where F (x) is a function that should be chosen to make a more realisticmodel.

10

1 Modelling population growth: the logistic equation

A more realistic assumption is that the rate of population growthdecreases in equation (2) as the population increases. In order to includethis feature, the population growth rate R should be made to decrease andeventually become negative as x increases. The simplest way to achievethis is by making the growth rate a linear function of x, so

R = R0

(1− x

x0

),

where R0 and x0 are constants. Note that the population growth rate isapproximately R0 when the population is small, but the growth ratedecreases as the population increases, and it becomes negative when thepopulation exceeds x0. The corresponding equation of motion for thepopulation is the logistic equation, illustrated in Figure 5.

F (x)

x

slope R0

x0

Figure 5 The logisticequation is dx/dt = F (x),where F (x) is a quadraticfunction, with initialslope R0, which is equal tozero when x = x0

Logistic equation

dx

dt=

R0

x0(x0 − x)x. Equation (3) appears to have

been first published byPierre-Francois Verhulst in 1838.(The reason why he used thename ‘logistic’ is unclear.)

(3)

This is one of the simplest examples of a dynamical system, because it hasjust one degree of freedom, and involves a first-order differential equation.

1.2 Solving the logistic equation

The logistic equation can be solved exactly to determine x(t). In thefollowing we consider how to find the general solution of the logisticequation. In practice this solution is used to predict the population atlater times, given its value at some initial time. We show how to find asolution of the logistic equation for the case where the population is x(0)at time t = 0. The calculation uses the method of separation of variables.It requires some care over the manipulations, and it will be presented insufficient detail that you should be able to follow all of the steps. If youneed some revision of differential equations, see Section 5 (the method ofseparation of variable is discussed in Subsection 5.1).

Applying the method of separation of variables to equation (3) gives∫dx

(x0 − x)x=

R0

x0

∫dt. (4)

The integral on the left-hand side can be performed by simplifying theintegrand using the method of partial fractions, which is described inExercise 1 below. If you are not yet familiar with this method, you cancheck that

x0(x0 − x)x

=1

x0 − x+

1

x. (5)

11

Unit 1 Introduction and differential equations

Equation (4) therefore gives∫dx

x+

∫dx

x0 − x= R0

∫dt,

and performing the integrals gives

ln(x)− ln(x0 − x) = R0t+ C,

where C is a constant of integration. This can also be written in the formRecall thatlnA− lnB = ln(A/B).

ln

(x

x0 − x

)= R0t+ C.

This is an equation that is satisfied by the solution x(t), but what wewould really like is an explicit equation that gives a formula for x(t). Letus see how that can be achieved. Taking the exponential of this expressiongives an alternative equation describing the solution:

x(t)

x0 − x(t)= A exp(R0t),

where A = exp(C) is another constant. This is still not an explicit formulafor x(t), but it does represent progress because the awkward logarithmfunctions no longer appear. Multiplying both sides by x0 − x(t) andrearranging gives an explicit expression for x(t):

x(t) =x0A exp(R0t)

1 + A exp(R0t).

This is an explicit formula for x(t). It contains an arbitrary constant A,which will depend on the value of x at t = 0. Setting t = 0, this expressiongives x(0) = Ax0/(1 +A), so

A =x(0)

x0 − x(0).

Substituting this into the expression for x(t) and rearranging finally givesx(t) in terms of the initial value x(0):

x(t) =x0 x(0) exp(R0t)

x0 + x(0)[exp(R0t)− 1], (6)

or equivalently,

x(t) =x0 x(0)

x(0) + [x0 − x(0)] exp(−R0t). (7)

This is the full solution to the problem, but the expression is quitecomplicated. It is in fact rather too complicated to understand, whichpoints to a general difficulty with the study of dynamics. Usually theequations do not have exact solutions in terms of known mathematicalfunctions. And even in simple cases such as the logistic equation where thesolution can be obtained, the mathematical expression may be socomplicated that its implications are not clear.

Example 1

Partial fractions are often required for solution of first-order differentialequations. Obtain equation (5) by a systematic method.

12

1 Modelling population growth: the logistic equation

Solution

Write

x0(x0 − x)x

=a

x0 − x+

b

x,

where a and b are constants to be determined. Combining the terms onthe right-hand side gives

x0(x0 − x)x

=x0b+ (a− b)x

(x0 − x)x.

By comparing the coefficients of x and x0 in the numerators on both sidesof this equation, we find that they are equal if a = b = 1. This shows howequation (5) can be obtained.

One approach to dealing with a complicated formula is to use a computerto plot a graph. In the case of the logistic equation, we could plot x(t) fordifferent values of the initial population, as illustrated in Figure 6. Thisapproach is useful, but it has limitations. Although you may trust theresults that the computer produces, you may not be able to understandthem. Also, you may have to plot many graphs for different values of x(0)in order to gain a complete picture.

Exercise 3 Computing – optional

Use the Software Guide to find out how to plot a function, then plot thesolutions illustrated in Figure 6. The Computer Exploration Worksheetgives working code.

t

x(t)

0

0.2

0.4

0.6

0.8

1.0

1.2

2 4 6 8 10

Figure 6 Solutions of the logistic equation for R0 = 1 and x0 = 1, withthree different initial conditions x(0) = 0.1, x(0) = 0.8 and x(0) = 1.2.Note that the solution initially grows exponentially when x(0) is small,and all cases approach x0 = 1 as t → ∞.

13

Unit 1 Introduction and differential equations

An alternative approach is to try to understand limiting cases of thesolution. In the case of the logistic equation, there are two limiting casesthat are easy to understand. Consider the case where t is very large inequation (7). In this limit, exp(−R0t) becomes very small, so we canconclude that

limt→∞x(t) = x0 (8)

for any value of x(0) (except x(0) = 0, where x(t) = 0 for all t).

The other simple observation that can be made is that when x(0)/x0 ) 1,The notation A ) B means thatthe magnitude of A is very smallcompared to B. For example,the condition x(0) ) x0 wouldbe satisfied if x(0) = x0/100.

the denominator of equation (6) can be approximated by x0 for small t.This implies that the initial growth is approximately exponential ifx(0)/x0 ) 1:

x(t) # x(0) exp(R0t). (9)

In summary, when x(0) is small compared to x0, the solution initiallygrows exponentially, like equation (2). At large times, the solution alwaysapproaches x0 (except for the case x(0) = 0). Reading simple conclusionsfrom relatively complex expressions such as equation (6) is a skill thatpeople develop with practice. In this module we will usually offer hintsabout how to proceed.

2 Modelling mechanical vibrations:the harmonic oscillator

The genesis of dynamics was the study of mechanical systems. Some subtlephysical insights can be required to write down the differential equationsdescribing a mechanical system, but this module does not dwell on thephysics of Newton’s mechanics. The mechanical systems that we considerin Book 1 will involve particles moving along a straight line, and for thesecases there is a simple prescription for obtaining the equations of motion.

2.1 Newtonian mechanics

Consider a particle of mass m that is moving in one dimension along thex-axis. At any given time t, the particle’s position is x(t), and its velocityand acceleration are given by the derivatives dx/dt and d2x/dt2. There areno general laws for the position or velocity of the particle, but there is avery important law for its acceleration: Newton’s second law tells usthat

mass× acceleration = force.

14

2 Modelling mechanical vibrations: the harmonic oscillator

In mathematical notation this is

md2x

dt2= F, (10)

where F is the force acting on the particle. The force need not be constant,and may vary with the position x of the particle, its velocity dx/dt, ortime t. So we get a second-order differential equation for x as a functionof t, and the solution of this equation tells us how the particle can move.

In the cases considered in this book, the equations of motion for amechanical system are obtained by a direct application of equation (10).The equation of motion follows from specifying the force F , and theunderlying physical principles will always be explained.

Vector or scalar equations?

In equation (10) the force and acceleration are scalars, rather thanvectors. You may have been taught to formulate Newtonian dynamicsby writing forces as vector-valued quantities, so that equation (10)would be written as

md2x

dt2i = F i,

where i is a unit vector along the x-axis. To determine the motion,you have to solve the same scalar differential equation (10). In thismodule we do not expect you to express forces as vectors. You canwrite down the scalar form of the equation of motion straight away.

One reason for expressing forces as vectors is that this can help incorrectly formulating mechanical problems, so that you end upsolving the correct ordinary differential equations. In Book 2,however, we consider an alternative formulation of Newtonianmechanics, called Lagrangian dynamics. One of the advantages of theLagrangian approach is that it simplifies obtaining the equations ofmotion, especially where the geometry of the problem or the forcesbetween particles are hard to analyse. You will see that the verypowerful Lagrangian method avoids writing forces as vectors.

When we discuss dynamical problems, derivatives with respect to time tappear frequently. It is useful to introduce a compact notation for these,the dot notation, so that the velocity v and the acceleration a of a particlewith position x(t) are indicated as follows:

v = x =dx

dt, a = v = x =

d2x

dt2.

This notation for time derivatives will be used throughout the module. Wewill not assume very much knowledge about mechanics, and we will tellyou the formulas that are required to determine the force.

15

Unit 1 Introduction and differential equations

Example 2

Let x be the coordinate of a ball of mass m thrown vertically upwards (sothat x increases as the ball moves upwards). The force due to gravity isconstant in time and space, and acts vertically downwards. Newtonunderstood that the force is proportional to the mass of the particle, so theforce may be written as F = −mg, where g is the magnitude of theacceleration due to gravity.

Write down Newton’s second law for the motion of this particle.

Solution

The equation of motion is mx = F = −mg. Because the mass m cancels,the equation of motion is simply

d2x

dt2= −g.

2.2 Force and motion due to a spring

In order to write down the equation of motion, we need to specify theforce F .

The system known as the simple harmonic oscillator provides a goodexample. Here, a particle of mass m is suspended at the lower end of aspring that is attached to a fixed support (Figure 7). The particle moves

x(t)

F = −kx

m

Figure 7 A particle of massm moves along the x-axissubject to a force F providedby a spring and gravity

up and down along a vertical x-axis, subject to a force F provided by thespring and gravity. If the system is left to settle, then the particle comes torest at a point of equilibrium, which we label x = 0. Because the particledoes not spontaneously move away from this position, we can infer thatF = 0 when x = 0.

When the particle is displaced from x = 0, the force F tends to draw theparticle back towards x = 0. We consider the case where the force isproportional to the displacement from equilibrium, and take

F = −kx, (11)

where k is a positive constant. The negative sign in this equation ensuresA spring that satisfies this linearrelation between restoring forceand displacement is said to obeyHooke’s law.

that the force always acts in a direction that tends to restore the particleto its equilibrium position.

Putting equations (10) and (11) together, we get the differential equation

md2x

dt2= −kx.

Recalling that k > 0 and m > 0, we can also express this as

d2x

dt2= −ω2x, (12)

where

ω =√k/m (13)

16

2 Modelling mechanical vibrations: the harmonic oscillator

is a positive constant, called the angular frequency of the oscillation.Equation (12) is called the equation of motion of a simple harmonicoscillator. It is a second-order differential equation whose solution tells ushow the particle can move.

Measuring time

The motion of a pendulum is well approximated by a simple harmonicmotion when the displacement is small. It is a remarkable fact thatthe period of the oscillation is independent of the amplitude, and itwas this property (first understood by Galileo in 1602) that led to theuse of pendulum clocks to measure time accurately. It was only afterthis insight that time is a measurable quantity that quantitativetheories for dynamics could be developed.

Later in this unit we summarise the systematic techniques to solveequations like this. As well as being able to apply procedural methods tosolve differential equations, it is valuable to be able to guess solutions (thisis how many of the textbook procedures for solving differential equationswere invented). You know that

d

dt(sin t) = cos t and

d

dt(cos t) = − sin t,

so

d2

dt2(sin t) = − sin t and

d2

dt2(cos t) = − cos t.

In other words, taking the second derivative of a sine or cosine functiongives the same function back again, but with a minus sign. This is veryclose to what is required to solve equation (12). We therefore try afunction of the form

x(t) = C sin(ωt) +D cos(ωt), (14)

where C and D are any constants and ω is the constant in equation (12).Differentiating this function once, and then again, we get

dx

dt= Cω cos(ωt)−Dω sin(ωt),

d2x

dt2= −Cω2 sin(ωt)−Dω2 cos(ωt) = −ω2x.

So the function in equation (14) does indeed satisfy equation (12). In fact,it is the general solution of this differential equation.

Notice that because the equation of motion is a second-order differentialequation, the general solution is expected to contain two arbitraryconstants. These are the coefficients C and D. The values of theseconstants depend on the initial conditions, that is, the initial position x(0)and the initial velocity x(0). An example of simple harmonic motion isplotted in Figure 8.

17

Unit 1 Introduction and differential equations

To interpret this solution, it is helpful to note that it can also be written as

x(t) = A cos(ωt+ φ), (15)

where A and φ are arbitrary constants. To see why this works, expand theRecall the trigonometric identitycos(A+B)= cosA cosB − sinA sinB.

right-hand side of equation (15), to get

x(t) = A cos(ωt) cosφ− A sin(ωt) sinφ. (16)

Then comparing with equation (16), we see that equation (15) is validprovided that

C = −A sinφ and D = A cosφ. (17)

These expressions give C and D in terms of A and φ. To express A interms of C and D, we first square both of the relations in equations (17),add them, and use the Pythagoras formula in the form cos2 φ+ sin2 φ = 1to obtain

A =√

C2 +D2. (18)

To express φ in terms of C and D, taking the ratio of the relations inequations (17) gives

φ = arccos(D/A). (19)

Here we have chosen the positive square root for A; this involves no loss ofgenerality because cos(ωt+ π) = − cos(ωt), so increasing the value of φ byπ is equivalent to reversing the sign of A. Values of φ that differ by aninteger multiple of 2π correspond to the same motion, so we can restrict φto a range such as 0 ≤ φ < 2π.

The constant A ≥ 0 is the amplitude of the oscillation, which is themagnitude of the maximum displacement from the equilibrium positionx = 0. The constant φ is called the phase constant. This is related tothe time when the oscillator reaches its maximum displacement: accordingto equation (15), x = A at time t = −φ/ω (and at other times differing byinteger multiples of 2π/ω). The oscillation consists of identical cycles,endlessly repeated. The time taken to complete one of these cycles is theperiod of the oscillation, and is given the symbol T . Because the sinefunction has period 2π, we have

ωT = 2π,

thus, using equation (13),

T =2π

ω= 2π

√m

k.

As you might expect, the period of oscillation is reduced if m is reduced(a lighter particle) or if k is increased (a stiffer spring). The quantity 1/Tis called the frequency of the oscillation, and represents the number ofcycles completed per unit time. The constant ω = 2π/T is called theangular frequency.

Figure 8 shows a graph of the solution for a particular instance of theinitial conditions.

0 t

x

T

A

Figure 8 Simple harmonicmotion with amplitude A,phase constant φ andperiod T

18

2 Modelling mechanical vibrations: the harmonic oscillator

Exercise 4

Example 2 considered the equation of motion for a particle movingvertically under gravity. This is x = −g, where g is the gravitationalconstant (i.e. the magnitude of the acceleration of an object falling undergravity).

Determine the general solution. Use this to determine when a ball thrownvertically into the air with speed u returns to its starting point.

Sometimes simple harmonic motion is a good approximation for themotion of a more complex system, as the following example shows.

Example 3

The simple pendulum illustrated in Figure 9 presents a more complicated

m

θ

l

Figure 9 A simplependulum

problem, because the particle moves along a curve rather than in a straightline. In Book 2 we show that the equation of motion of a simple pendulumof length l is

θ =g

lsin θ,

where θ is the angle of the bob from the vertical.

Show that the equation of motion for small oscillations can beapproximated by an equation describing simple harmonic motion, anddetermine the angular frequency and period. (Hint : Use the Taylor seriesexpansion of sin θ, that is, sin θ = θ− θ3/6 + · · · .)Solution

When θ ) 1 we can use the approximation sin θ # θ. The equation ofmotion is then approximated by θ = −gθ/l = −ω2θ, so

ω =

√g

l, T = 2π

√l

g.

2.3 Adding resistive forces

The simple harmonic motion described by equation (15) continues forever,but we know from everyday experience that oscillations generally die awayafter a while. We can get a more realistic description by including anadditional force in our model, one that will dampen the oscillations down(e.g. Figure 10). When the system is displaced from equilibrium, we can

Figure 10 Sometimesdamping is deliberatelyintroduced into mechanicalsystems, such as thesuspension systems ofvehicles; this all-terrainbicycle has a damped springsuspension system

write the force F as the sum of two contributions:

F = Fs + Fr,

where Fs is the force due to the spring, and Fr is the additional resistiveforce that dampens out the motion.

19

Unit 1 Introduction and differential equations

We take the additional force to be proportional to the velocity of theparticle (which is a good model for some types of resistive force), andalways in the opposite direction to the velocity (so that the force is actingto slow the particle down). This means that we should write the additionalforce in the form Fr = −γ dx/dt, where γ is a positive constant, leading tothe differential equation

md2x

dt2= −kx− γ

dx

dt. (20)

This is the equation of motion for a damped harmonic oscillator. Nowconsider the solution of this equation of motion. You will see that (forsome values of γ and k) it has solutions that oscillate but diminish andeventually die away.

Equation (20) is a linear, second-order, homogeneous differential equation,which can be solved by standard methods. This will be discussed at lengthin Unit 2. Here we consider an alternative approach: let us guess thatthere may exist a solution that oscillates in time, but with an amplitudethat decays exponentially:

x(t) = sin(ωt) exp(−λt), (21)

where ω and λ are constants. The first and second derivatives of this trialsolution are

x(t) = [ω cos(ωt)− λ sin(ωt)] exp(−λt),

x(t) = [(λ2 − ω2) sin(ωt)− 2ωλ cos(ωt)] exp(−λt).

Substitution into the equation of motion (20) and collecting terms insin(ωt) and cos(ωt) gives

[m(λ2 − ω2)− γλ+ k] sin(ωt) exp(−λt)

+ [−2mωλ+ γω] cos(ωt) exp(−λt) = 0.

This equation must be satisfied for all values of t. Dividing by exp(−λt)gives

[m(λ2 − ω2)− γλ+ k] sin(ωt) + [−2mωλ+ γω] cos(ωt) = 0,

that is, an equation of the form C sin(ωt) +D cos(ωt) = 0, where C and Dare independent of t. This is satisfied only if the coefficients of the sin(ωt)and cos(ωt) terms are both equal to zero. This leads to the two equationsThis follows from the reasoning

above, connecting equations (15)and (16), where we showed thatC sinx+D cosx=

√C2 +D2 sin(x+ φ). This

can vanish for all x only ifC = D = 0.

m(λ2 − ω2)− γλ+ k = 0,

2mλ = γ.

This is a pair of equations that determines the two unknown coefficients λand ω in terms of the coefficients of the differential equation, m, γ and k.The second equation gives λ = γ/2m. Substituting this into the firstequation then gives

ω2 =k

m− γ2

4m2,

20

2 Modelling mechanical vibrations: the harmonic oscillator

so the required solution is

x(t) = sin(ωt) exp

(− γt

2m

), ω =

√k

m− γ2

4m2. (22)

We can conclude that there is a solution of the form suggested, but thissolution ceases to be meaningful when γ is sufficiently large that γ2 > 4km.Note that in the limit as γ → 0, we recover the undamped oscillationconsidered in Subsection 2.2.

We have constructed a solution in the form described by equation (21). Byreplacing sin(ωt) with cos(ωt), you can check that x(t) = cos(ωt) exp(−γt)is also a solution, with the same values of ω and γ. Both of these solutionsare plotted in Figure 11. The general solution to this problem will bediscussed in depth in Unit 2.

x(t)

t

1

0.8

0.6

0.4

0.2

0

−0.2

−0.4

−0.6

2 4 6 8 10 12 14 16 18 20

Figure 11 Damped oscillations: x(t) = sin(ωt) exp(−γt) (red curve) andx(t) = cos(ωt) exp(−γt) (green curve)

Exercise 5

By using a trial solution y(x) = exp(ax), where a is a constant that is tobe determined, find a set of solutions of the equation

d4y

dx4= 16y.

21

Unit 1 Introduction and differential equations

3 Fixed points and stability

Thus far we have examined two very simple dynamical systems, namelythe logistic equation for population growth, and the damped harmonicoscillator. Both of these were described by exactly solvable differentialequations, but a fair amount of algebra was required to obtain thesolution. It is desirable to find means of obtaining useful informationabout solutions, without having to solve differential equations exactly.

Our treatment of the logistic equation led to an exact solution for thepopulation x(t), but the manipulations were not very easy. The differentialequation has a very simple structure, in that x is a quadratic function of x.If the logistic equation were replaced by another model, such as

dx

dt=

[x4(1− x4)

]1/4,

then the analysis would become much more difficult, and it would not bepossible to express the integrals in terms of known functions. In the case ofmore complex dynamical systems, the differential equations often cannotbe solved exactly by any known method. In these cases it is desirable to beable to understand the properties of the solution without being able towrite down its precise mathematical form.

In the following discussion, we assume that the dynamical system is adifferential equation of the form

dx

dt= F (x), (23)

where F (x) is some known function. We pay particular attention to theconsequences of the condition F (x) = 0 being satisfied, and we show thatwhen x is close to a value for which F (x) = 0, the solution is quite easy toanalyse.

Equation (23) corresponds to the logistic equation in the case where F (x)is a quadratic function:

F (x) =R0

x0x(x0 − x).

Note that this is equal to zero when x = x0 or when x = 0. We havealready seen that these values have particular significance for solutions ofthe logistic equation. Equation (8) shows that solutions approach the pointx0 as t increases, whereas equation (9) shows that trajectories move awayfrom x = 0. In this section we show how this conclusion can be reachedwithout going to the trouble of solving the differential equation exactly.This is achieved by introducing two concepts, namely fixed points andstability analysis. These are discussed below using the logistic equation asan example.

22

3 Fixed points and stability

3.1 Equilibrium or fixed points

If we can find a value of x such that F (x) = 0, then the differentialequation reads x = F (x) = 0. This implies that x will remain constant,and the values of x for which this happens are called fixed points orequilibrium points. This idea is encapsulated in the following definition.

An equilibrium point or fixed point of a differential equation

x = F (x)

is a point xe such that x(t) = xe is a constant solution of the systemof differential equations, that is, xe is a point at which x(t) = 0.

In principle it is easy to find the equilibrium points: they are the values ofx that satisfy the equation

F (x) = 0.

Note that there may be multiple solutions (or no solutions).

Example 4

Determine the equilibrium points of the equation x = a− bx2, where a andb are positive constants.

Solution

Here F (x) = a− bx2. The equilibrium points satisfy a− bx2e = 0, so

xe = ±√a/b.

Exercise 6

What are the fixed points of x = x− Ax3, where A > 0?

Note that the logistic equation has two fixed points, namely x = 0 andx = x0.

3.2 Stability of fixed points

We have seen that for some special choices of the initial condition,satisfying F (xe) = 0, the system has a very simple solution, namely aconstant, x(t) = xe.

It is useful to consider what happens if the initial condition is very close tothe fixed point. Usually, one of two things happens. Either the solutionapproaches the fixed point, or it moves further away. The same behaviouris usually seen for all initial conditions that are close to the fixed point. Ifnearby solutions approach the fixed point, then we say that the fixed pointis stable. If nearby points move away from the fixed point, then wedescribe it as being unstable.

23

Unit 1 Introduction and differential equations

If a small change or perturbation of the population from its equilibriumvalue results in subsequent populations that remain close to theequilibrium value, then we say that the equilibrium point is stable. Onthe other hand, if a perturbation results in a large change as time passes,then we say that the equilibrium point is unstable.

Stability of equilibrium points

Suppose that the differential equation

x = F (x)

has an equilibrium point at x = xe. The equilibrium point is said tobe:

• stable if all points arbitrarily close to the equilibrium pointremain in the neighbourhood of the equilibrium point as timeincreases

• unstable otherwise.

We have already seen that the logistic equation has two fixed points, x = 0and x = x0. Our discussion of the solution (equation (6)) showed thatx = 0 is an unstable fixed point, because if the initial condition is close tox = 0, then the initial population growth is approximated by anexponential function x(t) # x(0) exp(R0t). We also showed that any initialcondition except for x(0) = 0 results in x(t) approaching x0 as t → ∞.This implies that x = x0 is a stable fixed point of the logistic equation. Wegive a simple criterion for stability of a fixed point below.

3.3 Criterion for stability

First-order differential equations, such as the logistic equation, are quiteeasy to understand using geometrical ideas. Think of x(t) as the positionof a particle moving along a line. If x(t) obeys the equation of motion

x = F (x), (24)

then you know that if you are at position x, then you can calculate F (x),which tells you the velocity at which you are moving away from x. (Thevelocity of a particle is the rate of change of its position, x = dx/dt.) Itcan be helpful to draw a diagram such as Figure 12, where you indicate thex3

F (x)

xx1 x2

Figure 12 The equationx = F (x) can be thought ofas describing motion of apoint along a line; the arrowsindicating the velocity F (x)change direction at fixedpoints

direction of the velocity at points distributed along the x-axis. Thevelocity is zero at the fixed points.

The arrows point towards some of the fixed points and away from others.You should not be surprised to learn that this gives a criterion for whichfixed points are stable: the arrows always point towards the stable fixedpoints, and away from the unstable ones. If the velocity F (x) becomespositive to the right of a fixed point, then the arrow points to the right,and the fixed point is unstable.

24

3 Fixed points and stability

The velocity for a point close to the fixed point is approximated by makinga Taylor series expansion about the fixed point:

F (x) = F (xe) + F ′(xe)(x− xe) + · · · = F ′(xe)(x− xe) + · · · ,where the second step uses the fact that F (xe) = 0 at fixed points.

This leads to a very simple condition for stability. If x− xe is small andpositive, then F (x) has the same sign as F ′(xe). If x = F (x) > 0, then theparticle moves further from the fixed point. Conversely, if F (x) < 0 whenx− xe is small and positive, then the particle moves towards the fixedpoint, as illustrated in Figure 12. Applying the same reasoning whenx− xe is negative leads to the following rule.

Procedure 1 Checking the stability of fixed points ofone-dimensional motion

The equilibrium points or fixed points of x = F (x) are those points xewhere F (xe) = 0. Each fixed point xe is

• stable if F ′(xe) < 0

• unstable if F ′(xe) > 0,

where F ′(x) = dF/dx.

Example 5

Use Procedure 1 to determine the stability of the fixed points for thelogistic equation.

Solution

Here F (x) = R0(x0 − x)x/x0, so

F ′(x) =R0

x0(x0 − 2x).

The values at the fixed points are F ′(0) = R0 > 0 and F ′(x0) = −R0. Theprocedure implies that xe = 0 is unstable and xe = x0 is stable, inagreement with the conclusions reached earlier.

Exercise 7

Determine the stability of the fixed points of x = x−Ax3, with A > 0.

Exercise 8

Determine the fixed points of

dx

dt= A sin x,

where A > 0, and decide which are stable.

25

Unit 1 Introduction and differential equations

4 Phase space and constants ofmotion

When we considered the motion of a simple mechanical system, thedamped oscillator, we investigated its behaviour by solving a second-orderdifferential equation. This was possible only because the forces in thesystem were proportional to the displacement and the velocity of theparticle, resulting in a differential equation that could be solved exactly.However, it is not usually possible to find exact solutions of differentialequations. It is desirable to find approaches that give useful information inthe general case. In this section we develop two useful ideas: phase spaceand constants of motion.

4.1 Phase space and phase trajectories

Newton’s second law leads to an equation of motion that is a second-orderdifferential equation. We assume that the force F is a function of theposition x of the particle and its velocity, so that the Newtonian equationof motion is

mx = F (x, x).

This looks hard to interpret: at position x this equation gives acomplicated relationship between position, velocity and acceleration. It is,however, possible to rewrite the second-order equation as a system of twofirst-order equations. Let us introduce a two-dimensional space withcoordinates x and y. We take x as the position of the particle, and let y bethe velocity of the particle, so that x = y. Because y = x, this equation ofmotion can be written as y = G(x, y), where G(x, x) = F (x, x)/m. Themotion of the system can therefore be described by the equations

x = y,

y = G(x, y).

This is a system of two coupled first-order equations that are equivalent tothe single second-order equation. An advantage of this approach is that itcan help to visualise the motion. At any given time, we represent thissystem by a point in the (x, y)-plane. We call this two-dimensional spacethe phase space or phase plane for the system, and the point is calledthe phase point. We can think of x and y as the coordinates of theposition vector x of the phase point. The evolution of the position andvelocity can then be represented by a path, called a phase path or phasetrajectory in the phase space, as shown in Figure 13. Here, the direction

x

y

0

(x(t), y(t))

Figure 13 A phase path (orphase trajectory) in phasespace

of the arrows indicates the direction in which the phase point (x(t), y(t))moves along the phase path with increasing time. However, this type ofrepresentation does not show how quickly or slowly the point moves alongthe path.

As well as considering systems where the coordinates of the phase spaceare a position and a velocity, we can also consider the more general case of

26

4 Phase space and constants of motion

a dynamical system that is described by two variables, given by first-orderdifferential equations. The equations of motion are

x = u(x, y), y = v(x, y), (25)

where u(x, y) and v(x, y) are two functions. Equations of motion of thistype can be used to model the populations of two species of animals, suchas the snowshoe hare and the Canadian lynx, represented by twotime-dependent variables x(t) and y(t).

The pair of equations (25) can be written in a very simple form usingvector notation, so that they are analogous to equation (24). The positionof the phase point at time t, its velocity, and the pair of functions u(x, y)and v(x, y) are represented by the two-dimensional vectors

x(t) =

(x(t)y(t)

), x(t) =

(x(t)y(t)

), u(x, y) =

(u(x, y)v(x, y)

).

With this notation, equations (25) can be written in the vector form

x = u(x),

which is analogous to equation (24). This is an equation of motion for thephase point: the velocity of the phase point, x, is equal to u(x), that is, tothe value of a vector field u evaluated at the position of the phase point,x = (x, y). We observe the following.

The phase path at (x, y) is tangential to the vector field u(x, y).

This geometrical picture is a powerful method for getting insight into thebehaviour of systems of differential equations that cannot be solved exactly.

Exercise 9

Write down the equations of motion of the damped oscillator, namely

md2x

dt2= −kx− γ

dx

dt,

in the form of equations (25).

Multiple meanings of phase

The word ‘phase’ crops up in many different areas of science thathave no obvious connection. In this unit we have defined phase point,phase path and phase space. We also wrote an equation for anoscillation in the form x(t) = A cos(ωt+ φ), and referred to φ as thephase constant of the oscillation. In physics and chemistry you willalso find discussions of phase transitions, which are abrupt changes ofthe properties of a substance in response to changes of temperature.Do not seek a deep connection: there is none.

27

Unit 1 Introduction and differential equations

The word phase is derived from a Greek word with a meaning similarto ‘appearance’, so it is natural that it was adopted independently bydifferent branches of science. Its use in discussing oscillationsprobably arose from the fact that the phases of the moon are aperiodic phenomenon.

Having introduced the concept of phase space, we now consider the phasetrajectory of the linear oscillator, which was discussed in Section 2. Wehave seen that for the undamped oscillator the position x(t) is a sinusoidalfunction of time. The velocity y(t) = x is also a sinusoidal function, so thepath of the trajectory in the (x, y)-plane is described by the equations

x(t) = A cos(ωt+ φ),

y(t) = x = −Aω sin(ωt+ φ).

As t increases, the phase point (x, y) traces out a path in the plane. Theseequations give a parametric representation of the phase trajectory. Usingthe identity cos2 θ+ sin2 θ = 1, from these equations we see that

ω2x2 + y2 = A2ω2 = constant. (26)

This is the equation of an ellipse in the (x, y)-plane. So the phasetrajectories of the undamped oscillator are closed elliptical curves. Becausex is increasing when y > 0, the curve is traversed in a clockwise sense. Thephase trajectory is illustrated in Figure 14. Note that different initial

x

x−A A

−Aω

Figure 14 The phasetrajectory for an undampedharmonic oscillator is anellipse

conditions make the trajectory trace out different elliptical curves.

In the case of the damped linear oscillator, the trajectory in phase spacemust be similar when γ is small, but in the limit as t → ∞, the solution(equations (22)) shows that the trajectory in phase space alwaysapproaches the point (x, y) = (0, 0), provided that γ > 0. We can concludethat the trajectory spirals in towards the origin, as shown in Figure 15.x

x

Figure 15 For a dampedharmonic oscillator, the phasetrajectory spirals towards theorigin

4.2 Constants of motion

You have seen that the motion of the undamped linear oscillator continuesforever. This conclusion was reached by finding an exact solution of theequation of motion. We have mentioned that exact solutions of theequation of motion can be obtained only in special cases. We might askwhether the property of oscillating forever is something that might beobserved in other cases.

At first sight it appears as if it is impossible to make any reliable statementwithout being able to solve the equation of motion. However, there is avery powerful approach that resolves this difficulty. The idea is to try tofind a constant of motion. This is a function K(x, y) that remains constantas we follow any given phase path. In some cases we may be able to findthe function K(x, y) without being able to determine the trajectory definedby x(t) and y(t). To see what this means, consider a function K(x, y) as x

28

4 Phase space and constants of motion

and y trace out a trajectory in phase space. Then the rate of change ofK(x, y) with respect to t is obtained by applying the chain rule. We have

dK

dt=

∂K

∂x

dx

dt+

∂K

∂y

dy

dt,

where dx/dt = x and dy/dt = y are the components of the velocity of thephase point in phase space. If we can find a function K(x, y) with theproperty that

dK

dt= 0

for all values of x and y, then it follows that K remains constant as wetrace out any given phase path. The function K(x, y) is called a constantof motion. If there is a constant of motion, then the phase paths arecontour lines of K(x, y). Because x = u(x, y) and y = v(x, y), the constantof motion is determined by solving the following problem: given functionsu(x, y) and v(x, y), we want to find a function K(x, y) that satisfies theequation

∂K

∂xu+

∂K

∂yv = 0

for all points (x, y) in the phase space. If the contours of K(x, y) are closedcurves, then the phase paths must themselves be closed curves, asillustrated in Figure 16. In that case the coordinates x and y will be

0 x

y

Figure 16 When there is aconstant of motion K, thephase trajectories must followcontours of K(x, y)

periodic in time. Both x and y have the same period T . The period T isusually different for different contours.

It is hard to find constants of motion, even in cases where they exist. Butif someone suggests that a function K(x, y) is a constant of motion, then itis easy to test this by using the following procedure.

Procedure 2 Testing for a constant of motion

If the equations of motion for a system with two degrees of freedomare x = u(x, y) and y = v(x, y), then a differentiable function K(x, y)is a constant of motion if and only if

dK

dt=

∂K

∂xu+

∂K

∂yv = 0 (27)

for all points (x, y) in the phase space of the system.

The fact that the motion of the undamped linear oscillator follows ellipticalclosed contours suggests that there should be a constant of motion, withelliptical contour lines. Equation (26) for the elliptical curve suggests that

K(x, y) = 12

(ω2x2 + y2

)(28)

is a constant of motion (the factor 12 is included for a reason that will be

explained shortly).

29

Unit 1 Introduction and differential equations

We want to test whether this is a constant of motion for the equations ofmotion (which were considered earlier, in Exercise 9 – here we set γ = 0because we consider the case without damping). We have

x = y, y = − k

mx,

and

∂K

∂x= ω2x,

∂K

∂y= y.

So

dK

dt= ω2xy − k

mxy,

which equals zero because ω2 = k/m. So equation (27) is satisfied, andequation (28) gives a constant of motion for the undamped linear oscillator.

This approach can be extended to some situations where the equation ofmotion is nonlinear. If the force on the particle is obtained from thederivative of a potential energy function V (x) as

F = −dV

dx,

then the equations of motion are

x = y, y = − 1

m

dV

dx(x),

and there is a constant of motion

E(x, y) =my2

2+ V (x). (29)

The constant of motion E(x, y) is the total energy of the particle, which isthe sum of the kinetic energy mx2/2 and the potential energy V (x).

Example 6

Verify that if the force is F = −dV/dx, then equation (29) gives a constantof motion.

Solution

The partial derivatives of E(x, y) are

∂E

∂x=

dV

dx,

∂E

∂y= my.

The equations of motion are

x = y, y = − 1

m

dV

dx.

The time derivative of E is then

E =∂E

∂xx+

∂E

∂yy =

dV

dxy − 1

m

dV

dxmy = 0.

30

4 Phase space and constants of motion

Exercise 10

In a harmonic oscillator, the spring force obeys Hooke’s law, F = −kx.This force can be written as the derivative of a potential energy V (x).

What is the potential energy for an undamped linear oscillator? Obtainthe energy function and show that it is the same as in equation (28).

Example 7

A ball bounces vertically up and down on a solid floor without loss ofenergy. If the height of the ball is x and its vertical velocity is y = x, whatis the energy of the motion? Use the fact that energy is a constant ofmotion to sketch phase trajectories.

(Hint : Note that the motion is confined to the region x > 0 and that thevelocity y = x reverses sign when the ball hits the floor.)

Solution

The force is F = −mg, so the potential energy is V (x) = mgx. The energyfunction is therefore

E = 12mx2 +mgx.

The largest value of x is where the velocity passes through zero, atx = E/mg. The velocity of the particle at height x is therefore

x = ±√2m(E −mgx).

Noting the fact that the velocity of the ball changes sign abruptly when itstrikes the floor at x = 0, the phase trajectories must have the form shownin Figure 17.

x

√2mE

−√2mE

Emg

x

Figure 17 Phase trajectoriesfor a bouncing ball

Exercise 11

A ball moves backwards and forwards horizontally without resistance inthe space between two walls, at x = 0 and x = L. When it hits a wall, itrebounds with its velocity reversed. The potential energy is zero in theregion between the two walls.

Draw a sketch of the phase trajectories of this system, for the case wherethe energy of the ball is E.

Finally, consider what happens when there is a resistive term in theequation of motion as well as a potential V (x), so that Newton’s secondlaw is

mx = −dV

dx− γx.

31

Unit 1 Introduction and differential equations

In this case the equations of motion in phase space are

x = y, y = − 1

m

dV

dx− γ

my.

In the case where there is a resistive term with γ &= 0 in the equations ofmotion, the energy E = mx2/2 + V (x) is not a constant. Its rate of changealong a phase trajectory is

E =∂E

∂xx+

∂E

∂yy =

dV

dxy − 1

m

dV

dxmy − γy2 = −γy2 ≤ 0.

We have E < 0 whenever y &= 0, so the phase trajectory is always movingacross contours of E(x, y) towards a lower value of E. Thus we have seenthat whatever the form of the potential V (x), the total energy E(x, y) isnot a constant of motion whenever γ > 0. Furthermore, because E alwaysdecreases, the trajectory is always approaching a minimum of E(x, y). Inthis case it is impossible to find a function K(x, y) that is a constant ofmotion.

These examples show that considering the phase space and the possibleexistence of constants of motion can give useful information even when theNewtonian equation of motion mx = F (x, x) cannot be solved exactly.

4.3 Classifying dynamical systems

Thus far we have discussed two simple examples of dynamical systems,namely the logistic equation for population growth, and the equation for alinear oscillator (with and without damping). These systems were firstsolved exactly, then we discussed methods for making approximatesolutions and for obtaining qualitative information about the motion. Inthe context of a qualitative investigation, we expect that systems withsimilar equations of motion will exhibit similar behaviour. For this reasonit is very useful to attempt a classification of dynamical systems.

You can classify dynamical systems according to the number of dependentvariables, the order of the differential equations that are involved, andwhether there are conserved quantities. At this stage you have seen threeexamples:

• The logistic equation has one dependent variable and is described by afirst-order differential equation.

• The linear oscillator may be described either by a second-orderequation with one dependent variable, or by two first-order equations.If there is no damping, then there is a constant of motion, which is thetotal energy of the particle, and the phase trajectories follow contoursof the energy function.

• If the linear oscillator has a resistive term, then the phase trajectoriesapproach minima of the energy function.

32

5 Solution of differential equations

When you are presented with an unfamiliar system of equations of motion,it is unlikely that you will find an exact solution. It is usually moreproductive to ask what features the equations share with other systemsthat you have examined on past occasions: similar equations may havesimilar solutions.

One aspect of classification that will prove to be particularly important iswhether we are dealing with a mechanical system in which energy isconserved. These systems are called conservative. They have specialproperties, and there are methods that are applicable only to these cases.In particular, the methods of Lagrangian dynamics, developed in Units 5and 6 in Book 2, are very powerful, but they are applicable only toconservative systems.

5 Solution of differential equations

The ability to solve differential equations is central to understandingdynamical systems. Although there is a vast amount of informationavailable about the solution of differential equations, the set of differentialequations that occur in typical applied mathematics problems and can besolved exactly is quite limited. You need to be able to recognise whichequations can be solved exactly, and to be able to find their solutions.

This section is a summary of the important solvable differential equationsand the methods by which they are solved. The two most important caseshave been covered extensively in earlier modules: these are first-orderequations that are solvable by separation of variables, andconstant-coefficient linear differential equations. These two types ofequation occur so frequently in applied mathematics that you can achievequite a lot just by knowing how to solve them.

There are two other types of differential equations that you should be ableto recognise. We present a summary of the method for solving linearfirst-order equations by the integrating factor method. We also mentionthe significance of linear second-order differential equations that are solvedin terms of special functions.

Many differential equations do not have exact solutions that can bewritten down in terms of standard mathematical functions. In these cases,there are two other approaches that can be applied. It is always possible touse a computer to find a numerical solution of a differential equation, andthere are many different methods to provide approximate formulas forsolutions of differential equations. Both of these approaches are beyond thescope of this module. The following subsections discuss the basicknowledge of exact methods for differential equations that a practisingapplied mathematician uses regularly.

33

Unit 1 Introduction and differential equations

5.1 First-order differential equations: solution byseparation of variables

A general first-order differential equation can be written in the form

dy

dx= f(x, y), (30)

where f is a given function depending on two variables. The objective is todetermine the unknown function y(x). The general solution contains oneconstant of integration, which is fixed by using some additionalinformation about the solution, such as an initial condition y(0).

You cannot solve equation (30) for every possible choice of the functionf(x, y). However, there is one solvable case that is very important. This iswhere f is a product of two functions of one variable, that is,f(x, y) = g(x)h(y), so that the differential equation can be written in theform

dy

dx= g(x)h(y).

In this case the equation can be solved by the method of separation ofvariables. In practice, the method of separation of variables is oftenapplicable to first-order differential equations that arise from real-worldapplications.

Procedure 3 Solving a first-order differential equation byseparation of variables

To solve the differential equation

dy

dx= g(x)h(y), where h(y) &= 0, (31)

do the following.

1. Divide both sides of the equation by h(y), and integrate withrespect to x, to obtain∫

1

h(y)dy =

∫g(x) dx. (32)

2. If possible, perform the two integrations, obtaining an implicitform of the general solution, which should include one arbitraryconstant.

3. If possible, rearrange the formula found in Step 2 to give y interms of x; this is the explicit general solution of the differentialequation.

A special case is where f(x, y) is a function of just one of the variables, sothat

dy

dx= g(x) or

dy

dx= h(y).

34

5 Solution of differential equations

The approach still works, and it is even easier to apply.

Exercise 12

Using separation of variables, find the general solution of each of thefollowing differential equations.

(a) u′ = −xu

(b) x = a+ bx2 (where a and b are positive constants)

5.2 Second-order linear constant-coefficientdifferential equations: homogeneous case

Besides the case of first-order equations that can be solved by separation ofvariables, there is another class of differential equations that occur veryfrequently and can be solved exactly. The general form is

ad2y

dx2+ b

dy

dx+ cy = f(x), (33)

where the coefficients a, b and c are real constants, and f(x) is a specifiedfunction. Provided that a &= 0, equation (33) is a second-order differentialequation, and we expect that the general solution should have twoarbitrary constants. This equation is said to be inhomogeneous if f(x) isnot equal to zero for all x. For every inhomogeneous equation, there is acorresponding homogeneous equation. The homogeneous equationcorresponding to equation (33) is

ad2y

dx2+ b

dy

dx+ cy = 0. (34)

We start by considering how to solve the homogeneous equation (34) as astep towards finding a solution of the inhomogeneous equation (33).

You have already seen examples of solving this type of equation inSection 2, where we showed examples of how to guess a solution. Theseequations occur so frequently that it is necessary to learn a systematicmethod for their solution, as described below.

General solution of the homogeneous equation

The general solution of the homogeneous linear constant-coefficientsecond-order differential equation (34) is obtained as follows.

On substituting a trial solution y(x) = exp(λx) into equation (34), we findthat λ satisfies the following quadratic equation, which is known as theauxiliary equation:

aλ2 + bλ+ c = 0. (35)

We solve this equation to determine λ. Because this is a quadraticequation, there are two solutions, which will be either both real or bothcomplex.

35

Unit 1 Introduction and differential equations

If the auxiliary equation has two distinct roots λ1 and λ2, then the generalsolution of the differential equation is

y(x) = Ceλ1x +Deλ2x, (36)

where C and D are arbitrary constants. This is valid provided that λ1 andλ2 are distinct (i.e. λ1 &= λ2). However, complications arise because theroots of a quadratic equation may be complex numbers, or they may notbe distinct. Three different cases should be considered.

• If λ1 and λ2 are two distinct real numbers, then equation (36) givesthe required general solution.

• If the auxiliary equation has complex roots, then they will be complexconjugates of each other: λ1 = α+ iβ and λ2 = α− iβ, where α and βare real numbers. Then the general solution is

y(x) = C exp[(α+ iβ)x] +D exp[(α− iβ)x],

or equivalently,

y(x) = exp(αx) [C exp(iβx) +D exp(−iβx)]. (37)

Usually, dynamics describes phenomena in the real world, and we seeksolutions in terms of real (as opposed to complex) numbers. In thecase where D is the complex conjugate of C, this solution isreal-valued. Using the Euler formula exp(ix) = cos(x) + i sin(x) andwriting C = (A− iB)/2, D = (A+ iB)/2, where A and B are realconstants, the real-valued solution can always be expressed in the form

y(x) = exp(αx) [A cos(βx) +B sin(βx)]. (38)

In many cases it is easier to manipulate complex exponential functionsthan sines and cosines. Both forms of the solution, equations (37)and (38), will be used throughout this module.

• If the auxiliary equation has equal real roots λ1 = λ2 (i.e. aλ2 + bλ+ cis a perfect square), then the general solution of the differentialequation is

y(x) = (C +Dx)eλ1x. (39)

A general approach to special cases

In the case where there are equal roots you can check that (39) is asolution, but it is not obvious how to deduce this solution. Here wesuggest a method that can be adapted to deal with other similarproblems. In order to understand the case where the roots are exactlyequal, let us consider the case where they are nearly equal and bothreal, so that λ2 = λ1 + ε, where ε is very small. The generalsolution (36) is then

y(x) = [C +D exp(εx)] exp(λ1x).

36

5 Solution of differential equations

In the limit as ε → 0, the Taylor series for ex gives exp(εx) # 1 + εx,so

y(x) = [(C +D) +Dεx] exp(λ1x),

which is of the same form as (39).

There is a general lesson to be learned here. If you are faced with a‘special case’ where a general solution breaks down, consider whathappens to the general solution that approaches the special casecondition.

The following procedure summarises the discussion above.

Procedure 4 Solving a linear second-orderconstant-coefficient homogeneous differential equation

To solve

ad2y

dx2+ b

dy

dx+ cy = 0, (40)

first solve the auxiliary equation

aλ2 + bλ+ c = 0 (41)

to determine λ. Because this is a quadratic equation, there are twosolutions.

• If the auxiliary equation has two distinct roots λ1 and λ2, thenthe general solution of the differential equation is

y(x) = Ceλ1x +Deλ2x, (42)

where C and D are arbitrary constants.

• If the auxiliary equation has complex roots, then they will becomplex conjugates of each other: λ1 = α+ iβ and λ2 = α− iβ,where α and β are real numbers. The general solution is

y(x) = exp(αx) [A cos(βx) +B sin(βx)], (43)

where A and B are real constants.

• If the auxiliary equation has equal real roots λ1 = λ2, then thegeneral solution is

y(x) = (C +Dx)eλ1x. (44)

Exercise 13

Use the auxiliary equation to find the general solution of each of thefollowing differential equations.

(a) 3d2y

dx2+ 5

dy

dx− 2y = 0 (b) 2

d2y

dx2+

dy

dx= 0

37

Unit 1 Introduction and differential equations

Exercise 14

Use the auxiliary equation to find the general solution of each of thefollowing differential equations.

(a)d2y

dx2+

dy

dx+ 2y = 0

(b) s− 2As+ A2s = 0, where A is a real constant

5.3 Second-order linear constant-coefficientdifferential equations: inhomogeneous case

Next consider how to obtain a solution of the inhomogeneous differentialequation

ad2y

dx2+ b

dy

dx+ cy = f(x), (45)

where the coefficients a, b and c are constants, and f(x) is a specifiedfunction. This depends on the form of the function f(x). Here we discusshow to find solutions for simple choices of f(x).

Equation (45) is an example of a linear differential equation becausethe terms that contain the dependent variable y are proportional to y or toits derivatives. Linear equations are easier to solve because we can makeuse of the principle of superposition.

Principle of superposition

If y1(x) is a solution of the inhomogeneous equationay′′ + by′ + cy = f1(x), and y2(x) is a solution ofay′′ + by′ + cy = f2(x), then for any constants k1 and k2,

y(x) = k1 y1(x) + k2 y2(x) (46)

is also a solution of the inhomogeneous equation

ad2y

dx2+ b

dy

dx+ cy = k1 f1(x) + k2 f2(x). (47)

It is worth pausing briefly to describe the principle of superposition in thecontext of a dynamical problem. Usually, the dependent variable is acoordinate for motion of an object, and the independent variable is time,so that we consider a differential equation for the displacement x(t). Thefunction on the right-hand side of the homogeneous equation is anexternally applied force F (t) that depends on time. In the context of adynamical problem, we might expect equation (45) to appear in the form

md2x

dt2+ γ

dx

dt+ kx = F (t), (48)

38

5 Solution of differential equations

where m is the mass, γ is the resistance coefficient, and k is the springconstant. In this context, the principle of superposition states that if twodifferent forces F1(t) and F2(t) are applied to the system, whichindividually cause displacements x1(t) and x2(t), respectively, then thedisplacement resulting from applying both forces simultaneously is the sumx1(t) + x2(t).

The power of the principle of superposition is that we can find generalsolutions by taking a linear combination of simple solutions. Linearequations play a very important role in describing the natural world, andthe principle of superposition is perhaps the most powerful tool inunderstanding their solutions.

Now consider how to construct solutions of equation (45). As usual, weproceed by constructing solutions by guesswork. This is possible for simplechoices of the function f(x). More complicated cases are treated by usingthe principle of superposition.

Method of undetermined coefficients

For certain inhomogeneous equations, particular solutions can be found bythe method of undetermined coefficients. The method involves usinga trial solution y(x) of a form similar to that of f(x), but withcoefficients that initially are undetermined. The coefficients are determinedby substituting the trial solution into the differential equation andchoosing the coefficients so that the equation is satisfied.

In this module we require only a few simple cases for the function f(x).Suitable trial solutions y(x) for specified right-hand-side (or target)functions f(x) are shown in Table 1.

Table 1

Target function f(x) Trial solution y(x)

a pa0 + a1x p0 + p1xaekx pekx

aeikx peikx

a cos(kx) + b sin(kx) p cos(kx) + q sin(kx)

Here the coefficients a, b, a0, a1 in the left-hand column, and the number k,are given constants that occur in the definition of the differential equation.The coefficients p, q, p0, p1 in the right-hand column are constants to bedetermined, by demanding that the trial solution does satisfy thedifferential equation. We do this by differentiating the expression for y(x)twice, substituting into the left-hand side of the differential equation, andequating coefficients of corresponding terms on the left- and right-handsides.

Note that even if some of the given coefficients in f(x) are zero – forexample, f(x) = 3x or f(x) = 2 cosx – it is still necessary in general to usethe full expression from the right-hand column of the table.

39

Unit 1 Introduction and differential equations

In many cases we have to solve inhomogeneous equations where thefunction on the right-hand side is an oscillating function that is a sine, or acosine, or some combination of these. This arises in mechanical problemssuch as equation (48) when a system is subjected to a periodic forcing.(Note that F (t) in equation (48) plays the role of f(x) in equation (45).)There are two ways to deal with these cases: we can write f(x) in either ofthe forms

f(x) = a cos(kx) + b sin(kx), f(x) = c1eikx + c2e

−ikx.

These are equivalent, if the constants are related by c1 = (a− ib)/2 andc2 = (a+ ib)/2. The second form may appear to be less convenientbecause it uses complex numbers, but it does have an advantage, becausewhen f(x) = aeikx, the trial solution requires just one term, peikx, insteadof having to keep track of different coefficients for sines and cosines. Theapproach involving complex numbers becomes more efficient when youconsider more advanced problems. Both approaches will be used in thismodule.

Now the various elements can be combined to give the general solution.

Procedure 5 Finding the general solution of a second-orderinhomogeneous linear constant-coefficient equation

The general solution of the inhomogeneous equation

ad2y

dx2+ b

dy

dx+ cy = f(x) (49)

is given by

y = yc + yp, (50)

where:

• yc, the complementary function, is the general solution of theassociated homogeneous equation

ad2y

dx2+ b

dy

dx+ cy = 0 (51)

• yp, a particular integral, is any particular solution of theoriginal inhomogeneous equation.

This leads to the following procedure for finding the general solutionof an inhomogeneous equation.

1. Find the complementary function, by solving the auxiliaryequation of the associated homogeneous equation.

2. Find a particular integral, using the method of undeterminedcoefficients.

3. Add the particular integral to the complementary function.

40

5 Solution of differential equations

An initial-value problem for a second-order differential equation is aproblem in which one has to find the particular solution y = y(x) of a givenequation such that y and its derivative y′ take specified values y0 and z0,respectively, when the independent variable x takes the value x0. Thenumbers x0, y0 and z0 are called initial values. The relationships betweeninitial values are called initial conditions. These may be specified eitheras ‘y = y0 and y′ = z0 when x = x0’, or as ‘y(x0) = y0, y

′(x0) = z0’.

An initial-value problem has a unique solution, which can be obtained byfinding the general solution of the differential equation and substituting inthe initial values to determine the two arbitrary constants that it contains.

Exercise 15

Find general solutions of the following differential equations.

(a)d2y

dx2+ ω2y = A, where ω and A are constants

(b)d2y

dx2+ 3

dy

dx+ 2y = 5x

Exercise 16

Find the general solution of

d2y

dt2− dy

dt= cos 2t.

Exercise 17

The motion of a small ball-bearing released in viscous oil with initialvelocity equal to zero can be modelled by the differential equation

mx+ rx−mg = 0,

where m is the mass of the ball-bearing, r is a constant related to theviscosity of the oil, g is the magnitude of the acceleration due to gravity,and x is the vertical distance from the point of release.

(a) Write down a first-order differential equation for the velocity v = x,and determine its general solution.

(b) Find the solution v(t) that satisfies the initial condition. Use this todetermine the limiting value of the velocity as t → ∞.

(c) Determine the displacement x(t), assuming the initial conditionx(0) = 0.

41

Unit 1 Introduction and differential equations

5.4 First-order linear equations with non-constantcoefficients

There are a few other examples of differential equations that occurfrequently in applied mathematics and for which exact solutions can begiven. One important example is the general case of first-order lineardifferential equations.

A first-order differential equation is linear if it can be expressed in theform

dy

dx+ g(x) y = h(x). (52)

It is homogeneous if h(x) = 0 for all x, inhomogeneous otherwise.

Linear first-order differential equations can be solved by the integratingfactor method. An integrating factor for equation (52) is a functionp(x) with the property that after multiplication by p(x), the left-hand sideof the equation becomes an exact derivative:

p(x)

(dy

dx+ g(x) y

)=

d

dx

(p(x) y

).

Multiplication by an integrating factor therefore makes it possible to solvethe equation by direct integration.

The integrating factor for equation (52) is

p(x) = exp

(∫g(x) dx

).

In the constant-coefficient case dy/dx+Ay = h(x), where A is a constant,we have p(x) = exp(Ax).

The steps of the integrating factor method are as follows.

Procedure 6 Integrating factor method

To solve the equation

dy

dx+ g(x) y = h(x) (53)

by the integrating factor method, do the following.

1. Determine the integrating factor

p(x) = exp

(∫g(x) dx

). (54)

2. Rewrite the equation as

d

dx

(p(x) y

)= p(x)h(x). (55)

42

5 Solution of differential equations

3. Integrate to obtain

p(x) y =

∫p(x)h(x) dx+ C, (56)

where C is a constant of integration.

4. Divide through by p(x), to obtain the general solution in explicitform.

Exercise 18

Solve the equation

dx

dt+ γx = sinωt,

where ω and γ > 0 are constants, with the initial condition x(0) = 0.Check your solution by differentiation.

5.5 Special functions

Sometimes we encounter second-order differential equations where thecoefficients are not constant. These usually have no solutions in terms ofelementary functions. Some of these differential equations play animportant role in applied mathematics, and are given names. An exampleis Bessel’s equation

x2d2y

dx2+ x

dy

dx+ (x2 − n2)y = 0, (57)

in which n is an integer. This equation often appears when one attemptsto solve partial differential equations in domains that are discs orcylinders, and an example of just this type will be considered in Book 3.

The solution of Bessel’s equation cannot be expressed in terms ofelementary functions. This difficulty is resolved by defining Besselfunctions to be functions that satisfy Bessel’s equation. Because theequation is second-order, there are two independent solutions for each valueof n: these are denoted Jn(x) and Yn(x). Despite the fact that there is nosimple expression for the Bessel functions, a vast amount is known abouttheir properties. In particular, there are power series that allow evaluationof these functions. The first three Bessel functions are shown in Figure 18.

43

Unit 1 Introduction and differential equations

Figure 18 Bessel functions J0(x), J1(x) and J2(x)

The Bessel functions are an example of the special functions ofmathematics. If you encounter a second-order differential equation withnon-constant coefficients, be aware that you may not be the first person tohave written it down. Someone may already have named its solutions asspecial functions, and discovered useful results about their properties.

Exercise 19 Computing – optional

Most computer algebra software recognises many special functions. Referto the Computer Exploration Worksheet to find out how to specify Besselfunctions. Plot J0(x), J1(x) and J2(x) in the range [0, 20] (see Figure 18).

There is a vast range of named differential equations for which thesolutions are defined as named special functions. Besides Bessel’s equation,two other examples are Airy’s equation

d2y

dx2+ yx = 0, (58)

for which those solutions that are finite for all x are known as Airyfunctions, denoted Ai(x), and Legendre’s differential equation

d

dx

[(1− x2)

dy

dx

]+ l(l + 1)y = 0, (59)

where l is a non-negative integer, which has polynomial solutions denotedPl(x), known as Legendre polynomials. It takes years of experience tobecome familiar with the properties of special functions. In this moduleour aim is simply to make you aware that they exist.

44

6 Additional exercises

6 Additional exercises

The following additional exercises are intended to be good practice forquestions that could appear in the examination.

Exercise 20

Find the solution y(x) of each of the following differential equations thatsatisfies the given conditions.

(a)dy

dx= x2y3, y(1) = 1

(b)dy

dx+

1

xy =

cos(x)

x, y(π/2) = 1

(c)d4y

dx4= 1, y(0) = y(1) = 0, y′′(0) = y′′(1) = 0

Exercise 21

The velocity v of a particle at time t satisfies the differential equation

dv

dt= −av2 − bv,

where a ≥ 0, b ≥ 0 are constants. The initial condition is v(0) = v0, wherev0 is the velocity at time t = 0.

(a) What is the order of this equation? Is it linear or nonlinear?

(b) Find the general solution of the equation in the case where a = 0,b &= 0, and use this to find a solution satisfying the initial condition.

(c) Find the general solution of the equation in the case where b = 0,a &= 0, and use this to find a solution satisfying the initial condition.

(d) Write

1

av2 + bv=

A

v+

B

av + b,

and determine the coefficients A and B.

(e) Hence or otherwise find a general solution of the equation for v. Showthat your solution leads to the following equation for v(t) that satisfiesthe stated initial condition:

av0 + b

v0exp(bt) =

a v(t) + b

v(t).

(f) Rearrange this equation to find an expression for v(t).

45

Unit 1 Introduction and differential equations

Exercise 22

The position x(t) of a particle at time t is described by the inhomogeneousdifferential equation

d2x

dt2= −9x+ sin t− 10.

Initially, the particle is at rest at the origin.

(a) Find the general solution of the associated homogeneous differentialequation.

(b) Find a particular integral that satisfies the differential equation, andhence obtain the general solution.

(c) Find the solution of the differential equation that satisfies the initialconditions.

(d) What is the position of the particle at t = 3π/2?

Learning outcomes

After studying this unit, you should be able to:

• recognise that a problem might be addressed by the methods ofdynamical systems theory

• describe some simple mechanical or population dynamics problems bymeans of differential equations

• identity fixed points of a system with one dependent variable, anddetermine their stability

• describe the motion of simple mechanical systems using phasetrajectories and (where appropriate) constants of motion

• recognise when a first-order differential equation is separable, andapply the method of separation of variables

• solve second-order, linear, constant-coefficient differential equations

• recognise when a first-order differential equation is linear, and solvesuch an equation by the integrating factor method

• be aware that most differential equations do not have solutions interms of elementary functions, but that solutions may sometimes beexpressed in terms of special functions.

46

Solutions to exercises

Solutions to exercises

Solution to Exercise 1

The function exp(y) approaches infinity as y → +∞ and approaches zeroas y → −∞. As t → ∞, y = Rt approaches +∞ if R > 0, or −∞ if R < 0.Thus as t → ∞, x(t) → ∞ if R > 0 or x(t) → 0 if R < 0.

Solution to Exercise 2

The equation is solvable by separation of variables, yielding∫dx

x2= C

∫dt,

so the solution is

1

x(t)= −Ct+D,

where D is a constant of integration. (If you have forgotten this method,see the revision in Subsection 5.1.) In terms of the population at t = 0, wehave D = 1/x(0). Rearranging this solution gives

x(t) =x(0)

1− x(0)Ct.

The population for this model becomes infinite as t approaches 1/(C x(0)).

Solution to Exercise 4

Integrating once with respect to t gives x = −gt+ u, where the constant uis clearly the velocity at time t = 0. Integrating again gives

x = −12gt

2 + ut+ x0,

where x0 is the initial position.

To determine the time at which x(t) returns to its starting point, solve theequation x(t) = x0. The solutions are t = 0 and t = 2u/g, so the ballreturns to its starting point after a time equal to 2u/g.

Solution to Exercise 5

The first two derivatives of the trial solution are y′ = a exp(ax),y′′ = a2 exp(ax), so you can see that the fourth derivative isy′′′′ = a4 exp(ax) = a4y. Thus the trial solution satisfies the equation ifa4 = 16, that is, a2 = ±4. Thus the allowed values of a are 2, −2, 2i, −2i,corresponding to solutions exp(2x), exp(−2x), exp(2ix) and exp(−2ix),respectively. Using Euler’s relation, exp(ix) = cosx+ i sinx, the latter twosolutions can be replaced by sin(2x) and cos(2x). The linear combination

y(x) = C1 exp(2x) + C2 exp(−2x) + C3 sin(2x) + C4 cos(2x)

(where C1, . . . , C4 are arbitrary constants) is also a solution (and is in factthe general solution).

47

Unit 1 Introduction and differential equations

Solution to Exercise 6

The fixed points satisfy xe(1−Ax2e) = 0, so the solutions are xe = 0 and

xe = ±1/√A.

Solution to Exercise 7

Here F (x) = x−Ax3, so the fixed points are 0 and ±1/√A. We have

F ′(x) = 1− 3Ax2, hence F ′(0) = 1, so xe = 0 is unstable, and

F ′(±1/√A) = −2, so the other two fixed points are stable.

Solution to Exercise 8

Here F (x) = A sin(x) satisfies F (x) = 0 when x = nπ, for any integer n.So the equation has an infinite number of fixed points xn = nπ, where n isany integer (including zero and negative integers).

The derivative is F ′(x) = A cos(x), so at xn = nπ,F ′(xn) = A cos(nπ) = (−1)n. Thus the equilibrium points nπ are unstablewhen n is even and stable when n is odd.

Solution to Exercise 9

One of the equations is x = y. The acceleration is y = F/m, where theforce is F = −kx− γx = −kx− γy, so the equations are

x = y,

y = − k

mx− γ

my.

Solution to Exercise 10

Integration of F = −kx gives

V (x) = −∫

F dx = k

∫xdx =

kx2

2+ constant.

The constant is irrelevant because it does not affect the form of thecontours of the energy function, which can therefore be written as

E =mx2

2+

kx2

2,

which is equivalent to equation (28). The phase trajectories are illustratedin the figure.

x

x

−√2mE

√2mE

−√

2E/k√

2E/k

Solution to Exercise 11

The velocity changes sign at each contact with a wall, but because thepotential energy V (x) is constant in the region 0 < x < L, the velocityremains constant in that region. If the energy of the ball is E, then wehave E = mx2/2, since the potential energy is zero. The velocity is

therefore x = ±√2mE. The phase trajectories are therefore rectangles, as

shown in the figure.

x

x

√2mE

−√2mE

0 L

48

Solutions to exercises

Solution to Exercise 12

(a) The differential equation is u′ = du/dx = −xu. For the cases whereu &= 0, we divide through by u and integrate with respect to x. Thisgives∫

1

udu = −

∫xdx.

Integration produces

ln |u| = −12x

2 +A,

where A is an arbitrary constant. On solving this equation for u, weobtain

u = ±e−x2/2+A = ±eAe−x2/2 = Be−x2/2,

where B = ±eA is a non-zero but otherwise arbitrary constant.However, the case B = 0 can be added, since it can be seen byinspection of the differential equation that the zero function u = 0 is asolution. Hence the general solution is

u = Be−x2/2,

where B is an arbitrary constant.

(b) The differential equation is x = dx/dt = a+ bx2. We divide throughby a+ bx2 and integrate with respect to t. This gives∫

1

a+ bx2dx =

∫1 dt.

Now take out a factor 1/a, and make a change of variable from x to

u =√b/ax:

1

a

∫1

1 + bx2/adx =

1√ab

∫1

1 + u2du =

∫dt.

Integration produces

1√ab

arctanu = t+ C,

where C is an arbitrary constant. On solving for u, we have

u = tan[√ab(t+ C)].

A suitable domain for the solution is −π2 <

√ab(t+ C) < π

2 , since the

image set of arctan is the interval(−π

2 ,π2

).

Thus the general solution is

x =

√a

btan[

√ab(t+ C)]

(−π

2 <√ab(t+ C) < π

2

),

where C is an arbitrary constant.

49

Unit 1 Introduction and differential equations

Solution to Exercise 13

(a) The auxiliary equation is 3λ2 + 5λ− 2 = 0. This can be factorised as(λ+ 2)(3λ− 1) = 0, giving the roots λ1 = −2 and λ2 = 1/3. Thegeneral solution is therefore

y = Ce−2x +Dex/3,

where C and D are arbitrary constants.

(b) The auxiliary equation is 2λ2 + λ = 0. This can be factorised asλ(2λ+ 1) = 0, giving the roots λ1 = 0 and λ2 = −1

2 . The generalsolution is therefore

y = Ce0 +De−x/2 = C +De−x/2,

where C and D are arbitrary constants.

Solution to Exercise 14

(a) The auxiliary equation is λ2 + λ+ 2 = 0, which has rootsλ± = −(1±√

1− 4× 2)/2, that is,

λ+ = −1

2+

√7

2i, λ− = −1

2−

√7

2i.

The general solution is therefore

y = e−x/2[C sin(√7x/2) +D cos(

√7x/2)],

where C and D are arbitrary constants.

(b) The auxiliary equation factorises as (λ−A)2 = 0, which has equalroots λ1 = λ2 = A. The general solution is therefore

s = (C +Dt)eAt,

where C and D are arbitrary constants.

Solution to Exercise 15

(a) The associated homogeneous equation is

d2y

dx2+ ω2y = 0.

The complementary function is yc = C cosωx+D sinωx, where C andD are arbitrary constants.

Trying a solution of the form yp = p, where p is a constant, in theoriginal equation d2y/dx2 + ω2y = A gives 0 + ω2p = A, so p = A/ω2.Thus a particular integral is yp = A/ω2.

Combining the complementary function and the particular integral,the general solution is

y = C cosωx+D sinωx+A

ω2.

50

Solutions to exercises

(b) The associated homogeneous equation is λ2 + 3λ+ 2 = 0, that is,(λ+ 2)(λ+ 1) = 0, so the complementary function isy = C exp(−2x) +D exp(−x), where C and D are arbitrary constants.

Substituting y = p1x+ p0 and its derivatives into the differentialequation gives

0 + 3p1 + 2(p1x+ p0) = 2p1x+ (2p0 + 3p1) = 5x.

Equating the coefficients of x gives p1 = 52 , and equating the constant

terms gives p0 = −154 . Thus a particular integral is yp = 5

2x− 154 .

The general solution is therefore

y = C exp(−2x) +D exp(−x) + 52x− 15

4 .

Solution to Exercise 16

The associated homogeneous equation is λ2 − λ = 0, so the complementaryfunction is y = C +D exp(x), where C and D are arbitrary constants.

The easiest way to find a particular integral is to writecos 2t = [exp(2it) + exp(−2it)]/2, obtain particular integrals fory − y = exp(2it)/2 and y − y = exp(−2it)/2, and then use the principle ofsuperposition.

We seek a solution of y − y = exp(2it)/2 in the form y = p exp(2it), andobtain −(4 + 2i)p = 1/2, hence p = −1/4(2 + i). The particular integralfor the other equation is obtained by replacing i with −i. Adding thesesolutions to obtain the particular integral for y − y = cos(2t) gives

yp = −14

[exp(2it)

2 + i+

exp(−2it)

2− i

]= − 1

20 [(2− i) exp(2it) + (2 + i) exp(−2it)]

= − 110 [2 cos(2t) + sin(2t)],

so the general solution is

y = C +D exp(x)− 110 [2 cos(2t) + sin(2t)].

Solution to Exercise 17

(a) The equation of motion can be viewed as a first-order differentialequation for the velocity v = x:

mv + rv = mg.

The associated homogeneous equation is mv + rv = 0, which can besolved by separation of variables or by assuming that v = exp(λt) andfinding that the associated homogeneous equation is mλ+ r = 0. Theauxiliary equation is λ = −r/m, so the complementary function is

vc = Ce−rt/m,

where C is an arbitrary constant.

51

Unit 1 Introduction and differential equations

The inhomogeneous term is the constant function mg, so the methodof undetermined coefficients suggests a trial solution v = p0. Hence weobtain a particular integral v = mg/r, so the general solution for v(t)is

v(t) = Ce−rt/m +mg

r.

(b) Inserting the initial condition v(0) = 0 into the general solution givesC = −mg/r, so the velocity is

v(t) =mg

r

[1− exp

(−rt

m

)].

This approaches mg/r as t → ∞.

(c) Integrating v(t) with respect to t, the displacement is

x(t) =mg

r

[t+

m

rexp(−rt/m)

]+B,

where B is a constant of integration. Using the initial conditionx(0) = 0 gives B = −m2g/r2, hence

x(t) =mg

rt+

m2g

r2

[exp

(−rt

m

)− 1

].

Solution to Exercise 18

This equation can be solved using the integrating factor method. Hereg(t) = γ, so the integrating factor is exp(γt), and the equation can bewritten as

d

dx

(xeγt

)= eγt sin(ωt),

so

exp(γt)x(t) =

∫exp(γt) sin(ωt) dt+ C,

where C is a constant.

The integral can be done in a variety of different ways. Here we illustratean approach that uses the relation sinx = (eix − e−ix)/2i to express thesine function in terms of exponentials, which are easily integrated (thisapproach is often the most efficient for more complicated problems):

x(t) = C exp(−γt) + exp(−γt)

∫sin(ωt) exp(γt) dt

= C exp(−γt) +−i

2exp(−γt)

∫ (exp[(γ+ iω)t]− exp[(γ− iω)t]

)dt

= C exp(−γt) +−i

2

[exp(iωt)

γ+ iω− exp(−iωt)

γ− iω

]= C exp(−γt) +

−i

2(γ2 + ω2)

[(γ− iω) exp(iωt)− (γ+ iω) exp(−iωt)

]= C exp(−γt) +

γ sin(ωt)− ω cos(ωt)

γ2 + ω2.

52

Solutions to exercises

The initial condition x(0) = 0 gives C = ω/(ω2 + γ2), so

x(t) =ω[exp(−γt)− cos(ωt)] + γ sin(ωt)

ω2 + γ2.

Differentiating x(t), we find

dx

dt=

ωγ[cos(ωt)− exp(−γt)] + ω2 sin(ωt)

ω2 + γ2,

and substituting into the original differential equation verifies that x(t) isindeed a solution.

Solution to Exercise 20

(a) This equation can be written in the form

1

y3dy

dx= x2,

thus is separable.

Integrating both sides, we obtain

−1

2y2= 1

3x3 + C,

where C is an arbitrary constant. Using the initial condition y(1) = 1,we obtain C = −5/6, so the required solution satisfies

1

y2= 5

3 − 23x

3.

Rearranging, and taking the appropriate sign of the square root,

y =

√3

5− 2x3.

(b) This equation is linear and could be solved by applying the integratingfactor method (which shows that x is the integrating factor), but byinspection it can be written as

d

dx(yx) = cosx.

This may be integrated to give

yx = sinx+ C,

where C is a constant. Applying the initial condition y(π/2) = 1, wefind C = π/2− 1. The required solution is therefore given by

yx = sinx+π

2− 1.

In explicit form,

y(x) =2 sinx+ π− 2

2x.

53

Unit 1 Introduction and differential equations

(c) This equation is solved by integrating directly four times insuccession, giving y′′′ = x+A, y′′ = x2/2 + Ax+B,y′ = x3/6 +Ax2/2 +Bx+ C and finally

y(x) = 124x

4 + 16Ax

3 + 12Bx2 + Cx+D,

where A, B, C and D are constants.

Applying the conditions y(0) = 0 and y′′(0) = 0 gives directly D = 0and then B = 0. The conditions y(1) = 0 and y′′(1) then give1/24 +A/6 + C = 0 and A+ 1/2 = 0, respectively, so A = −1/2 andC = −A/6− 1/24, that is, C = 1/24.

The required solution is thus

y(x) =x4 − 2x3 + x

24.

Solution to Exercise 21

(a) The equation is first-order and nonlinear.

(b) When a = 0, the differential equation is dv/dt = −bv. This hasgeneral solution v(t) = C exp(−bt), for some constant C.

The solution satisfying the initial condition is v(t) = v0 exp(−bt).

(c) When b = 0, the differential equation is dv/dt = −av2. This hasgeneral solution 1/v + C = at, for some constant C.

Inserting the initial condition, we have 1/v0 + C = 0, so C = −1/v0.So the solution satisfying the initial condition is

v(t) =v0

v0at+ 1.

(d) From the given expression we obtain

1

av2 + bv≡ A

v+

B

av + b=

(Aa+B)v + bA

(av + b)v,

so Aa+B = 0, bA = 1, implying A = 1/b, B = −a/b.

(e) The differential equation is separable. Using the result of part (d), itmay therefore be integrated in the form∫

dt =

∫ −dv

av2 + bv= −

∫dv

bv+

∫a dv

b(av + b),

which gives

C + bt = − ln(v) + ln(av + b),

or, on exponentiating,

D exp(bt) =av + b

v,

where C and D = exp(C) are constants. Setting t = 0, we must havev = v0, so v(t) satisfies

av0 + b

v0exp(bt) =

a v(t) + b

v(t),

as required.

54

Solutions to exercises

(f) Rearranging this equation gives

v(t) (av0 + b) exp(bt) = v0(a v(t) + b),

so

v(t) [av0(exp(bt)− 1) + b exp(bt)] = v0b.

This gives

v(t) =v0b exp(−bt)

av0[1− exp(−bt)] + b.

Solution to Exercise 22

(a) The associated homogeneous equation is

d2x

dt2+ 9x = 0.

This has auxiliary equation m2 + 9 = 0, so m = ±3i.

The solution of the homogeneous equation (the complementaryfunction) is therefore

xc = A cos 3t+B sin 3t,

for some constants A and B.

(b) The inhomogeneous part suggests that we try a particular integral ofthe form xp = C +D sin t+E cos t, for some constants C, D and E.

To determine the constants, evaluate

d2xp

dt2+ 9xp = 9C + 8D sin t+ 8E cos t.

By equating coefficients, we see that the differential equation issatisfied if C = −10/9, D = 1/8 and E = 0. Thus xp = sin t/8− 10/9.

The general solution is the sum of the complementary function andthe particular integral:

x = xc + xp = A cos 3t+B sin 3t− 109 + 1

8 sin t.

(c) Applying the initial conditions gives

x(0) = A− 109 = 0, x′(0) = 3B + 1

8 = 0,

thus A = 10/9 and B = −1/24.

The solution is

x(t) = 109 cos 3t− 1

24 sin 3t− 109 + 1

8 sin t.

(d) At t = 3π/2 we have

x(3π/2) = −109 − 1

24 − 18 =

−80− 3− 9

72= −92

72= −23

18.

55

Unit 1 Introduction and differential equations

Acknowledgements

Grateful acknowledgement is made to the following sources:

Figure 1(a): Peter Isotalo. This file is licensed under the CreativeCommons Attribution Licencehttp://creativecommons.org/licenses/by/3.0.

Figure 1(b): Sunil Gupta. This file is made available under the GNU FreeDocumentation Licence 1.2 www.gnu.org/licenses/old-licenses/fdl-1.2.html.

Figure 2, left-hand photo: Keith Williams. This file is licensed under theCreative Commons Attribution Licencehttp://creativecommons.org/licenses/by/3.0.

Figure 2, right-hand photo: D. Gordon, E. Robertson. This file is licensedunder the Creative Commons Attribution-Share Alike Licencehttp://creativecommons.org/licenses/by-sa/3.0.

Figure 10: Image by Pseudotsuga menziesii / Wikipedia.

Every effort has been made to contact copyright holders. If any have beeninadvertently overlooked, the publishers will be pleased to make thenecessary arrangements at the first opportunity.

56


Recommended