You are on page 1of 17

Chemical Engineering Programmes, Civil

Engineering Programmes
Faculty of Engineering and Physical Sciences

ENG1085: Mathematics 2

3. Ordinary Differential Equations (ODEs)


3.1 Motivation
3.2 Some Terminology/Jargon
3.3 Solutions to ODEs
3.4 Solving First Order ODEs
3.4.1 Separable Equations
3.4.2 Equations Reducible to Separable Form
3.4.3 Exact Differentials
3.4.4 Linear First Order Equations
3.4.5 Summary of Methods for First Order Equations
3.5 Second Order ODEs
3.5.1 Linear Second Order ODEs – Some Properties
3.5.2 Homogeneous Second Order ODEs with Constant Coefficients
3.5.3 Non-Homogeneous Second Order ODEs with Constant
Coefficients
3.5.4 Summary
3.6 Using Eigenvalues to Solve Sets of ODEs
3.7 Modelling Physical Systems with ODEs
Key

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 − (𝜇𝛼 − 𝛽) ( ) = 𝑇 − 𝜇𝑚𝑔
𝑑𝑡 𝑑𝑡

Where α, β and µ are constants.

This is an example of a DIFFERENTIAL EQUATION. It connects various derivatives of the


quantity s – which is what we want to find! – and various other parameters (known constants
in this case, i.e. , , , m, g and T).
Many/most engineering problems (the most interesting and fun ones anyway!) are
specified in terms of differential equations, so we need to develop a RANGE of methods
(there is not one method that works for all of them, sadly!) to allow us to solve them.

2 Ordinary Differential Equations


ENG1085: Mathematics 2 Dr. Madeleine Bussemaker

3.2 Some Terminology/Jargon


James, Modern Engineering Mathematics, Ch 10.3
HELM Workbook 19.1
If an equation involves ORDINARY DERIVATIVES (i.e. a derivative of a function of
one variable) it is called an ORDINARY DIFFERENTIAL EQUATION, e.g.
𝑑𝑥
− 3𝑥𝑡 = 𝑡 2 𝑓𝑜𝑟 𝑥(𝑡)
𝑑𝑡
𝑑2𝑦 𝑑𝑦
2
+3 + 7𝑦 = 𝑒 −𝑥 𝑓𝑜𝑟 𝑦(𝑥)
𝑑𝑥 𝑑𝑥
𝑑3𝑦 𝑑𝑦 2
− ( ) + 3𝑦 = 10 − 2𝑡 𝑓𝑜𝑟 𝑦(𝑡)
𝑑𝑡 3 𝑑𝑡
Etc….

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:

1) The ‘INDEPENDENT VARIABLE’ – the one we differentiate with respect to


(BOTTOM of derivative)

2) The ‘DEPENDENT VARIABLE’ – what we differentiate (TOP) of derivative.

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

3 Ordinary Differential Equations


ENG1085: Mathematics 2 Dr. Madeleine Bussemaker

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

function (trigonometric functions, log functions , exponentials...) (exp(x)=ex).


Non-linear ODEs are those that do have non-linear terms in the dependent variable or
its derivatives.
Examples
d2y dy d2y
3
dy dx
2
 3t 2  y7  2   3  4 y  x 2 4  sin x  0
dt dt  dx  dx dt
We can solve linear equations pretty easily. Non-linear equations can be more tricky...

Homogeneous/Non-Homogeneous (for linear equations ONLY)


A final classification that can be useful for linear equations is that of
homogeneous/non-homogeneous. If you look back at the examples you’ll see that they’re
written with all of the terms involving the dependent variable (either itself or its derivatives)
on the left hand side, whilst all the terms including the independent variable (or constants or
zero!) appear on the right:

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

4 Ordinary Differential Equations


ENG1085: Mathematics 2 Dr. Madeleine Bussemaker

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

You can now do Q1 on tutorial sheet 7

3.3 Solutions to ODEs


James, Modern Engineering Mathematics, Ch 10.4
 General and Particular Solutions
 Boundary and Initial Value Problems

Unlike solving algebraic equations, where we expect a single solution, or several


