Chapter 4.
Differential Equations and
Applications
Le Cong Nhan
Visiting Lecturer at
University of Economic Ho Chi Minh City
Le Cong Nhan (Visiting Lecturer at University of Economic
Chapter Ho Chi MinhEquations
4. Differential City) and Applications 1 / 28
Contents
1 Introduction
Dynamics of Market Price
2 First order Differential Equations
Separable Equations
Linear Equations
3 Second Order Differential Equations
Homogeneous Equations with Constant Coefficients
Non-homogeneous Equations with Constant Coefficients
Le Cong Nhan (Visiting Lecturer at University of Economic
Chapter Ho Chi MinhEquations
4. Differential City) and Applications 2 / 28
4.1 Introduction to Differential Equations
Dynamics of Market Price
Assume that the rate of change of price over time is proportional to the
excess demand, then we have
dP
= k (Qd − Qs ) (1)
dt | {z }
excess demand
where k represents a adjustment coefficient. Notice that
dP
=0 if and only if Qd = Qs . (2)
dt
Assume that the demand and support functions are given by
Qd = α − βP (3)
Qs = −γ + δP (4)
Le Cong Nhan (Visiting Lecturer at University of Economic
Chapter Ho Chi MinhEquations
4. Differential City) and Applications 3 / 28
First-order differential equation
dP
+ k(β + δ)P = k(α + γ). (5)
dt
α+γ
1 Equilibrium price: Qd = Qs , that is, P ∗ = β+δ .
2 Assume P(0) = P0 , then
P(t) = P ∗ + (P0 − P ∗ ) e −k(β+δ)t . (6)
Le Cong Nhan (Visiting Lecturer at University of Economic
Chapter Ho Chi MinhEquations
4. Differential City) and Applications 4 / 28
Example 1
Let the demand and supply functions for a particular commodity be
dP
Qd = α − βP + σ (α, β, σ > 0) (7)
dt
Qs = −γ + δP (γ, δ > 0) (8)
(a) Assume that the rate of change of price over time is proportional to
the excess demand, find the time path P(t).
(b) What restriction on the parameter σ would ensure dynamic stability?
Le Cong Nhan (Visiting Lecturer at University of Economic
Chapter Ho Chi MinhEquations
4. Differential City) and Applications 5 / 28
Example 2
Let the demand and supply functions be
Qd = 42 − 4P − 4P ′ + P ′′
Qs = −6 + 8P
with initial conditions P(0) = P ′ (0) = 4.
1 Assuming the market clearance at every point of time, that is,
Qd = Qs , find the time path P(t).
2 Is this market-clearing equilibrium dynamically stable?
Le Cong Nhan (Visiting Lecturer at University of Economic
Chapter Ho Chi MinhEquations
4. Differential City) and Applications 6 / 28
4.2 First order Differential Equations
Separable Differential Equations
A differential equation is of the form
dy f (x)
= (9)
dx g (y )
is so-called separable differential equation.
Method of solution:
Step 1: separate the variables g (y )dy = f (x)dx.
Step 2: integrate both sides of the equation
Z Z
g (y )dy = f (x)dx. (10)
Le Cong Nhan (Visiting Lecturer at University of Economic
Chapter Ho Chi MinhEquations
4. Differential City) and Applications 7 / 28
Example 3
Solve the equation (1 + x)dy − ydx = 0.
Le Cong Nhan (Visiting Lecturer at University of Economic
Chapter Ho Chi MinhEquations
4. Differential City) and Applications 8 / 28
Example 4 (Losing a Solution)
dy
Solve the equation = y 2 − 4.
dx
Le Cong Nhan (Visiting Lecturer at University of Economic
Chapter Ho Chi MinhEquations
4. Differential City) and Applications 9 / 28
Example 5
Solve the initial-valued problem
dy x
=− , y (4) = −3.
dx y
Le Cong Nhan (Visiting Lecturer at University of Economic
Chapter Ho Chi MinhEquations
4. Differential City) and Applications 10 / 28
Example 6
Solve the initial-valued problem
dy
cos x e 2y − y = e y sin 2x, y (0) = 0.
dx
Le Cong Nhan (Visiting Lecturer at University of Economic
Chapter Ho Chi MinhEquations
4. Differential City) and Applications 11 / 28
4.2 First order Differential Equations
First-Order Linear Differential Equations
A first-order differential equation of the form
dy
a1 (x) + a0 (x)y = g (x), (11)
dx
is said to be a linear equation in the dependent variable y .
If g (x) = 0, then the linear equation (11) is said to be homogeneous
(thuần nhất);
Otherwise, it is non-homogeneous (không thuần nhất).
Le Cong Nhan (Visiting Lecturer at University of Economic
Chapter Ho Chi MinhEquations
4. Differential City) and Applications 12 / 28
Method of Solution
The standard form (dạng chính tắc) of a linear equation
dy
+ P(x)y = f (x). (12)
dx
1 Find an integrating factor (thừa số tích phân) of the differential
equation
R
P(x)dx
I (x) = e (13)
2 Multiply both sides of linear equation by I (x)
d h R P(x)dx i R
e y = e P(x)dx f (x)
dx
and then integrate both sides of this equation, we get
Z
1
y= I (x)f (x)dx + C (14)
I (x)
Le Cong Nhan (Visiting Lecturer at University of Economic
Chapter Ho Chi MinhEquations
4. Differential City) and Applications 13 / 28
Example 7
Solve the differential equation
dy dy
a. − 3y = 6 b. x − 4y = x 6 e x
dx dx
Le Cong Nhan (Visiting Lecturer at University of Economic
Chapter Ho Chi MinhEquations
4. Differential City) and Applications 14 / 28
Example 8 (Singular points)
Solve the differential equation
dy
(x 2 − 9) + xy = 0.
dx
Le Cong Nhan (Visiting Lecturer at University of Economic
Chapter Ho Chi MinhEquations
4. Differential City) and Applications 15 / 28
Example 9
Find the solution of the initial-value problem
dy
+ y = x, y (0) = 4.
dx
Le Cong Nhan (Visiting Lecturer at University of Economic
Chapter Ho Chi MinhEquations
4. Differential City) and Applications 16 / 28
4.3 Second Order Differential Equations
Definition 10
Second order linear differential equations is the equation of the form
a(x)y ′′ + b(x)y ′ + c(x)y = d(x), (15)
where a, b, c and d are functions of x.
If d(x) = 0, then the DE is homogeneous.
Otherwise, it is nonhomogeneous.
Le Cong Nhan (Visiting Lecturer at University of Economic
Chapter Ho Chi MinhEquations
4. Differential City) and Applications 17 / 28
Method of Solutions
1 Find the general solution (nghiệm tổng quát) yc (x) to the
associated homogeneous DE
a(x)y ′ + b(x)y ′ + c(x)y = 0. (16)
2 Find a particular solution (nghiệm riêng) yp (x) to the
nonhomogeneous DE
Method of undetermined coefficients
Method of variable parameters
3 The general solution to nonhomogeneous DE is
y (x) = yc (x) + yp (x). (17)
Le Cong Nhan (Visiting Lecturer at University of Economic
Chapter Ho Chi MinhEquations
4. Differential City) and Applications 18 / 28
Homogeneous Equations with Constant Coefficients
Auxiliary Equation
The auxiliary equation of the DE ay ′′ + by ′ + cy = 0 is
ar 2 + br + c = 0. (18)
1 If r1 and r2 are two distinct real roots, then
yc (x) = c1 e r1 x + c2 e r2 x . (19)
2 If r = r0 is a unique real root, then
yc (x) = c1 e r0 x + c2 xe r0 x . (20)
3 If r1,2 = α ± βi are two conjugate complex roots, then
yc (x) = e αx [c1 cos (βx) + c2 sin (βx)] . (21)
Le Cong Nhan (Visiting Lecturer at University of Economic
Chapter Ho Chi MinhEquations
4. Differential City) and Applications 19 / 28
Non-homogeneous Equations with Constant Coefficients
Method of Undetermined Coefficients
Let us consider a special case of second-order equation
ay ′′ + by ′ + cy = f (x), (22)
where a, b and c are constants, and f (x) is a linear combination of
functions of the type
P(x)e αx or (P1 (x) cos βx + P2 (x) sin βx) e αx . (23)
with P(x) = an x n + an−1 x n−1 + · · · + a1 x + a0 , n ∈ N, α, β ∈ R.
Le Cong Nhan (Visiting Lecturer at University of Economic
Chapter Ho Chi MinhEquations
4. Differential City) and Applications 20 / 28
Method of Undetermined Coefficients
Case 1: f (x) = P(x)e αx
Find a particular solution (nghiệm riêng) of the form
yp (x) = x λ Q(x)e αx (24)
where degQ = degP and
0 if α is not a root of (18),
λ = 1 if α is a real but not repeated root of (18),
2 if α is a real repeated root of (18).
Le Cong Nhan (Visiting Lecturer at University of Economic
Chapter Ho Chi MinhEquations
4. Differential City) and Applications 21 / 28
Method of Undetermined Coefficients
Case 2: f (x) = (P1 (x) cos βx + P2 (x) sin βx) e αx
Find a particular solution (nghiệm riêng) of the form
yp (x) = x λ (Q1 (x) cos βx + Q2 (x) sin βx) e αx , (25)
where degQ1 = degQ2 = max{degP1 , degP2 } and
(
0 if α ± iβ is not a complex root of (18),
λ=
1 if α ± iβ is a complex root of (18).
Le Cong Nhan (Visiting Lecturer at University of Economic
Chapter Ho Chi MinhEquations
4. Differential City) and Applications 22 / 28
Example 11
Solve y ′′ + 2y ′ − 3y = 4x − 5.
Le Cong Nhan (Visiting Lecturer at University of Economic
Chapter Ho Chi MinhEquations
4. Differential City) and Applications 23 / 28
Example 12
Find a particular solution of y ′′ − y ′ + y = 2 sin 3x.
Le Cong Nhan (Visiting Lecturer at University of Economic
Chapter Ho Chi MinhEquations
4. Differential City) and Applications 24 / 28
Example 13
Solve y ′′ + 2y ′ − 3y = 4x − 5 + 6xe 2x .
Le Cong Nhan (Visiting Lecturer at University of Economic
Chapter Ho Chi MinhEquations
4. Differential City) and Applications 25 / 28
Example 14
Find a particular solution of y ′′ − 5y ′ + 4y = 2e x .
Le Cong Nhan (Visiting Lecturer at University of Economic
Chapter Ho Chi MinhEquations
4. Differential City) and Applications 26 / 28
Example 15
Solve the differential equation
y ′′ (t) + y ′ (t) − 2y (t) = 10
subject to the initial conditions y (0) = 12 và y ′ (0) = −2.
Le Cong Nhan (Visiting Lecturer at University of Economic
Chapter Ho Chi MinhEquations
4. Differential City) and Applications 27 / 28
Example 16
Given the demand and supply functions:
Qd = 40 − 2P − 2P ′ − P ′′
Qs = −5 + 3P
with initial conditions P(0) = 12 and P ′ (0) = 1. Find the time path P(t)
on the assumption that that the market is always cleared. Is this
market-clearing equilibrium dynamically stable?
Le Cong Nhan (Visiting Lecturer at University of Economic
Chapter Ho Chi MinhEquations
4. Differential City) and Applications 28 / 28