SCNC1111
Scientific Method and Reasoning
Differential Equations
Equations
• Equations that we learned in schools such as
quadratic equations in one unknown or system of
linear equations in two variables are sufficient to
solve many static problems.
2
Differential equations
• However, many natural phenomena involve change.
They are described by equations involving derivative
𝑑𝑦
(the rate of change of function 𝑦).
𝑑𝑥
3
Forgetting Curve
• The forgetting curve hypothesizes the decline of
memory retention in time.
−𝑡
𝑅= 𝑒𝑆
where 𝑅 is memory retention, 𝑆 is the relative
strength of memory, and 𝑡 is the time.
• As time goes by, we lose some of our memory. The
rate of forgetting is:
𝑑𝑅
= −𝜆𝑅
𝑑𝑡
4
Differential Equations
Definition
A differential equation is an equation containing one
or more derivatives.
𝑑𝑦
4 = 3𝑦 + 12
𝑑𝑥
2
𝑑𝑦
𝑥 − 2𝑥𝑦 − 𝑦 2 = 0
𝑑𝑥
The highest order of the derivative in the equation is
called the order of that differential equation.
5
Differential Equations
Examples Suppose 𝑦(𝑥) is a function in variable 𝑥.
• Then
𝑑𝑦
4 = 3𝑦 + 12
𝑑𝑥
2
𝑑𝑦
𝑥 − 2𝑥𝑦 − 𝑦 2 = 0
𝑑𝑥
are first order differential equations.
𝑑2𝑦 𝑑𝑦
• 2 2 + 3 + 4𝑦 = 0 is a second order differential
𝑑𝑥 𝑑𝑥
equation.
6
Differential Equations
• The study of differential equations is:
– To describe a specified physical situation such as ecological
models (e.g. predators and competitors) or an electric
circuit by D.E.
– To find the appropriate solution of that equation and to
interpret the solution
7
Solving a differential equation
• By solving a differential equation we mean to find a
formula for 𝑦(𝑥) (which is expressed in terms of
simple functions of 𝑥 only).
• Note that some differential equations do not have
solutions.
8
Verifying Solutions
• To verify whether a function 𝑦(𝑥) is a solution to a
differential equation or not, we may simply compute
the derivative(s) of 𝑦, and substitute them into the
differential equation to see whether the equation is
satisfied.
9
Verifying Solutions
• Example The rate of change of blood glucose level G
of patients with diabetes can be modelled by the
𝑑𝐺
differential equation = 12𝑒 −0.05𝑡 − 4.8𝑒 −0.02𝑡
𝑑𝑡
with initial conditions 𝐺 0 = 90. Verified that this
differential equation has a solution 𝐺 = 90 −
240(𝑒 −0.05𝑡 − 𝑒 −0.02𝑡 ).
10
Verifying Solutions
• How do you verify 𝑥 = 3 is a solution to the equation
𝑥 + 7 = 10?
• We substitute the solution into the LHS of the
equation and see if it is the same as the right hand
side.
11
Verifying Solutions
𝑑𝐺
• LHS of the differential equation is .
𝑑𝑡
• We substitute 𝐺 = 90 − 240(𝑒 −0.05𝑡 − 𝑒 −0.02𝑡 ) into the left hand side.
𝑑𝐺 𝑑(90−240 𝑒 −0.05𝑡 −𝑒 −0.02𝑡 )
• LHS = =
𝑑𝑡 𝑑𝑡
𝑑𝐺 𝑑(90) 𝑑(240 𝑒 −0.05𝑡 −𝑒 −0.02𝑡 ))
• = − (by sum rule)
𝑑𝑡 𝑑𝑡 𝑑𝑡
𝑑𝐺 𝑑 𝑒 −0.05𝑡 𝑑(𝑒 −0.02𝑡 )
• = −240( − ) (by sum rule)
𝑑𝑡 𝑑𝑡 𝑑𝑡
𝑑𝐺 𝑑 𝑒 −0.05𝑡 𝑑 𝑒 −0.02𝑡
• = −240 + 240
𝑑𝑡 𝑑𝑡 𝑑𝑡
𝑑𝐺
• = −240(−0.05)𝑒 −0.05𝑡 + 240(−0.02) 𝑒 −0.02𝑡
𝑑𝑡
𝑑𝐺
• = 12𝑒 −0.05𝑡 − 4.8𝑒 −0.02𝑡 = 𝑅𝐻𝑆
𝑑𝑡
• Check initial condition 𝐺 0 = 90.
• We substitute 𝑡 = 0 into 𝐺 = 90 − 240 𝑒 −0.05𝑡 − 𝑒 −0.02𝑡 = 90.
12
Special First-order Differential Equations
and Their Solutions
• For differential equations of the form
𝑑𝑦
=𝑓 𝑥 ,
𝑑𝑥
where the RHS does not involve 𝑦 (and derivatives of
𝑦), the solution is of the form
𝑥
𝑦 𝑥 = 𝑓 𝑥
0
𝑢 𝑑𝑢 + 𝐶 (*)
where 𝑥0 is any suitable value within the domain of
the function 𝑦(𝑥), and 𝐶 is an arbitrary constant.
13
Example
𝑑𝑦
• Example Solve the differential equation = 2𝑥 + 3
𝑑𝑥
with initial condition 𝑦 1 = 2.
• 𝑦 = 2𝑥 + 3 𝑑𝑥
• 𝑦 = 2𝑥 𝑑𝑥 + 3 𝑑𝑥
• 𝑦 = 𝑥 2 + 3𝑥 + 𝐶
• Substitute the initial condition to find 𝐶.
• 2 = (1)2 +3 1 + 𝐶
• 𝐶 = −2
• Therefore, 𝑦 = 𝑥 2 + 3𝑥 − 2.
14
Separable Differential Equations
• Definition
A differential equation is called separable if
𝑑𝑦 𝑔(𝑥)
= , 𝑓(𝑦) ≠ 0,
𝑑𝑥 𝑓(𝑦)
can be written separated by writing informally
𝑓 𝑦 𝑑𝑦 = 𝑔 𝑥 𝑑𝑥.
Integrating both sides:
𝑥𝑑 𝑥 𝑔 = 𝑦𝑑 𝑦 𝑓 .
15
Separable Differential Equations
𝑑𝑦
• Example For the differential equation = 2𝑥𝑦 2 ,
𝑑𝑥
we find the general solution as follow:
𝑑𝑦
2
= 2𝑥 𝑑𝑥 (separate the variables)
𝑦
𝑦 −2 𝑑𝑦 = 2𝑥 𝑑𝑥
𝑦 −2 𝑑𝑦 = 2𝑥 𝑑𝑥 (integrate both sides)
−𝑦 −1 = 𝑥 2 + 𝐶 (note: needs only one constant of integration)
𝑦 −1 = −𝑥 2 − 𝐶
−1
𝑦= 2
𝑥 +𝐶
16
Singular Solution
𝑑𝑦
• Note that = 2𝑥𝑦 2 has another solution, which is
𝑑𝑥
the constant zero function 𝑦(𝑥) ≡ 0. This is known
as the singular solution, and it cannot be obtained
−1
from the general solution 𝑦 𝑥 = 2 .
𝑥 +𝐶
• In fact 𝑦 = 0 will generally be a solution whenever
separating the variables results in 𝑑𝑦 being divided
by a positive power of 𝑦, as in this example.
17
Example
• Example Let 𝑢(𝑡) denote the size of a colony of bacteria after
𝑡 hours. Suppose the growth rate the colony is equal to six
times the three-fourths power of its present size, and the
colony size is 10,000 at time zero.
a) Write down the differential equation and the initial
condition.
b) When will the colony size become 16 times of that at time
zero?
18
Example
• Let 𝑢(𝑡) denote the size of a colony of bacteria after 𝑡 hours.
Suppose the growth rate the colony is equal to six times the
three-fourths power of its present size, and the colony size is
10,000 at time zero.
3
𝑑𝑢
a) = 6 × 𝑢 and 𝑢 0 = 10000
4
𝑑𝑡
19
Example
3
𝑑𝑢
b) = 6𝑢 and 𝑢 0 = 10000
4
𝑑𝑡
𝑑𝑢
3 = 6𝑑𝑡
𝑢4
3
𝑢−4 𝑑𝑢 = 6𝑑𝑡
3
−
න𝑢 4 𝑑𝑢 = න 6𝑑𝑡
1
𝑢4
= 6𝑡 + 𝐶
1
4
1
4𝑢4 = 6𝑡 + 𝐶
Substitute 𝑢 0 = 10000 into the equation.
1
4(10000)4 = 6(0) + 𝐶
4 × 10 = 𝐶
𝐶 = 40
1
4𝑢4 = 6𝑡 + 40
1
4(160000)4 = 6𝑡 + 40
4 × 20 = 6𝑡 + 40
40 20
t= =
6 3
20
Applications: Natural growth and decay
• The differential equation
𝑑
𝑥 𝑡 =𝑘𝑥 𝑡
𝑑𝑡
where 𝑘 is a constant, serves as a mathematical
model for a remarkably wide range of natural
phenomena – any involving a quantity whose rate of
change is proportional to its current size.
This is called:
• the law of natural growth (when 𝑘 > 0), or
• the law of natural decay (when 𝑘 < 0).
21
Applications: Natural growth and decay
Here are some examples:
– Population growth
– Compound interest
– Radioactive decay
– Drug elimination
– Cooling and heating
– Memory
22
Natural growth and decay
𝑑
• The general solution to 𝑥 𝑡 = 𝑘 𝑥 𝑡 is
𝑑𝑡
𝑥 𝑡 = 𝐶𝑒 𝑘𝑡
where 𝐶 is some constant.
• In fact we can check that 𝑥 𝑡 = 𝐶𝑒 𝑘𝑡 satisfies
the given equation:
𝑑 𝑑 𝑘𝑡
𝑑 𝑘𝑡 𝑘𝑡
𝑑
𝑥 𝑡 = 𝐶𝑒 = 𝐶 𝑒 = 𝐶 𝑒 𝑘𝑡
𝑑𝑡 𝑑𝑡 𝑑𝑡 𝑑𝑡
= 𝐶𝑒 𝑘𝑡 𝑘 = 𝑘𝑥 𝑡 .
23
Motivating Examples
• Example (Population growth) Suppose a population is increasing at a
rate which is proportional to the current population size 𝑃(𝑡). Then
𝑑
𝑃 𝑡 =𝑘𝑃 𝑡 (∗)
𝑑𝑡
Where 𝑘 is a positive constant.
• The general solution to this equation is 𝑃 𝑡 = 𝐶𝑒 𝑘𝑡
where 𝐶 is some constant.
• To find 𝐶, we plug in 𝑡 = 0 into the general solution 𝑃 𝑡 = 𝐶𝑒 𝑘𝑡 to
obtain 𝑃 0 = 𝐶𝑒 𝑘0 = 𝐶 1 = 𝐶. Therefore, 𝐶 = 𝑃(0), which is the
population at time 𝑡 = 0.
24
Motivating Examples
• Note that in the previous example, with 𝑃 𝑡 = 𝐶𝑒 𝑘𝑡 where
𝐶 and 𝑘 are positive, the growth of 𝑃 is exponential. The
graph of 𝑃(𝑡) follows the trend of the graph of 𝑦(𝑡) = 𝑒 𝑡 ,
as shown in the figure below:
y(t) = et
25
Motivating Examples
• Example 2 (Radioactive decay) When a radioactive substance
emits radiation, some of its atoms decay into another element or
another isotope of the same element.
• Let 𝑚(𝑡) denote the mass of the radioactive substance at time 𝑡.
𝑑𝑚
Experimental results showed that the ratio 𝑑𝑡 : 𝑚 is a constant,
𝑑𝑚 𝑑𝑚
i.e., = 𝑘𝑚 (here 𝑘 is a negative constant, because is
𝑑𝑡 𝑑𝑡
negative).
• The solution to this differential equation is
𝑚 𝑡 = 𝑚0 𝑒 𝑘𝑡
where 𝑚0 = 𝑚 0 is the mass of the substance at time 𝑡 = 0.
26
Motivating Examples
• In this example, with 𝑚 𝑡 = 𝑚0 𝑒 𝑘𝑡 where 𝑘 is negative, the
decay of 𝑚 is exponential. The graph of 𝑚(𝑡) follows the trend
of the graph of 𝑦 𝑡 = 𝑒 −𝑡 , which is shown below.
y(t) = e−t
27
Homogeneous Linear Differential Equations
Definition
A first order homogeneous linear differential equation
is a differential equation of the form
𝑑𝑦
𝑎 + 𝑏𝑦 = 0
𝑑𝑥
where a and b are constants.
Example:
2𝑦 = −3𝑦 ′
𝑑𝑦
3 + 4𝑦 = 0
𝑑𝑥
28
Homogeneous Linear Differential Equations
Definition
A second order homogeneous linear differential
equation is a differential equation of the form
𝑑2𝑦 𝑑𝑦
𝑎 2+𝑏 + 𝑐𝑦 = 0
𝑑𝑥 𝑑𝑥
where a ≠ 0, b and c are constants.
Example:
3𝑦 ′′ = −3𝑦 ′ − 𝑦
𝑑2𝑦 𝑑𝑦
2
=3 + 4𝑦
𝑑𝑥 𝑑𝑥
29
To solve differential equations
Definition
For a second order homogeneous linear differential equation
𝑑2𝑦 𝑑𝑦
𝑎 2+𝑏 + 𝑐𝑦 = 0
𝑑𝑥 𝑑𝑥
its characteristic polynomial equation is defined as
𝑎𝜆2 + 𝑏𝜆 + 𝑐 = 0
Example
• The characteristic polynomial equation of the differential
𝑑2 𝑦 𝑑𝑦
equation 𝑑𝑥2 = 3 𝑑𝑥 + 4𝑦 is
𝜆2 − 3𝜆 − 4 = 0
30
Step 1: Characteristic polynomial equations
Differential equations Characteristic polynomial equations
𝑑2 𝑦 𝑑𝑦 𝜆2 = 7𝜆 − 6
= 7 − 6𝑦
𝑑𝑥 2 𝑑𝑥
𝑑2 𝑦 𝑑𝑦 𝜆2 − 5𝜆 − 6 = 0
−5 − 6𝑦 = 0
𝑑𝑥 2 𝑑𝑥
𝑑2 𝑦 𝑑𝑦 2𝜆2 − 7𝜆 + 3 = 0
2 2−7 + 3𝑦 = 0
𝑑𝑥 𝑑𝑥
𝑑2 𝑦 4𝑑𝑦 𝜆2 − 4𝜆 + 4 = 0
− + 4𝑦 = 0
𝑑𝑥 2 𝑑𝑥
31
Step 2: Factorization
Characteristic polynomial equations Factorized
𝜆2 = 7𝜆 − 6 𝜆−6 𝜆−1 =0
𝜆2 − 5𝜆 − 6 = 0 𝜆−6 𝜆+1 =0
2𝜆2 − 7𝜆 + 3 = 0 2𝜆 − 1 𝜆 − 3 = 0
𝜆2 − 4𝜆 + 4 = 0 𝜆−2 𝜆−2 =0
32
Step 3: Determine single or double roots
Characteristic polynomial equations Roots Single or double?
𝜆−6 𝜆−1 =0 𝜆 = 6 or 𝜆 = 1 Two single roots
𝜆−6 𝜆+1 =0 𝜆 = 6 or 𝜆 = −1 Two single roots
2𝜆 − 1 𝜆 − 3 = 0 1 Two single roots
𝜆 = or 𝜆 = 3
2
𝜆−2 𝜆−2 =0 𝜆=2 Double roots
33
Step 4: Write a closed form solution
Roots Single or double? General closed form solution
𝜆 = 6 or 𝜆 = 1 Two single roots 𝑦 = 𝑎𝑒 6𝑥 + 𝑏𝑒1𝑥
𝜆 = 6 or 𝜆 = −1 Two single roots 𝑦 = 𝑎𝑒 6𝑥 + 𝑏𝑒 −1𝑥
1 Two single roots 1
𝜆 = or 𝜆 = 3 𝑦= 𝑎𝑒 2𝑥 + 𝑏𝑒 3𝑥
2
𝜆=2 Double roots 𝑦 = 𝑎𝑒 2𝑥 + 𝑏𝑥𝑒 2𝑥
where 𝑎 and 𝑏 are constants and they
can be found by substituting the initial
conditions into the particular solution.
34
Examples
• Consider 𝑦 ′ + 2𝑦 = 0, 𝑦 1 = 2. The characteristic
equation is 𝜆 + 2 = 0, which has root 𝜆 = −2. Thus
the general solution is 𝑦 𝑥 = 𝐶𝑒 −2𝑥 .
• Substituting 𝑥 = 1 into it, together with the initial
condition, we get 2 = 𝑦 1 = 𝐶𝑒 −2 , or 𝐶 = 2𝑒 2 .
Hence the particular solution is 𝑦 𝑥 = 2𝑒 2 𝑒 −2𝑥 =
2𝑒 2−2𝑥 .
35
Examples
• Consider 𝑦 ′′ − 2𝑦 ′ + 𝑦 = 0, 𝑦 0 = 1, 𝑦′ 0 = 3.
The characteristic equation is 𝜆2 − 2𝜆 + 1 = 0.
Factorizing it gives 𝜆 − 1 2 = 0, which has double
roots 𝜆 = 1,1. Thus the general solution is 𝑦 𝑥 =
𝑎𝑒 𝑥 + 𝑏𝑥𝑒 𝑥 where 𝑎, 𝑏 are arbitrary constants.
• Note that 𝑦 ′ = 𝑎𝑒 𝑥 + 𝑏 𝑥𝑒 𝑥 + 𝑒 𝑥 . From 𝑦 0 = 1
and 𝑦 ′ 0 = 3 we get
1 = 𝑎, 3 = 𝑎+𝑏
Hence 𝑎 = 1, 𝑏 = 2, and the particular solution is
𝑦 𝑥 = 𝑒 𝑥 + 2𝑥𝑒 𝑥 = 𝑒 𝑥 (2𝑥 + 1).
36
Examples
• Consider 𝑦 ′′ − 𝑦 ′ − 2𝑦 = 0, 𝑦 0 = 0, 𝑦 1 = 1. The
characteristic equation is 𝜆2 − 𝜆 − 2 = 0. Factorizing
it gives (𝜆 + 1)(𝜆 − 2) = 0, which has roots 𝜆 =
− 1, 2. Thus the general solution is 𝑦 𝑥 = 𝑎𝑒 −𝑥 +
𝑏𝑒 2𝑥 where 𝑎, 𝑏 are arbitrary constants.
• From 𝑦 0 = 0, 𝑦 1 = 1 we get
0 = 𝑎 + 𝑏, 1 = 𝑎𝑒 −1 + 𝑏𝑒 2
𝑒 𝑒
Hence 𝑎 = − 3 , 𝑏 = 3 . Therefore the
𝑒 −1 𝑒 −1
particular solution is
𝑒 𝑒 1−𝑥 𝑒 3𝑥 −1
𝑦 𝑥 = (𝑒 2𝑥 − 𝑒 −𝑥 ) = .
𝑒 3 −1 𝑒 3 −1
37
Reference
• G.C. Berresford, A.M. Rockett, Applied Calculus (5th
edition), 2010, Brooks/Cole, Cengage Learning
38