solutions (numerical answers), when we solve a differential equation we expect to find a
function. In fact, we will find a whole family of functions (in simple terms solving ODEs is
like integrating) – we expect arbitrary constants.
In some cases you might be able to integrate directly
e.g.
𝑑𝑥
=1
𝑑𝑡
Then
𝑥(𝑡) = 𝑡 + 𝑐
In other cases we might ‘spot’ a solution.
𝑑𝑥
=𝑥
𝑑𝑡
We know that if x(t) = et then
𝑑𝑥
= 𝑒𝑡
𝑑𝑡
𝑑𝑥
⇒ = 𝑥 = 𝑒𝑡
𝑑𝑡
Likewise
𝑑2𝑥
= −4𝑥
𝑑𝑡 2
You might spot that x(t) = sin(2t) is a solution

5 Ordinary Differential Equations


ENG1085: Mathematics 2 Dr. Madeleine Bussemaker

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.

Types of Problems to Solve


 ODE + Boundary Conditions
 ODE + 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

we are applying two initial conditions.

ODE + Initial Conditions  Initial Value Problem


Solving using integration gives

6 Ordinary Differential Equations


ENG1085: Mathematics 2 Dr. Madeleine Bussemaker

𝑡 3 𝑒 4𝑡 1
𝑥(𝑡) = − +𝑡+
3 4 4
This is
a) A particular solution to the ODE alone
b) THE solution to the initial value problem.

Integration is the rigorous way, but not how I would do it!


𝑑 𝑑𝑥
( ) = 2𝑡 − 4𝑒 4𝑡
𝑑𝑡 𝑑𝑡

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.

You can now do Q2 on tutorial sheet 7

7 Ordinary Differential Equations


ENG1085: Mathematics 2 Dr. Madeleine Bussemaker

3.4 Solving First Order ODEs


James, Modern Engineering Mathematics, Ch 10.5

HELM Workbook 19.2

Most 1st order ODEs can be written in the form:


𝑑𝑥
= 𝑓(𝑥, 𝑡)
𝑑𝑡
(there are some that can’t be written like this, but we won’t worry about that!)
We will deal with several forms of 1st order ODEs in turn. The techniques we apply
will NOT enable us to solve them all (many useful ones though!).

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!!!

3.4.1 Separable Equations


This is an extension of the direct integration method used above. Suppose our ODE is
of the form:
𝑑𝑥
= 𝑓(𝑥, 𝑡)
𝑑𝑡
and that it can be rearranged into the form
𝑑𝑥
𝑔(𝑥) = ℎ(𝑡)
𝑑𝑡
so all the ‘x’ terms are on one side of the equation and all the ‘t’ terms are on the other. Such
equations are called separable.

NOT ALL ARE!


So, how can we spot which equations are separable? We need to look for specific forms of
f(x, t). Specifically, we want:
𝑑𝑥 ℎ(𝑡) 𝑑𝑥 𝑑𝑥 𝑑𝑥
= , = ℎ(𝑡)𝑔(𝑥) , = ℎ(𝑡) or = 𝑔(𝑥)
𝑑𝑡 𝑔(𝑥) 𝑑𝑡 𝑑𝑡 𝑑𝑡

Forms that are not separable are:


𝑑𝑥 𝑑𝑥 𝑑𝑥
= ℎ(𝑡) + 𝑔(𝑥) , = 𝑓(𝑥, 𝑡) , = 𝑓(𝑥, 𝑡) + 𝑓1 (𝑥)+ 𝑓2 (𝑥) , etc.
𝑑𝑡 𝑑𝑡 𝑑𝑡

8 Ordinary Differential Equations


ENG1085: Mathematics 2 Dr. Madeleine Bussemaker

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.

9 Ordinary Differential Equations


ENG1085: Mathematics 2 Dr. Madeleine Bussemaker

Examples
Solve dx
 3xt 2  x  0
dt

x4  9
dx 1
Solve t2 
dt x

You can now do Q3 – 5 on tutorial sheet 7

A practical example

A copper ball is heated to a temperature of 100°C.


At time t=0 the ball is placed in water maintained at temperature of 30°C.
After 3 minutes the temperature of the ball is reduced to 70°C.
When does the ball reach 31°C?

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.

10 Ordinary Differential Equations


ENG1085: Mathematics 2 Dr. Madeleine Bussemaker

3.4.2 Equations Reducible to Separable Form

Some equations can be written in the form


𝑑𝑥 𝑥
= 𝑓( )
𝑑𝑡 𝑡
Such equations, as originally written, might not be separable, but can be transformed into
separable form.

