Professional Documents
Culture Documents
Engineering Programmes
Faculty of Engineering and Physical Sciences
ENG1085: Mathematics 2
This symbol will refer you to the relevant sections of recommended text books
This symbol will refer you to the relevant HELM workbooks (available in the
Drop in Centre (Library level 1)
This symbol will let you know what questions from the tutorial sheets you can
tackle
1
ENG1085: Mathematics 2 Dr. Madeleine Bussemaker
Many equations we as engineers are interested in depend on both space and time. Often
the rate of change of a property will be important. This takes us out of the realm of algebraic
equations, and leads us to so-called DIFFERENTIAL EQUATIONS.
3.1 Motivation
James, Modern Engineering Mathematics, Ch 10.1, 10.2
Consider an aircraft of mass m, accelerating along a runway for take-off. Let’s think about
the forces acting:
Vertical Forces:
Gravity = g
Weight = mg
G = normal reaction (Newton 3)
L = aerodynamic lift
Horizontal Forces:
T = thrust
D = drag
R = rolling resistance (e.g. friction)
Consideration of vertical and horizontal displacement (s), velocity (v) and acceleration (a)
gives:
𝑑2𝑠 𝑑𝑠 2
𝑚 2 − (𝜇𝛼 − 𝛽) ( ) = 𝑇 − 𝜇𝑚𝑔
𝑑𝑡 𝑑𝑡
We can also have ‘Partial Differential Equations’ (PDEs) – these involve partial
derivatives of a function of more than one variable.
𝜕 2𝑢 2
𝜕 2𝑢
= 𝑐
𝜕𝑡 2 𝜕𝑥 2
This is the wave equation for the displacement (u(x, t)) of a vibrating string (or a bridge
cable).
Chemical engineers might see
𝜕𝑢 2
𝜕 2𝑢
=𝑐
𝜕𝑡 𝜕𝑥 2
This describes transient heat/mass transfer.
Before we look at PDEs (and that fun still awaits us!), we must first concentrate on
ODEs.
In our differential equations (both ordinary and partial) we have two kinds of variables:
d 3x dx
e.g.
3
3 4tx 10t 2
dt dt
So x = x(t) is the unknown function describing how the dependent variable (x) depends
on the independent (t).
Order
We classify differential equations not only as ODEs and PDEs, but also by ‘ORDER’.
By ‘order’ of an ODE, we mean the degree of the highest derivative that is in the equation.
Examples:
2
dx dx d3y
tx 10t 7 y 3 5x 2
dt dt dx 3
2
NB: dx is NOT the same as d x . The former is the first derivative squared and the latter
2
dt dt 2
is the second derivative.
Different orders have different solution methods!
Linearity
A linear ODE is one where the DEPENDENT VARIABLE and ALL its
𝑑𝑥 𝑑𝑥 2
DERIVATIVES do not occur as products (𝑥 𝑑𝑦), raised to powers (𝑑𝑦) or any non-linear
dx d 2 x dnx
f x, , 2 ,..., n g t
dt dt dt
This is a standard, and very useful way to present ODEs.
For a LINEAR EQUATION, when written in this standard form, if the right hand side (g(t))
is zero, the equation is HOMOGENEOUS.
If the RHS is non-zero, it is NON-HOMOGENEOUS.
Examples
dx d2y dy
4 7tx 5t 2 7 2 3 5y 0
dt dx dx
There is a big question here! These are solutions ... are they the only ones? For
example, x(t) = cos(2t) is also a solution to the second equation (try it!).
But there’s more!
𝑥(𝑡) = 𝐴𝑐𝑜𝑠(2𝑡) + 𝐵𝑠𝑖𝑛(2𝑡) 𝐴, 𝐵 𝑎𝑟𝑒 𝑐𝑜𝑛𝑠𝑡𝑎𝑛𝑡𝑠
This is also a solution! Try it again if you don’t believe me. This is true generally – the most
general function that satisfies the ODE will have one or more arbitrary constants (A and B).
Such a function is called the ‘GENERAL SOLUTION’.
If/when the arbitrary constants take specific values then we have a ‘PARTICULAR
SOLUTION’.
Let’s ask an obvious question – how do we define the constants? They are usually
determined or defined by applying other conditions (perhaps related to the physics). These
conditions usually prescribe the value of the solution (or its derivatives) at certain fixed
values of the independent variable – these are known as boundary conditions. If they are
specified for a single value of the independent variable, we call them initial conditions.
Example
𝑑2𝑥
= 2𝑡 − 4𝑒 4𝑡
𝑑𝑡 2
Gives the general solution:
𝑡 3 𝑒 4𝑡
𝑥(𝑡) = − + 𝐴𝑡 + 𝐵
3 4
If we say that:
𝑑𝑥
( 𝑑𝑡 ) =0 and 𝑥(0) = 0
𝑡=0
𝑡 3 𝑒 4𝑡 1
𝑥(𝑡) = − +𝑡+
3 4 4
This is
a) A particular solution to the ODE alone
b) THE solution to the initial value problem.
Instead of integrating each side with respect to t, cross multiply and integrate.
𝑑𝑥
Apply the initial condition ( 𝑑𝑡 ) = 0 as the lower limit, then the upper limit is just my
𝑡=0
𝑑𝑥
unknowns ( 𝑑𝑡 , 𝑡) i.e. the things we want to find.
𝑑𝑥
( ) =𝑡
𝑑𝑡 𝑡=𝑡 𝑡
𝑑𝑥
∫ 𝑑 ( ) = ∫ 2𝑡 − 4𝑒 4𝑡 𝑑𝑡
𝑑𝑡
𝑑𝑥 𝑡=0
( ) =0
𝑑𝑡 𝑡=0
Gives
𝑑𝑥
= 𝑡 2 − 𝑒 4𝑡 + 1
𝑑𝑡
Do the same again (i.e. cross multiply) and apply the initial condition at t = 0, gives:
𝑡 3 𝑒 4𝑡 1
𝑥(𝑡) = − +𝑡+
3 4 4
This is a slightly more intuitive way of handling our initial or boundary conditions. This is
not really what we’re doing mathematically (and would make our friends the mathematicians
very upset!) – but it works!
Our example was 2nd order and had two arbitrary constants in the general solution – we
therefore needed two conditions (either boundary or initial) to find our particular solution. In
fact, this generalises – an nth order ODE needs n initial or boundary conditions for complete
specification of the problem.
Health Warning:
There is NOT a single method that can be applied and used as a sledgehammer to crack
all our problems (as much as I’m sure you all wish there was!) – you need to be able to
recognise what to use when – you will be able to do this from lots of PRACTICE!!!
As with direct integration above, we will look at two ways of arriving at our solution – the
mathematically rigorous way, and then the way I’d do it!
To do it rigorously, let us begin by integrating both sides with respect to t.
𝑑𝑥
∫ 𝑔(𝑥) 𝑑𝑡 = ∫ ℎ(𝑡) 𝑑𝑡 (∗)
𝑑𝑡
Let
𝐺(𝑥) = ∫ 𝑔(𝑥) 𝑑𝑥
Then
𝑑𝐺
= 𝑔(𝑥)
𝑑𝑥
AND
𝑑𝐺 𝑑𝐺 𝑑𝑥
=
𝑑𝑡 𝑑𝑥 𝑑𝑡
Hence
𝑑𝐺 𝑑𝑥
= 𝑔(𝑥)
𝑑𝑡 𝑑𝑡
Integrate both sides with respect to ‘t’
𝑑𝑥
𝐺(𝑥) = ∫ 𝑔(𝑥) 𝑑𝑡
𝑑𝑡
From our definition of 𝐺(𝑥) we now have:
𝑑𝑥
𝐺(𝑥) = ∫ 𝑔(𝑥) 𝑑𝑡 = ∫ 𝑔(𝑥) 𝑑𝑥
𝑑𝑡
Hence we can replace the LHS of (*) with ∫ 𝑔(𝑥) 𝑑𝑥 and it becomes:
∫ 𝑔(𝑥) 𝑑𝑥 = ∫ ℎ(𝑡) 𝑑𝑡
If we can integrate, we have a solution. Note – you don’t need to do the above steps every
time. You can just go straight from (*) to
∫ 𝒈(𝒙) 𝒅𝒙 = ∫ 𝒉(𝒕) 𝒅𝒕
𝑑𝑥
This is rather like what we did earlier i.e. treat as dx divided by dt and cross-multiply to
𝑑𝑡
take dt to the right hand side (as we did before). We can then integrate each side with respect
to its variable.
Again, this is not strictly speaking what we’re doing mathematically, but it’s how most
people actually tackle the problem.
Examples
Solve dx
3xt 2 x 0
dt
x4 9
dx 1
Solve t2
dt x
A practical example
Note 1 – Newton’s law of cooling applies, i.e. the rate of change of the temperature of the
ball (T) is proportional to the difference between T and the surroundings.
Note 2 – Heat flows rapidly in copper so the temperature in the ball is assumed the same at
all points of the ball.
𝑥 = 𝑦𝑡
𝑑𝑥 𝑑 𝑑𝑦 𝑑𝑡 𝑑𝑦
= (𝑦𝑡) = 𝑡 +𝑦 =𝑡 +𝑦
𝑑𝑡 𝑑𝑡 𝑑𝑡 𝑑𝑡 𝑑𝑡
Then
𝑑𝑥 𝑥
= 𝑓( )
𝑑𝑡 𝑡
Becomes
𝑑𝑦
𝑡 + 𝑦 = 𝑓(𝑦)
𝑑𝑡
Rearrange
𝑑𝑦
𝑡 = 𝑓(𝑦) − 𝑦
𝑑𝑡
If we separate ts and ys we end up with
1 𝑑𝑦 1
=
𝑓(𝑦) − 𝑦 𝑑𝑡 𝑡
Examples
Solve t2
dx
x 2 xt t 0, x 0
dt
dx t 3 x 3
Solve x 2
dt t
Some (again some, not all!) 1st order ODEs can be of a form (or put into a form) called
‘EXACT.’
Let us look at the mathematically rigorous route to solving these equations, and then
look at what I do!
The solution of such equations depends on 𝑈(𝑡, 𝑥) which is a function of both x and t, but
also x itself is a function of t.
Examples
dx
1) 2 xt x 2 2t 0
dt
2) ln sin t 3x dx x cot t 4t 0
2
dt
𝜕𝑈
= 𝑞(𝑡, 𝑥) ⇒ 𝑈2 = ∫ 𝑞(𝑡, 𝑥)𝑑𝑡 + 𝐻(𝑥)
𝜕𝑡
and combine with
𝑑𝑈
=0 𝑎𝑛𝑑 𝑈(𝑡, 𝑥) = 𝑐
𝑑𝑡
To get an expression in terms of x and t. (The independent and dependent variable)
Example
dy x y 4
0
dx x
Where p and q are just arbitrary functions of t ONLY (or of course constants).
We solve this by finding an ‘INTEGRATING FACTOR’ (IF), which when we multiply the
equation through by the IF, then the left hand side of the equation turns into something that
we can integrate easily. So we have,
𝑑𝑥
+ 𝑝(𝑡). 𝑥 = 𝑞(𝑡) (#)
𝑑𝑡
and we want to multiply throughout by some IF, which we’ll call (#) becomes:
𝑑𝑥
𝛼 + 𝛼𝑝(𝑡). 𝑥 = 𝛼𝑞(𝑡)
𝑑𝑡
𝑑 𝑑𝑥 𝑑𝛼 𝑑𝑥
[𝛼𝑥] = 𝛼 +𝑥 =𝛼 + 𝛼𝑝(𝑡). 𝑥
𝑑𝑡 𝑑𝑡 𝑑𝑡 𝑑𝑡
Simplify:
𝑑𝛼
= 𝛼𝑝(𝑡)
𝑑𝑡
Which is SEPARABLE!! So solve for
𝛼 = 𝑒 ∫ 𝑝(𝑡)𝑑𝑡
Called the INTEGRATING FACTOR
Summary of steps:
𝑑𝑥
+ 𝑝(𝑡). 𝑥 = 𝑞(𝑡) (#)
𝑑𝑡
Step 1 – Generate IF
𝐼𝐹 = 𝛼 = 𝑒 ∫ 𝑝(𝑡)𝑑𝑡
Step 2 – Multiply (#) through by IF (remember the Right Hand Side as well!)
We end up with
𝑑𝑥
𝑒 ∫ 𝑝(𝑡)𝑑𝑡 + 𝑒 ∫ 𝑝(𝑡)𝑑𝑡 𝑝(𝑡). 𝑥 = 𝑒 ∫ 𝑝(𝑡)𝑑𝑡 𝑞(𝑡)
𝑑𝑡
It’s easy to show (and in fact we’ve just derived!) that the Left Hand Side is just
𝑑 ∫ 𝑝(𝑡)𝑑𝑡
[𝑒 . 𝑥]
𝑑𝑡
So the ODE becomes
𝑑 ∫ 𝑝(𝑡)𝑑𝑡
[𝑒 . 𝑥] = 𝑒 ∫ 𝑝(𝑡)𝑑𝑡 𝑞(𝑡)
𝑑𝑡
Step 3 – Integrate both sides with respect to t (or whatever the independent variable is!)
This looks quite unpleasant in this general form, with the exponentials of integrals, but
normally this will just be a simple function. Let’s look at some examples
Examples
dx dx
x e2t p(t ) x q(t )
1) dt Is it in the form dt
dy
2) y tan x sin 2 x 2 sin x cos x y(0) 1
dx
Note the switched dependent variable (now y) and independent variable (now x)
dy
We now need something of the form p( x) y q( x) . Is this the case?
dx
Different methods exist for solving first order equations, and they don’t all work for
every equation! You need to look at the shape of the equation to see which to use.
(2) Separable
𝑑𝑥
= 𝑓(𝑥, 𝑡)
𝑑𝑡
And
𝑑𝑥 𝑑𝑥 𝑓(𝑥)
= 𝑓(𝑥)𝑔(𝑡) 𝑂𝑅 =
𝑑𝑡 𝑑𝑡 𝑔(𝑡)
Bring all the x terms to one side and all the t terms to the other side
(4) Exact
𝑑𝑥
𝑝(𝑡, 𝑥) + 𝑞(𝑡, 𝑥) = 0
𝑑𝑡
iff
𝜕𝑝 𝜕𝑞
=
𝜕𝑡 𝜕𝑥
We can solve for 𝑈(𝑡, 𝑥) to get an expression in terms of x and t.