SMB2103Notes DE
SMB2103Notes DE
Lecture Notes
Kyambogo University
School of Education
Course Outline: SMB2103 Differential Equations; 2 CUs
Detailed Course Description
1. First Order Differential Equations (DEs) and their Applications
Classification of Differential Equations: exact, separable, Homogeneous, Linear &
Nonlinear Differential Equations, Integrating Factors. Examples include: physical
processes, Chemical processes like radioactive processes and Biological processes;
(10hrs). Test 1; 1 hour.
Examination: 70%
Total: 100%
References
1. Boyce W. E. and Diprima R. C., (2021). Elementary differential Equations and
boundary value problems, 12th Ed., Wiley, New York, USA.
2. William F. Trench (2013). Elementary Differential Equations with Boundary Value
Problems; Texas, USA.
3. Edward C.H. and Penney D.E. (2008). Elementary Differential Equations; 6th
Edition, Prentice Hall International, New Jersey, USA.
Facilitator:
Dr. Rao Awichi
0701958101/0772862362.
[email protected] OR [email protected]
Contents
1.1 Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.2 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.2.1 Illustration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.2.2 Order of a DE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.5.2 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
2.1 Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
2.2 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
ii
2.4 Solving Second Order DE Using Wronskian . . . . . . . . . . . . . . . . . . . 26
3.1 Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
3.2 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
3.6 Generalization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
iii
Chapter 1
Quotation:
“The mind once expanded to the dimensions of larger ideas, never returns to its original
size.” Oliver Wendell Holms.
1.1 Objectives
• define an ODE
1.2 Introduction
1
1.2.1 Illustration
Data Science:
The advent of Data Science especially Deep Learning Revolution (AI, Machine/Statistics
Learning and Neural Networks) has brought with it new set of tools for performing large
scale optimizations over numerous data sets, for example, a time series data y(t) using the
following differential equation:
dy
= f (y, t : θ);
dt
y(t0 ) = y0
Indeed time series models are best handled using difference equations (for discrete data).
Banker’s Equation:
Consider the following equation which could be yours as a banker! Let’s assume that your
account earns an interest of say 10%, then your account may have an equation of the form;
dY
= 0.1Y
dt
Price Elasticity:
You could have probably used this common term in economics at high school: price elasticity
of demand. Do you still recall what it is? If yes, say amen. If no, open your kabiriti and talk
to Mr. Google (he knows it all).
Newton’s Law:
The famous equation of motion: F = ma.
EER: Write it in a DE format.
1.2.2 Order of a DE
The order of a DE is the order of the highest derivative contained in the equation e.g:
2
dy
• dx
+ xy = k: DE of order 1.
4
d2 y dy
• dx2
+ 3 dx + 6y = 0: DE of order 2.
dy 2
= (sin xy + 2)2 : DE of order 1.
• dx
∂3u ∂u∂ 2 u
• ∂x3
+ ∂x∂t2
+ xtu = 0: PDE of order 3.
The degree of a DE is the power of the highest derivative in the DE, e.g:
• y ′′ + 2y ′ = 0: Order 2, deg. 1
• (y ′′ )2 + (y ′ )3 = k: Order 2, deg. 2
F (x, y, y ′ , y ′′ , · · · , y (n) ) = 0
A solution to a given DE is a function say f(y) which satisfies the DE, e.g;
if y ′ = 2y − 4x then y = 2x + 1 is a solution. This can be checked by direct differentiation and
substitution of y into the DE.
We often wish to find a solution of a given DE that satisfies certain prescribed conditions
called initial conditions. For example, the famous Newton’s second law of motion implies that
a particle of fixed mass m moving along a straight line with acceleration ẍ will experience a
force F = mẍ. The initial conditions in such a case would be: x0 = a0 and ẋ0 = a1
We now turn our attention to the study of methods of solving first order DEs of the form
y ′ = f (x, y)
3
where f is a continuous function ∀(x, y) in a rectangle D where
D = {(x, y) : A1 < x < A2 ; B1 < y < B2 }.
We usually find the general solution to the above equation or a particular solution subject to
the initial condition, y(xo ) = ao .
dy g(x)
= f (x, y) =
dx f (y)
Examples
dy 2 + sin x
= ; y(0) = 2.
dx 3(y − 1)2
Losung:
3(y − 1)2 dy = (2 + sin x)dx
=⇒ (y − 1)3 = 2x − cos x + c
p
=⇒ y = 1 + 3 (2x − cos x + c)
When x = 0, y = 2;
p
=⇒ 2 = 1 + 3 (0 − cos 0 + c)
p
=⇒ 3 (c − 1) = 1; =⇒ c = 2
p
∴ y = 1 + 3 (2x − cos x + 2) ⊡
4
Q2. Solve the DE: y ′ = x2 (1 + y) subject to y(0) = 3.
Losung:
On separating;
dy
= x2 dx and integrating;
1+y
=⇒ ln (1 + y) = 13 x3 + c
When x = 0; y = 3;
=⇒ ln 4 = c
=⇒ ln (1 + y) = 13 x3 + ln 4
x3
=⇒ ln 1+y4
= 3
1+y 1 3
=⇒ 4
= e3x
1 3
∴ y = 4e 3 x − 1 ⊡
Q3. Find the particular solution to the equation,
x3 y − y
y′ = ; y(0) = 1
y4 − y2 + 1
Losung:
Notice that the DE can be re-written as;
3 1
y −y+ dy = (x3 − 1) dx
y
On integrating we get;
y4 y2 x4
− + log|y| = −x+c
4 2 4
From the initial condition, check that c = − 14 .
Hence;
y 4 − 2y 2 + 4 log|y| = x4 − 4x − 1 ⊡
EER:
Q1. Find the general solutions to the following DEs:
i) y ′ = xy 2 − x ii) sin x cos2 y = y ′ cos2 x
2x3
p
iii) y ′ = (1 − y 2 )(1 − x2 ) iv) y′ = y(1+x4 )
.
5
1.3.2 Homogeneous DEs
For example:
i) f (x, y) = x2 + y 2 is homogeneous of degree 2 since,
= z 2 (x2 + y 2 )
= z 2 f (x, y).
= z 3 x3 + 2z 3 x2 y + 3z 3 xy 2 + 4z 3 y 3
= z 3 (x3 + 2x2 y + 3y 2 x + 4y 3 )
= z 3 f (x, y).
EER:
p
iii) Prove that h(x, y) = (x8 − 3x2 y 6 ) is homogeneous and state its degree.
iv) Show that f (x, y) = x3 − y 2 is not homogeneous.
Definition:
A first order DE, M (x, y)dx + N (x, y)dy = 0 is said to be homogeneous if M(x, y) and N(x, y)
are both homogeneous functions of the same degree.
Examples:
Q1. Show that the DE, (x2 − y 2 )dx + xydy = 0 is homogeneous.
Losung:
6
Now M(x, y) = x2 − y 2 . Let z ∈ R s.t,
= z 2 x2 − z 2 y 2
= z 2 (x2 − y 2 )
N (zx, zy) = xz × zy
= z 2 xy
Hence both M(x, y) and N(x, y) are homog. of the same degree, 2.
To solve a homog. DE, use the substitution y = xv or change the variable y to xv so that
dy = xdv + vdx and use the method of separation of variables above.
Q2. Solve the equation, (x2 − y 2 )dx + xydy = 0.
Losung:
The DE is homogeneous.
=⇒ y = xv; dy = xdv + vdx
∴ [x2 − (xv)2 ]dx + x(xv)[xdv + vdx)] = 0
=⇒ x2 dx − x2 v 2 dx + x3 vdv + x2 v 2 dx = 0
=⇒ x2 dx + x3 vdv = 0
=⇒ x2 dx = −x3 vdv
dx
=⇒ x
= −vdv
dx
R R
=⇒ x
= − vdv
2
=⇒ ln x = − v2 + c
v2
=⇒ 2
= c − ln x; let c = ln a.
=⇒ v 2 = 2 ln xa ; v = y/x
=⇒ y 2 = 2 x2 ln xa ⊡
dy
x2 = y 2 − xy + x2 ; y(1) = 2.
dx
7
Losung:
dy y 2 − xy + x2
=
dx x2
y 2 y
= − +1
x x
= v 2 − v + 1; v = y/x.
dy dv
From v = y/x; y = vx; =⇒ dx
= x dx + v.
dv
=⇒ x dx + v = v2 − v + 1
dv
=⇒ x dx = v 2 − 2v + 1 = (v − 1)2
x (v−1)2
=⇒ dx
= dv
dx dv
=⇒ x
= (v−1)2
=⇒ ln x = −(v − 1)−1 + c
=⇒ (v − 1)−1 = c − ln x = ln a
x
1
=⇒ v − 1 = a
ln ( x )
1
=⇒ v = 1 + a ;
ln ( x
v = y/x
)
1
=⇒ y = x 1 + a
ln ( x )
For any function of two variables, e.g f (x, y), the total differential, df, is given as,
∂f ∂f
df = dx + dy
∂x ∂y
8
For example, if f (x, y) = x2 y + 6x − y 3 , then,
∂ 2 ∂ 2
df = (x y + 6x − y 3 ) dx + (x y + 6x − y 3 ) dy
∂x ∂y
= (2xy + 6) dx + (x2 − 3y 2 ) dy.
=⇒ My = Nx
∂f ∂f
To find a solution, f (x, y) = c of the exact DE, integrate M (x, y) = ∂x
w.r.t x and N (x, y) = ∂y
w.r.t y and ‘merge’ the two integrals to obtain the general solution.
Examples:
Q1. Solve the exact DE, (y 2 − 2x)dx + (2xy + 1)dy = 0
Losung:
M (x, y) = y 2 − 2x.
R
=⇒ M (x, y) ∂x = y 2 x − x2 .
Also N (x, y) = 2xy + 1.
R
=⇒ N (x, y) ∂y = xy 2 + y.
∴ f (x, y) = xy 2 − x2 + y = c is the general solution.
Note that while ‘merging’ each term from each integral is written just once.
Q2. Find the general solution to the DE (2xy + x2 )y ′ + (1 + 2xy + y 2 ) = 0.
Losung:
Re-write the DE properly.
=⇒ (2xy + x2 )dy + (1 + 2xy + y 2 )dx = 0
R
=⇒ M (x, y) = 1 + 2xy + y 2 ; ⇒ M (x, y)∂x = x + x2 y + y 2 x.
R
Also N (x, y) = 2xy + x2 =⇒ N (x, y)∂y = xy 2 + x2 y.
9
∴ f (x, y) = x + x2 y + xy 2 = c ⊡
EER:
Solve the following DEs:
i) (3x2 y − 1) dx + (x3 + 6y − y 2 ) dy = 0; y(0) = 3
ii) (x cos xy) y ′ = −y cos xy + 2x; y(1) = 2
iii) sin t + t2 ey − 3)y ′ + (y cos t + 2tey ) = 0; y( π2 ) = 0
dy −3x2 +2xy
iv) dx
= x2 +y 2
; y(1) = −1.
If a DE of the form M (x, y) dx + N (x, y) dy = 0 is not exact, ∃ a function, µ(x, y) which when
multiplied into the DE makes the DE exact, i.e
My −Nx
i) If µ = µ(x)– a function of only x i.e if N
= p(x), then
R
p(x) dx
µ(x) = e
10
My −Nx
ii) If µ = µ(y)– a function of only y i.e if −M
= q(y), then
R
q(y) dy
µ(y) = e
∂ ∂ 2
My = (3xy − y 2 ) = 3x − 2y ̸= Nx = (x − xy) = 2x − y.
∂y ∂x
Now
My − Nx (3x − 2y) − (2x − y) 1
= = = p(x)
N x(x − y) x
Hence
R
p(x) dx
µ(x) = e = eln x = x.
µM
z }| {
(3x y − xy ) dx + (x3 − x2 y) dy = 0.
2 2
| {z }
µN
however,
My − Nx (x + y) cos y + sin y − sin y cos y
= =− = q(y)
−M −(x + y) sin y sin y
11
Note that Z Z
cos y
q(y) dy = − dy = −ln (sin y);
sin y
−1
R
⇒ µ(y) = e q(y) dy
= e−ln (sin y) = eln (sin y) = (sin y)−1 .
µM
z }| { cos y
(x + y) dx + x + dy = 0.
sin y
| {z }
µN
EER 2: Now solve by the method of the exact DE. Ans.: 21 x2 + xy + ln | sin y| = c
Examples:
Q1. Solve the IVP,
(3xy − y 2 ) dx + x(x − y) dy = 0; y(1) = 1.
Losung:
Now M(x, y) = 3xy − y 2 ; =⇒ My = 3x − 2y.
Also N(x, y) = x2 − xy; =⇒ Nx = 2x − y.
Thus My ̸= Nx ; =⇒ DE is not exact.
Now
My − Nx 3x − 2y − 2x + y x−y
= = = x−1 ; a fxn of only x.
N x(x − y) x(x − y)
But
My − Nx x−y
= 2 ; not a fxn of y alone !
−M y − 3xy
R
p(x) dx
∴ µ(x, y) = e
1
R
dx
=e x
= eln x
= x.
12
∴ µM (x, y) + µN (x, y) = 0 is now exact. Check that (µM )y = (µN )x !
Integrating µM and µN ;
Z Z
1
µM (x, y) ∂x = (3x2 y − xy 2 ) ∂x = x3 y − x2 y 2
2
Z Z
1
µN (x, y) ∂y = (x3 − x2 y) ∂y = x3 y − x2 y 2
2
∴ f (x, y) = x3 y − 21 x2 y 2 = c
From initial conditions, y(1) = 1, c = 1/2.
=⇒ x3 y − 21 x2 y 2 = 1
2
⊡
xy 2 + y 1
=⇒ µM = =y+ ; ⇒ (µM )y = 1,
xy x
x2 y − x 1
=⇒ µN = =x− ; ⇒ (µN )x = 1.
xy y
Hence the IF, µ(x, y) = (xy)−1 .
Now Z Z
1
µM ∂x = (y + ) ∂x = xy + ln |x|
x
Also Z Z
1
µN ∂y = (x − ) ∂y = xy − ln |y|
y
=⇒ f (x, y) = xy + ln |x| − ln |y| = c
=⇒ xy + ln | xy | = c ⊡
EER:
Q1. Obtain the general solution to the non exact DE,
1 2
(x + y) sin y dx + (x sin y + cos y) dy = 0. Ans: x + xy + ln | sin y| = c
2
13
Q2. Solve the IVP,
1
(3ex y + x) dx + ex dy = 0; y(0) = 1. Ans: y = [3e−3x + (1 − 2x)e−x ]
4
Q3. Given that the non exact DE, (5xy 2 − 2y) dx + (3x2 y − x) dy = 0 has an IF of the form
µ(x, y) = xa y b ; a, b ∈ Z+ , find the general solution to the DE.
Ans: x5 y 3 − 12 x4 y 2 = c.
An equation of the form, y ′ + P (x)y = Q(x) or a0 y ′ + a1 (x)y = b(x) is called a first order linear
DE. The method of solving such equations is similar to the IF method above. Once the DE
R
P dx
is in standard form, we obtain the IF, µ(x) = e
The LHS of the DE can be written in a simpler way as follows:
dy dy R
µ + µP y = µ + e P dx P y
dx dx
dy d R P dx
=µ +y e
dx dx
dy dµ
=µ +y
dx dx
d
= (µy).
dx
14
Multiplying through by the IF and simplifying, we get
d x2 2
(e y) = xex
dx
2 1 2
ex y = ex + k
2
1 −2
=⇒ y = + kex ⊡
2
Q2. Solve the IVP,
dy
+ x−1 y = sin x; y(π) = 1.
dx
Losung:
x−1 dx
R
P (x) = x−1 =⇒ µ(x) = e = eln x = x.
d
=⇒ dx
(xy) = x sin x
R
=⇒ xy = x sin x dx = −x cos x + sin x + c
From initial conditions, y(π) = 1, c = 0 (verify!!!)
∴ xy = sin x − x cos x
sin x
=⇒ y = x
− cos x ⊡
Q3. Solve the DE, y ′ = 2y + x; y(0) = 2.
Losung:
Write the DE as; y ′ − 2y = x; y(0) = 2 =⇒ P = −2; Q(x) = x.
R
−2 dx
=⇒ µ(x) = e = e−2x
=⇒ e−2x (y ′ − 2y) = xe−2x
=⇒ d
dx
(ye−2x ) = xe−2x
=⇒ ye−2x = xe−2x dx = c − x 1
e−2x (by Parts)
R
2
+ 4
=⇒ y = ce2x − x2 + 14
EER:
1 2
Q1. Find the general solution to the DE, (x + 1)y ′ = 1/y. Ans: (x + 1)e− 2 y = c
Q2. Solve the DE, x2 y ′ = −2y. Ans: y = ce2/x
15
1.4 Bernoulli’s Equation
The DE,
dy
+ P (x)y = y n Q(x)
dx
is called Bernoulli’s equation.
If n = 0, the equation reduces to the first order linear equation and if n = 1 the equation can
be written as,
y ′ + P (x)y = yQ(x) ⇔ y ′ + [P (x) − Q(x)]y = 0.
For any other values of n, the equation is no-longer linear, but can be transformed into a
linear equation by first multiplying throughout by y −n i.e
1
ω ′ + P (x) ω = Q(x); linear in ω
1−n
16
Integrating both sides,
2 2
e−x ω = e−x + k
2
=⇒ ω = y −2 = 1 + kex ⊡
Q2. Solve the following equation, y ′ − 5y = − 25 xy 3
Losung:
Here, n = 3.⇒ y −3 y ′ − 5y −2 = − 25 x. Let ω = y −2 .
=⇒ ω ′ = −2y −3 y ′ ; =⇒ y −3 y ′ = − 12 ω ′
The transformed equation is:
1 5
− ω ′ − 5ω = − x
2 2
=⇒ ω ′ + 10ω = 5x; =⇒ P (x) = 10
R
10 dx
=⇒ µ = e = e10x
Multiplying thru: by the IF and simplifying, we get,
d
(ωe10x ) = 5xe10x
dx
=⇒ ω = y −2 = x
2
− 1
20
+ ke−10x ⊡
EER:
Solve the following Bernoulli equations:
2
1) y ′ + xy = xy 3 Ans: y −2 = 1 + kex
− 21
2) xy ′ = y + ex y 3 ; x>0 Ans: y = (cx−2 − 2x−1 ex + 2x−2 ex )
17
1.5.1 Basic Sciences
You have possibly heard of the Radioactive Decay Law or Newton’s Law of Cooling in Physics
or the the Population Growth Rate in Biology or Price Elasticity of Demand in Economics or
the Safe Drug Dosage in Medicine or Rate of Diffusion/Absorption in Chemistry. All these
are applications of first order ODEs. E.g:
dN
• Population Growth Rate: dt
= kN =⇒ N = No ekt
dP
• Price of Commodities: dt
= k(D − S) k > 0 &P ↑ ses if D exceeds S
dT
• Newton’s Law of cooling: dt
= −k(T − θr )
1.5.2 Examples
Q1. Thorium (232 Th), a heavy metal is a radioactive material of atomic weight 232. The half-
life of 232 Th is approximately 1.4 × 1010 years. Compute the radioactive decay constant k for
232
Th. If a piece of the thorite mineral (in which 232 Th commonly occurs) initially contained 2
grams of 232 Th, how many years must elapse before 1.9 grams remain?
Losung:
For half-life cases, dN
dt
= kN =⇒ N (τ ) = No e−kτ = No
2
1
e−kτ = =⇒ kτ = ln 2; ∴k∼
= 0.495 × 10−10 .
2
Let No = 2 g and t1 be the time that elapses before 1.9 g remains. Then N (t1 ) = 2e−kt1 .
Thus,
1.9
N (t1 ) = 1.9 = 2e−kt1 ; =⇒ e−kt1 = ; ∴ t1 ∼
= 0.104 × 1010 years
2
18
Q2. According to Newton’s law of cooling, the rate of fall of temperature of a body is directly
proportional to the excess of its temperature over the surrounding, i.e
dT
∝ (T − θr ), where θr is room temperature.
dt
Given that the temperature of an object falls from 200 °C to 100 °C in 40 minutes in a room
temperature of 10 °C. Show that T can be written as T = 10 + 190e−kt ; k ∈ R. Find the time
taken for the temperature of the body to reach 50 °C.
Losung:
dT dT dT
R R
dt
∝ (T − θr ); =⇒ dt
= −k(T − θr ); =⇒ T −θr
= −k dt; =⇒ ln (T − θr ) = −kt + c
=⇒ T = θr + Ae−kt ;
From initial conditions, θr = 10, t = 0, T = 200; =⇒ A = 190
Thus T = 10 + 190e−kt ⊡
1
Also if t = 40 , T= 100, =⇒ k = 40
ln (19/9)
When T = 50; then
1
50 = 10 + 190e−kt ; =⇒ t = ln (19/4) = 83.41 mins ⊡
k
Q3. Econ: The equation for the growth of an investment with continuous compounding of
interest is a first-order differential equation. Let S(t) be the value of the investment at time t,
and let r be the annual interest rate compounded after every time interval δt. We can also
include deposits (or withdrawals). Let k be the annual deposit amount (k > 0) or withdrawal
(k < 0), and suppose that an installment is deposited after every time interval δt. The value
of the investment at the time t + δt is then given by
where at the end of the time interval δt, rδtS(t) is the amount of interest credited and kδt is
the amount of money deposited (k > 0) or withdrawn (k < 0).
The equation above can be rearranged into a DE as follows:
19
The equation for continuous compounding of interest and continuous deposits is obtained
by taking the limit δt → 0. The resulting differential equation is
dS
= rS(t) + k,
dt
which can solved with the initial condition S(0) = S0 , where S0 is the initial capital. We can
solve either by separating variables or by using an integrating factor.
As a simple illustration, consider the account held $10, 000 at time t, and r = 6% per year
and k = $12, 000 per year, say, and the compounding and deposit period is δt = 1 month =
1/12 year, then the interest awarded after one month is rδtS = (0.06/12) × $10, 000 = $50,
and the amount deposited is kδt = $1000.
dN
Q4. Logistic Equation: Consider the Malthusian exponential population growth: dt
=
kN =⇒ N = No ekt ; where No is the initial population size. However, when the population
growth is constrained by limited resources, a heuristic modification to the Malthusian growth
model results in the Verhulst equation,
dN N
= rN 1−
dt K
where K is called the carrying capacity of the environment. Making the equation dimension-
less using τ = rt and x = N/K leads to the logistic equation,
dx
= x(1 − x).
dτ
The logistic equation can then be solved using separable technique to the effect that the
population grows in size until it reaches the carrying capacity of its environment; i.e.
lim N (t) = K
t→∞
20
Chapter 2
Quotation:
“An idea which can be used once is a trick. If it can be used more than once it becomes a
method.”
George Polya and Gabor Szego.
2.1 Objectives
2.2 Introduction
Second order DEs involve 2nd derivatives of the unknown function. The general solution of
nearly all 2nd DEs contains two arbitrary constants and particular solutions require two initial
values.
21
A 2nd DE is an equation of the form,
OR
d2 y dy
2
+ p(x) + q(x)y = 0; y(xo ) = ao , y ′ (xo ) = a1
dx dx
Equations of the form,
F (x, y ′ , y ′′ ) = 0 (2.1)
OR
F (y, y ′ , y ′′ ) = 0 (2.2)
may be reduced to first order (which could be linear) and then solved using first order meth-
ods of Chapter (1). Notice that (2.1) is independent of y and (2.2) is independent of x.
Examples:
Q1. Solve the IVP: xy ′′ + 2y ′ + x = 1, y(1) = 2, y ′ (1) = 1
Solution:
This is of type (2.1) above, independent of y.
Let y ′ = p so that y ′′ = p′
=⇒ xy ′′ + 2y ′ + x = xp′ + 2p + x
∴ xp′ + 2p + x = 1
=⇒ p′ + x2 p + 1 = 1
x
(linear in p).
2 2
R
=⇒ p′ + x2 p = 1
x
− 1; (IF, µ(x) = e x
dx
= eln x = x2 .)
=⇒ x2 (p′ + x2 p) = x2 ( x1 − 1)
d
=⇒ dx
(x2 p) = x − x2 . Integrating both sides;
=⇒ x2 p = 12 x2 − 13 x3 + c1
=⇒ p = 1
2
− x
3
+ c1 x−2
From initial condition, y ′ (1) = 1; p = y ′ ⇒ c1 = 5/6
=⇒ y ′ = p = 12 − x3 + 56 x−2
=⇒ y = ( 12 − x3 + 56 x−2 ) dx = x
− 16 x2 + 65 x−1 + c2
R
2
x 1 2 5 −1 5
∴y= − x + x + ⊡
2 6 6 2
22
Q2. Solve y ′′ + (y ′ )3 y = 0; y(0) = 1; y ′ (0) = −1
Solution:
This is of type (2.2) above i.e it is independent of x. Let y ′ = p.
dp dp dy dp
=⇒ y ′′ = dx
= .
dy dx
= p dy
Hence y becomes the independent variable.
dp
=⇒ y ′′ + (y ′ )3 y ≡ p dy + p3 y = 0 (separable)
2c−y 2
=⇒ p−2 dp = −ydy =⇒ − p1 = − 12 y 2 + c = 2
−2
=⇒ p = 2c−y 2
. From y ′ (0) = −1, c = 3/2.
=⇒ p = y ′ = 2
y 2 −3
=⇒ (y 2 − 3)dy = 2dx; =⇒ 13 y 3 − 3y = 2x + c2
From y(0) = 1, ⇒ c2 = −8/3
1 8
∴ y 3 − 3y = 2x − ⊡
3 3
OR
y ′′ + p(x)y ′ + q(x)y = r(x)
If r(x) ≡ 0; i.e
y ′′ + p(x)y ′ + q(x)y = 0,
23
Important Results
• If y1 (x) and y2 (x) are linearly independent (LI) solutions of the linear homogeneous
equation, then every solution is a linear combination of y1 (x) and y2 (x),i. e
y = c1 y1 (x) + c2 y2 (x); c1 , c2 ∈ R
y = ȳ + yh .
For example:
For the DE
y ′′ + y = 0 : y1 = cos x & y2 = sin x
Definition:
Given that y1 (x) and y2 (x) are solutions to the DE,
y1 (x) y2 (x)
W(y1 , y2 ) = = y1 y2′ − y2 y1′ .
y1′ (x) y2′ (x)
an y n + an−1 y n−1 + · · · + a1 y ′ + ao y = 0,
24
then a necessary and sufficient condition for the solutions {yi }ni=1 to be LI is that their Wron-
skian is identically different from zero, i.e
W(y1 , y2 , · · · , yn ) ̸= 0.
x2 3x − 1
W (y1 , y2 ) =
2x 3
= 2x − 3x2
ii)
1 x x2
W (y1 , y2 , y3 ) = 0 1 2x
0 0 2
= 1.1.2
=2
EER:
Q1. Determine whether the set of solutions given alongside the DEs are either LI or LD:
i) y ′′ + 3y ′ + 2y = 0; y1 = e−2x & y2 = e−2x + e−x
ii) y ′′ + 9y = 0; y1 = cos 3x & y2 = cos(3x + π3 )
iii) y ′′ − 2y ′ + y = 0; y1 = ex & y2 = xex
Q2. Show that y = cx + c2 x ln x is a general solution of x2 y ′′ − xy ′ + y = 0; x > 0. Find the
solutions to this equation that satisfy the initial conditions below:
(i) y(1) = 1, y ′ (1) = 0 (ii) y(2) = 0, y ′ (2) = 0 (iii) y(1) = 1, y ′ (1) = −1.
Q3. Show that y1 = x2 and y2 = x−1 are LI solutions to the DE x2 y ′′ − 2y = 0. Find the unique
solution subject to y(1) = -2 and y ′ (1) = 7.
25
Theorem:
Let y1 and y2 be LI solutions to the 2nd order DE: a2 (x)y ′′ + a1 (x)y ′ + a0 (x)y = 0, then the
Wronskian W (y1 , y2 ) satisfies the first order DE,
a1 (x)
W′ + W =0
a2 (x)
Proof:
Since y1 and y2 be LI solutions to the DE;
a1 ′ a0
a2 y1′′ + a1 y1′ + a0 y1 = 0 ⇔ y1′′ + y + y1
a2 1 a2
a1 ′ a0
=⇒ y1′′ = − y
a2 1
+ y
a2 1
a1 ′ a0
Similarly, y2′′ =− y
a2 2
+ y
a2 2
=−W
z }| {a a1
1
′
W = (y2 y1′ − y1 y2′ ) = −W
a2 a2
Thus
a1
W′ + W =0
a2
This is a separable first order DE where the solution can be given as,
R a1
− dx
W = ke a2
; k ∈ R; usually k = 1.
d y1 y2′ − y2 y1′ W
(y2 /y1 ) = 2
= 2
dx y1 y1
26
Solution:
Comparing the DE with a standard 2nd order DE; a2 y ′′ + a1 y ′ + ao y = 0, we see that;
x2 +2
a2 = x; a1 = −2; ao = x
, thus;
R a1
− dx
W = ke a2
−2
R
= ke− x
dx
2
= keln x ; k = 1
= x2 .
d W
Using (y /y1 )
dx 2
= y12
,
d x2
=⇒ (y /y1 )
dx 2
= (x sin x)2
,
d 1
=⇒ (y /y1 )
dx 2
= sin2 x
= cosecx ,
y2
R
=⇒ y1
= cosecx dx = − cot x
=⇒ y2 = −y1 cot x = −x cos x; y1 = x sin x
∴ y = c1 y1 + c2 y2 = c1 x sin x − c2 x cos x ⊡
Q2. Solve the DE: (x2 + 1)y ′′ − 2xy ′ + 2y = 0 given that y1 = −x is one of the LI solutions to
the DE.
Solution:
On comparison: a2 = x2 + 1; a1 = −2x; and ao = 2. Therefore;
R a1
− dx
W = ke a2
−2x
R
− dx
= ke x2 +1x
2 +1)
= keln (x ; k=1
= x2 + 1.
d W x2 +1
Now (y /y1 )
dx 2
= y12
= (−x)2
,
y2 x2 +1 1
R
=⇒ y1
= x2
dx = x − x
=⇒ y2 = −y1 (x − x1 ) = 1 − x2 ; y1 = −x
∴ y = c1 y1 + c2 y2 = −c1 x + c2 (1 − x2 ) ⊡
Q3. Solve the DE, xy ′′ + (1 − 2x)y ′ + (x − 1)y = 0 given that y = ex is one of the LI solutions
to the DE. Find the unique solution subject to y(1) = e; y ′ (1) = −3e.
Solution:
27
Here, a2 = x; a1 = 1 − 2x; ao = x − 1
W = x−1 e2x Verify!!!!
=⇒ d
(y /y1 )
dx 2
= W
y12
= x−1 e2x .e−2x = x−1
∴ y2 = y1 ln x = ex in x
=⇒ y = c1 ex + c2 ex ln x
From initial conditions, y(1) = e; =⇒ c1 = 2; verify
Now y ′ = c1 ex + c2 [ex ln x + x−1 ex ]. Work it out!
Also from y ′ (1) = −3e; c2 = −5. Check it out!
∴ y = 2ex − 5ex ln x ⊡
ay ′′ + by ′ + cy = 0; a, b, c ∈ R.
am2 + bm + c = 0; a ̸= 0
This equation is variously called Auxiliary Quadratic Equation, AQE or Characteristic Equa-
tion or Quadratic Polynomial Equation. The root of the AQE is given as,
p
−b ± (b2 − 4ac)
m= .
2a
Three cases arise from the root, depending on the discriminant, i.e
28
Case I: Real and Distinct Roots
For real roots say λ1 and λ2 , the general solution to the DE is given by,
y = c1 y1 + c2 y2 = c1 eλ1 x + c2 eλ2 x
eλ1 x eλ2 x
W(y1 , y2 ) = = (λ2 − λ1 )e(λ1 +λ2 )x .
λ1 eλ1 x λ2 eλ2 x
29
∴ y = c−x
e + c2 xe
−x
If the roots of the AQE are complex (b2 < 4ac) i.e λ1 = u + iv and λ2 = u − iv = λ̄1 , then the
general solution to the DE is given as,
y = c1 y1 + c2 y2 = c1 eλ1 x + c2 eλ2 x
where,
eλ1 x = e(u+iv)x = eux . eivx = eux (cos vx + i sin vx)
and
eλ2 x = eux (cos vx − i sin vx)
Examples:
Q1. Solve the DE, y ′′ + 6y ′ + 25y = 0
Solution:
AQE: m2 + 6m + 25 = 0
√
−b± (b2 −4ac)
=⇒ m = 2a
= −3 ± 4i (verify)
Thus y = e−3x (c1 cos 4x + c2 sin 4x) ⊡
30
From y ′ (0) = 2, check that c2 = −1/2.
∴ y = e3x (cos 2x − 21 sin 2x) ⊡
EER:
Solve the following DEs:
1. y ′′ − 2y ′ − 3y = 0;
2. y ′′ − y ′ − 6y = 0; y(0) = 0, y ′ (0) = −1
d2 B
3. dx2
− 10 dB
dx
+ 25B = 0
4. y ′′ + 2y ′ + 10y = 0
5. y ′′ + 4y ′ = 0; y(0) = 2, y ′ (0) = −1
7. y ′′ + 2y ′ + 3y = 0; y(0) = 0, y ′ (0) = 3
2
d y dy
8. 2 dx2 − 2 dx + y = 0.
d2 d
L= 2
+ b1 (x) + b0 (x)
dx dx
with properties;
• L(cy) = cL(y)
31
Step 1: Find the complimentary function yc of the homogeneous part,
L(y) = 0 i.e yc = c1 y1 + c2 y2 .
y = y c + yp .
This is based on the form of g(x), i.e whether its a polynomial or exponential or trigonometric
(transcendental or sinusoidal) function.
=⇒ y = yc + yp = c1 e4x + c2 e−x − 43 x + 5
16
If g(x) were of deg. 2, then yp would be of the form Ax2 + Bx + C; etc and proceed as above.
Example 2:
32
Solve the equation: y ′′ − 3y ′ − 4y = 4x2 .
Solution:
As before, yc = c1 e4x + c2 e−x .
Now yp = Ax2 + Bx + C.
Differentiate, substitute and solve for A, B and C. Ans: A = -1, B = 3/2 and C = -13/8.
∴ y = c1 e4x + c2 e−x − x2 + 23 x − 13
8
⊡
The function g(x) here is of the type, keax . The trial solution may take the following forms:
g(x) yp
eax Aeax
kxex (Ax + B)ex
x2 e−x (Ax2 + Bx + C)e−x
ax2 + ke2x Ax2 + Bx + C + (Dx + E)e2x
OR more generally, for any form of g(x) in exponential form, the trial solution may be written
as,
yp = peax + qx + k
Example 1:
2
Solve: 10 ddt2x + 13 dx
dt
− 3x = 21e2t − 6t + 2
Solution:
Complimentary function: 10x′′ + 13x′ − 3x = 0.
√
2 −b± (b2 −4ac)
AQE: =⇒ 10λ + 13λ − 3 = 0; ⇒ λ = 2a
= (−3/2, 1/5) (real and distinct)
3 1
∴ xc = c1 e− 2 t + c2 e 5 t
Let xp = pe2t + qt + k, ⇒ x′p = 2pe2t + q; x′′p = 4pe2t
Substituting in the equation,
⇒ 10(4pe2t ) + 13(2pe2t + q) − 3(pe2t + qt + k) = 21e2t − 6t + 2
Collecting like terms and equating coefficients of the like terms and simplifying; we get: p
=1/3, q = 3 and k = 8.
3 t
∴ x = xc + xp = c1 e− 2 t + c2 e 5 + 13 e2t + 2t + 8
Example 2:
Solve; y ′′ + 3y ′ + 2y = 10e3x ; y(0) = 1, y ′ (0) = 0.
33
Solution:
Complimentary function: y ′′ + 3y ′ + 2y = 0.
√
−b± (b2 −4ac)
AQE: =⇒ λ2 + 3λ + 2 = 0; ⇒ λ = 2a
= (−1, −2) (real and distinct)
∴ yc = c1 e−x + c2 e−2x
Let yp = Ae3x , ⇒ yp′ = 3Ae3x ; yp′′ = 9Ae3x
Substituting in the equation and solving for A, we get A = 1/2.
∴ y = yc + yp = c1 e−x + c2 e−2x + 12 e3x
From initial conditions, y(0) = 1 and y’(0) = 0; after substituting and solving the resulting
simultaneous equation, c1 = −1/2; c2 = 1
⇒ y = − 12 e−x + e−2x + 12 e3x ⊡
Example 3:
Solve the IVP: y ′′ + 3y ′ + 2y = 6xex ; y(0) = 1; y ′ (0) = 0.
Solution: y = 72 e−x − 35 e−2x + (x − 56 )ex ⊡ (Working left as EER!!)
The complimentary function is obtained as before. For yp , if g(x) is of the form a sin kx +
b cos kx, then the particular solution takes the form, p sin kx + q cos kx. OR one may consider
the following table:
g(x) yp
sin 2α A cos 2α + B sin 2α
2 cos 2α A cos 2α + B sin 2α
x sin 3α (Ax + B) cos 3α + (Cx + D) sin 3α
x sin α + 2 cos α (Ax + B) cos α + (Cx + D) sin α
Example 1:
Find the solution to the DE: y ′′ + 3y ′ + 2y = cos x, y(0) = 0 = y ′ (0).
Solution:
Complimentary function:
=⇒ λ2 + 3λ + 2 = 0; ⇒ (λ + 1)(λ + 2) = 0; ⇒ λ = (−1, −2)
∴ yc = c1 e−x + c2 e−2x
For the particular solution:
yp = p cos α + q sin α; yp′ = −p sin α + q cos α; yp′′ = −p cos α − q sin α
34
Substituting in the DE and solving the resulting simultaneous equation, p = 1/10 and q =
3/10.
1 3
∴ yp = 10
cos α + 10
sin α
=⇒ y = c1 e−x + c2 e−2x + 1
10
cos α + 3
10
sin α
Solving for c1 and c2 from initial conditions, we find that,
y = 52 e−2x − 21 e−x + 1
10
(cos α + 3 sin α) ⊡
Example 2:
Solve the equation: y ′′ − 3y ′ − 4y = 2 sin α
Solution:
AQE: λ2 − 3λ − 4 = 0; ⇒ (λ − 4)(λ + 1) = 0; ⇒ λ = (4, −1); yc = c1 e4x + c2 e−x
For yp ; use yp as p cos α + q sin α, differentiate it twice, substitute in the DE and solve for p
and q to obtain p =-5/17 and q = 3/17.
∴ y = c1 e4x + c2 e−x − 5
17
cos α + 3
17
sin α ⊡
EER:
Q1. Find the general solution to the following:
(i) y ′′ + y = 1 + x (ii) y ′′ + 4y = e3x (iii) y ′′ + y ′ + 3y = e2x
(iv) y ′′ − y ′ + 2y = x (v) y ′′ − 5y ′ + 6y = e−x (vi) y ′′ − y = 5 − 3x
Q2. Solve the following IVPs:
(i) y ′′ − y = e2x , y(0) = −1; y ′ (0) = 1 (ii)y ′′ + y = 2ex ; y(0) = 1; y ′ (0) = −1
(iii) B ′′ − 4B ′ + 4B = x; B(0) = 0; B ′ (0) = 1 (iv) y ′′ − 4y ′ + 3y = ex ; y(0) = y ′ (0) = 0
35
Ae−x + 3Ae−x − 4Ae−x = e−x ⇔ 0 = e−x !!; x undefined!!
Now attach a polyl of multiplicity n − 1 = 2 − 1 = 1 to yp , i.e;
yp = xAe−x ; yp′ = −xAe−x + Ae−x ; yp′′ = xAe−x − 2Ae−x
Substituting in the DE and solving for A, we find that A = -1/5.
∴ y = c1 e4x + c2 e−x − x5 e−x ⊡
Example 2:
Solve the DE: y ′′ − 4y ′ = 2x
Solution:
For yc : AQE: λ2 − 4λ = 0; ⇒ λ = (0, 4); ↱ yc = c1 + c2 e4x
For yp : g(x) = 2x; ⇒ yp = Ax + B (cf c1 and B)!!
=⇒ yp′ = A; yp′′ = 0
=⇒ −4A = 2x!! yet A ∈ R!!
Now use yp = x(Ax + B).
Differentiating twice and substituting into the DE and solving simultaneously:
A = −1/4 and B = −1/8.
x x
∴ y = c1 + c2 e4x − 4
− 8
⊡
Example 1:
Solve the IVP: y ′′ − y ′ − 6y = −ex + 12x; y(0) = 1; y ′ (0) = −2
Solution:
For yc : AQE: λ2 − λ − 6 = 0; =⇒ λ = (−2, 3) =⇒ yc = c1 e−2x + c2 e3x .
For yp : g(x) = 12x − ex
For g1 (x) = 12x; yp1 = Ax + B; yp′ 1 = A; yp′′1 = 0
36
Substituting: 0 − A − 6(Ax + B) = 12x and solving for A and B, we get A = −2 and B = 1/3.
∴ yp1 = −2x + 1/3
Similarly for g2 (x) = −ex ; yp2 = Aex ; yp′ 2 = Aex ; yp′′2 = Aex
Substituting: Aex − Aex − 6Aex = −ex and solving for A, we get A = 1/6.
∴ yp2 = 61 ex ; =⇒ yp = yp1 + yp2 = 61 ex − 2x + 13 .
=⇒ y = c1 e−2x + c2 e3x + 16 ex − 2x + 31 .
From initial conditions: c1 = 1/3; c2 = 1/6
∴ y = 13 (e−2x + 1) + 16 (e3x + ex ) − 2x ⊡
Example 2:
Find the complete solution to the equation: y ′′ + 4y = x sin 2x + 8
Solution:
y = c1 cos 2x + c2 sin 2x − 81 x2 cos 2x + 1
16
x sin 2x + 2 (verify).
ax2 y ′′ + bxy ′ + cy = 0
OR
b ′ c
y ′′ + y + 2 y = 0; a, x ̸= 0
ax ax
To solve such an equation, use the substitution x = et to change the given equation to a
standard 2nd order DE; i.e;
dx
= et = x
dt
dy dy dx dy
=⇒ = × =x
dt dx dt dx
and
d2 y d2 y
d dy dx dy d dy dy
2
= x = × +x× = + x2 2
dt dt dx dt dx dx dt dt dx
2
2dy d2 y dy
=⇒ x = 2 −
dx2 dt dt
OR alternatively, one may use the substitution, y = xm and solve for m.
If y = xm , y ′ = mxm−1 ; y ′′ = m(m − 1)xm−2 . Substituting in the DE yields the following
37
cases:(for m1 and m2 roots):
Case 2: m1 = m2 = m then y = c1 xm + c2 xm ln x
Example:
Solve the equation: x2 y ′′ − 3xy ′ + 3y = 0
Solution:
y = xm obtain y ′ and y ′′ as above. Substituting into the equation, simplifying and solving for
m, we find m = (1, 3) (real and distinct roots).
∴ y = c1 x + c2 x 3
EER: Find a particular solution s.t y(1) = 2 and y ′ (0) = 1.
38
Chapter 3
Quotation:
“I believe that mathematical reality lies outside us, that our function is to discover or observe
it, and that the theorems which we prove, and which we describe grandiloquently as our
“creations,” are simply the notes of our observations.” Hardy, Godfrey H. (1877 - 1947)
3.1 Objectives
solve higher order linear DEs using several methods e.g. undetermined coefficients, Wron-
skian, variation of parameters, order reduction, etc
3.2 Introduction
39
Both of these equations will have n initial conditions of the form;
The solution will also have n arbitrary constants. The equations may be homogeneous or
non homogeneous depending on the right hand functions, h(x) or g(x).
If the coefficients bj s are constants, then the equation is called constant coefficient equation.
Using the L operator notation i.e.
dn dn−1 d
L= n
+ b n−1 n−1
+ · · · + b1 + b0 (x),
dx dx dx
L(y) = 0 − − − homogeneous
The equation x2 y (iv) + 5x3 y ′′ + 8y = 4x2 can be written as y (iv) + 5xy ′′ + 8x−2 y = 4 in which
case L is,
d4 d3 d2 d
L= 4
+ 0. 3
+ 5x 2
+ 0. + 8x−2
dx dx dx dx
with b3 = 0, b2 = 5x, b1 = 0, b0 = 8x−2 , and g(x) = 4.
d
The other notation is to use D for the differential operator, dx
e.g,
For the DE, 2y ′′′ + y ′′ + 4y ′ − 6y = sin x we have,
L = 2D3 + D2 + 4D − 6
y = c1 y1 + c2 y2 + · · · + ck yk
40
is a solution to L(y) = 0
For example, if the solutions to the DE (D3 − 4D2 + 5D − 2)y = 0 are:
y1 = ex , y2 = xex , and y3 = e2x then
y = c1 ex + c2 xex + c3 e2x ; ci ∈ R
is also a solution.
If yi }ki=1 are solutions to L(y) = 0, then the yi s are LI if
c1 y1 + c2 y2 + · · · + ck yk = 0.
Iff W(y1 , y2 , · · · , yn ) ̸= 0 then the set {y1 , y2 , · · · , yn } is a fundamental set of the homoge-
neous equation.
For example, the equation (D3 − 4D2 + 5D − 2)y = 0 has solutions y1 = ex , y2 = xex y3 = e2x .
The Wronskian is computed as;
ex xex e2x
W (y1 , y2 , y3 ) = ex ex + xex 2e2x
ex 2ex + xex 4e2x
= e4x ̸= 0
Hence {ex , xex , e2x } is a fundamental set for the equation. A general solution is thus given
as,
y = c1 ex + c2 xex + c3 e2x ⊡
Theorem
If yp is a particular solution to the non homogeneous equation whose corresponding homo-
41
geneous equation has {y1 , y2 , · · · , yn } as a fundamental set, then the general solution of the
non homogeneous equation is written as,
y = yc + yp
where yc = c1 y1 + c2 y2 + · · · + cn yn .
Examples:
Determine whether or not the solutions given are a fundamental set of the given DEs:
1) y ′′′ − 3y ′′ + 2y ′ = 0 : y1 = 1, y2 = ex , y3 = e2x .
2) (D4 − 8D3 + 24D2 − 32D + 16)y = 0 : y1 = e2x , y2 = xe2x , y3 = x2 e2x , y4 = x3 e2x .
3) y ′′′ − 3y ′′ − y ′ + 3y = 0 : y1 = e3x + ex + e−x , y2 = 2e3x + 3ex − e−x , y3 = 3e3x + 4ex .
4) x2 y ′′′ + xy ′ − y ′ = 0 : y1 = 1 + x2 , y2 2 + x2 , y3 = ln x.
5) y ′′′ − 3y ′′ − y ′ + 3y = 0 : y1 = e3x + ex , y2 = ex − e−x , y3 = e3x + e−x .
λn + bn−1 λn−1 + · · · + b1 λ + b0 = 0
The roots of the CE are the roots of the nth order homogeneous equation above. If the CE
has n distinct roots, {λ1 , · · · , λn } then the set {y1 = eλ1 x , y2 = eλ2 x , · · · , yn = eλn x } is a
fundamental set for the nth order DE.
Examples:
Q1. Find the general solution to the DE, y ′′′ − 2y ′′ − y ′ + 2y = 0
Solution:
42
CE: λ3 − 2λ2 − λ + 2 = 0.
If λ = 1 then LHS of the CE is zero, so (λ − 1) is a factor to the CE. Factorizing (or performing
the long division), we obtain,
λ3 − 2λ2 − λ + 2 = (λ − 1)(λ2 − λ − 2)
But (λ2 − λ − 2) = (λ − 2)(λ + 1)
=⇒ (λ − 1)(λ − 2)(λ + 1) = 0
∴ λ = (1, 2, −1). Real and distinct roots.
=⇒ y1 = ex , y2 = e2x , y3 = e−x .
Thus the general solution to the DE is: y = c1 ex + c2 e2x + c3 e−x
Q2. Obtain an expression for the general solution to the DE: (D2 − 1)(D2 + 4) = 0.
Solution:
CE: (λ2 − 1)(λ2 + 4) = 0
=⇒ λ = ±1 real and distinct roots and λ = ±2i complex roots.
∴ y1 = ex , y2 = e−x , y3 = e2ix , y4 = e−2ix .
Recall that for complex roots, y = eux (c1 cos vx + c2 sin vx)
Hence y3,4 = e0 (c1 cos 2x + c2 sin 2x) = c3 cos 2x + c4 sin 2x
Thus,
y = c1 y1 + c2 y2 + c3 y3 + c4 y4
1 1 1
∴ y = ex − cos x − sin x ⊡
2 2 2
43
Q4. Find the fundamental set of solutions to the DE below and compute the Wronskian at
x = 0; (D3 + D2 − 4D − 4)y = 0
Solution:
CE: λ3 + λ2 − 4λ − 4 = 0
Factors: (λ + 1)(λ − 2)(λ + 2) =⇒ λ = (2, −1, −2)
Fundamental set = {e2x , e−x , e−2x }
Thus,
e2x e−x e−2x
W (y1 , y2 , y3 ) = 2e2x −e−x −2e−2x
4e2x e−x 4e−2x
Note that if a root to the CE has multiplicity m > 1, then the set,
are LI solutions.
EER:
Q1. Solve the following IVPs
i) (D − 2)3 y = 0; y(0) = 1, y ′ (0) = −1, y ′′ (0) = 0
ii) y ′′′ − y ′′ + y ′ − y = x; y(0) = y ′ (0) = 0; y ′′ (0) = 1.
Q2. Find the fundamental set and compute the Wronskian at x = 0 for the following DEs:
i) y ′′′ + 2y ′′ + 5y ′ = 0 ii) (D − 1)3 y = 0.
This is an extension from 2nd order DEs to the nth order DEs:
44
• g(x) = eαx q(x); α ∈ R, q(x) a polyl of deg m
The CE will have n roots, some of which with multiplicities bigger than 1.
yp = xr (A0 + A1 x + · · · + Am xm )
Examples:
Q1. Solve the DE: y ′′′ − 3y ′′ + 2y ′ = 1 − x2 .
Solution:
CE: λ3 − 3λ2 + 2λ = 0; ⇒ λ(λ2 − 3λ + 2) = 0
=⇒ λ(λ − 1)(λ − 2) = 0
=⇒ λ = 0 (multiplicity 1); λ = (1, 2)
=⇒ yc = c1 e0 + c2 ex + c3 e2x = c1 + c2 ex + c3 e2x
For yp :
Use yp = x1 (A0 + A1 x + A2 x2 ) = A0 x + A1 x2 + A2 x3
∴ yp′ = A0 + 2A1 x + 3A2 x2 ; yp′′ = 2A1 + 6A2 x; yp′′′ = 6A2
Substituting yp and its derivatives into the DE and solving, we find,
1 3 5
A2 = − ; A1 = − , A0 = −
6 4 4
45
=⇒ yp = x(− 54 − 43 x − 61 x2 )
∴ y = c1 + c2 ex + c3 e2x + − 45 x − 34 x2 − 16 x3 ⊡
– yc is obtained as usual.
–for yp : Trial solution: yp = (A0 + A1 x + · · · + Am xm )eαx if α is not a root for yc .
–if α is a characteristic root of multiplicity r > 0, then the trial solution is:
yp = xr (A0 + A1 x + · · · + Am xm )eαx
–the general solution is then; y = yc + yp .
46
3.4.3 Case 3 and 4: g(x) has transcendental form
EER:
See Exercise 4.3 (Nos 1–20), page 222, Miller 2008.
a2 y ′′ + a1 y ′ + a0 y = f (x)
OR
y ′′ + p(x)y ′ + q(x)y = g(x)
47
v1 (x) and v2 (x) respectively; i.e
y = v1 (x)y1 + v2 (x)y2
The replacements are made while obtaining the trial solution, yp . Hence
yp = v1 (x)y1 + v2 (x)y2 .
When yp′′ is substituted into the standard 2nd order DE: y ′′ + b1 y ′ + b0 y = g(x) and simplified,
we obtain the equations:
v1′ y1 + v2′ y2 = 0
−gy2 gy1
v1′ = and v2′ =
y1 y2′ − y2 y1′ y1 y2′ − y2 y1′
−gy2
Z Z
gy1
∴ v1 = dx and v2 = dx
W (y1 , y2 ) W (y1 , y2 )
For example:
Solve the DE: y ′′ + y = tan x; x ∈ (− π2 , π2 ).
Solution:
AQE: λ2 + 1 = 0; =⇒ λ = ±i
=⇒ y1 = cos x and y2 = sin x =⇒ yp = v1 cos x + v2 sin x Differentiating yp twice (not-
ing that v1′ cos x + v2′ sin x = 0), substituting into the DE and solving the resulting equation
48
simultaneously, we get,
Example 2:
ex
Solve: y ′′ − 2y ′ + y = (1+x2 )
using the method of variation of parameters.
Solution:
AQE: λ2 − 2λ + 1 = 0; =⇒ λ = 1(repeated, r = 1).
=⇒ yc = c1 ex + c2 xex
Trial solution: yp = v1 ex + v2 xex . Differentiate twice, substitute into the DE and solve the
resulting equation to give v2 = tan−1 x and v1 = − 12 ln (1 + x2 )
⇒ yp = − 12 ln (1 + x2 )ex + xex tan−1 x
1
∴ y = c1 ex + c2 xex − ln (1 + x2 )ex + xex tan−1 x ⊡
2
3.6 Generalization
49
And likewise for higher derivatives.
The Wronskian is obtained from.
y1 y2 ··· yn
y1′ y2′ ··· yn′
W(y1 , · · · , yn ) = .. .. .. ̸= 0
. . ··· .
(n−1) (n−1) (n−1)
y1 y2 ··· yn
0 xex e−x
=⇒ W1 = 0 (x + 1)ex −e−x = (−2x − 1)e5x
e5x (x + 2)ex e−x
ex 0 e−x
=⇒ W2 = ex 0 −e−x = −2e5x
ex e5x e−x
50
ex xex 0
=⇒ W3 = ex (x + 1)ex 0 = e7x
ex (x + 2)ex e5x
W1
∴ V1′ = = 14 e4x − 21 xe4x
=⇒ V1 = { 41 e4x − 21 xe4x } dx = 18 (1 − 2x)e4x
R
W
Also V2′ = W 1 4x 1
e dx = − 81 e4x
R 4x
W
2
= − 2
e =⇒ V 2 = − 2
x x −x 1 3
∴ y = c1 e + c2 xe + c3 e + − x e5x
6 8
EER:
Solve the following DEs by the method of variation of parameters:
a) y ′′ − 5y ′ + 6y = 2ex b) y ′′ − y ′ − 2y = 2e−x c) y ′′ + 4y ′ + 4y = x−2 e−2x
51