(These types of equations are sometimes know as ‘HOMOGENEOUS FUNCTIONS’ – the


interested reader can look these up. This is much more general than our previous definition,
but to avoid any confusion, I’ll just use homogeneous as we did previously!)

To tackle these equations, let’s start by making an obvious substitution


𝑥
𝑦=
𝑡
𝑑𝑥
Our derivative can be evaluated by the product rule
𝑑𝑡

𝑥 = 𝑦𝑡

𝑑𝑥 𝑑 𝑑𝑦 𝑑𝑡 𝑑𝑦
= (𝑦𝑡) = 𝑡 +𝑦 =𝑡 +𝑦
𝑑𝑡 𝑑𝑡 𝑑𝑡 𝑑𝑡 𝑑𝑡
Then
𝑑𝑥 𝑥
= 𝑓( )
𝑑𝑡 𝑡
Becomes
𝑑𝑦
𝑡 + 𝑦 = 𝑓(𝑦)
𝑑𝑡
Rearrange
𝑑𝑦
𝑡 = 𝑓(𝑦) − 𝑦
𝑑𝑡
If we separate ts and ys we end up with
1 𝑑𝑦 1
=
𝑓(𝑦) − 𝑦 𝑑𝑡 𝑡

Our cross-multiplication method yields


𝑑𝑦 𝑑𝑡
=
𝑓(𝑦) − 𝑦 𝑡

11 Ordinary Differential Equations


ENG1085: Mathematics 2 Dr. Madeleine Bussemaker

Now we have a separable equation for y and we know that


𝑥 = 𝑦𝑡

Examples

Solve t2
dx
 x 2  xt t  0, x  0
dt
dx t 3  x 3
Solve x 2

dt t

You can now do Q6 – 7 on tutorial sheet 7


3.4.3 Exact Differential Equations

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.

Let’s begin by recalling the definition of the TOTAL DERIVATIVE


𝜕𝑈 𝜕𝑈
𝑑𝑈 = 𝑑𝑥 + 𝑑𝑡
𝜕𝑥 𝜕𝑡
Hence,
𝑑𝑈 𝜕𝑈 𝑑𝑥 𝜕𝑈
= +
𝑑𝑡 𝜕𝑥 𝑑𝑡 𝜕𝑡

Now, let’s suppose we have an ODE of the form


𝑑𝑥
𝑝(𝑡, 𝑥) + 𝑞(𝑡, 𝑥) = 0 (∗)
𝑑𝑡

Let’s also assume a function 𝑈(𝑡, 𝑥) can be found such that


𝜕𝑈 𝜕𝑈
= 𝑝(𝑡, 𝑥) and = 𝑞(𝑡, 𝑥)
𝜕𝑥 𝜕𝑡

12 Ordinary Differential Equations


ENG1085: Mathematics 2 Dr. Madeleine Bussemaker

Then ODE (*) basically says


𝜕𝑈 𝑑𝑥 𝜕𝑈
+ =0
𝜕𝑥 𝑑𝑡 𝜕𝑡
𝑑𝑈
Or in other words, when comparing the form to our total derivative we have
𝑑𝑡
𝑑𝑈 𝜕𝑈 𝑑𝑥 𝜕𝑈
TOTAL DERIVITIVE: = +
𝑑𝑡 𝜕𝑥 𝑑𝑡 𝜕𝑡
𝜕𝑈 𝑑𝑥 𝜕𝑈
ODE (*) 0= +
𝜕𝑥 𝑑𝑡 𝜕𝑡
𝑑𝑈
OR =0
𝑑𝑡

HENCE 𝑈(𝑡, 𝑥) = 𝑐 where c is a constant

Examples
dx
1) 2 xt  x 2  2t  0
dt
2) ln sin t  3x  dx  x cot t  4t  0
2

dt

Summary of the method


