MAT3110 Notes On ODEs With Variable Coefficients and Systems
MAT3110 Notes On ODEs With Variable Coefficients and Systems
1 Introduction
Linear differential equations with variable coefficients arise in many areas of mathematics,
physics, and engineering. Unlike constant coefficient equations, these equations require spe-
cialized techniques for their solution. In this chapter, we focus on two important methods:
the Power Series Method and the analysis of Euler (Cauchy-Euler) Equations.
1
2
where:
• an are coefficients,
• x is the variable.
Through out this topic, we will be working with power series whose center is 0.
Example 0.1: Examples of Power Series
■
3
Other examples of power series include the Taylor series expansions of various functions.
1. Exponential Function:
∞
X xn x2 x3 x4
ex = =1+x+ + + + ..., x ∈ R.
n=0
n! 2! 3! 4!
2. Sine Function:
∞
X (−1)n 2n+1 x3 x5 x7
sin x = x =x− + − + ....
n=0
(2n + 1)! 3! 5! 7!
3. Cosine Function:
∞
X (−1)n x2 x4 x6
cos x = x2n = 1 − + − + ....
n=0
(2n)! 2! 4! 6!
Example 0.3:
■
Example 0.4:
1. Shift n → n + 1:
∞
X ∞
X
n
nx ⇒ (n + 1)xn+1 .
n=1 n=0
2. Shift n → n − 1:
∞
X ∞
X
n+1
an x ⇒ an−1 xn .
n=0 n=1
Example 0.5:
Given: ∞
X xn
y= ,
n=0
n!
its derivative is: ∞ ∞ ∞
X nxn−1 X xn−1 X xn
y′ = = = = ex .
n=1
n! n=1
(n − 1)! n=0
n!
■
Combining differentiation with shifting the index allows for further simplifications.
Example 0.6:
Use the power series method to find the general solution of the following Ordinary
Differential Equation.
y ′′ − y = 0
Step 1: Assume a Power Series Solution
We assume that y(x) can be expressed as a power series:
∞
X
y(x) = an x n .
n=0
For the series to be zero for all x, the coefficients must satisfy:
(m + 2)(m + 1)am+2 − am = 0.
Rewriting,
am
am+2 = .
(m + 2)(m + 1)
Step 3: Compute the First Few Terms
Let a0 and a1 be arbitrary constants:
- m = 0: a2 = a2!0 = a20 . - m = 1: a3 = a3!1 = a1
6
. - m = 2: a4 = a2
4!
= a0
24
. - m = 3:
a1
a5 = a5!3 = 120 .
The general pattern is:
a0 a1
a2n = , a2n+1 = .
(2n)! (2n + 1)!
Step 4: Express the General Solution Thus, the power series solution is:
6
∞ ∞
X x2n X x2n+1
y(x) = a0 + a1 .
n=0
(2n)! n=0
(2n + 1)!
Recognizing these as the Maclaurin series for cosh x and sinh x, we conclude:
y(x) = C1 ex + C2 e−x ,
where C1 = a0 +a1
2
and C2 = a0 −a1
2
.
■
Example 0.7:
Find the first four terms in each portion of the series solution around x0 = 0 for the
following differential equation:
(x2 + 1)y ′′ − 4xy ′ + 6y = 0
We finally have a differential equation that doesn’t have constant coefficients for the
second derivative.
Here,
p(x) = x2 + 1, p(0) = 1 ̸= 0
So x0 = 0 is an ordinary point.
Assume a power series solution:
∞
X
y(x) = an x n
n=0
Differentiate: ∞
X
′
y (x) = nan xn−1
n=1
∞
X
y ′′ (x) = n(n − 1)an xn−2
n=2
Substitute into the differential equation:
∞
X ∞
X ∞
X
2 n−2 n−1
(x + 1) n(n − 1)an x − 4x nan x +6 an x n = 0
n=2 n=1 n=0
Second term: ∞ ∞
X X
−4x nan xn−1 = −4 nan xn
n=1 n=1
Combine:
∞
X
[n(n − 1)an + (n + 2)(n + 1)an+2 − 4nan + 6an ] xn = 0
n=0
Simplify:
∞
X 2
(n − 5n + 6)an + (n + 2)(n + 1)an+2 xn = 0
n=0
Factor: ∞
X
[(n − 2)(n − 3)an + (n + 2)(n + 1)an+2 ] xn = 0
n=0
Since the series equals zero, the coefficient of each power of x must vanish:
Solve recurrence:
(n − 2)(n − 3)
an+2 = − an
(n + 2)(n + 1)
Compute terms:
For n = 0:
(0 − 2)(0 − 3) (−2)(−3) 6
a2 = − a0 = − a0 = − a0 = −3a0
(2)(1) 2 2
For n = 1:
(1 − 2)(1 − 3) (−1)(−2) 2 1
a3 = − a1 = − a1 = − a1 = − a1
(3)(2) 6 6 3
For n = 2:
(2 − 2)(2 − 3) (0)(−1)
a4 = − a2 = − a2 = 0
(4)(3) 12
For n = 3:
(3 − 2)(3 − 3) (1)(0)
a5 = − a3 = − a3 = 0
(5)(4) 20
Both sequences terminate! The solution is:
2
1 3
y(x) = a0 1 − 3x + a1 x − x
3
■
8
y ′′ + P (x)y ′ + Q(x)y = 0
7 Euler Equations
Euler equations, also known as Cauchy-Euler equations, represent a special class of linear
differential equations with variable coefficients that can be solved by exploiting their homo-
geneous structure.
The general form of an Euler equation is:
x2 y ′′ + αxy ′ + βy = 0,
x2 y ′′ + αxy ′ + βy = 0.
9
y(x) = xr .
r(r − 1) + αr + β = 0.
y(x) = C1 xr + C2 xr ln(x).
Example 0.8:
Solve the following IVP:
Simplify:
2r(r − 1)xr + 3rxr − 15xr = 0
10
Factor out xr :
xr (2r(r − 1) + 3r − 15) = 0
Since xr ̸= 0, we solve:
2r2 − 2r + 3r − 15 = 0
2r2 + r − 15 = 0
Factor:
(2r − 5)(r + 3) = 0
Thus:
5
r1 = , r2 = −3
2
The general solution is:
5
y(x) = c1 x 2 + c2 x−3
Differentiate to prepare for initial conditions:
5 3
y ′ (x) = c1 x 2 − 3c2 x−4
2
Apply the initial conditions:
5
y(1) = 0 ⇒ c1 · 1 2 + c2 · 1−3 = 0 ⇒ c1 + c2 = 0
5 3 5
y ′ (1) = 1 ⇒ c1 · 1 2 − 3c2 · 1−4 = 1 ⇒ c1 − 3c2 = 1
2 2
Substitute c2 = −c1 into the second equation:
5
c1 − 3(−c1 ) = 1
2
5
c1 + 3c1 = 1
2
5 6
c1 + c1 = 1
2 2
11
c1 = 1
2
2
c1 =
11
Thus:
2
c2 = −c1 = −
11
The particular solution is:
2 5 2
y(x) = x 2 − x−3
11 11
■
11
Example 0.9:
Find the general solution to the following differential equation:
x2 y ′′ − 7xy ′ + 16y = 0
Simplify:
r(r − 1)xr − 7rxr + 16xr = 0
Factor out xr :
xr (r(r − 1) − 7r + 16) = 0
Since xr ̸= 0, solve:
r2 − r − 7r + 16 = 0
r2 − 8r + 16 = 0
Factor:
(r − 4)2 = 0
Thus, the repeated root is:
r=4
Since we have a repeated root, the general solution is:
y(x) = c1 x4 + c2 x4 ln x
■
Example 0.10:
Example 3 Find the solution to the following differential equation:
x2 y ′′ + 3xy ′ + 4y = 0
Hide Solution
First, we find the roots of the characteristic equation.
Assume y = xr , then:
y ′ = rxr−1 , y ′′ = r(r − 1)xr−2
Substitute into the differential equation:
Simplify:
r(r − 1)xr + 3rxr + 4xr = 0
12
Factor out xr :
xr (r(r − 1) + 3r + 4) = 0
Since xr ̸= 0, solve:
r2 − r + 3r + 4 = 0
r2 + 2r + 4 = 0
Use the quadratic formula:
√ √ √
−2 ± 22 − 4 · 1 · 4 −2 ± 4 − 16 −2 ± −12
r= = =
2 2 2
√ √
−2 ± i 12 −2 ± i2 3
= =
2 2
√
= −1 ± i 3
Thus, the roots are: √
r1,2 = −1 ± i 3
Since the roots are complex, the general solution is:
√ √
y(x) = x−1 c1 cos 3 ln x + c2 sin 3 ln x
Or equivalently:
√ √
y(x) = c1 x−1 cos 3 ln x + c2 x−1 sin 3 ln x
A⃗x = ⃗y
A⃗x = r⃗x
Here, r is a scalar and ⃗x is a nonzero vector. If such a pair exists, r is called an eigenvalue
of A, and ⃗x is its corresponding eigenvector.
To find eigenvalues and eigenvectors, we rearrange:
A⃗x − r⃗x = ⃗0
(A − rI)⃗x = ⃗0
13
Important Facts
- The characteristic equation is an nth-degree polynomial. - An n×n matrix has n eigenvalues
(counting multiplicities). - If an eigenvalue appears once, it is simple. - If it appears k times,
it has multiplicity k and between 1 and k linearly independent eigenvectors.
Examples
Example 0.11:
= (2 − r)(−6 − r) + 7 = (−12 − 2r + 6r + r2 ) + 7 = r2 + 4r − 5
Set to zero:
r2 + 4r − 5 = 0
(r + 5)(r − 1) = 0
Eigenvalues: r = −5, r = 1
For r = −5:
(A + 5I)⃗x = 0
7 7 x1
= ⃗0
−1 −1 x2
−1
Equation: 7x1 + 7x2 = 0 ⇒ x1 = −x2 Eigenvector: ⃗x =
1
For r = 1:
(A − I)⃗x = 0
1 7 x1
= ⃗0
−1 −7 x2
−7
Equation: x1 + 7x2 = 0 ⇒ x1 = −7x2 Eigenvector: ⃗x =
1
14
Solution:
Compute det(A − rI):
1−r −1 1 4
det 4 = (1 − r) − − r +
9
− 31 − r 3 9
1 r 4
= − + − r + r2 +
3 3 9
Simplify:
2 1
= r2 − r +
3 9
Set to zero:
2 1
r2 − r + = 0
3 9
2
1
r− =0
3
Eigenvalue: r = 31 (multiplicity 2)
Find eigenvector:
1
(A − I)⃗x = 0
3
2
−1 x1
3
4 2 = ⃗0
9
− 3
x 2
3
First equation: 2
x
3 1
− x2 = 0 ⇒ x2 = 2
x
3 1
Eigenvector: ⃗x = (scaled for clarity) ■
2
Example 0.12:
Example 0.13:
Solution:
First, compute the characteristic polynomial:
3−r 9
det(A − rI) = det
−4 −3 − r
= (3 − r)(−3 − r) − (−4)(9)
= (−9 − 3r + 3r + r2 ) + 36
= r2 + 27
Set to zero:
r2 + 27 = 0
r2 = −27
√ √
r = ± −27 = ±3i 3
√ √
Eigenvalues: r = 3i 3, r = −3i 3
Now, find √
eigenvectors.
For r = 3i 3:
(A − rI)⃗x = 0
√
3 − 3i 3 9 √ x1
=0
−4 −3 − 3i 3 x2
From the first row: √
(3 − 3i 3)x1 + 9x2 = 0
16
9
x1 = − √ x2
3 − 3i 3
Simplify:
9 3
=− √ x2 = − √ x2
3(1 − i 3) 1−i 3
Multiply numerator and denominator by conjugate:
√
1+i 3
= −3 · √ x2
(1)2 − (i 3)2
√
1+i 3 3 √
= −3 · x2 = − (1 + i 3)x2
1+3 4
Choose x2 = 4 for simplicity: √
x1 = −3(1 + i 3)
Eigenvector: √
−3(1 + i 3)
⃗x =
4
√
For r = −3i 3: By the complex conjugate fact, the eigenvector is the conjugate of the
previous: √
−3(1 − i 3)
⃗x =
4
■
Example 0.14:
Solution:
First, compute the characteristic polynomial:
7−r 1
det(A − rI) = det
−4 3 − r
= (7 − r)(3 − r) − (−4)(1)
= (21 − 7r − 3r + r2 ) + 4
= r2 − 10r + 25
Set to zero:
r2 − 10r + 25 = 0
(r − 5)2 = 0
17
Eigenvalue: r = 5 (multiplicity 2)
Now, find eigenvectors.
Solve (A − 5I)⃗x = 0:
2 1 x1
= ⃗0
−4 −2 x2
From the first row:
2x1 + x2 = 0 ⇒ x2 = −2x1
General solution:
x1
⃗x =
−2x1
Choose x1 = 1:
1
⃗x =
−2
So, the eigenvector corresponding to r = 5 is:
1
⃗x =
−2
Since the eigenvalue has multiplicity 2 but we only get one eigenvector, this is a **defec-
tive** matrix (good for mentioning if you’re teaching this). ■
Example 0.15:
Solution:
First, compute the characteristic polynomial:
2−r 0
det(A − rI) = det
0 2−r
= (2 − r)(2 − r) = (2 − r)2
Set to zero:
(2 − r)2 = 0
Eigenvalue: r = 2 (multiplicity 2)
Now, find eigenvectors.
Solve (A − 2I)⃗x = 0:
0 0 x1
= ⃗0
0 0 x2
18
x′ = ax
Since the exponential term is never zero, we can discard it, leading to the condition:
(A − rI)⃗v = ⃗0
Thus, for our proposed solution to satisfy the given system, the scalar r and vector ⃗v must
correspond to an eigenvalue and eigenvector of the matrix A.
Consequently, solving the a system of first order linear differential equation reduces to
finding the eigenvalues and eigenvectors of A. Once these are known, solutions can be built
as seen above. We will encounter three main scenarios depending on the nature of the
eigenvalues:
• Two distinct real eigenvalues,
• Complex eigenvalues,
⃗x′ = A⃗x
Solution:
First, find eigenvalues:
1−r 2
det (A − rI) = = (1 − r)(2 − r) − 6
3 2−r
= r2 − 3r − 4 = (r − 4)(r + 1)
20
Thus, r1 = 4, r2 = −1.
Find eigenvectors: For r = 4,
−3 2 x
(A − 4I)⃗v = 0 ⇒ =0
3 −2 y
2
From the first row: −3x + 2y = 0 ⇒ y = 3
2
x.Let x = 2, then y = 3, so v⃗1 = .
3
For r = −1,
2 2 x
(A + I)⃗v = 0 ⇒ =0
3 3 y
1
From the first row: 2x + 2y = 0 ⇒ y = −x. Let x = 1, then y = −1, so v⃗2 = .
−1
General solution:
4t 2 −t 1
⃗x(t) = c1 e + c2 e
3 −1
Apply initial condition:
2 1 0
⃗x(0) = c1 + c2 =
3 −1 −4
This gives:
2c1 + c2 = 0 (1), 3c1 − c2 = −4 (2)
Solving: from (1), c2 = −2c1 . Substitute into (2):
4 4 8
3c1 − (−2c1 ) = −4 ⇒ 5c1 = −4 ⇒ c1 = − , c2 = −2 − =
5 5 5
Final solution:
4 4t 2 8 −t 1
⃗x(t) = − e + e
5 3 5 −1
■
Example 0.17:
Solve the following initial value problem.
′ −5 1 1
⃗x = ⃗x, ⃗x(0) =
4 −2 2
Solution:
Find eigenvalues:
−5 − r 1
det = (r + 5)(r + 2) − 4 = r2 + 7r + 6
4 −2 − r
= (r + 6)(r + 1)
Eigenvalues: r1 = −1, r2 = −6.
21
Complex Eigenvalues
In this section, we will look at solutions to
⃗x′ = A⃗x
where the eigenvalues of the matrix A are complex. With complex eigenvalues, we are going to
have the same problem that we had back when we were looking at second-order differential
equations. We want our solutions to only have real numbers in them; however, since our
solutions to systems are of the form
⃗x = ⃗v ert
we are going to have complex numbers appear in our solution from both the eigenvalue r and
the eigenvector ⃗v . Getting rid of the complex numbers here will be similar to what we did
in the case of second-order differential equations but will involve a little more work this time
around. It is easiest to see how to do this in an example.
22
When dealing with a 2 × 2 system of first-order linear differential equations with complex
eigenvalues, the typical approach is as follows:
⃗v = p⃗ + i⃗q
• Multiply out
Example 0.18:
Substitute:
√ √
√3 cos(3 √3t) √ √3 sin(3√ 3t) √
= c1 + c2
− cos(3 3t) − 3 sin(3 3t) − sin(3 3t) + 3 cos(3 3t)
2
Now apply the initial condition ⃗x(0) = :
−4
3 0
⃗x(0) = c1 + c2 √
−1 3
Equating components: (
3c1 = 2
√
−c1 + 3c2 = −4
From the first: c1 = 32
Substitute into the second:
2 √
− + 3c2 = −4
3
√ 2 10
3c2 = −4 + = −
3 3
10
c2 = − √
3 3
Thus, the final solution is:
√ √
2 3 cos(3 3t) 10 3 sin(3 3t)
⃗x(t) = √ √ √ − √ √ √ √
3 − cos(3 3t) − 3 sin(3 3t) 3 3 − sin(3 3t) + 3 cos(3 3t)
■
Example 0.19:
3 − r −13
det(A − rI) = = r2 − 4r + 68
5 1−r
25
So,
r1,2 = 2 ± 8i
Now, we find the eigenvector corresponding to r1 = 2 + 8i. We solve:
1 − 8i −13 v1 0
=
5 −1 − 8i v2 0
Denoting:
2tcos(8t) − 8 sin(8t) 2t 8 cos(8t) + sin(8t)
⃗u(t) = e , ⃗v (t) = e
5 cos(8t) 5 sin(8t)
Compute:
0 1 1 8 0 8
⃗u(0) = e = , ⃗v (0) = e =
5 5 0 0
Thus:
3 1 8
= c1 + c2
−10 5 0
This gives:
c1 + 8c2 = 3
5c1 = −10
From the second equation: c1 = −2
Substitute into the first:
5
−2 + 8c2 = 3 ⇒ 8c2 = 5 ⇒ c2 =
8
Thus, the final solution is:
2t cos(8t) − 8 sin(8t) 5 2t 8 cos(8t) + sin(8t)
⃗x(t) = −2e + e
5 cos(8t) 8 5 sin(8t)
Unique Eigenvalue
⃗x ′ = A⃗x
where: - r is the repeated eigenvalue, - ⃗v1 and ⃗v2 are two linearly independent eigenvectors
corresponding to r.
Example 0.20:
27
4−r 0
det(A − rI) = = (4 − r)2
0 4−r
■
The final case that we need to take a look at is at solutions to the system
⃗x ′ = A⃗x
where the eigenvalue is a repeated eigenvalue and corresponding to it is a single linearly
independent vector. So, the system will have a double eigenvalue r.
This presents a challenge. We want two linearly independent solutions so that we can
form a general solution. However, with a double eigenvalue, we will have only one:
⃗x1 = ⃗v ert
Thus, we need to find a second solution.
To fix this, let’s guess that the second linearly independent solution is:
⃗x = tert⃗v + ert ρ⃗
where ρ⃗ is an unknown vector to be determined.
Compute the derivative:
d
⃗x ′ = tert⃗v + ert ρ⃗ = ⃗v ert + r⃗v tert + r⃗
ρert
dt
28
Example 0.21:
7−r 1
det(A − rI) = = r2 − 10r + 25 = (r − 5)2
−4 3 − r
Thus, r1 = r2 = 5.
So, we got a double eigenvalue. Of course, that shouldn’t be too surprising given the
section that we’re in. Let’s find the eigenvector for this eigenvalue.
We solve:
2 1 v1 0
=
−4 −2 v2 0
From the first equation: 2v1 + v2 = 0, so v2 = −2v1 .
The eigenvector is then:
v1
⃗v =
−2v1
Since v1 ̸= 0, we can take v1 = 1, so:
1
⃗v =
−2
Equating components:
c1 = 2, −2c1 + c2 = −5
Substituting c1 = 2:
−2(2) + c2 = −5 ⇒ c2 = −1
Therefore, the solution is:
5t 1 5t 1 5t 0
⃗x(t) = 2e − te +e
−2 −2 1
Simplifying:
5t 2 5t 1 5t 0
⃗x(t) = e −e t −e
−4 −2 1
Finally:
5t 2 1
⃗x(t) = e −t
−5 −2
Note that we did a little combining here to simplify the solution up a little. ■
9 Conclusion
In this chapter, we have explored two fundamental techniques for solving linear differential
equations with variable coefficients. The power series method is a versatile tool for addressing
equations near ordinary points, while Euler equations provide a structured approach using
the substitution y = xr . Additionally, we examined systems of first-order linear differential
equations, developing methods to handle multiple interdependent equations simultaneously.
Mastery of these methods is essential for solving complex differential equations encountered
in various scientific and engineering problems.
The University of Zambia
Department of Mathematics, Statistics and
Actuarial Science
MAT 3110 - Engineering Mathematics II
Tutorial Sheet 2 Power Series Method, Euler Equations and March, 2025
Systems of Differential Equations
1. Use the power series method to find the solution to each of the following differential
equations. Express your final answers as power series expansions about x = 0.
(a) y ′ = 2y
(b) y ′′ + y = 0
(c) y ′ = ky (where k is a constant)
(d) (1 − x)y ′ = y
(e) (x + 1)y ′ = 3y
(f) (1 + x)y ′ + y = 0
(g) y ′ + 2xy = 0
(h) y ′ = 3x2 y
(i) y ′′ − y = 0
(j) y ′′ + 2xy = 0
(k) y ′′ − y ′ = 0
(l) y ′′ − 9y = 0
2. Show that
∞
X ∞
X ∞
X
m−2 j−1
m(m − 1)am x = (j + 1)jaj+1 x = (s + 2)(s + 1)as+2 xs
m=2 j=1 s=0
3. For each of the following series, shift the index so that the power of x under the sum-
mation sign is xm .
P∞ (−1)n+1 n+2
(a) n=1 3n
x
P∞ s(s+1) s−1
(b) s=1 s2 +1 x
P∞ (−1)k+1 k−3
(c) k=1 6k
x
4. Solve the following differential equations. Find the general solution in each case.
(a) xy ′ = 3y + 3
1
(b) (x − 3)y ′ − xy = 0
(c) y ′ = 2xy
(d) (1 − x4 )y ′ = 4x3 y
(e) (x + 1)y ′ − (2x + 3)y = 0
(f) (1 + x)y ′′ − y = x
(g) y ′′ − 3y ′ + 2y = 0
(h) y ′′ − 4xy ′ + (4x2 − 2)y = 0
(i) (1 − x2 )y ′′ − 2xy + 2y = 0
(j) y ′′ − xy + y = 0
2
8. Find the general solution of each of the following systems of first-order linear differential
equations. Write each system in component form.
(a)
(b)
(c)
(d)
(e)
x′1 = 2x1 + x2
x′2 = x1 + 2x2
(f)