We have an ODE of the form
𝑑𝑥
𝑝(𝑡, 𝑥) + 𝑞(𝑡, 𝑥) = 0
𝑑𝑡
Through algebraic manipulation (e.g. multiplying throughout by dt)
𝑝(𝑡, 𝑥)𝑑𝑥 + 𝑞(𝑡, 𝑥)𝑑𝑡 = 0
We compare this from to a total differential
𝜕𝑈 𝜕𝑈
𝑑𝑈 = 𝑑𝑥 + 𝑑𝑡 = 0
𝜕𝑥 𝜕𝑡
This comparison tells us that
𝜕𝑈 𝜕𝑈
= 𝑝(𝑡, 𝑥) 𝑎𝑛𝑑 = 𝑞(𝑡, 𝑥)
𝜕𝑥 𝜕𝑡
This will be a valid solution to the ODE iff (which means if and only if) our key test is true,
i.e.
𝜕𝑝 𝜕𝑞 𝜕 2𝑈 𝜕 2𝑈
= ⇒ =
𝜕𝑡 𝜕𝑥 𝜕𝑡𝜕𝑥 𝜕𝑥𝜕𝑡
We then integrate:
𝜕𝑈
= 𝑝(𝑡, 𝑥) ⇒ 𝑈1 = ∫ 𝑝(𝑡, 𝑥)𝑑𝑥 + 𝐺(𝑡)
𝜕𝑥

13 Ordinary Differential Equations


ENG1085: Mathematics 2 Dr. Madeleine Bussemaker

𝜕𝑈
= 𝑞(𝑡, 𝑥) ⇒ 𝑈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

You can now do Q8 – 9 on tutorial sheet 7

3.4.4 First Order Linear Equations

The general form of a first order linear ODE is


𝑑𝑥
+ 𝑝(𝑡). 𝑥 = 𝑞(𝑡)
𝑑𝑡

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:
𝑑𝑥
𝛼 + 𝛼𝑝(𝑡). 𝑥 = 𝛼𝑞(𝑡)
𝑑𝑡

We want to reduce the left hand side to


𝑑
[𝛼𝑥]
𝑑𝑡
What  does this? Use the product rule:

14 Ordinary Differential Equations


ENG1085: Mathematics 2 Dr. Madeleine Bussemaker

𝑑 𝑑𝑥 𝑑𝛼 𝑑𝑥
[𝛼𝑥] = 𝛼 +𝑥 =𝛼 + 𝛼𝑝(𝑡). 𝑥
𝑑𝑡 𝑑𝑡 𝑑𝑡 𝑑𝑡
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!)

𝑒 ∫ 𝑝(𝑡)𝑑𝑡 . 𝑥 = ∫ 𝑒 ∫ 𝑝(𝑡)𝑑𝑡 𝑞(𝑡)𝑑𝑡 + 𝐶

Where C is a constant and must not be forgotten!!

Step 4 – Rearrange for x (or whatever your dependent variable is!)


1
𝑥(𝑡) = [∫ 𝑒 ∫ 𝑝(𝑡)𝑑𝑡 𝑞(𝑡)𝑑𝑡 + 𝐶]
𝑒 ∫ 𝑝(𝑡)𝑑𝑡

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

15 Ordinary Differential Equations


ENG1085: Mathematics 2 Dr. Madeleine Bussemaker

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

You can now do Q10 – 12 on tutorial sheet 7

16 Ordinary Differential Equations


ENG1085: Mathematics 2 Dr. Madeleine Bussemaker

3.4.5 First Order Summary

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.

(1) Direct integration


𝑑𝑥
= 𝑓(𝑡)
𝑑𝑡

(2) Separable
𝑑𝑥
= 𝑓(𝑥, 𝑡)
𝑑𝑡
And
𝑑𝑥 𝑑𝑥 𝑓(𝑥)
= 𝑓(𝑥)𝑔(𝑡) 𝑂𝑅 =
𝑑𝑡 𝑑𝑡 𝑔(𝑡)
Bring all the x terms to one side and all the t terms to the other side

(3) Reducible to separable form


𝑑𝑥 𝑥
= 𝑓( )
𝑑𝑡 𝑡
𝑥
Substitute in 𝑦 = 𝑡

(4) Exact
𝑑𝑥
𝑝(𝑡, 𝑥) + 𝑞(𝑡, 𝑥) = 0
𝑑𝑡
iff
𝜕𝑝 𝜕𝑞
=
𝜕𝑡 𝜕𝑥
We can solve for 𝑈(𝑡, 𝑥) to get an expression in terms of x and t.

(5) Linear ODEs


𝑑𝑥
+ 𝑝(𝑡). 𝑥 = 𝑞(𝑡)
𝑑𝑡
Multiply by the integrating factor
𝑒 ∫ 𝑝(𝑡)𝑑𝑡

17 Ordinary Differential Equations

You might also like