You are on page 1of 76

Makerere University EMT 1201 - Engineering Mathematics II

Contents

1
1 Introduction and basic principles 3

20
1.1 Meaning of a differential equation . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.2 Definition of terms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.3 Solution to a differential equation . . . . . . . . . . . . . . . . . . . . . . . . . . 5

1
2 Solving first-order oquations 7
2.1 Simple separable equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.2 First order exact equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

MT
2.3 First-order linear equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
2.4 Integrating factor: First-order linear equations . . . . . . . . . . . . . . . . . . 12
2.5 Integrating factor: First-order general equation . . . . . . . . . . . . . . . . . . 13

3 Using substitutions and transformations 16


3.1
3.2
3.3
3.4
-E
Homogeneous functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
The substitution y = vx . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Coefficients are linear functions . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Substitution suggested by nature of the equation . . . . . . . . . . . . . . . . . 19

4 Applications of first order equations 20


EE
4.1 Radioactive Decay . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
4.2 Newton’s Law of Cooling: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
4.3 Population growth . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
4.4 Logistic Growth . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
DC

5 Linear dependence and Wronskian 28


5.1 Linear Dependence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
5.2 The Wronskian . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

6 Homogeneous linear differential equations 30


6.1 Application of Wronskian . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
-

6.2 Method of Order Reduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33

7 Constant-Coefficient, Homogeneous Equations 36


AK

7.1 If the auxiliary roots r1 and r2 are real and distinct: . . . . . . . . . . . . . . . . 37


7.2 If the auxiliary roots r1 and r2 are real and equal: . . . . . . . . . . . . . . . . . 38
7.3 If the auxiliary roots are complex conjugates : . . . . . . . . . . . . . . . . . . . 39

Dr. Joseph Ssebuliba - DCEE & Maths Dept page 1 of 76


Makerere University EMT 1201 - Engineering Mathematics II

1
8 Nonhomogeneous, Constant-coefficient Equations. 41

20
8.1 The method of undetermined coefficients. . . . . . . . . . . . . . . . . . . . . . . 42
8.2 Expected difficulties: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
8.3 The Principle of Superposition: . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
8.4 Limitation of the method of undetermined coefficients . . . . . . . . . . . . . . . 46
8.5 The method of variation of parameters . . . . . . . . . . . . . . . . . . . . . . . 46

1
8.6 Special substitutions: Cauchy-Euler equations . . . . . . . . . . . . . . . . . . . 52
8.7 Further Cauchy-Euler equations . . . . . . . . . . . . . . . . . . . . . . . . . . . 54

MT
9 Systems of linear differential equations 56
9.1 Transforming an equation into a system of differential equations . . . . . . . . . 57
9.2 Reducing a system of differential equations into one equation . . . . . . . . . . . 58

10 Solving systems of differential equations 59

-E
10.1 Solutions by Method of elimination . . . . . . . . . . . . . . . . . . . . . . . . . 59
10.2 Solutions by matrix method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60

11 Homogeneous linear systems 61


11.1 Real and distinct eigenvalues. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
11.2 Case II: Complex conjugate eigenvalues . . . . . . . . . . . . . . . . . . . . . . . 64
EE

12 Nonhomogeneous system of differential equations 70


12.1 Method of undetermined coefficients . . . . . . . . . . . . . . . . . . . . . . . . 70
12.2 Method of variation of parameters . . . . . . . . . . . . . . . . . . . . . . . . . . 73
- DC
AK

Dr. Joseph Ssebuliba - DCEE & Maths Dept page 2 of 76


Makerere University EMT 1201 - Engineering Mathematics II

1
1 Introduction and basic principles

20
1.1 Meaning of a differential equation
A differential equation is an expression that involves derivatives of some unknown function.
If the unknown function is a function of a single independent variable then the differential
equation is called an ordinary differential equation. If the unknown function depends on two or
more independent variables then the differential equation is called a partial differential equation.

1
Equations
∂ 2u ∂ 2u
1. y 0 + xy = 3 2. y 00 + 5y 0 + 6y = cos x 3. y 00 = (1 + y 0 2 )(x2 + y 2 ) 4. 2 − 2 = 0
∂t ∂x

MT
∂u ∂u
and 5. =3 are all differential equations.
∂t ∂x
In equations (1)-(3), the unknown function is y and is assumed to be a function of the single
independent variable x, (i.e y = y(x)). The functions y 0 and y 00 are the first and second
dy d2 y
derivatives of y(x) with respect to x (usually denoted by , ). the equations (1)- (3) have
dx dx2
ordinary derivatives depending on one single variable x and are called ordinary differential
equations.

-E
In equations (4) and (5), the unknown function u is a function of two independent variables
t and x (and is usually written as (u(t, x) or u(x, t)). We define
∂u
∂x
and
∂ 2u
∂x2
as the first and
second partial derivative of u with respect to x respectively. And equations (4) and (5) are
called partial differential equations because they involve partial derivatives.
EE
1.2 Definition of terms
(a) The order of a differential equation is the highest derivative which occurs in the equation.
For example
dy
dx
=x+2 order 1 (or first order)
DC

d2 y dy
dx2
+ 2 dx + 3y = 0 second order
0
xy + 3y = 4 first order
(y 00 )2 − (y 0 )3 + 2y = 5x second order
∂z ∂z
∂x
= z + x ∂y first order
∂2z ∂2z
∂x2
+ ∂y 2
= x2 + y second order

(b) A differential equation can be written (and can be regarded ) as a polynomial in the
-

derivatives in which the powers of the derivatives go on decreasing.


The degree of a differential equation is the power of the highest derivative appearing in
the equation.
AK

For example; equation (y 00 )3 + 4xy 0 − 3y = x is second order because y 00 is the highest


derivative in the equation, and is of degree 3 because the highest power of the highest
derivative is 3. Thus

(i) 3y 0 = x + 2 first order, degree 1


0 2 3
(ii) (y ) − 3y = 5 first order, degree 2

Dr. Joseph Ssebuliba - DCEE & Maths Dept page 3 of 76


Makerere University EMT 1201 - Engineering Mathematics II

1
(iii) y 00 + 5y 2 x = sin x second order, degree 1
(iv) (y 00 )2 + (y 0 )3 + 3y = x2 second order, degree 2

20
000 00 2
(v) y + 2(y ) = cos 2x order 3, degree 1
000
(vi) ey − xy 00 + y = 0 order 3, degree does not apply

(vii) y 0 + y = sin θ order 1, degree1

1
(c) Generally the equation
F (x, y, y 0 , y 00 , . . . , y (n) ) = 0 (1.1)
is called an nth order ordinary differential equation, for the unknown function y.

MT
An nth order differential equation is said to be a linear differential equation if it is of the
special form

a0 (x)y (n) + a1 (x)y (n−1) + . . . + an−1 (x)y 0 + an (x)y = f (x). (1.2)

where the functions ai (x); i = 0, 1, 2, . . . , n and f (x) are given functions independent of
the variable y, with a0 (x) 6= 0. In general, the nth-order equation (1.2) is linear if the
function F (x, y 0 , y 00 . . . y (n) ) is a first degree polynomial in y, y 0 , y 00 , . . . , y (n)

equation. -E
The functions ai (x), i = 0, 1, 2, . . . , n are known as the coefficients of the differential

(d) If any of the functions ai (x), i = 0, 1, 2, . . . , n is a function of y, then the differential


equation (1.2) is nonlinear.
When a function f (x) in the differential equation (1.2) is identically zero, we say that
differential equation (1.2) is homogeneous, and when f (x) is not identically zero, then
EE
(1.2) is nonhomogeneous.
If all the coefficients ai (x); i = 0, 1, 2, . . . , n are constants, then equation (1.2) is known
as a linear differential equation with constant coefficient. Otherwise if only one of the
coefficients ai (x), i = 0, 1, 2, . . . , n is a variable, then the differential equation is variable
coefficient.
DC

The term linear refers to the fact that each expression in the differential equation is of
degree one or zero in the variables y, y 0 , . . . , y (n) .

Examples 1.1

(i) y 00 + 5y 0 − 6y = 0 is second order, constant coefficient linear, homogeneous differential


equation.

(ii) y 00 + 5y 0 − 6y = 5 is second order, constant coefficient linear, nonhomogeneous differential


-

equation

(iii) y 000 + 5y 0 = 6y is third order, constant coefficient linear, nonhomogeneous differential


AK

equation.

(iv) 4y 00 + 4xy 0 − 5 = 0 is second order, variable coefficient, homogeneous, linear differential


equation.
The following differential equations are nonlinear

(i) xy 0 − 2y 2 = ex because of the term y 2

Dr. Joseph Ssebuliba - DCEE & Maths Dept page 4 of 76


Makerere University EMT 1201 - Engineering Mathematics II

1
(ii) y 00 − 5(y 0 )3 = 3y because of the term (y 0 )3

20
(iii) y 00 − 4y 0 = cos y because of the term cos y

(iv) xy 000 − 3yy 0 − 5x = 0 because of the term yy 0


The rest of the characteristics do apply on the above equations

Exercise 1.1

1
1. State the orders and degrees of the differential equations

MT
(a) 3y 00 + 2y 0 − 4y 2 = 0 (b) 2(y 0 )3 − 3y = 4
(c) (y 00 )2 − 6x(y 0 )3 − 4y = x (d) (y (4) )3 − 3(y 000 )2 − 4(y 0 )5 = 5y 2
1
(e) y 0 + x = (y − xy 0 )−3 (f ) y 00 = (y + (y 0 )2 ) 4

2. Classify the following differential equations as to linearity, nature of coefficients, order


and homogeneity

(a) xy 00 − 2ex y 0 − 5x = 0 (b) y 00 − 4y 0 − 3 cos x = 5y


(c) 3y 000 − 4y 00 + xy = 11
(e)(y 00 )2 − 4y 0 + 5y = 6x
(g) y 000 + 5y 00 − 6y 0 = cos xy
(i) y 000 = 5
-E
(d) y 000 − 6y 00 − 17y 0 = xey
(f ) y (4) − 5y 00 + 11y = 0
(h) y (4) + 3(cos x)y 000 + (y 0 )2 = 0
(j) y 000 − x5 = 0

1.3 Solution to a differential equation


EE
Definition 1.1 A solution of an nth order ordinary differential equation
F (x, y, y 0 , . . . , y (n) ) = 0 is a function y(x) defined over an interval I which satisfies the differ-
ential equation and is such that

(i) y(x) should have at least n derivatives


DC

(ii) F (x, y(x), y 0 (x), . . . , y (n) (x)) = 0, for all x ∈ I.

Examples 1.2

(i) The function y(x) = ex is a solution to the differential equation y 00 − y = 0.


In fact y 00 (x) − y(x) = (ex )00 − ex = ex − ex = 0 for all x ∈ (−∞, ∞)

(ii) The function y(x) = cos x is a solution of y 00 + y = 0


-

for y 00 (x) + y(x) = (cos x)00 = − cos x + cos x = 0 for all x ∈ (−∞, ∞)
p (1 − 2x)
(iii) The function y = x(x − 1) is a solution of y 0 = valid only in x ∈ [0, 1)
2y
AK

√ 1
(iv) The function y = x is a solution of the equation y 0 = valid only in (0, +∞)
2y
The differential equation y 00 − y = 0 given in (i) above, the function y = e−x is a solution too
and moreover, y = c1 ex + c2 e−x is again a solution to y 00 − y = 0 for some constants c1 and c2 .

Dr. Joseph Ssebuliba - DCEE & Maths Dept page 5 of 76


Makerere University EMT 1201 - Engineering Mathematics II

1
Therefore the process of finding a solution to a differential equation is to focus ones’s mind to
a unique solution (called a primitive) that was differentiated to have the combination terms of

20
the differential equation satisfied.
Such a primitive function of a differential equation is called the general solution of the differential
equation.
A solution to a differential equation that comes from particular qualities specified together
with the equation is called the particular solution. Such a differential equation that has initial

1
conditions that will result into a particular solution is called an initial value problem (IVP).
Remark: Given any primitive we can in some way obtain a differential equation that is

MT
associated with it by eliminating the constants involved.

Examples 1.3

1. To obtain the differential equation associated with the solution y = Ax2 + Bx + C, we


eliminate the constants A, B, C as:

dy d2 y d3 y
y = Ax2 + Bx + C,

Then
d3 y
dx3
dx
-E
= 2Ax + B,
dx2
= 2A,
dx3
= 0,

= 0 no longer has constants and is the differential equation associated with


the solution y = Ax2 + Bx + C

2. Obtain the differential equation associated with the solution x2 y 3 + x3 y 5 = c


Solution: Differentiating once with respect to x gives
EE
   
3 2 2 dy 2 5 3 4 dy dy 2 dy
2xy + 3x y + 3x y + 5x y = 0 or 2y + 3x + xy 3y + 5x =0
dx dx dx dx

3. Obtain the differential equation associated with the solution y = Ae2x + Bex + C
dy d2 y d3 y
DC

Solution: = 2Ae2x + Bex , = 4Ae 2x


+ Be x
, = 8Ae2x + Bex .
dx dx2 dx3
d3 y d2 y 2x d2 y dy
So that 3
− 2
= 4Ae , and 2
− = 2Ae2x .
dx dx dx dx
3 2
 2
d3 y d2 y

dy dy dy dy dy
Therefore − = 2 − ⇒ − 3 + 2 =0
dx3 dx2 dx2 dx dx3 dx2 dx
dy
4. Show that y = 2x + Cex is a solution to the differential equation − y = 2(1 − x) and
dx
-

find the particular solution satisfied by x = 0, y = 3.


dy
Solution: y = 2x + Cex , = 2 + Cex .
dx
AK

dy
Then − y = 2 + Cex − (2x + Cex ) = 2 + Cex − 2x − Cex = 2 − 2x = 2(1 − x).
dx
When x = 0, y = 3. Then 3 = 2.0 + Ce0 ⇒ C = 3 and the solution is y = 2x + 3ex .

Dr. Joseph Ssebuliba - DCEE & Maths Dept page 6 of 76


Makerere University EMT 1201 - Engineering Mathematics II

1
2 Solving first-order oquations

20
2.1 Simple separable equations
A first order differential equation is said to be separable if it is of the form
dy g(x)
=
dx f (y)

1
R R
such that f (y)dy = g(x)dx and on integration gives f (y)dy = g(x)dx ⇒ F (y) + c1 =
G(x) + c2 ⇒ F (y) = G(x) + C. The method used to solve simple separable differential

MT
equations is known as the method of separation of variables.

Examples 2.1
dy y−1
1. Solve the differential equation: =
dx x+3
Solution: By separation of variables
dy
y−1
=
dx
x+3

Z
dy
y−1
=
Z

2. Solve the differential equation:


dx
x+3

dy
dx
=
-E
⇒ ln (y − 1) = ln k(x + 3) ⇒ y = 1 + k(x + 3)

6x5 − 2x + 1
cos y + ey
Solution: By separation of variables
EE
Z Z
y 5
(cos y + e )dy = (6x − 2x + 1)dx ⇒ (cos y + e )dy = (6x5 − 2x + 1)dx
y

⇒ sin y + ey = x6 − x2 + x + c

3. Solve the differential equation ydx + (1 + x)dy = 0; y(1) = 1.
Solution: By separation of variables
DC


Z Z
1 1 1 1
√ dy = − dx ⇒ √ dy = − dx ⇒ 2 y = − ln (1 + x) + c
y 1+x y 1+x

and y(1) = 1 ⇒ 2 = − ln 2 + c ⇒ c = 2 − ln 2
r
√ √ x+1  x + 1 2
Thus 2 y = − ln(1 + x) + 2 − ln 2 ⇒ 2 y = 2 − ln ⇒ y = 1 − ln .
2 2
-

Exercise 2.1

Solve the differential Equations


AK

dy x2 − 1 dy
1. = 2. = y(2 + sin x)
dx y2 dx
dy dy
3. = 3x2 (1 + y 2 ) 4. + y2 = y
dx dx
dy sec2 y
5. = 6. y sin xecos x dx + y −1 dy = 0
dx 1 + x2 2
7. (x + xy 2 )dx + ex ydy = 0 8. x2 dx + 2ydy = 0; y(0) = 2

Dr. Joseph Ssebuliba - DCEE & Maths Dept page 7 of 76


Makerere University EMT 1201 - Engineering Mathematics II

1
2.2 First order exact equations

20
dy
Any first order differential equation = f (x, y) can be expressed in the form
dx
M (x, y)dx + N (x, y)dy = 0 (2.1)

1
Examples 2.2
dy 3x2 − y

MT
1. = ⇒ (y − 3x2 )dx + (x − 1)dy = 0 in which M (x, y) = y − 3x2 and
dx x−1
N (x, y) = x − 1.

Examples 2.3
d
R R
1. xdy + ydx = 0 ⇒ dx
(xy) =0 ⇒ d(xy) = 0.dx; ⇒ xy = c.

d
dy
2. 2x2 y dx = 3 − 2xy 2 ⇒ R2x2 ydy + 2xy
2 2 2 2
2
R dx = 3dx2 2
⇒ dx (x y ) = 3dx ⇒ d(x y ) = 3dx ⇒ x y = 3x + c
-E
We are able to solve these two examples because their LHS expressions were reducing to total
differentials.

Definition 2.1 A first-order differential equation whose LHS expressions can be easily re-
grouped into total differentials is said to be exact differential equation
EE
Theorem 2.1 The first-order differential equation M (x, y)dx + N (x, y)dy = 0 is exact iff

∂M (x, y) ∂N (x, y)
=
∂y ∂x
DC

where the partial derivatives are continuous functions.


Proof:
Assume M (x, y)dx + N (x, y)dy = 0 is exact. Then there exists a function F (x, y) satisfying

∂F ∂F
= M (x, y) and = N (x, y)
∂x ∂y
∂F ∂F
Since for any function F (x, y), dF (x, y) = dx + dy
-

∂x ∂y
∂ 2F ∂ 2F
   
∂M ∂ ∂F ∂N ∂ ∂F
Then = = and = = .
∂y ∂y ∂x ∂x∂y ∂x ∂x ∂y ∂x∂y
AK

∂M ∂ 2F ∂ 2F ∂N
Hence = = =
∂y ∂y∂x ∂x∂y ∂x

To solve the exact equation M (x, y)dx + N (x, y)dy = 0

Dr. Joseph Ssebuliba - DCEE & Maths Dept page 8 of 76


Makerere University EMT 1201 - Engineering Mathematics II

1
∂F
(a) We let the solution to take the form F (x, y) = c, such that ∂x
= M (x, y),
and ∂F = N (x, y).

20
∂y

Z
Then F (x, y) = M (x, y)dx + g(y) (2.2)

(b) To determine g(y) we take the partial derivatives with respect to y of both sides of (2.2)
to give

1
Z Z
∂F ∂ ∂ ∂
= M (x, y)dx + (g(y)) = M (x, y)dx + g 0 (y) = N (x, y).
∂y ∂y ∂y ∂y

MT
Then g 0 (y) = N (x, y) − ∂y

R R R
M (x, y)dx gives g(y) = [N (x, y) − M (x, y)dx]dy, so
R R R
that F (x, y) = M (x, y)dx + [N (x, y) − M (x, y)dx]dy = c.

Examples 2.4

1. Solve the differential equation: (2xy − sec2 x)dx + (x2 + 2y)dy = 0.


Solution: Let M (x, y) = 2xy − sec2 x, then ∂M
∂N
∂x

Then
= 2x. Since ∂M

∂F
∂x
∂y
= 2x = ∂N∂x
be of the form F (x, y) = c in which ∂F
∂x

= M (x, y) = 2xy − sec2 x


-E
∂y
= 2x. And N (x, y) = x2 + 2y, then
then the differential equation is exact. Let the solution
= M (x, y) and ∂F∂y
= N (x, y).

Z
⇒ F (x, y) = (2xy) − sec2 x)dx = x2 y − tan x + g(y)
EE

And ∂F
∂y
= x2 + g 0 (y) = N (x, y) = x2 + 2y ⇒ g 0 (y) = 2y ⇒ g(y) = y 2 .

Then F (x, y) = x2 y − tan x + y 2 = c gives the solution x2 y − tan x + y 2 = c


DC

2. Solve the differential equation: (1 + ex y + xex y)dx + (xex + 2)dy = 0.


Solution: Let M (x, y) = 1 + ex y + xex y; then ∂M∂y
= ex + xex . And let
N (x, y) = xex + 2; then ∂N
∂x
= xex + ex . Since ∂M
∂y
= ex + xex = ∂N
∂x
then the equation is
exact. Let the solution take the form F (x, y) = c, with ∂x = M (x, y) and ∂F
∂F
∂y
= N (x, y).
Then
Z
∂F
= N (x, y) = xe + 2 ⇒ F (x, y) = (xex + 2)dy ⇒ F (x, y) = xex y + 2y + T (x).
x
∂y
-

From which we have


∂F
= ex y + xex y + T 0 (x) = M (x, y) = 1 + ex y + xex y ⇒ T 0 (x) = 1 ⇒ T (x) = x.
AK

∂x

Then F (x, y) = c gives xex y + 2y + x = c


Remark: Sometimes after making an equation exact it is sufficient to regroup the terms seen
to be forming total differentials together and thereafter integration of term by term solves the
differential equation without going through the whole process of finding F (x, y) = c.

Dr. Joseph Ssebuliba - DCEE & Maths Dept page 9 of 76


Makerere University EMT 1201 - Engineering Mathematics II

1
Examples 2.5

20
1. Solve the differential equation: (3x2 − 2y 2 )dx + (1 − 4xy)dy = 0
∂M
Solution: M (x, y) = 3x2 − 2y 2 , ⇒ ∂y
= −4y and N (x, y) = 1 − 4xy,
⇒ ∂N
∂x
= −4y.
Since ∂N
∂y
= −4y = ∂N∂x
the equation is exact. And 3x2 dx − 2y 2 dx + dy − 4xydy = 0
2 d
⇒ 3x
R dx + dyR− (2y 2Rdx + 4xydy)R = 0 ⇒ 3x2 dx + dy − dx (xy 2 ) = 0

1
⇒ 3x2 dx + dy − d(xy 2 ) = 0dx ⇒ x3 + y − xy 2 = c.

2. Solve the differential equation: (2x3 + 3y)dx + (3x + y − 1)dy = 0

MT
Solution: M (x, y) = 2x3 + 3y, ⇒ ∂M ∂y
= 3 and N (x, y) = 3x + y − 1, ⇒ ∂N∂x
= 3. Since
∂M ∂N 3
∂y
= 3 = ∂x , it is exact. And 2x dx + 3ydx + 3xdy + ydy − 1dy = 0
d
⇒ 2x3 dx + ydy − dy + 3(ydx R +3xdy) =R 0 ⇒ 2x
3
R − dy − R3 dx (xy) = 0
R dx + ydy
which on integration gives 2x dx + ydy − dy − 3 d(xy) = 0.dx
⇒ 41 x4 + 12 y 2 − y − 3xy = c ⇒ x4 + 2y 2 − 4y + 12xy = c

Solution: M (t, y) = 3y + et , ⇒

Since
∂M
=3=
∂N
∂M
∂y

then the equation is exact.


-E
3. Solve the differential equation: 3y + et + (3t + cos y) dy
dt
= 0.

= 3 and N (t, y) = 3t + cos y, ⇒


∂N
∂t
= 3.

∂y ∂t
Let the solution be F (t, y) = c. Then
∂F
EE
= M (t, y) = 3y + et (1)
∂t
∂F
= N (t, y) = 3t + cos y. (2)
∂y
Integrating (1) w.r.t.t. gives F (t, y) = 3ty + et + h(y) (3)
Integrating (2) w.r.t.y. gives F (t, y) = 3ty + sin y + h(t) (4)
DC

Equating (3) to (4) gives h(y) = sin y and h(t) = et


Hence F (t, y) = 3ty + et + sin y = c.
Alternative Route:
∂F
R
∂y
= 3t + cos y ⇒ F (t, y) = (3t + cos y)dy ⇒ F (t, y) = 3ty + sin y + f (t)
and ∂F
∂t
= f 0 (t) = M (t, y) = et ⇒ f 0 (t) = et ⇒ f (t) = et .
Thus F (t, y) = c ⇒ 3ty + sin y + et = c.
-

4. The easiest Way


Solve the equation: (3x2 y + 8xy 2 )dx + (x3 + 8x2 y + 12y 2 )dy = 0; y(2) = 1.
AK

∂M
Solution: M (x, y) = 3x2 y + 8xy 2 , ⇒ ∂y
= 3x2 + 16xy
∂N
N (x, y) = x3 + 8x2 y + 12y 2 ; ⇒ ∂x
= 3x2 + 16xy
∂M ∂N
Since ∂y
= 3x2 + 16xy = ∂x
the equation is exact. Let the solution be F (x, y) = c with

∂F
= M (x, y) = 3x2 y + 8xy 2 (2.3)
∂x

Dr. Joseph Ssebuliba - DCEE & Maths Dept page 10 of 76


Makerere University EMT 1201 - Engineering Mathematics II

1
∂F
= N (x, y) = x3 + 8x2 y + 12y 2 (2.4)

20
∂y
Then we have, from (2.3)
Z
F (x, y) = (3x2 y + 8xy 2 )dx = x3 y + 4x2 y 2 + h(y).) (2.5)

1
And from equation (2.4)
Z
F (x, y) = (x3 + 8x3 y + 12y 2 )dy = x3 y + 4x2 y 2 + 4y 3 + f (x) (2.6)

MT
So equations (2.5) and (2.6) are equal and they give
x3 y + 4x2 y 2 + h(y) = x3 y + 4x2 y 2 + 4y 3 + f (x); from which we see that for the two to be
equal, h(y) = 4y 3 and f (x) = 0.
Using h(y) in (2.5) or f (x) in (2.6) gives the solution as x3 y + 4x2 y 2 + 4y 3 = c.
And y(2) = 1 ⇒ 8 + 16 + 4 = c ⇒ c = 28 ⇒ x3 y + 4x2 y 2 + 4y 3 = 28.
5. Solve the differential equation:(3x2 − 2xy + 2)dx + (6y 2 − x2 + 3)dy = 0
Solution: M (x, y) = 3x2 − 2xy + 2, ⇒
N (x, y) = 6y 2 − x2 + 3, ⇒ ∂N
Since ∂M
∂y
= −2x = ∂N
∂x
,
∂x
= −2x.
∂M
∂y

the equation is exact.


Let the solution be F (x, y) = c with
-E= −2x

∂F
= M (x, y) = 3x2 − 2xy + 2 (2.7)
∂x
EE
∂F
= N (x, y) = 6y 2 − x2 + 3 (2.8)
∂y
Z
Then (2.7) gives F (x, y) = (3x2 − 2xy + 2)dx = x3 − x2 y + 2x + g(y) (2.9)
DC

Z
And (2.8) gives F (x, y) = (6y 2 − x2 + 3)dy = 2y 3 − x2 y + 3y + f (x) (2.10)

Equations (2.9) and (2.10) are equal and


x3 − x2 y + 2x + g(y) = 2y 3 − x2 y + 3y + f (x)
from which we see that
-

g(y) = 2y 3 + 3y and f (x) = x3 + 2x


And using g(y) in (2.9) or f (x) in (2.10) gives the solution as x3 − x2 y + 2x + 2y 3 + 3y = c
AK

Exercise 2.2

Test for exactness and solve if exact.


1. 3x3 y 2 y 0 + 3x2 y 3 − 5x4 = 0 2. (3x2 y 2 − 4xy)dy + (2xy 3 − 2y 2 )dx = 0
3. xexy dy + (yexy − 4x3 )dx = 0 4. (x + y 2 )y 0 + 2x2 − y = 0
5. (x2 − y)dx + (2x2 + 2xy)dy = 0 6. [cos (x2 + y) − 3xy 2 ]y 0 + 2x cos (x2 + y) − y 3 = 0
7. (2xy + 3)dx + (x2 − 1)dy = 0 8. (x + y sin x)dy + (y + x sin y)dx = 0

Dr. Joseph Ssebuliba - DCEE & Maths Dept page 11 of 76


Makerere University EMT 1201 - Engineering Mathematics II

1
2.3 First-order linear equations

20
Definition 2.2 A first-order differential equation is said to be linear if it takes the form
dy
a1 (x) + a0 (x)y = b(x) (2.11)
dx
where a1 (x), a0 (x), b(x) are continuous functions that depend only on the independent variable

1
x.

Examples 2.6

MT
dy
1. x2 sin (x − cos x)y = (sin x) dx is linear since it can be written in the form
dy 2
(sin x) dx + (cos x)y = x sin x
dy dy
2. y dx + (sin x)y 3 = ex + 1 is not linear due to the presence of terms y 3 and y dx
If we divide through (2.11) by a1 (x) we write equation (2.11) in standard form

dy
dx
where P (x) and Q(x) are functions of x or constants. -E
+ P (x)y = Q(x) (2.12)

2.4 Integrating factor: First-order linear equations


Suppose (2.12) is written in the form
EE
[P (x)y − Q(x)]dx + dy = 0 (2.13)

Let M (x, y) = P (x)y − Q(x), and N (x, y) = 1. Then ∂M∂y


= P (x) and ∂N
∂x
= 0 in which case
the equation is not exact. Let by multiplying through equation (2.13) by µ(x) make it exact.
Then [(µ(x)P (x).y − µ(x)Q(x)]dx + µ(x)dy = 0 implies that
DC

)
∂M
∂y
= µ(x)P (x)
(2.14)
∂N
∂x
= dµ(x)
dx

dµ(x)
and for exact ∂M
∂y
= ∂N
∂x
⇒ µ(x)P (x) = dx
which on separating of variables gives
R dµ R
µ(x)
= P (x)dx from which we have
R
P (x)dx
µ(x) = e (2.15)
-

Then (2.15) is our desired integrating factor; and clearly since µ(x)P (x) = dµ(x)
dx
then
dy dy dµ(x)
µ(x) dx + P (x)µ(x)y = µ(x)Q(x) ⇒ µ(x)
AK

d
R dx + dx y = µ(x)Q(x)
⇒ dx (µ(x).y) = µ(x)Q(x) ⇒ µ(x)y = µ(x)Q(x)dx + c. Thus
y = µ(x)−1 ( µ(x)Q(x)dx + c) is the general solution to (2.12) where µ(x) = e P (x)dx .
R R

Dr. Joseph Ssebuliba - DCEE & Maths Dept page 12 of 76


Makerere University EMT 1201 - Engineering Mathematics II

1
Examples 2.7

20
dy
1. Solve the differential equation: dx
+ 2y = 3ex
R R
P (x)dx 2dx
Solution: Integrating factor = e =e = e2x . Then multiplying through by the
integrating factor, gives
dy d
R
e2x dx + 2e2x y = 3e3x ⇒ dx
(e2x y) = 3e3x e(2x) y = 3e3x dx = e3x + c
Therefore y = ex + ce−2x .

1
2. Solve the differential equation:
1 dy 2y
− = x cos x; y( π2 ) = 3

MT
x dx x2
Solution: Rewrite the differential equation as
dy 2
− y = x2 cos x.
dx x

2
R
dy
Then the Integrating factor= e − x dx = e−2 ln x = x12 . Thus x12 dx − x23 y = cos x
d 1
⇒ dx ( x2 y) = cos x ⇒ x12 y = sin x + c. And y( π2 ) = 3 ⇒ c = ( π122 − 1) gives the solution
y = x2 sin x + ( π122 − 1)x2 .

Exercise 2.3

Solve the differential equations.


-E
1. y 0 + 3y = x + e−2x 2. y 0 − 2y = x2 e2x
EE
2
3. xy 0 + 2y = x2 − x + 1; y(1) = 12 4. y 0 + 2xy = 2xe−x
5. xy 0 + y = 3x cos 2x 6. (1 + x2 )y 0 + 4xy = (1 + x2 )−2
7.y 0 + y = xe−x + 1 8. dx
dy
= ey − x; y(1) = 0
dy
9. x2 y 0 + 2y = x2 − x + 1; y(π) = 0 10. dx = xy + 2x + 1
dr
11. (t + y + 1)dt − dy = 0 12. dθ + r tan θ = secθ
dy dy
13. x dx + 3xy + 2x2 = x3 + 4x 14 dx = e4y1+2x
DC

2.5 Integrating factor: First-order general equation


Consider the general first-order differential equation

M (x, y)dx + N (x, y)dy = 0 (2.16)

with its conditions for exactness ∂M = ∂N Suppose equation (2.16) is not exact. Let, by
-

∂y ∂x
multiplying through (2.16) by µ(x, y) make it exact. Then if

µ(x, y)M (x, y)dx + µ(x, y)N (x, y)dy = 0 (2.17)


AK

is exact, we must have


∂ ∂
[µ(x, y)M (x, y)] = [µ(x, y)N (x, y)] (2.18)
∂y ∂x

Dr. Joseph Ssebuliba - DCEE & Maths Dept page 13 of 76


Makerere University EMT 1201 - Engineering Mathematics II

1
On differentiating by product rule (2.18) gives
∂µ ∂M ∂µ ∂N

20
M + µ(x, y) =N + µ(x, y)
∂y ∂y ∂x ∂x
∂µ ∂µ ∂N ∂M
⇒M −N =( − )µ(x, y) (2.19)
∂y ∂x ∂x ∂y

Then we have the following situations of equation (2.19):

1
1. If µ(x, y) is a function of x only, then ∂µ
∂y
= 0 and ∂µ
∂x
= dµ
dx
. In this case equation (2.19)
gives
dµ ∂N ∂M

MT
−N =( − )µ(x)
dx ∂x ∂y
or
dµ 1 ∂M ∂N
= ( − )µ(x) (2.20)
dx N ∂y ∂x
And if N1 ( ∂M
∂y
− ∂N
∂x
) is a function of x only, say f (x) or a constant, (2.20), would reduce

to dx = f (x)µ(x) which on separation of variables gives

gives
Z

µ(x)
Z

2. If µ(x, y) is a function of y only, then ∂µ


∂x
Z

= 0 and ∂µ
-E
= f (x)dx ⇒ ln µ(x) = f (x)dx ⇒ µ(x) = e f (x)dx

∂y
= dµ
dy
R
(2.21)

. In this case equation (2.19)

dµ ∂M ∂N
M = −( − )µ(y)
dy ∂y ∂x
or
EE
dµ 1 ∂M ∂N
=− ( − )µ(y) (2.22)
dy M ∂y ∂x
1 ∂M ∂N
And if (
M ∂y
− ∂x
) is a function of y only, say g(y) or a constant; we get

= −g(y)µ(y) (2.23)
dy
DC

which on separation of variables gives


Z Z Z
dµ R
= − g(y)dy ⇒ ln µ(y) = − g(y)dy ⇒ µ(y) = e− g(y)dy (2.24)
µ(y)

The following is the summary:


∂M
If M (x, y)dx + N (x, y)dy = 0 is neither simple separable, nor linear, compute ∂y
and
∂N
∂x
.
-

∂M ∂N ∂M ∂N
(a) If ∂y
= ∂x
then the equation is exact. If ∂y
6= ∂x
then the equation is not exact.

(b) Compute N1 ( ∂M − ∂N ). If this is a function of x only, say f (x); then the integrating factor
AK

R ∂y ∂x
f (x)dx
is µ(x) = e . If it is not a function of x only then
(c) Compute M1 ( ∂M − ∂N ). If this is a function of y only, say g(y); then the integrating factor
R ∂y ∂x
− g(y)dy
is µ(y) = e .
Then multiplying through the equation by the integrating factor will make the equation
exact and the method of solving exact follows.

Dr. Joseph Ssebuliba - DCEE & Maths Dept page 14 of 76


Makerere University EMT 1201 - Engineering Mathematics II

1
Examples 2.8

20
1. Solve the differential equation
(2x2 + y)dx + (x2 y − x)dy = 0 (2.25)

Solution: The equation (2.25) is neither separable nor linear.


∂M ∂N
M (x, y) = 2x2 + y, ⇒ = 1 N (x, y) = x2 y − x, ⇒

1
= 2xy − 1
∂y ∂x
∂M ∂N
Since ∂y
= 1 6= 2xy − 1 = ∂x
, the equation is not exact. We compute

MT
1 ∂M ∂N 1 − 2xy + 1 2(1 − xy) 2
( − )= 2
= =− (a function of x only).
N ∂y ∂x x y−x −x(1 − xy) x
2
R R
Then the Integrating factor is µ(x) = e f (x)dx = e − x dx = e−2 ln x = x12 . Multiplying
through by the intergrating factor gives
1
x2
(2x2 + y)dx + x12 (x2 y − x)dy = 0, which is exact.
Cleary 2dx + x−2 ydx + ydy − x−1 dy R = 0 ⇒R 2dx −1+ (x−2 Rydx − x−1
R dy) + ydy = 0
d −1
⇒ 2dx + dx (x y) + ydy = 0 ⇒ 2dx + d(x y) + ydy = 0dx
⇒ 2x − x−1 y + 21 y 2 = c.

Solution: M (x, y) = y 2 + 2xy, ⇒ ∂M


∂y
-E
2. Solve the differential equation: (y 2 + 2xy)dx − x2 dy = 0
= 2y + 2x N (x, y) = −x2 , ⇒ ∂N
∂x
= −2x
∂M ∂N
Since ∂y
= 2y + 2x 6= −2x = ∂x
the equation is not exact.
We check
EE
1 ∂M ∂N [2y + 2x − (−2x)] 2y + 4x
( − )= 2
=
N ∂y ∂x −x −x2
which is not a function of x only. We check
1 ∂M ∂N [2y + 2x − (−2x)]
( − ) =
y 2 + 2xy
DC

M ∂y ∂x
2y + 4x 2(y + 2x) 2
= 2 = = = g(y), (a function of y only)
y + 2xy y(y + 2x) y
2
R
= e−
R
dy
Then the integrating factor is µ(y) = e− g(y)dy y = e−2 ln y = 1
y2
.
x2
And y12 (y 2 + 2xy)dx − y2 dy = 0 is exact.
−1 2 (−2)
R dx +R 2xy −1dx2 − xR y
Thus dy = 0 ⇒ dx + dxd
(y −1 x2 ) = 0
−1 2
⇒ dx + d(y x ) = 0.dx ⇒ x + y x = c ⇒ xy + x2 = cy.
-

Exercise 2.4

Solve the differential equations


AK

1. ( 21 y 2 + 2yex )dx + (y + ex )dy = 0 2. (3x2 + y)dx + (x2 y − x)dy = 0


3. (x4 − x + y)dx − xdy = 0 4. (2xy)dx + (y 2 − 3x2 )dy = 0
5. (2y 2 x − y)dx + xdy = 0 6. (y 2 + 2xy)dx + xdy = 0
7. (2y 3 + 2y 2 )dx + (3y 2 + 2xy)dy = 0 8. (3x2 y + 2xy + y 3 )dx + (x2 + y 2 )dy = 0
dy
9. dx = e2x + y − 1 10.dx + ( xy − sin y)dy = 0
11.ydx + (2xy − e−2y )dy = 0

Dr. Joseph Ssebuliba - DCEE & Maths Dept page 15 of 76


Makerere University EMT 1201 - Engineering Mathematics II

1
3 Using substitutions and transformations

20
3.1 Homogeneous functions
Consider a first order differential equation M (x, y)dx + N (x, y)dy = 0. Then the functions
M (x, y) and N (x, y) are said to be homogeneous if they both contain expressions of the same
degree.

1
More generally, a function f (x, y) is said to be a homogeneous function of degree n if f (ax, ay) =
dy
an f (x, y). And to a first order differential equation dx = f (x, y) if the righthand side function
f (x, y) can be written as a function of the ratio xy alone then the equation is homogenous.

MT
Examples 3.1

1. The function f (x, y) = 2x2 + y 2 is homogeneous with degree 2 because


f (ax, ay) = 2(ax)2 + (ay)2 = a2 (2x2 + y 2 ) = a2 f (x, y).

p
p

p

-E
2. The function f (x, y) = x − 3 xy + 5y is homogeneous with degree 1 because
f (ax, ay) = (ax) − 3 (ax)(ay) + 5(ay) = a(x − 3 xy + 5y) = af (x, y).

3. The function f (x, y) = x3 + y 3 is homogeneous with degree 23 because


p 3p 3
f (ax, ay) = (ax)3 + (ay)3 = a3 x3 + a3 y 3 = a 2 x3 + y 3 = a 2 f (x, y).
x
4. The function f (x, y) = 2y
+ 4 is homogeneous with degree zero because
EE
ax ax x
f (ax, ay) = 2ay
+4= a(2y)
+ 4 = a0 ( 2y + 4) = a0 f (x, y).
dy x−y
5. dx
= x
= 1 − ( xy ) is homogeneous
dy y 2 +2xy
6. dx
= x2
= ( xy )2 + 2( xy ) is homogeneous
DC

y
dy x+y 1 1+ x
7. dx
= ln x − ln y + x−y
= ln y + y
1− x
is homogeneous
x

dy x3 −4xy
8. dx
= x2
= x − 4( xy ) is not homogeneous.
Also for the following functions:

1. M (x, y) = x2 + xy + y 2 is homogeneous function because each function involved is of


degree 2
-

2. M (x, y) = 2x + y is homogeneous with degree 1


4
3. M (x, y) = x3 − 2xy 2 − 5 xy is homogeneous with degree 3
AK

4. M (x, y) = x2 − 3xy + 2 is not homogeneous because of a 2 with degree zero.

5. M (x, y) = 3x2 − 5x2 y + 4y is not homogeneous because 3x2 is of degree 2, 5x2 y is of


degree 3 and 4y is of degree 1.

Dr. Joseph Ssebuliba - DCEE & Maths Dept page 16 of 76


Makerere University EMT 1201 - Engineering Mathematics II

1
3.2 The substitution y = vx

20
If the degree of all the functions in M (x, y) is the same as the degree of the functions in N (x, y)
then the RHS of the differential equation

dy M (x, y)
=− = f (x, y)
dx N (x, y)

1
y
can clearly be written as a ratio of x
alone and the substitution y = vx solves such a differential
equation.
But first check if the differential equation is not separable, exact or linear as these are easily

MT
solved with methods mentioned earlier.

Examples 3.2

1. Solve the differential equation (x − y)dx + xdy = 0


Solution: M (x, y) = x − y and N (x, y) = x both are of degree 1.
Let y = vx, then dy = vdx + xdv. And (x − y)dx + xdy = 0

-E
⇒ (x − xv)dx + x(vdx + xdv) = 0 ⇒ (1 − v)dx + vdx + xdv = 0 ⇒ dx + xdv = 0 which
on separation of variables and integration gives ln x = −ν + c ⇒ ln xc = ν. And this
y
leads to the solution xe x = c.

2. Solve the differential equation: (xy + y 2 + x2 )dx − x2 dy = 0


Solution: Both M (x, y) = xy + y 2 + x2 and N (x, y) = −x2 have functions of the same
degree.
EE
Let y = vx, dy = vdx + xdv. Then (x.xv + v 2 x2 + x2 )dx − x2 (vdx
R + xdv)R = 0
⇒ (v + v 2 + 1)dx − vdx − xdv = 0 ⇒ (v 2 + 1)dx = xdv so that x1 dx = v21+1 dv
⇒ ln x = tan−1 v + c ⇒ tan−1 xy = ln Ax ⇒ y = x tan(ln Ax).

3. Solve the differential equation: (y 2 + 2xy)dx − x2 dy = 0


DC

Solution. The differential equation is rewritten as

dy y 2 + 2xy y y
⇒ = 2
= ( )2 + 2 .
dx x x x
dy dv dv dv
And y = vx ⇒ dx = v + x dx gives
R 1 v +Rx dx = v 2 + 2v ⇒ x dx = v2 + v
1 1 1 1 1
⇒ x dx = ( v − v+1 )dv. Then x dx = ( v − v+1 )dv ⇒ ln x = ln v − ln (v + 1) + c.
y
v v y Ax2
⇒ ln Ax = ln v+1 ⇒ Ax = v+1
⇒ Ax = y
x
+1
= y+x
. Therefore y = 1−Ax
.
x
-

Exercise 3.1
AK

Solve the differential equations

1. (x2 + y 2 )dx + 2xydy = 0 2. (y 2 − xy)dx + x2 dy = 0


3. (xy + y 2 )dx − x2 dy = 0 4. (3x2 − y 2 )dx + (xy − x3 y −1 )dy = 0
5. y(ln y − ln x + 1)dx − xdy = 0 6. (2xy + y 2 )dx − (x2 + xy + y 2 )dy = 0
7. (x2 + 2y 2 )dx − (2xy + y 2 )dy = 0 8. (y 4 + x3 y)dx − x4 dy = 0

Dr. Joseph Ssebuliba - DCEE & Maths Dept page 17 of 76


Makerere University EMT 1201 - Engineering Mathematics II

1
3.3 Coefficients are linear functions

20
(a) Lines through the origin
Consider the differential equation (ax + by)dx + (cx + dy)dy = 0
Then M (x, y) = ax + by and N (x, y) = cx + dy are linear functions (i.e ax + by = 0 and
cx + dy = 0 are lines through the origin).
Clearly these functions M (x, y) and N (x, y) are both homogeneous of the same degree 1

1
and writing the differential equation as

dy (ax + by) a + b xy

MT
=− =−
dx (cx + dy) c + d xy
implies that the substitution y = vx solves the equation.

Examples 3.3

Solve the differential equation: (2x − 5y)dx + (2x + y)dy = 0

dy
dy
dx
dv
=−
(2x − 5y)
(2x + y)
-E
Solution: The differential equation can be written as

=−
(2 − 5 xy )
(2 + xy )

Letting y = vx ⇒ dx
= v + x dx we get

dv 2 − 5v dv 2 + 5v (v 2 − 3v + 2)
v+x =− ⇒x =− −v =−
EE
dx 2+v dx 2+v 2+v
Separating the variables gives
Z Z Z Z
2+v dx 4 3 dx
dv = − ⇒ dv − dv = −
v 2 − 3v + 2 x v−2 v−1 x
DC

Thus
(v − 2)4 C
4 ln(v − 2) − 3 ln(v − 1) = − ln x + C ⇒ 3
=
v − 1) x
y
And with v = x
we get the solution (y − 2x)4 = C(y − x)3 .

(b) Parallel lines:


Consider the differential equation ((x + 2y)dx + (x + 2y − 3)dy = 0
Here the two linear functions are parallel and as such the appearance of x + 2y in both
-

M (x, y) and N (x, y) suggests the substitution z = x + 2y.


Thus z = x + 2y ⇒ dz = dx + 2dy ⇒ dx = dz − 2dy (or dy = dz−dx 2
)
AK

And (x + 2y)dx + (x + 2y − 3)dy = 0 ⇒ z(dz − 2dy) + (z − 3)dy = 0.


z
⇒ zdz − 2zdy + zdy − 3dy = 0 ⇒ zdz − (z + 3)dy = 0 ⇒ z+3 dz = dy.
3
R R
(1 − z+3 )dz = dy ⇒ y = z − 3 ln(z + 3) + c ⇒ y = (x + 2y) − 3 ln(x + 2y + 3) + c
or y = 3 ln(x + 2y + 3) − x + c

Dr. Joseph Ssebuliba - DCEE & Maths Dept page 18 of 76


Makerere University EMT 1201 - Engineering Mathematics II

1
(c) Lines not parallel:
Consider (−3x + y + 6)dx + (x + y + 2)dy = 0.

20
The functions M (x, y) = −3x + y + 6 and N (x, y) = x + y + 2 are linear and not parallel.
We solve simultaneously the lines −3x + y + 6 = 0 and x + y + z = 0 to give x = 1
and y = −3 ⇒ x − 1 = 0, y + 3 = 0
Then we translate the axes as follows:

1
Let X = x − 1 and Y = y + 3 ⇒ x = X + 1 and y = Y − 3. Then dx = dX and dy = dY
so that (−3x + y + 6)dx + (x + y + 2)dy = 0
⇒ [−3(X + 1) + (Y − 3) + 6]dX + [(X + 1) + (Y − 3) + 2]dY = 0

MT
⇒ [−3X + Y ]dX + [X + Y ]dY = 0. This process always leads to lines through the origin
which we can easily solve by substitution Y = vX. Thus Y = vX ⇒ dY = vdX + Xdv
gives (−3X + vX)dX + [X + vX][vdX + Xdv] = 0
⇒ (−3 + v)dX + (1 + v)(vdXR + Xdv) = 0 ⇒ (v 2 + 2v − 3)dX + (1 + v)dv = 0.
1+v
dv = − X1 dX
R
Separation of variables gives v2 +2v−3
Y2 (Y )
⇒ v 2 + 2v − 3 = XC2 ⇒ X 2 + 2 X − 3 = X2
C

⇒ Y 2 + 2XY − 3X 2 = C and Y = y + 3, X = x + 1 gives the final solution as


(y + 3)2 + 2(x − 1)(y + 3) − 3(x − 1)2 = c.

Exercise 3.2

Solve the differential equations


-E
1. (−2x + 4y)dx − (x + y)dy = 0 2. (2x + y)dx − (x + 2y)dy = 0
3. (x + 3y)dx + (y − x)dy = 0 4. (2x − y)dx + (3x − 4y)dy = 0
EE
5. 4(3x + y − 2)dx − (3x + y)dy = 0 6. (x + 2y − 1)dx − (x + 2y − 5)dy = 0
7. (x + 2y − 1)dx + (2x + 4y − 3)dy = 0 8. (3x − 2y + 1)dx + (3x − 2y + 3)dy = 0
9. (−3x + y − 1)dx + (x + y + 3)dy = 0 10. (2x + y + 4)dx + (x − 2y − 2)dy = 0
11. (−8x + 3y + 17)dx + (3x − y − 6)dy = 0 12. (2x + y − 13)dx − (y + 1)dy = 0
13. (2x + y − 8)dx − (x + 2y − 7)dy = 0 14. (3x + y + 2)dx + (x + y + 2)dy = 0
15. (x + y − 1)dx + (y − x − 5)dy = 0 16. (2x − y)dx + (4x + y − 3)dy = 0
DC

17. (2x − y)dx + (x + y − 3)dy = 0; y(0) = 2 18. (y − 2x − 1)dx + (x + y − 4)dy = 0


19. (x − 3y + 2)dx + 3(x + 3y − 4)dy = 0 20. (6x − 3y + 2)dx − (2x − y − 1)dy = 0

3.4 Substitution suggested by nature of the equation


The Bernoulli’s Equation:
This is a first order differential equation of the form
-

dy
+ P (x)y = Q(x)y n (3.1)
dx
where P (x), Q(x) are continuous functions of x and n ∈ <.
AK

When n = 0, 1 the equation is linear and can be solved by methods mentioned earlier .
And for any other values of n, we use substitution v = y 1−n
dy dy
Thus writing dx
+ p(x)y + Q(x)y n as y −n dx + P (x)y 1−n = Q(x) together with v = y 1−n
gives
dv dy
= (1 − n)y −n
dx dx

Dr. Joseph Ssebuliba - DCEE & Maths Dept page 19 of 76


Makerere University EMT 1201 - Engineering Mathematics II

1
1 dv
⇒( ) + P (x)v = Q(x) (3.2)

20
1 − n dx
1
And indeed equation (3.2) is linear since n−1
is a constant.

Examples 3.4

dy
− 5y = − 52 xy 3

1
1. Solve the differential equation: dx
Solution: This is Bernoulli equation with n = 3, P (x) = −5, Q(x) = − 25 x. We write
dy dy
the equation as y −3 dx − 5y −2 = − 25 x Let v = y −2 , dx
dv
= −2y −3 dx we get

MT
1 dv 5 dv
− − 5v = − x ⇒ + 10v = 5x
2 dx 2 dx
R
10dx d
whose integrating
R 10xfactor is e = e10x . Thus, dx (v.e10x = 5xe10x )
−10x
10x
⇒ ve = 5 xe dx ⇒ v = 2 − 20 + ce x 1
⇒ y −2 = x2 − 20 1
+ ce−10x
dy
2. Solve the differential equation: dx
+ x1 y = xy 2 .
Solution:

Here n = 2, P (x) =


1
x
dy dν 1
-E
, Q(x) = x. We write the equation as y −2
dy
dx x
1
− y −1 = x

so that ν = y −1 , = −y −2 gives − ν = −x whose integrating factor is


dx dx dx x
dx
R
e− x = x−1 , so that dx d
(x−1 .ν) = −1 and so ν = −x2 + cx. Then with ν = y −1 , we
EE
1
obtain the solution y = cx−x 2.

Exercise 3.3

Solve the Bernoulli’s Equation


DC

dy dy
1. x dx + y = y1 2. dx − y = ex y 2
dy dy
3. dx = y(xy 3 − 1) 4. x dx − (1 + x)y = xy 2
dy dy
5. x2 dx + y 2 = xy 6. 3(1 + x2 ) dx = 2xy(y 3 − 1)
dy 1 dy 3
7. x2 dx − 2xy = 3y 4 ; y(1) = 1
2
8. y − 2 dx + y 2 = 1; y(0) = 4

4 Applications of first order equations


-

4.1 Radioactive Decay


The law of radioactive decay states: The rate of decay of a radioactive material is proportional
AK

to the amount of material present at the time t.


Let x(t) be the amount present at time t. Then

dx
= −kx (4.1)
dt
where k is a constant of proportionality and the negative on k signifies decay.

Dr. Joseph Ssebuliba - DCEE & Maths Dept page 20 of 76


Makerere University EMT 1201 - Engineering Mathematics II

1
Using separation of variables on equation (4.1) we get

20
Z Z
dx
= − kdt ⇒ ln x = −kt + C ⇒ x(t) = Ae−kt
x
If initially at t = 0; x = x0 then A = x0 and so

x(t) = x0 e−kt (4.2)

1
Equation (4.2) is then the governing equation of the amount of radioactive substance at any
time t.

MT
Remarks:

(1) The radioactive decay is exponential decay since for all k > 0 we have x(t) → 0 as t → ∞.
(2) The half life of a radioactive substance is the length of time it takes the material to decay
to half its original amount.
Let T be the half life. Then we have

where x0 is the original amount we started with.


1
x(T ) = x0
2 -E
And from equations (4.2) and (4.3) x(T ) = x0 e−kT ⇒ e−kT = 12 ⇒ kT = ln 2. Thus
(4.3)

T = lnk2 is the time it takes the original amount to decay to half the material.
EE
Examples 4.1

Three grams of a radioisotope decay in two years to 0.9g. Determine

(i) the half life T of the isotope


(ii) The time it will take the amount to decay to 0.4g
DC

(ii) the remaining amount in grams after 6 years.

Solution: Let x(t) be the amount at time t. Then dx


dt
= −kx ⇒ x(t) = x0 e−kt
Initially, when t = 0 we have x = 3 gives x0 = 3. And so x(t) = 3e−kt .
ln( 10 )
After t = 2 years, we have x = 0.9 and so 0.9 = 3e−2k . This gives k = 2
3
= 0.6
Thus
-

ln( 10
3 )t
x(t) = 3e− 2

ln 2 ln 2
(i) To find half life T , we know T = = = 1.2 years
AK

k 0.6

(ii) To find time when the amount will be 0.4g;


ln( 10
3 )t 2 ln( 30 )
x(t) = 3e− 2 ⇒ ln( 10
3
)t = 2 ln( 30
4
). Therefore t = ln( 10
4
)
= 4.4 years
4

ln( 10
3
(ii) To find the amount remaining after 6 years; x(t) = 3e− 2
t
gives
ln( 10 )
− 23 ×6
x(t) = 3e = 0.081

Dr. Joseph Ssebuliba - DCEE & Maths Dept page 21 of 76


Makerere University EMT 1201 - Engineering Mathematics II

1
Exercise 4.1

20
1. A radioactive isotope has a half life of 16 days. if one wishes to have 30g at the end of 30
days how much radio isotope should he start with? Ans. 110.04g

2. A radio isotope is going to be used in an experiment. At the end of 10 days only 5% is


to be left. What should be the half-life?

3. A radioactive isotope sits unused in a laboratory for 10 years at which time it is found to

1
contain only 80% of the original amount of the radioactive material.

(a) What is the half-life of this isotope? Ans: 31.063 years

MT
(b) How many additional years will it take until only 15% of the original amount is left? Ans
75.018 years

4.2 Newton’s Law of Cooling:


This law state that the rate of change of the surface temperature of an object is proportional to

-E
the difference between the temperature of the object and the temperature of its surroundings
(also called the ambient temperature) at that time.
Thus if T (t) is the surface temperature of the object at time t and Ts is the temperature of the
sorrounding at time t then we have the differential equation dT dt
= k(T − Ts ).
Remarks:
EE
(a) if T > Ts the body’s temperature is hotter than the temperature of the surrounding, and
in this case there will be loss of temperature of the body; it therefore follows that k will
be negative.

(b) If T < Ts then the body will gain temperature and in this case k will be positive.
R
Consider dT
= k(T − Ts ). Then dT
− kT = kTs . The integrating factor e− kdt
= e−kt gives
DC

dt dt

d
(T e−kt ) = −ke−kt .Ts ⇒ T e−kt = e−kt .Ts + C ⇒ T (t) = Ts + Cekt .
dt
If t = 0 then we have T0 = Ts + C ⇒ C = T0 − Ts .
Thus T (t) = Ts + ekt (T0 − Ts ).
Note that if k < 0 then lim T (t) = lim (Ts + e−kt (T0 − Ts )) = Ts .
t→∞ t→∞
-

That is; the surface temperature of a body cools and eventually approaches the temperature of
the surroundings.
The difference θ = T − Ts is commonly referred to as excess temperature between temperature
AK

of the body and the temperature of its surroundings. Thus we commonly state Newton’s law
of cooling as :
The rate of change of temperature of a body is proportional to the excess temperature of the
body and that of its surroundings. And for θ = T − Ts , we write

= −kθ
dt
Dr. Joseph Ssebuliba - DCEE & Maths Dept page 22 of 76
Makerere University EMT 1201 - Engineering Mathematics II

1
so that Z Z

= −kdθ ⇒ ln θ = −kt + C ⇒ θ(t) = Ae−kt

20
θ
If at t = 0, θ = θ0 (the initial excess temperature ) we have A = θ0 and so θ(t) = θ0 e−kt

Examples 4.2

1. A cup of coffee at 90o C is placed in an office with constant room temperature of 20o C. If

1
from experience the cup of coffee drops from 90o C to 70o C in 10 minutes, Find

(i) the temperature of coffee after 30 minutes

MT
(ii) how long it will take coffee to cool to 50o C.

Solution: Let T (t) be the temperature of coffee at time t. Let θ = T − T0 . Then



= −kθ
dt

θ = 70 − 20 = 50o C give 50 = 70e−10k ⇒ k = 10 1


-E
gives θ(t) = θ0 e−kt . Initially θ = 90 − 20 = 70o C, ⇒ 70 = θ0 and so θ(t) = 70e−kt .
Since the coffee cools from 90o C to 70o C in 10 minutes then t = 10 and
1 7
ln( 75 ). Thus θ(t) = 70e− 10 ln( 5 )t .
1 7
(i) After t = 30 minutes, θ(t) = 70e− 10 ln( 5 ).30 = 25.5o C. And since θ = T − T0 , then the
temperature of the coffee after 30 minutes,
T = θ + T0 = 25.5 + 20 = 45.5o C.
EE
(ii) When the coffee has cooled to 50o C, the excess temperature θ = 50 − 20 = 30o C. Thus
1 7 1 7
θ(t) = 70e− 10 ln( 5 )t ⇒ 30 = 70e− 10 ln( 5 )t ⇒ 10
1
ln( 75 )t = ln( 75 ). Therefore
10 ln( 73 )
t= ln( 57 )
' 25.2. Thus coffee will cool to 50o C after 25.2 minutes.

2. According to Newton’s law of cooling, the rate at which a substance cools in moving air is
DC

proportional to the difference between the temperature of a substance and that of the air. If
the temperature of the air is 30o and the substance cools from 100o to 70o in 15 minutes, find
when the temperature will be 40o .
Let T be the temperature of the substance at time t minutes. Then
dT dT
= −k(T − 30) or = −kdt.
dt T − 30
-

( Note that the use of k is optional. It will be found that k is positive, but if +k is used it will
be found that k is equally negative)
Integrating between the limits t = 0, T = 100 and t = 15, T = 70,
AK

Z 70 Z 15
dT 4
= −k dt, ⇒ ln 40 − ln 70 = −15k = ln
100 T − 30 0 7

and 15k = ln 47 = 0.56


Integrating
R 40 dT between
R t the limits t = 0, T = 100 and t = t, T = 40 15 ln 7
100 T −30
= −k 0
dt, ⇒ ln 10 − ln 70 = −kt, 15kt = 15 ln 7, t = 0.56
= 52 minutes.

Dr. Joseph Ssebuliba - DCEE & Maths Dept page 23 of 76


Makerere University EMT 1201 - Engineering Mathematics II

1
Exercise 4.2

20
1. The temperature of an engine by the time it is shut off is 200o C. The surrounding air
temperature is 30o C. After 10 minutes have elapsed the surface temperature of the engine
is 180o C.
(a) How long will it take for the surface temperature of the engine to cool to 40o C. Ans ≈
226.4 minutes

1
(b) Find the surface temperature of the engine after 60 minutes.
2. An object at 100o C is placed in a room of 40o C constant temperature. What should

MT
be the constant of proportionality in order that the object be at 600 C after 10 minutes?
1
k = 10 ln 3 ≈ 0.1099

4.3 Population growth


If the rate of increase of a population is proportional to the number of individuals present at
time t, and N (t) is the population at time t then

Then
R dN
N
=
R
dN
dt
= kN. -E
kdt ⇒ N (t) = N0 ekt , where N0 is the initial population.

Examples 4.3

1. If the population of a country doubles in 50 years, in how many years will it treble under
EE
the assumption that the rate of increase is proportional to the number of inhabitants?
Solution: Let y denote the population at time t years and y0 the population at time
t = 0. Then dy
dt
= ky where k is the proportionality factor.
Integrating we have y = Cekt . At time t = 0, y = y0 gives, C = y0 . Thus, y = y0 ekt .
At t = 50, y = 2y0 . ⇒ 2y0 = y0 e50k or e50k = 2.
DC

When y = 3y0 we get 3 = ekt . Then 350 = e50kt = (e50k )t = 2t and t = 79 years.
2. In a certain culture of bacteria the rate of increase is proportional to the number present
(a) if it is found that the number doubles in 4 hours, how many may be expected at the
end of 12 hours?
(b) If there are 104 at the end of the 3 hours and 4.104 at the end of five hours, how many
were there in the beginning
Solution: Let x denote the number of bacteria at time t hours. Then dx dt
= kx (a)
-

kt
Integrating , we have x = Ce . Assuming that x = x0 at time t = 0, we have C = x0 and
x = x0 ekt .
At time t = 4, x = 2x0 . Then 2x0 = x0 e4k and e4k = 2.
AK

When t = 12, x = x0 e12k = x0 (e12k ) = x0 (e4k )3 = x0 (23 ) = 8x0 , that is, there are 8 times
the original number.
4
(b) When t = 3, x = 104 ⇒ 104 = Ce3k and C = 10 e3k
.
4 4 5k 4.104
When t = 5, x = 4.10 ⇒ 4.10 = Ce and C = e3k .
104 4.104
Equating the values of C, e3k
= e5k
. Then e2k = 4 and ek = 2.
104 104
Thus the original number is C = e3k
= 8
bacteria.

Dr. Joseph Ssebuliba - DCEE & Maths Dept page 24 of 76


Makerere University EMT 1201 - Engineering Mathematics II

1
4.4 Logistic Growth

20
Numerous attempts have been made to develop models to study the growth of populations.
One means of obtaining a simple model for such a study is to assume that the average birth
rate per individual is a positive constant and that the average death rate per individual is
proportional to the population.
If we let x(t) represent the population at time t, then the above assumption leads to the

1
differential equation
1 dx
= b − ax (4.4)
x dt

MT
where b and a are positive constants. This equation is commonly called the logistic equation
and the growth of the population determined by it is called logistic growth.
 
1 a
The variables in the logistic equation may be separated to obtain + dx = b dt.
x b − ax
Integrating both sides gives us
 
x x
ln = bt + c, =⇒ = Aebt . (4.5)
b − ax b − ax

b − ax
=
-E
To expedite the study of equation (4.5), let us further assume that at t = 0 the population is
the positive number x0 . Then equation (4.5) may be written
x x0
b − ax0
ebt

and upon solving for x we have


EE
bx0 ebt
x(t) = . (4.6)
b − ax0 + ax0 ebt
It is interesting to note that the population function obtained in equation (4.6) has a limiting
value
bx0 ebt
   2 bt 
b x0 e b
lim x(t) = lim bt
= lim bt
=
t→∞ t→∞ b − ax0 + ax0 e t→∞ abx0 e a
DC

where we have used L’Hopital’s rule to evaluate the limit.


We should also note that the logistic equation (4.4) will dictate a growth or a decline in the
population depending upon whether the initial population is less than or greater than b/a.

Exercise 4.3

1. A certain population is known to be growing at the rate given by the logistic equation
-

dx/dt = x(b−ax). Show that the maximum rate of growth will occur when the population
is equal to half its equilibrium size, that is when the population is b/2a.
2. A bacterial population is known to have a logistic growth pattern with initial population
AK

1000 and an equilibrium population 10,000. A count shows that at the end of 1 hour
there are 200 bacteria present. Determine the population as a function of time. Ans.
bt
x(t) = 10,000e
9+ebt
, where b = ln 94 ≈ 0.81
3. For the population in number 2 above, determine the time at which the population is
increasing most rapidly and draw a sketch of the logistic curve.
ln 9
Ans. t = ln 9−ln 4
≈ 2.7hr

Dr. Joseph Ssebuliba - DCEE & Maths Dept page 25 of 76


Makerere University EMT 1201 - Engineering Mathematics II

1
4. A college dormitory houses 100 students, each of whom is susceptible to a certain virus
infection. A simple model of epidemics assumes that during the course of an epidemic the

20
rate of change with respect to time of the number of infected students I is proportional
to the number of infected students and also proportional to the number of uninfected
students, 100 − I

(a) If at time t = 0 a single student becomes infected, show that the number of infected
students at time t is given by

1
100e100kt
I= .
99 + e100kt

MT
(b) If the constant of proportionality k has value 0.001 when t is measured in days, find the
value of the rate of new cases I 0 (t) at the end of each day for the first 9 days.
Ans.(b) 3,6,14,23,24,16,8,3,1.

Exercise 4.4

A. Solve the differential Equations


dy
1. dx

= (2 1 + y) cos x; y(π) = 0
3. xy 4 dx + (y 2 + 2)e3x dy = 0
5. (4y + yx2 )dy − (2x + xy 2 )dx = 0
dy
7. dx = y2 − 4
2
dy
8. dx + 2xy = 0
-E dy
2. dx

6. dx
9. dx
dy
2
= 3x 2y+1
+4x+2

= xy−2x+4y−8
2 y2
= x1+x
; y(0) = −1
p
4. y 4 − x2 dy = 4 + y 2 dx
dy xy+3x−y−3

dy
10. dx = e3x+2y
11. y ln x dx
dy
= ( y+1
x
) dy
12. 2 dx − 1
y
= 2x
y
.
EE
B. Test for exactness and solve if exact.
1. (cos x cos y + 2x)dx − (sin x sin y + 2y)dy = 0 2. (2xy 2 + 2y) + (2x2 + 2x)y 0 = 0
3. (x + y)(x − y)dx + x(x − 2y)dy = 0 4. (2x + y)dx − (x + 6y)dy = 0
5. (1 + ln x + xy )dx = (1 − ln x)dy 1
6. (x2 y 3 − 1+9x dy 3 2
2 ) dx + x y = 0

7. (4y + 2x − 5)dx + (6y + 4x − 1)dy = 0; y(−1) = 2 8. cos θdr − (r sin θ − eθ )dθ = 0


dy
9. (5x + 4y)dx + (4x − 8y 3 )dy = 0 10. (1 − 2x2 − 2y) dx = 4x3 + 4xy
DC

11. (x + y)2 dx + (2xy + x2 − 1)dy = 0; y(1) = 1


12. (cos x sin x − xy 2 )dx + y(1 − x2 )dy = 0; y(0) = 2
13. [2x + y 2 − cos(x + y)]dx + [2xy − cos(x + y) − ey ]dy =0
-
AK

Dr. Joseph Ssebuliba - DCEE & Maths Dept page 26 of 76


Makerere University EMT 1201 - Engineering Mathematics II

1
C. Solve the following differential equations.

20
dy
1. xy 0 + 2y = x2 − x + 1; y(1) = 0 2. dx = xy + 2x + 1
dr
3. (t + y + 1)dt − dy = 0 4. dθ + r tan θ = sec θ
dy dy
2
5. x dx + 3xy + 2x = x + 4x 3
6. dx = e4y1+2x
dy
7. dx = e2x + y − 1 8. dx + ( xy − sin y)dy = 0
9. ydx + (2xy − e−2y )dy = 0 10. (y 2 + xy + x2 )dx − x2 dy = 0
y
dy x tan( x )+y
= csc( xy ) + ( xy ) dy

1
11. dx 12. dx = x
13. (−8x + 3y + 17)dx + (3x − y − 6)dy = 0 14. (2x + y − 13)dx − (y + 1)dy = 0
15. (2x + y − 8)dx − (x + 2y − 7)dy = 0 16. (3x + y + 2)dx + (x + y + 2)dy = 0

MT
17. (x + y − 1)dx + (y − x − 5)dy = 0 18. (2x − y)dx + (4x + y − 3)dy = 0
19. (2x − y)dx + (x + y − 3)dy = 0; y(0) = 2 20. (y√− 2x − 1)dx + (x + y − 4)dy = 0

21. (x − 3y + 2)dx + 3(x + 3y − 4)dy = 0 22. ( x + y)2 dx = xdy; y(1) = 0
dy
23. (2x − 3y + 4)dx + 3(x − 1)dy = 0; y(3) = 2 24. 2 dx = xy − yx2 ; y(1) = 1
√ dy 1 3
25. (x + xy) dx + x − y = x− 2 y 2 ; y(1) = 1 26. (x + 3y − 4)dx −p (2x − y + 1)dy = 0
2 dy 2
27. xy(1 + xy ) dx = 1; y(1) = 0 28. xydx − x dy = y x2 + y 2 ; y(0) = 1
29. (6x − 3y + 2)dx − (2x − y − 1)dy√= 0 30. (9x − 4y + 4)dx − (2x − y + 1)dy = 0
31. y 3 dx = 2x3 dy − 2x2 ydx; y(1) = 2
32. (x + y − 4)dx − (3x − y − 4)dy = 0; y(4) = 1.

D. Obtain Solutions to the following processes


-E
1. A body moves in a straight line so that its velocity exceeds by 2 its distance from a fixed
point of the line. If v = 5 when t = 0, find the equation of motion.
Ans. x = 5et − 2
EE
2. Find the time required for the sum of money to double itself at 5% per annum compounded
continously. Hint: dx
dt
= 0.05x, where x is the amount after t years. Ans. 13.9 years

3. Radium decomposes at a rate proportional to the amount present. If half the original
amount disappears in 1600 years, find the percentage lost in 100 years. Ans. 4.2%
DC

4. In a culture of yeast the amount of active ferment grows at a rate proportional to the
amount present. If the amount doubles in 1 hour, how many times the original amount
may be anticipated at the end of 2 34 hours? Ans. 6.73 times the original amount.

5. If, when the temperature of air is 20o C, a certain substance cools from 100o C to 60o C in
10 minutes, find the temperature after 40 minutes. Ans. 25o C

6. A tank contains 100 gal of brine made by dissolving 60 lb of salt in water. Salt water
-

containing 1 lb of salt per gal runs in at a rate 2gal/min and the mixture, kept uniform
by stirring, runs out at the rate 3 gal/min. Find the amount of salt in the tank at the
end of 1 hour. Hint: dx
dt
= 2 − 3x/(100 − t). Ans. 37.4lb
AK

7. Find the time required for a square tank of side 6ft and
√ depth 9ft to empty through a
one inch circular hole in the bottom. (Assume,v = 4.8 h) Ans. 137 min

8. A tank contains 100gal of brine made by dissolving 80 lb of salt in water. Pure water
runs into the tank at the rate of 4gal/min and the mixture, kept uniform by stirring, runs
out at the same rate. The outflow runs into a second tank which contains 100 gal of pure
water initially and the mixture,kept uniform by stirring, runs out at the same rate. Find

Dr. Joseph Ssebuliba - DCEE & Maths Dept page 27 of 76


Makerere University EMT 1201 - Engineering Mathematics II

1
the amount of salt in the second tank after one hour? Hint: dx
dt
= 4( 45 e−0.04t − 4 100
x
) for
the second tank. Ans. 17.4lb

20
9. A funnel 10 inch in diameter at the top and 1 inch in diameter at the bottom is 24 inch
deep. If initially full of water, find the time required to empty. Ans. 13.7sec

10. Water is flowing into a vertical cylindrical tank of radius 6ft and height 9ft at the rate
6πf t3 /min and is escaping through a hole 1 inch√in diameter in the bottom. Find the

1
π π
time required to fill the tank. Hint: ( 10 − (24)2 4.8 h)dt = 36πdh. Ans. 65 min

MT
5 Linear dependence and Wronskian
The question we need to answer here is does a linear equation have one solution?
Consider the second- order differential equation y 00 = 0. This equation solves to y 0 = c1 and
y = c1 x + c2 where c1 and c2 are constants of integration.
Regardless of the values given to the constants c1 and c2 the equation y = c1 x + c2 is a solution
to y 00 = 0. Thus there are so many solutions to y 00 = 0 based on the values of c1 and c1 . For

a combination of y1 and y2 is also a solution. -E


example if c1 = 1, c2 = 1 then we have y1 = x and y2 = 1 as solutions to y 00 = 0 and y = x + 1

However we must formulate the conditions on c1 and c2 to reduce the infinity of solutions to a
single solution and in such a case we need to find conditions which serve to determine c1 and c2 .
For example if y 00 = 0 satisfies initial conditions, y(1) = 1, y 0 (1) = 2 then c1 = 2, and c2 = −1
so that y = 2x − 1 is the stated solution.
EE

5.1 Linear Dependence


Definition 5.1 Let f1 , f2 , . . . , fn be functions defined on interval I. Then the set of functions
{f1 , f2 , . . . , fn } is said to be linearly dependent (or the functions of the set are said to be linearly
dependent) if there exists constants c1 , c2 , . . . , cn not all zero such that c1 f1 +c2 f2 +. . .+cn fn = 0.
DC

If for some c; c1 f1 + c2 f2 + . . . + cn fn = 0 ⇒ c1 = c2 = . . . = cn = 0 ∀n then the functions are


linearly independent.

Definition 5.2 If f1 , f2 , . . . , fn are functions and c1 , c2 , . . . , cn are constants, a function of the


form
c1 f 1 + c2 f 2 + . . . + cn f n = 0
is called a linear combination of the functions f1 , f2 , . . . , fn .
-

[Thus a set of functions f1 , f2 , . . . , fn is linearly dependent if its linear combinations with con-
stants (some of which are not zero) is the zero function.
AK

Examples 5.1

1. Let f1 (x) = x2 − x, f2 (x) = 2x2 , f3 (x) = 3x.


Then c1 f1 + c2 f2 + c3 f3 = 0 ⇒ c1 (x2 − x) + c2 (2x2 ) + c3 (3x) = 0.
A choice of c1 = 6, c2 = −3, c3 = 2 clearly gives f1 , f2 , f3 linearly dependent

Dr. Joseph Ssebuliba - DCEE & Maths Dept page 28 of 76


Makerere University EMT 1201 - Engineering Mathematics II

1
2. Let f1 (x) = x2 , f2 (x) = x2 . Then c1 f1 + c2 f2 = 0 ⇒ c1 x2 + x2 c2 = 0. And the choice
x = 1, x = 2 gives c1 + 2c2 = 0, 4c1 + c2 = 0, from which we have c1 = 0 = c2 Then the

20
functions f1 (x) and f2 (x) are linearly independent.
3. Let f (x) = 3x + 12
5
, f2 (x) = 5x + 4. Then c1 f1 + c2 f2 = 0
12
⇒ c1 (3x+ 5 )+c2 (5x+4) = 0. And the choice of c1 = 5, c2 = −3 gives c1 f1 +c2 f2 = 0 ⇒ f
and g are linearly dependent.
4. Let f1 (x) = x2 and f2 (x) = x1 . Then c1 f1 + c2 f2 = 0 ⇒ c1 x2 + cx2 = 0. And the choice of

1
x = 1 and x = 2 gives c1 + c2 = 0, 4c1 + 21 c2 = 0 which clearly gives c1 = c2 = 0 ⇒ f1 and
f2 are linearly independent.

MT
5.2 The Wronskian
Definition 5.3 Let f1 , f2 , . . . , fn be functions that are defined and differentiable at least (n−1)
times in the interval I (i.e possess at least (n − 1) derivatives on I). Then, the determinant of
the functions

f1 (x) f (x) . . . f (x)
0
f1 (x)
00
f1 (x)
W (x, f1 , f2 , . . . , fn ) =
..
.
(n−1)
f1
-E f
2
0
f2 (x) . . .
00
2

(n−1)
(x) f2
(x)
..
.
. . . f
..
.
(x) . . . fn
n
0
fn (x)
00
n (x)

(n−1)









(x)
is called the Wronskian (after the Polish Mathematician Hoene Wronski 1778-1853) of the
functions f1 , f2 , . . . , fn and is denoted by W (f1 , f2 , . . . , fn ) or simply W (x, f ).
EE
Examples 5.2

Compute the Wronskian of the functions

1. f1 (x) = x2 , f2 (x) = 3x − 1
DC

2
x 3x − 1

W (f1 , f2 ) = = 2x − 3x2

2x 3

1
2. f1 (x) = x2 , f2 (x) = x3 , f3 (x) = x2
2
x
x3 x−2

W (f1 , f2 , f3 ) = 2x 3x −2x−3
2 = 20
-


2 6x 6x−4

Exercise 5.1
AK

Compute the Wronskian of the set of functions


(a) 1, x, x2 (b) sin x, x2 , cos x2 , (c) sin 3x, cos 3x
1 3
(d) 1 + x, 2 − 3x, 4 − x (e) ln x, ex , (f ) x 2 , x 2
(g) x2 , x2 ln x (h) 6x2 , 14x2 , 2x (i) e7x , e7x
(j) e7x , xe7x (k) ex , xex , x2 ex (l) ex cos 2x, ex sin 2x
(m) x2 − x, x2 + x, x2

Dr. Joseph Ssebuliba - DCEE & Maths Dept page 29 of 76


Makerere University EMT 1201 - Engineering Mathematics II

1
6 Homogeneous linear differential equations

20
Theorem 6.1 Let the functions y1 , y2 , . . . yn be solution of the same linear homogeneous dif-
ferential equation

an (x)y (n) + an−1 (x)y (n−1) + . . . + a1 (x)y 0 + a0 (x)y = 0 (6.1)

THEN, for every choice of constants c1 , c2 , . . . cn the linear combinations of the solutions

1
y = c1 y1 + c2 y2 + . . . + cn yn (6.2)

MT
is also a solution:
Proof:
Clearly (f1 + f2 . . .)0 = f10 + f20 + . . . + fn0 and (cf )0 = cf 0 . Then using (6.2) in (6.1) gives

an (x)[c1 y1 + c2 y2 + . . . + cn yn ](n) + an−1 [c1 y1 + c2 y2 + . . . + cn yn ](n−1)


+ . . . + a1 (x)[c1 y1 + c2 y2 + . . . + cn yn ]0 + a0 (x)[c1 y1 + c2 y2 + . . . + cc yn ]
(n) (n) (n−1) (n−1)

(n)
-E
= an (x)[c1 y1 + c2 y2 + . . . + cn yn(n) ] + an−1 (x)[c1 y1

= c1 [an (x)y1 + an−1 (x)yn(n−1) + . . . + a1 (x)y 0 + a0 (x)y]


(n)
+ c2 [an (x)y2 + an−1 (x)y2
(n−1)
+ . . . + a1 (x)y20 + a0 (x)y]
+ c2 y 2 + . . . + cn yn(n−1) ]
+ . . . + a1 (x)[c1 y10 + c2 y20 + . . . + cn yn0 ] + a0 (x)[c1 y1 + c2 y2 + . . . + cn yn ]

+ . . . + cn [an (x)yn(n) + an−1 (x)yn(n−1) + . . . + a1 (x)yn0 + a0 (x)yn ]


= c1 .0 + c2 .0 + . . . + cn .0 ( since y1 , y2 , . . . , yn are solutions ) = 0 + 0 + . . . + 0 = 0
EE
Corollary 6.1 The function y = c1 y1 + c2 y2 + . . . + cn yn is called the general solution of the
differential equation (6.1).

Theorem 6.2 Let y1 , y2 , . . . , yn be solutions to the differential equation


an (x)y (n) + a1 (x)y (n−1) + . . . + a1 (x)y 0 + a0 (x)y = 0 where each ai (x) is defined and continuous
DC

on [a, b]; an (x) 6= 0. THEN the necessary and sufficient condition for y1 , y2 , . . . , yn to be linearly
independent is that the Wronskian of y1 , y2 , . . . , yn be identically different from zero. (i,e
y1 , y2 , . . . , yn are independent if W (y1 , . . . yn ) 6≡ 0).

Lemma 6.1 If y1 , y2 , . . . , yn are linearly independent solutions then the Wronskian never van-
ishes.

Examples 6.1
-

1. Verify that y = ex and y = e−x are linearly independent solutions to the differential
equation y 00 − y = 0 and write down its general solution and a unique solution subject to
AK

y(0) = 2, y 0 (0) = 8
Solution:

(i) We first show that they are solutions: y1 = ex , y10 = ex , y100 = ex . Then y 00 − y =
ex − ex = 0. Therefore y1 = ex is a solution. y2 = e−x , y20 = −e−x , y200 = e−x . Then
y 00 − y = e−x − e−x = 0. Therefore y2 = e−x is a solution.

Dr. Joseph Ssebuliba - DCEE & Maths Dept page 30 of 76


Makerere University EMT 1201 - Engineering Mathematics II

1
(ii) To show that they are linearly independent, we compute their Wronskian. Thus

20
x −x

x −x
e e
W (e , e ) = x = −1 − 1 = −2 6= 0.
e −e−x
Since the Wronskian is not zero then they are linearly independent.
(iii) The general solution of the differential equation is y = c1 ex + c2 e−x

1
(iv) The unique solution subject to y(0) = 2, y 0 (0) = 8

y(x) = c1 ex + c2 e−x , y 0 = c1 ex − c2 e−x 

MT
x = 0, y = 2 ⇒ c1 + c2 = 2 ⇒ c1 = 5 and c2 = −3
0
x = 0, y = 8 ⇒ c1 − c2 = 8,

Therefore the unique solution subject to y(0) = 2, y 0 (0) = 8 is y = 5ex − 3e−x

Exercise 6.1

Verify that the functions y1 and y2 are linearly independent solutions of the given differential

-E
equation. In each case find a general solution ( or a solution satisfying the given conditions).

1. y 00 − 5y 0 + 6y = 0; y1 = e2x , y2 = e3x ; y(0) = −1, y 0 (0) = −4.


2. y 00 − 2y 0 + 5y = 0; y1 = ex cos 2x, y2 = ex sin 2x.
3. x2 y 00 − 2y = 0; y1 = x2 ; y2 = x−1 , y(1) = −2 y 0 (1) = −7.
4. x2 y 00 − xy 0 − 3y = 0; y1 = x−1 , y2 = x3
EE
5. xy 00 − (x + 2)y 0 + 2y = 0; y1 = ex , y2 = x2 + 2x + 2; y(1) = 0, y 0 (1) = 1.

Definition 6.1 Let y1 , y2 be two linearly independent solutions to the second order differential
00
equation a2 (x)y + a1 (x)y 0 + a0 (x)y = 0. THEN the Wronskian of y1 , y2 is defined as
y y
W (y1 , y2 ) = 10 20 = y1 y20 − y2 y10 .
DC

y1 y2

Theorem 6.3 Let y1 , y2 be two linearly independent solutions to the second order differential
equation a2 (x)y 00 + a1 (x)y 0 + a0 (x)y = 0. THEN the Wronskian W (y1 , y2 ) satisfies the first order
differential equation
a1 (x)
W0 + W =0 (6.3)
a2 (x)
Proof:
-

Let y1 , y2 be linearly independent solutions to a2 (x)y 00 + a1 (x)y 0 + a0 (x)y = 0.


THEN a2 (x)y100 + a1 (x)y10 + a0 (x)y1 = 0 and a2 (x)y200 + a1 (x)y20 + a0 (x)y2 = 0 give
AK

)
y100 = − aa21 (x)
(x) 0
y1 − a0 (x)
y
a2 (x) 1
00 a1 (x) 0 a0 (x) (6.4)
y2 = − a2 (x) y2 − y
a2 (x) 2

y1 y2
And W (y1 , y2 ) = 0 = y1 y20 − y2 y10
y1 y20
⇒ W 0 = y1 y200 + y20 y10 − y2 y100 − y10 y20 ⇒ W 0 = y1 y200 − y2 y100 (6.5)

Dr. Joseph Ssebuliba - DCEE & Maths Dept page 31 of 76


Makerere University EMT 1201 - Engineering Mathematics II

1
Then using (6.4) in (6.5) gives

20
a1 (x) 0 a0 (x) a1 (x) 0 a0 (x)
W 0 = y1 [− y2 − y2 ] − y2 [− y − y1 ]
a2 (x) a1 (x) a2 (x) 1 a2 (x)
a1 (x) a0 (x) a1 (x) a1 (x)
= [−y1 y20 + y2 y10 ] + [y1 y2 − y2 y1 ] = −[(y1 y20 − y2 y10 ] =− W
a2 (x) a2 (x) a2 (x) a2 (x)
a1 (x)
⇒ W0 +

1
W =0 (6.6)
a2 (x)

MT
Corollary 6.2 Equation (6.6) has solution
R a1 (x)
− dx
W = ke a2 (x)
where k is a constant of integration
Proof:
a1 (x) W0 a1 (x)
W0 + W =0⇒ =−
a0 (x) W a2 (x)

ln W =

6.1
Z

a1 (x)
a2 (x)
dx + C ⇒ W = e

Application of Wronskian

R a1 (x)
a2 (x)
dx+C

-E⇒ W = ke

R a1 (x)
a2 (x)
dx
called Abel’s formula

This theorem helps to solve 2nd-order differential equation (Constant coefficient or variable
coefficient) if one linearly independent solution is known.
EE

Examples 6.2
x2 +2
1. Solve the differential equation: xy 00 − 2y 0 + x
y = 0, given that y1 = x sin x is one of
the two linearly independent solutions.
R a (x)
− a1 (x) dx 2
R
dx
a1 (x) = −2, a2 (x) = x. W = e = e2 ln x = x2
DC

Solution: Here 2 =e x

y y
W (y1 , y2 ) = 10 20 = y1 y20 − y2 y10 = x2
y1 y2
y1 y20 −y2 y10 x2 x2
⇒ y12
=
y12
= (x sin x)2
= csc2 x
d y2
( ) = csc2 x ⇒ yy12
R
Therefore dx y1
= csc2 xdx = − cot x ⇒ y2 = y1 (− cot x) =
x sin x(− cot x) = −x cos x.
Therefore y = c1 y1 + c2 y2 . ⇒ y = c1 x sin x − c2 x cos x.
-

Exercise 6.2

Use Abel’s formula to solve


AK

3
1. y 00 − (1 + 3
2x
)y 0 + 3
2x2
y = 0, y1 = x 2 ex
2. (x2 + 1)y 00 − 2xy 0 + 2y = 0; y1 = −x
3. xy 00 + (1 − 2x)y 0 + (x − 1)y = 0; y1 = ex ,
4. xy 00 + (1 − 2x)y 0 + (x − 1)y = 0; y(1) = 2e, y 0 (1) = −3e

Dr. Joseph Ssebuliba - DCEE & Maths Dept page 32 of 76


Makerere University EMT 1201 - Engineering Mathematics II

1
6.2 Method of Order Reduction

20
Let y1 , y2 be linearly independent solutions to the second order differential equation

a2 (x)y 00 + a1 (x)y 0 + a0 (x)y = 0 (6.7)

in which y1 is one known solution.


We seek to find the second linearly independent solution y2 and write down the general solution.

1
We try the substitution y2 = νy1 , where ν is unknown function of x to be determined. Then

y2 = νy1

MT

0 0 0
⇒ y2 = νy1 + ν y1 (6.8)
00 00 0 0 0 0 00 00 0 0 00
⇒ y2 = νy1 + ν y1 + ν y1 + ν y1 = νy1 + 2ν y1 + ν y1

Using (6.8) in (6.7) gives

a2 (x)[νy100 + 2ν 0 y10 + ν 00 y1 ] + a1 (x)[νy10 + ν 0 y1 ] + a0 (x)νy1 = 0

⇒ a2 (x)ν 00 y1 + [a2 (x)2y10 + a1 (x)y1 ]ν 0 + [a2 (x)y100 + a1 (x)y10 + a0 (x)y1 ]ν = 0.


Since y1 is a solution the last term is zero. And we get

ν 00 + [
2y10
y1
+
-E
a1 (x) 0
a2 (x)
]ν = 0.

And letting z = ν 0 , we get


2y10 a1 (x)
z0 + [ + ]z = 0
y1 a2 (x)
EE
which is a first order simple separable equation.

Theorem 6.4 (Order Reduction)

Let y1 , y2 be two linearly independent solutions to the differential equation


DC

a2 (x)y 00 + a1 (x)y 0 + a0 (x)y = 0 (6.9)

with y1 a known solution. Then the substitution y2 = νy1 (where ν is an unknown function to
be determined) transforms the second order differential equation (6.9) to a first order differential
equation
2y 0 a1 (x)
z0 + [ 1 + ]z = 0 (6.10)
y1 a2 (x)
where z = ν 0 .
-

The proof of this theorem is clearly the preceeding discussion.

Corollary 6.3 The solution to (6.10)is


AK

R a1 (x)
− dx
ke a2 (x)
z= where k is aconstant of integration
y12

Proof:
2y10 a1 (x) z0 2y 0 a1 (x)
z0 + [ + ]z = 0 ⇒ = −[ 1 + ]
y1 a2 (x) z y1 a2 (x)

Dr. Joseph Ssebuliba - DCEE & Maths Dept page 33 of 76


Makerere University EMT 1201 - Engineering Mathematics II

1
2y10
Z
a1 (x)
⇒ ln z = [− − ]+C
y1 a2 (x)

20
R 2y1 R a1 (x) R a1 (x)
− dx − dx C −2 ln y1 − dx
z=e y2
.e a2 (x)
.e ⇒ z = ke .e a2 (x)

R a1 (x)
− dx
ke a2 (x)
z= (6.11)
y12

1
Lemma 6.2 The second linearly independent solution is

MT
R a1 (x)
Z − dx
e a2 (x)
y2 = y1 dx
y12

and the general solution to the differential equation is


R a1 (x)
Z − dx
e a2 (x)
y = c1 y1 + c2 y2 = c1 y1 + c2 y1 dx

Proof:
Since z = ν 0 then (6.11) gives
-E y12

R a1 (x)
− dx
0 e a2 (x)
ν = (taking the constant c = 0 or k = 1)
y12
EE
R a1 (x)
Z − dx
e a2 (x)
Thus ν = dx
y12
And y2 = νy1 gives R a1 (x)
Z − dx
e a2 (x)
y2 = y1 dx.
DC

y12
Thus the general solution y1 = c1 y1 + c2 y2 becomes
R a1 (x)
Z − dx
e a2 (x)
y = c1 y 1 + c2 y 1 dx.
y12

Examples 6.3
-

1. Given y = ex is a solution to the differential equation y 00 − 2y 0 + y = 0 obtain the second


linearly independent solution and write down the general solution.
Solution: From y 00 − 2y 0 + y = 0; a2 (x) = 1, a1 (x) = −2 so that y2 = νy1 = νex
AK

⇒ y20 = νex + ν 0 ex , y200 = νex + 2ν 0 ex + ν 00 ex . Then substituting into the differential


equation gives
(νex + 2ν 0 ex + ν 00 ex ) − 2(νex + ν 0 ex ) + νex = 0.
This simplifies to ν 00 = 0. Hence ν 0 = C and ν = Cx + D. Taking C = 1 and D = 0 gives
ν = x from which we have y2 = νy1 = xex . And the general solution is y = c1 y1 + c2 y2 ⇒
c1 ex + c2 xex .

Dr. Joseph Ssebuliba - DCEE & Maths Dept page 34 of 76


Makerere University EMT 1201 - Engineering Mathematics II

1
2. Given y = x−1 is a solution to the differential equation 2x2 y 00 + 3xy 0 − y = 0 obtain the
second linearly independent solution and write down the general solution.

20
Solution: a2 (x) = 2x2 , a1 (x) = 3x, y1 = x1 .
R a1 (x)

R 3x
− dx − dx
e a2 (x) e 2x2 x2
THEN z = 2
y1
= 1 = 3 = x.
x2 x2
√ R 1 3 3 1
And z = ν 0 ⇒ ν 0 = x so that ν = x 2 dx = 23 x 2 . Then y2 = νy1 = 32 x 2 .x−1 = 23 x 2 . We
1 1
note that 32 is a multiple term

1
√ of x 2 and as such this leads us to taking y
2 = x 2 . And
y = c1 y1 + c2 y2 = c1 x−1 + c2 x.
3. Show that y = x is a solution to the differential equation (1 − x2 )y 00 − 2xy 0 + 2y = 0 and

MT
find the second linearly independent solution and the general solution.
Solution: y1 = x, y10 = 1, y100 = 0 gives (1 − x2 ).0 − 2x.1 + 2x = 0 ⇒ y = x is a
solution.
With a2 (x) = 1 − x2 , a1 (x) = −2x, y1 = x, we have
R a1 (x) R 2x
− dx dx 2)
0 e a2 (x)
e 1−x2 e− ln(1−x 1
ν = = = =

⇒ν=
Z
y12

dx
x (1 − x2 )
2
=
x2
Z -E
dx 1
x2
+
2
Z
x2

1
1+x
dx +
1
2
x2 (1 − x2 )
Z
dx
1−x

1 1 1+x
⇒ν=− + ln ( )
x2 2 1−x
EE
And y2 = νy1 ⇒ y2 = x(− x12 + 12 ln 1+x
1−x
) so that y = c1 y1 + c2 y2
gives the general solution as y = c1 x + c2 (− x1 + 12 x ln 1−x
1+x
).
Remarks :

1. One great advantage of order reduction (and Abel’s formula too!) is that it solves both
DC

constant coefficient and variable coefficient differential equations whose one solution is
known.
2. The reduction of order procedure can be used more generally to reduce a homogeneous
linear nth order differential equation to a homogeneous (n-1)th order equation.

Examples 6.4
Use the substitution y = νy1 to reduce the third order differential equation
y 000 − y 0 = 0 to a second order differential equation.
-

Solution: y = νy1 ,
y10 = ν 0 y1 + νy10
AK

y 00 = ν 0 y10 + ν 00 y1 + νy100 + ν 0 y10 = ν 00 y1 + 2ν 0 y10 + νy100


y 000 = ν 000 y1 + ν 00 y10 + 2[ν1000 + ν 00 y10 ] + νy1000 + ν 0 y100
= ν 000 y1 + 3ν 00 y10 + 3ν 0 y100 + 3ν 0 y100 = [y1 ν 000 + 3y10 ν 00 + 3y100 ]ν 0 − [y 000 − y 0 ]ν = 0
3y 0
⇒ ν 000 + y11 ν 0 = 0 and letting w = ν 0 in which w0 = ν 00 and w00 = ν 000 we obtain a second
order differential equation
y0 y 00
w00 + 3 1 w0 + 3 1 = 0. (6.12)
y1 y1

Dr. Joseph Ssebuliba - DCEE & Maths Dept page 35 of 76


Makerere University EMT 1201 - Engineering Mathematics II

1
And since y1 is known then (6.12) is easily further reducible to first order with
y0
a2 (x) = 1 and a1 (x) = 3 y11 if one root is known.

20
Exercise 6.3

1. Obtain by method of order reduction, the second linearly independent solution and the
general solution to the differential equations given one solution.

1
(a) y 00 − 3y 0 + 2y = 0; y1 = ex (b) y 00 + 2y 0 − 15y = 0; y1 = e3x
(c) x2 y 00 + 6xy 0 + 6y = 0; y1 = x−2 (d) x2 y 00 − (x + 1)y 0 + y = 0; y1 = ex
(f ) x2 y 00 − 2xy 0 − 4y = 0; y1 = x−1 (g) xy 00 + (1 − 2x)y 0 + (x − 1)y = 0; y1 = ex .

MT
2. Reduce the third order differential equations by substitution y = νy1 to second order
differential equations in w = ν 0 ; given one known solution.
(a) y 000 − 4y 00 + 3y 0 = 0; y1 = 1 (b) xy 000 − xy 00 + y 0 − y = 0; y1 = ex
(c) xy 000 + (1 − x)y 00 + xy 0 − y = 0; y1 = x (d) y 000 − 4y 00 + 3y 0 = 0; y1 = e2x
000 00 0
(e) x (x + 3)y − 3x(x + 2)y + 6(x + 1)y − 6y = 0; y1 (x) = x2 , y2 (x) = x3
2

-E
In cases (a) and (d) solve the equation if the second solutions are e2x and ex respectively.
3. Solve the differential equation by order reduction.
(a) x3 y 000 − 3x2 y 00 + 6xy 0 − 6y = 0; y1 (x) = x (b) y 00 − 4y 0 − 12y = 0; y1 = e6x
(c) y 00 + 2y 0 + y = 0; y1 = e−x (d) x2 y 00 + 2xy 0 = 0; y1 = 1
2 00 0 −1
(e) x y + 2xy = 0; y1 = x (f ) x2 y 00 + 2xy 0 − 2y = 0; y1 = x
(g) x2 y 00 + 3xy 0 + y = 0; y1 = x−1 ln x (h) x2 y 00 + 3xy 0 + y = 0; y1 = x−1
(i) x2 y 00 − x(x + 2)y 0 + (x + 2)y = 0; y1 = x (j) (x − 1)y 00 − xy 0 + y = 0; y1 = ex
EE
(k) xy 00 − y 0 + 4x3 y = 0; y1 = sin x2√ (l) (1 − x cot x)y 00 − xy 0 + y = 0; y1 = x
1 1
(m) y 00 − ( x1 − 16x3
2 )y = 0; y1 = x e
4
2 x
(n) x2 y 00 + xy 0 + (x2 − 41 )y = 0; y1 = x− 2

7 Constant-Coefficient, Homogeneous Equations


DC

Definition 7.1 A homogeneous nth order linear differential equation with constant coefficients
takes the form an y (n) + an−1 y (n−1) + . . . + a1 y 0 + a0 y = 0 where
ai , i = 0, 1, 2, . . . , n are all constants with an 6= 0.
Consider a second order homogeneous linear differential equation with constant coefficients
ay 00 + by 0 + cy 0 = 0, (7.1)
where a, b, c are all real constants; a 6= 0. Let us denote by m2 = y 00 , m = y 0 , m0 = y. Then
-

equation (7.1) is
am2 + bm + c = 0. (7.2)
AK

Definition 7.2 Equation (7.2) is commonly known as the characteristic (auxiliary) equation of
the differential equation (7.1). The roots, r1 and r2 of the equation (7.2) are called characteristic
(or auxiliary) roots of the differential equation. Equation (7.2) is clearly a quadratic equation
and in principle, if r1 and r2 are roots of such an equation, then we can write (7.2) as
m2 − (r1 + r2 )m + r1 r2 = 0. (7.3)

Dr. Joseph Ssebuliba - DCEE & Maths Dept page 36 of 76


Makerere University EMT 1201 - Engineering Mathematics II

1
7.1 If the auxiliary roots r1 and r2 are real and distinct:

20
If r1 and r2 are real and distinct then equation (7.3) holds and so

m2 − (r1 + r2 )m + r1 r2 = 0 ⇒ y 00 − (r1 + r2 )y 0 + r1 r2 y = 0
d 0
⇒ y 00 − r1 y 0 − (y 0 − r1 y)r2 = 0 ⇒ (y − r1 y) − (y 0 − r1 y)r2 = 0.
dx

1
Let ν = y 0 − r1 y. Then

− r2 ν = 0 (7.4)
dx

MT
Solving (7.4) by separation of variables gives ν = Cer2 x .
And ν = y 0 − r1 y ⇒ y 0 − r1 y = Cer2 x . The integrating factor of which is e−r1 x .
Thus dxd
(e−r1 x .y) = cer2 x .e−r1 x = Ce−(r1 −r2 )x .
−1
This integrates to e−r1 x .y = − r1 C
−r2
e−(r1 −r2 ) + C1 ⇒ y = c1 er1 x + r1 −r2
er2 x
C
OR y = c1 er1 x + c2 er2 x (where c2 = − ) (7.5)
r1 − r2

-E
Conclusion: If am2 + bm + c = 0 is an auxiliary equation of a second order linear differential
equation with r1 and r2 as its real and distinct roots. THEN the two linearly independent
solutions to the differential equation are y1 = er1 x and y2 = er2 x .
And the general solution is y = c1 er1 x + c2 er2 x .
Generally, if r1 , r2 , . . . , rn are n real and distinct roots of the auxiliary (characteristic) equation
of the nth order homogeneous linear differential equation with constant coefficients, THEN the
n linearly independent solutions of the differential equation are
EE
y1 = er1 x , y2 = er2 x , . . . , yn = ern x and the general solution is y = c1 er1 x + c2 er2 x + . . . + cn ern x .

Examples 7.1

1. Solve the differential equation: y 00 + 5y 0 + 6y = 0.


Solution: The auxiliary equation is
DC

r2 + 5r + 6 = 0 ⇒ r1 = −3, r2 = −2.
And so the two linearly independent solutions are y1 = e−3x , y2 = e−2x . Thus the general
solution is y = c1 e−3x + c2 e−2x .
2. Solve the differential equation y 00 − 4y 0 − 5y = 0 y(0) = 1, y 0 (0) = 2.
Solution: The auxiliary equation is r2 − 4r − 5 = 0 ⇒ r1 = 5, r2 = −1. Thus the
two linearly independent solutions are y1 = e5x , y2 = e−x and the general solution is
-

y = c1 e5x + c2 e−x . From


y = c1 e5x + c2 e−x ⇒ y 0 = 5c1 e5x − c2 e−x . Then ⇒ y(0) = 1 ⇒ c1 + c2 = 1
AK

1 2 1 2
and y 0 (0) = 2 ⇒ 5c1 − c2 = 2 ⇒ c1 = , c2 = . Therefore y = e5x + e−x .
3 3 3 3
3. Solve the differential equation: 6y 000 + y 00 − 2y 0 = 0.
Solution: The auxiliary equation is 6r3 + r2 − 2r = 0 ⇒ r1 = 0, r2 = 12 , r3 = − 23 . Thus
1 2
the linearly independent solutions are y1 = e0x = 1, y2 = e 2 x , y3 = e− 3 x and the general
1 2
solution is y = c1 + c2 e 2 x + c3 e− 3 .

Dr. Joseph Ssebuliba - DCEE & Maths Dept page 37 of 76


Makerere University EMT 1201 - Engineering Mathematics II

1
7.2 If the auxiliary roots r1 and r2 are real and equal:

20
Suppose r1 = r2 = r. Then m2 − (r1 + r2 )m + r1 r2 = 0 ⇒ m2 − 2rm + r2 = 0. And in this case
we have y 00 − 2ry 0 − r2 y = 0 ⇒ y 00 − ry 0 − ry 0 + r2 y = 0 ⇒ dx
d
(y 0 − ry) − (y 0 − ry)r = 0. Letting
rx
ν = y 0 − ry, gives dxdν
− rν = 0 whose solution is ν = c2 ee . And ν = y 0 − ry ⇒ y 0 − ry = c2 erx .
Whose integrating factor is e−rx .
Then dx d
(e−rx .y) = erx .e−rx = c2 ⇒ e−rx y = c1 + c2 x.

1
⇒ y = c1 erx + c2 xerx (7.6)

Equation (7.6) is a linear combination of two solutions y1 = erx and y2 = xerx .

MT
Conclusion: Let the two roots r1 and r2 of the auxiliary equation to the second order homoge-
neous linear differential equation with constant coefficients be equal (with r1 = r2 = r). THEN
the two linearly independent solutions corresponding to the root r are y1 = erx and y2 = xerx
and the general solution is y = c1 erx + c2 xerx
In general if the roots of the auxiliary equation are repeated to the multiplicity k, then the k
linearly independent solutions would be
y1 = erx , y2 = xerx , y3 = x2 erx , . . . , yk = xk−1 erx . And the general solution is

-E
y = (c1 + c2 x + c3 x2 + . . . + ck xk−1 )erx .

Examples 7.2

1. Solve the differential equation: y 00 − 4y 0 + 4y = 0.


EE
Solution: The characteristic equation is r2 − 4r + 4 = 0 ⇒ r = 2. And so
y1 = e2x , y2 = xe2x so that the general solution is y = (c1 + c2 x)e2x

2. Solve the differential equation:


y 000 + 7y 00 + 16y 0 + 12y = 0; y(0) = 1, y 0 (0) = 0, y 00 (0) = 0
DC

Solution: The characteristic equation is r3 + 7r + 16r + 12 = 0 ⇒ (r + 3)(r + 2)2 = 0


Therefore r1 = −3, r2 = r3 = −2. Then y1 = e−3x , y2 = e−2x , y3 = xe2x so that the
general solution becomes y = c1 e−3x + (c2 + c3 x)e−2x .
Now y = c1 e−3x + c2 e−2x + c3 xe−2x
⇒ y 0 = −3c1 e−3x − 2c2 e−2x + c3 (e−2x − 2xe−2x )
y 00 = 9c1 e−3x + 4c2 e−2x + c3 [−2e−2x − 2[e−2x − 2xe−2x ]].

y(0) = 1 ⇒ c1 + c2 = 1 
And y 0 (0) = 0 ⇒ −3c1 − 2c2 + c3 = 0 c = 1, c2 = 0, c3 = 3.
-

00  1
y (0) = 0 ⇒ 9c1 + 4c2 − 3c3 = 0

Thus y = e−3x + 3xe−2x


AK

3. Solve the differential equation: y (5) − 2y (4) + y 000 = 0.


Solution: The characteristic equation is r5 − 2r4 + r3 = 0 ⇒ r1 = 0, r2 = 0,
r3 = 0, r4 = 1, r5 = 1. So the general solution isy = c1 + c2 x + c3 x2 + (c4 + c5 x)ex .

Exercise 7.1

Dr. Joseph Ssebuliba - DCEE & Maths Dept page 38 of 76


Makerere University EMT 1201 - Engineering Mathematics II

1
Solve the differential equations

20
1. y 00 + 2y 0 − 3y = 0 2. 4y 00 + 4y 0 + y = 0
3 6y 00 − y 0 − y = 0 4. y 00 + 5y 0 = 0
5 y + y − 2y = 0; y(0) = 1, y (0) = 1 6 y 00 + 8y 0 − 9y = 0; y(1), y 0 (1) = 0
00 0 0

7. y 00 − 9y 0 + 9y = 0 8. y 000 − y 0 = 0; y(0) = 2, y 0 (0) = 2, y 00 (0) = −1

1
7.3 If the auxiliary roots are complex conjugates :
Let r1 = α + iβ and r2 = α − iβ be two complex conjugate roots of the characteristic equation

MT
am2 + bm + c = 0. Then since there are two distinct roots we still can write the two linearly
independent solutions as y1 = er1 x and y2 = er2 x . Then in this case we shall have

y1 = e(α+iβ)x and y2 = e(α−iβ)x

Remark:
Using the Maclaurin’s expansion we can show easily that

ex = 1 + x +

eax = 1 + ax +
x2 x3 x4 x5
2!
+

2!
3!
+
+
4!

3!
-E
+

+
5!
+ ...
(ax)2 (ax)3 (ax)4 (ax)5
4!
+
5!
+ ...
(bx)2 (bx)4
cos bx = 1 − + − ...
2! 4!
(bx)3 (bx)5
EE
sin bx = bx − + + ...
3! 5!
Then
(iβ)2 x2 (iβ)3 x3 (iβ)4 x4 (iβ)5 x5
eiβx = 1 + iβx + + + + + ...
2! 3! 4! 5!
(βx)2 (βx)4 (βx)3 (βx)5
DC

= (1 − + + . . .) + i(βx − + + . . .)
2! 4! 3! 5!
= cos βx + i sin βx.

Thus

e(α+iβ)x = eαx .eiβx


= eαx (cos βx + i sin βx)
-

and

e(α−iβ)x = eαx .e(−iβ)x


AK

= eαx (cos (−βx) + i sin (−βx))


= eαx (cos βx − i sin βx).

Thus our two linearly independent solutions are

y1 = e(α+iβ)x = eαx (cos βx + i sin βx)


y2 = e(α−iβ) = eαx (cos βx − i sin βx)

Dr. Joseph Ssebuliba - DCEE & Maths Dept page 39 of 76


Makerere University EMT 1201 - Engineering Mathematics II

1
And the general solution

20
y = c1 y1 + c2 y2 ⇒ y = c1 eαx (cos βx + i sin βx) + c2 eαx (cos βx − i sin βx)
= eαx [(c1 + c2 ) cos βx + i(c1 − c2 ) sin βx]

Or simply
y = eαx (A cos βx + B sin βx) (7.7)

1
Where A = c1 + c2 and B = i(c1 − c2 ) are constants.
Clearly the two linearly independent solutions from (7.7) are

MT
y1 = eαx cos βx and y2 = eαx sin βx

Conclusion: If r1 = α + iβ and r2 = α − iβ are the two complex conjugate roots of the


auxiliary equation of the differential equation then the two linearly independent solutions are
y1 = eαx cos βx and y2 = eαx sin βx and the general solution is then

y = eαx (A cos βx + B sin βx) .

Examples 7.3
-E
1. Solve the differential equation: y 00 + 4y 0 + 13y = 0
Solution: The auxiliary equation is r2 + 4r + 13 = 0 ⇒ r = −2 ± 3i
Thus r1 = −2 + 3i, r2 = −2 − 3i. And clearly α = −2, β = 3.
EE
Then the general solution is y = e−2x (A cos 3x + B sin 3x). [Note that
y1 = e−2x cos 3x and y2 = e−2x sin 3x are two linearly independent solutions of the differ-
ential equation].

2. Solve the differential equation: y 000 − 2y 00 + 5y 0 − 10y = 0.


Solution: The auxiliary equation is
DC

√ √
r3 − 2r2 + 5r − 10 = 0 ⇒ r1 = 2, r2 = ±i 5, r3 = −i 5.
√ √
Then the general equation is y = c1 e2x + c2 cos 5x + c3 sin 5x

3. Solve the differential equation: y 00 − 6y 0 + 13y = 0; y(0) = 1, y 0 (0) = 2.


Solution: The auxiliary equation is r2 − 6r + 13 = 0 ⇒ r = 3 ± 2i.
Thus
-

y = e3x (A cos 2x + B sin 2x


y 0 = 3Ae3x cos 2x − 2Ae3x sin 2x + 3Be3x + 2Be3x cos 2x
AK

And y(0) = 1 ⇒ A = 1, y 0 (0) = 2 ⇒ 3 + 2B = −5 ⇒ B = −4


⇒ y = e3x (cos 2x − 4 sin 2x).
Remark: Remember that the root r = α ± iβ can also be repeated. If the complex root
r = α ± iβ is repeated (say once) the solution takes the form

y = eαx [(Ax + B) cos βx + (Cx + D) sin βx] (7.8)

Dr. Joseph Ssebuliba - DCEE & Maths Dept page 40 of 76


Makerere University EMT 1201 - Engineering Mathematics II

1
Examples 7.4

20
Solve the differential equation: y (4) + 8y 00 + 16y = 0
Solution: The auxiliary equation is r4 + 8r2 + 16 = 0, r = ±2i, repeated once.
Then since α = 0, β = 2 we have y = (Ax + B) cos 2x + (Cx + D) sin 2x.

Exercise 7.2

1
Solve the differential equations
1. y 00 + y = 0 2. y 00 − 6y 0 + 10y = 0
3. y 00 + 4y 0 + 6y = 0 4. 4y 00 + 4y 0 + 6y = 0

MT
5. y 00 + 4y 0 + 8y = 0 6. y 00 + 7y = 0
7. y 00 + 2y 0 + 5y = 0 8. 2y 00 + 13y 0 − 7y = 0
9. 3y 00 + 4y 0 + 9y = 0 10. y 00 + 2y 0 + 2y = 0; y(0) = 2, y 0 (0) = 1
11. y 00 − 4y 0 + 2y = 0; y(0) = 0, y 0 (0) = 1

8 Nonhomogeneous, Constant-coefficient Equations.

-E
Definition 8.1 A general nth-order nonhomogeneous linear differential equation with constant
coefficients is of the form an y (n) + an−1 y (n−1) + . . . + a1 y 0 + a0 y = g(x)
where ai i = 0, 1, 2, . . . , n are all real constants with an 6= 0; and g(x) 6= 0. A second order
nonhomogeneous linear differential equation with constant coefficients has the form
ay 00 + by 0 + cy = g(x) (8.1)
EE
where a 6= 0, b, c are all real constants and g(x) 6= 0. This is generally an equation
L[y] = g(x).
To find the general solution to the differential equation,

(a) We find first the solution to the homogeneous part L[y] = 0. This solution (of the
homogeneous part) is usually known as the complementary solution and is denoted by
DC

yc = c1 y1 + c2 y2 ; where y1 and y2 are the linearly independent solutions to L[y] = 0.


(b) Thereafter we need to solve the equation for the nonhomogeneous part L[y] = g(x). The
solution to the nonhomogeneous part is usually known as the particular solution and is
denoted by yp . THEN the general solution to the differential equation is y = yc + yp .

Theorem 8.1 Let yc be a solution to the homogeneous part of the second order differential
equation
ay 00 + by 0 + cy = g(x) (8.2)
-

and let yp be the particular solution to the non homogeneous part of the differential equation.
THEN the general solution of the differential equation (8.2)is y = yc + yp
AK

Proof: Consider L[y] = g(x) in which L[yc ] = 0 then yc = y − yp is a solution since it can be
written as a linear combination of y and yp .
Remark: The particular solution depends on the nature of the RHS function g(x).
Since the methods of finding the complementary solution have already been dealt with, we
discuss in this section, different methods of finding the particular solution and hence of solving
the differential equation.

Dr. Joseph Ssebuliba - DCEE & Maths Dept page 41 of 76


Makerere University EMT 1201 - Engineering Mathematics II

1
8.1 The method of undetermined coefficients.

20
This method works when the RHS function g(x) takes up special forms: namely, polynomial,
exponential, trigonometrical, sinusoidal functions. The following examples explain the nature
of the applications.
Case I: If g(x) is only a polynomial function:

1
Examples 8.1

1. Solve the differential equation: y 00 − 3y 0 − 4y = 3x + 1

MT
Solution: We first solve for L[y] = 0. The auxiliary equation is r2 − 3r − 4 = 0
⇒ r1 = 4, r2 = −1. Thus the complementary solution (i.e solution to the homogeneous
part) is yc = c1 e4x + c2 e−x .
To find yp , we first note that g(x) = 3x + 1 is a polynomial of degree 1. So we try a
solution of the form yp = Ax + B, where A and B are constants to be determined (hence
the method of undetermined coefficients). If yp = Ax + B, then yp0 = A and yp00 = 0. And
using these in the differential equation we get 0 − 3A − 4(Ax + B) ≡ 3x + 1. By comparing
coefficients we note that
coefficient of x: −4A = 3 ⇒ A = − 43
Constants: −3A − 4B = 1 ⇒ B = 16
Therefore yp = Ax + B = − 34 x +
5

5
16
.
-E
Thus y = yc + yp ⇒ y = c1 e4x + c2 e−x − 34 x + 5
16
If g(x) is a polynomial of degree n we try the function yp as a polynomial of degree n
EE
with n constants to be determined. For example g(x) = 2x2 + 3x − 1
⇒ yp = Ax2 + Bx + C, g(x) = x2 ⇒ yp = Ax2 + Bx + C, g(x) = 4 ⇒ yp = A.

2. Solve the differential equation: y 00 − 3y 0 − 4y = 4x2 .


Solution: The auxiliary equation for the homogeneous part is r2 − 3r − 4 = 0
⇒ r = 4, r = 1 ⇒ yc = c1 e4x + c2 e−x . Since g(x) = x2 is a polynomial of degree 2 we try
DC

yp = Ax2 + Bx + C ⇒ yp0 = Ax + B, yp00 = 2A.


Then into the differential equation gives 2A − 3(2Ax + B) − 4(Ax2 + Bx + C) ≡ 4x2

coefficients of x2 : −4A = 4 ⇒ A = −1
3
coefficients of x: −6A − 4B = 0 ⇒ B =
2
13
constants : 2A − 3B − 4C = 0 ⇒ c = −
8
-

Then yp = −x2 + 23 x − 138


. And the general solution
y = yc + yp is y = c1 e4x + c2 e−x + −x2 + 23 x − 13
8
.
AK

Remarks:

1. The reader may wonder what would happen if a higher degree polynomial such as
ax4 + Bx3 + Cx2 + Dx + E was assumed for yp for g(x) with lower degree. The answer
is that all coefficients beyond the quadratic term would turn out to be zero. Thus with
exceptional cases to be noted later; it is unnecessary to assume for yp a polynomial of
higher degree than the degree in the nonhomogeneous term g(x)..

Dr. Joseph Ssebuliba - DCEE & Maths Dept page 42 of 76


Makerere University EMT 1201 - Engineering Mathematics II

1
2. If g(x) = 4x2 , do not take yp = Ax2 and leave out the other terms (or if g(x) = 4x2 +2, do
not take yp = Ax2 + B). You must not assume any other terms omitted in the polynomial

20
to take zero values.
Case II: If g(x) has exponential function
For example g(x) = e2x ; yp = Ae2x , g(x) = 2xex ; yp (Ax + B)e2x
g(x) = x2 e−x ; yp = (Ax2 + Bx + C)e−x
g(x) = 2x + 5e2x ; yp = Ax + B + Ce2x

1
g(x) = 3x2 + 4 + xe2x yp = Ax2 + Bx + C + (Dx + E)e2x .
3. Solve the differential equation: y 00 + 3y 0 + 2y = 10e3x . y(0) = 1, y 0 (0) = 0

MT
Solution. The auxiliary equation for the homogeneous part is r2 + 3r + 2 = 0
⇒ yc = c1 e−2x + c2 e−x .
To find yp we try yp = Ae3x ⇒ yp0 = 3Ae3x ⇒ yp00 = 9Ae3x Then the differential equation
gives
9Ae3x + 3(3Ae3x ) + 2(Ae3x ) = 10e3x .
1
⇒ 20Ae3x = 10e3x ⇒ 20A = 10 ⇒ A = .
2
1 3x

-E
Thus yp = 2 e and the general solution y = yc + yp is y = c1 e

1
−2x
+ c2 e−x + 21 e3x .

3
And y = c1 e−2x + c2 e−x + e3x ⇒ y 0 = −2c1 e−2x − c2 e−x + e3x .
1
y(0) = 1 ⇒ c1 + c2 + 2 = 1
2
2c1 + 2c2 = 1
 2
1
And 0 ⇒ ⇒ c1 = 1, c2 = −
y (0) = 0 ⇒ −2c1 − c2 + 23 = 0 −4c1 − 2c2 = −3 2
Thus we have the solution as y = e−2x − 12 e−x + 12 e3x . [Note that the initial conditions
EE
must be used in the general solution BUT not in yc only.]
Case III: If g(x) involves trigonometrical functions of sinusoidal type
g(x) = sin 2x; yp = A cos 2x + B sin 2x
g(x) = 2 cos x yp = A cos x + B sin x
g(x) = x sin 3x yp = (Ax + B) cos 3x + (Cx + D) sin 3x
DC

g(x) = x sin x + 2 cos x; yp = (Ax + B) sin x + (Cx + D) cos x

Examples 8.2
Solve the differential equation: y 00 − 3y 0 − 4y = 2 sin x
Solution: The auxiliary equation to the homogeneous part is r2 − 3r − 4 = 0
⇒ yc = c1 e4x + c2 e−x . To find yp we try
yp = A cos x + B sin x
-

yp0 = −A sin x + B cos x


yp00 = −A cos x − B sin x
which when used in the differential equation we obtain
AK

(−A + 3B − 4A) sin x + (−B − 3A − 4B) cos x = 2 sin x


giving (−5A + 3B) sin x + (−3A − 5B) cos x = 2 sin x

coefficients of sin x ⇒ −5A + 3B = −2 5 3
⇒ A = − ,B =
coefficients of cos x ⇒ −5B − 3A = 0 17 17
5
And so yp = − 17 cos x + 3
17
sin x. Thus y = c1 e4x + c2 e−x − 5
17
cos x + 3
17
sin x.

Dr. Joseph Ssebuliba - DCEE & Maths Dept page 43 of 76


Makerere University EMT 1201 - Engineering Mathematics II

1
8.2 Expected difficulties:

20
We demonstrate possible difficulties that could arise in practice in the method of undetermined
coefficients with the following example.

1. If the proposed yp has a term that is already a solution of the differential equation in yc .
Solve the differential equation: y 00 − 3y − 4y = e−x .

1
Solution: The complementary solution is yc = c1 e4x + c2 e−x .
Clearly, for g(x) = e−x , we would take yp = Ae−x ⇒ yp0 = −Ae−x , yp00 = Ae−x . so that
(A + 3A − 4A)e−x = e−x ⇒ 0.Ae−x = e−x .

MT
And in this case we cannot determine A. Where is the problem? The problem lies in the
choice of yp we have taken. It contains a term e−x which is a solution to the homogeneous
part (see the complementary solution yc ). To rectify this we have to modify our choice
by multiplying through yp by x. Thus we try

yp = Axe−x
yp0 = e−x (−Ax + A)

-E
yp00 = e−x (Ax − 2A)

And using (8.3) in the differential equation gives


1
(Ax − 2A − 3(−Ax + A) − 4Ax)e−x = e−x ⇒ −5A−x = e−x ⇒ −5A = 1 ⇒ A = − .
5
Thus yp = − 15 xe−x and the general solution is y = c1 e4x + c2 e−x − 51 xe−x .
EE
2. Solve the differential equation: y 00 − 4y 0 = 2x.
Solution: The auxiliary equation to the homogeneous part is

r2 − 4r = 0 ⇒ r(r − 4) = 0 ⇒ r = 0, r = 4 ⇒ yc = c1 + c2 e4x .
DC

With g(x) = 2x, we try yp = Ax + B. But this has a constant B. which is the same as
a solution in yc ( a constant c1 ) so we must try yp = x(Ax + B) = Ax2 + Bx. This gives
yp0 = 2Ax + B, yp00 = 2A. So that 2A − 4(Ax + B) = 2x. And comparing coefficients gives
coefficients of x: −8A = 2 ⇒ A = − 41 , constants: 2A − 4B = 0 ⇒ B = − 18 . Thus
yp = − 41 x2 − 18 x and the general solution is y = c1 + c2 e4x − 41 x2 − 18
Conclusion: If a term in the trial expression for yp is a solution to the corresponding
homogeneous equation ( i.e is directly implicated in the complementary solution yc ), then
replace yp by xs yp , where s is the smallest nonnegative integer such that no term in xs yp
-

is a solution to the corresponding homogeneous equation.


AK

8.3 The Principle of Superposition:


This principle is a useful tool while using the method of undetermined coefficients. It states
that if you have a second order nonhomogeneous linear differential equation with constant
coefficients ay 00 + by 0 + cy = g(x). with g(x) made up of a sum (or difference ) of different

Dr. Joseph Ssebuliba - DCEE & Maths Dept page 44 of 76


Makerere University EMT 1201 - Engineering Mathematics II

1
functions g1 (x), g2 (x), g3 (x), then solve for particular solution of the differential equation in the
following related differential equations.

20
ay 00 + by 0 + cy = g1 (x) to get yp1
ay 00 + by 0 + cy = g2 (x) to get yp2
ay 00 + by 0 + cy = g3 (x) to get yp3 .

Then the particular solution is the sum of the three solutions yp1 , yp2 , yp3 . And the general

1
solution is y = yc + yp1 + yp2 + yp3 .
The idea here is to lessen or ease the burden of solving for yp with very many constants to be

MT
determined. For instance if we solve y 00 − 4y = 3x + 2e−3x + 5x cos 2x we would expect to use
yp = Ax + B + Ce−3x + (Dx + E) cos 2x + (F x + G) sin 2x ( a whole 7 constants to handle in
the process).
The superposition principle then says:

(a) Solve for yc : r2 − 4 = 0 ⇒ r = ±2. ⇒ y= e2x , y2 = e−2x ⇒ yc = c1 e2x + c2 e−2x . (This


is important to do first, so that we make cross checks of the yp we are to try)

-E
(b) Solve for yp , for g1 (x) = 3x : yp1 = Ax + B ⇒ yp0 1 = A ⇒ yp001 = 0
⇒ 0 − 4(4x + B) = 3x ⇒ 4B = 0 ⇒ B = 0, −4A = 3 ⇒ A = −3 7
. Then yp1 = − 34 x.

(c) Solve for yp2 , for g2 (x) = 2e−3x : yp2 = Ae−3x ⇒ yp0 2 = −3Ae−3x , yp002 = 9Ae−3x . This
gives
2
9Ae−3x − 4Ae−3x = 2e−3x ⇒ 5A = 2 ⇒ A = .
5
EE
Then yp2 = 25 e−3x .

(d) We solve for yp3 for g3 (x) = 5x cos 2x

yp3 = (Ax + B) cos 2x + (Cx + D) sin 2x


yp0 3 = (A cos 2x − 2Ax sin 2x − 2B sin 2x + C sin 2x + 2Cx cos 2x + 2D cos 2x
DC

yp003 = −2A sin 2x − [2A sin 2x + 4Ax cos 2x] − 4B cos 2x


+ 2C cos 2x + 2C cos 2x − 4Cx sin sin 2x − 4D sin 2x
= (−4A − 4D) sin 2x + (−4B + 4C) cos 2x − 4Ax cos 2x − 4Cx sin 2x

Then y 00 − 4y = 5x cos 2x gives


(−4A − 4D) sin 2x + (−4B + 4C) cos 2x − 4Ax cos 2x
− 4Cx sin 2x − 4(Ax + B) cos 2x − 4(Cx + D) sin 2x = 5x cos 2x
coefficients of x cos 2x ⇒ −4A − 4A = 5 ⇒ A = − 85
-

coefficients of x sin 2x ⇒ −4C − 4C = 0 ⇒ C = 0


5
coefficients of sin 2x ⇒ −4A − 4D − 4D = 0 ⇒ −4A − 8D = 0 ⇒ D = − 16
Coefficients of cos 2x ⇒ −4B + 4C − 4B = 0 ⇒ B = 0
AK

⇒ yp3 = − 58 x cos 2x − 5
16
sin 2x
Then by superposition principle
yp = yp1 + yp2 + yp3 = − 43 x + 52 e−3x − 58 x cos 2x − 16
5
sin 2x. And the general solution is
2x −2x 3 2 −3x 5 5
y = c1 e + c2 e − 4x + 5e − 8 x cos 2x − 16 sin 2x

Dr. Joseph Ssebuliba - DCEE & Maths Dept page 45 of 76


Makerere University EMT 1201 - Engineering Mathematics II

1
This is a far better organised and simpler approach than using one yp for a big sum of
g(x). However care must be taken once again, at the choice of each trial ypi to check and

20
see if there is a term (or no term) that is in the solution to the homogeneous equation.
The other advantage is that you avoid multiplying by xs to the whole big yp and simply
multiply it to the function affected by similarity with a term in yc .

8.4 Limitation of the method of undetermined coefficients

1
The method of undetermined coefficients only handles particular forms of g(x). If g(x) takes
the forms say; g(x) = tan x, sec2 x, x1 , xcosec x, etc then the method fails to solve for the

MT
particular solution.

Exercise 8.1

A. Use the method of undetermined coefficients to solve the differential equations

1. 2y 00 − 4y 0 − 6y = 3e2x
3. y 00 + 2y 0 = 3 + 4 sin 2x
5. y 00 + 9y = x2 e3x + 6
7. 2y 00 + 3y 0 + y = x2 + 3 sin x
-E
2. y 00 + y 0 − 2y = 2x; y(0) = 0, y 0 (0) = 1
4. y 00 + 4y = x2 + 3ex ; y(0) = 0, y 0 (0) = 2.
6. y 00 − 2y 0 + y = xex + 4; y(0) = 1, y 0 (0) = 1
8. y 00 + y = 3 sin 2x + x cos 2x

B. State a suitable choice of yp to be used if the method of undetermined coefficients was to be


used to solve the following differential equations. Do not evaluate the constants
EE
1. y 000 − 2y 00 + y 0 = x3 + 2ex 2. y iv − 2y 00 + y = ex + sin x
000 0 −x
3.y − y = xe + 2 cos x 4.y iv − y 000 − y 00 + y 0 = x2 + 4 + x sin x
5. y iv + 2y 000 + 2y 00 = 3ex + 2xe−x + e−x sin x

Note an interesting point here that we only need to multiply x to the affected trial of yp if we
DC

are confronted with a sum ( or difference) of functions in principle of superposition.

6. y 00 + 3y 0 = 2x4 + x2 e−3x + sin 3x 7. y 00 − 5y 0 + 6y = ex cos 2x + e2x (3x + 4) sin x


8. y 00 + y = x(1 + sin x) 9. y 00 + 4y = x2 sin 2x + (6x + 7) cos 2x

8.5 The method of variation of parameters


We have seen that the method of undetermined coefficients is a simple procedure for determining
-

particular solutions when the equation has constant coefficients and the nonhomogeneous term
is of special type. Indeed as it has been said, the method of undetermined coefficients does not
work for some other types of the function such as g(x) = tan x, g(x) = x csc x, x12 etc. In
AK

addition, the method does not handle variable coefficients. In this section we discuss a more
general method that can handle both constant coefficients and variable coefficients differential
equation, in addition to any form of the nonhomogeneous function.
Consider the nonhomogeneous second order linear differential equation

a2 (x)y 00 + a1 (x)y 0 + a0 (x)y = f (x) (8.3)

Dr. Joseph Ssebuliba - DCEE & Maths Dept page 46 of 76


Makerere University EMT 1201 - Engineering Mathematics II

1
which in standard form is y 00 + p(x)y 0 + q(x)y = g(x) where p and q are constant functions of
x (or constants ). Let y1 , y2 be two linearly independent solutions of the homogeneous part,

20
L[y] = 0 of (8.3). Then the complementary solution is yc = c1 y1 + c2 y2
Let the particular solution yp take the form yp = ν1 (x)y1 (x) + ν2 (x)y2 (x) where ν1 (x) and ν2 (x)
are functions to be determined. Then

y p = ν1 y 1 + ν2 y 2 (8.4)
yp0 ν10 y1
+ ν2 y2 + ν1 y10 + ν2 y20
0

1
⇒ =
set ν10 y1 + ν20 y2 = 0 (8.5)
Then yp0 = ν1 y10 + ν2 y20 (8.6)

MT
And yp00 = ν10 y10 + ν1 y100 + ν20 y20 + ν2 y200 (8.7)

Substituting (8.4), (8.6),(8.7) in (8.3) gives

[ν10 y10 + ν1 y100 + ν20 y20 + ν2 y200 ] + p(x)[ν1 y10 + ν2 y20 ] + q(x)[ν1 y1 + ν2 y2 ] = g(x)

⇒ [ν10 y10 + ν20 y20 ] + ν1 [y100 + p(x)y10 + q(x)y1 ] + ν2 [y200 + p(x)y20 + q(x)y2 ] = g(x)

-E
⇒ [ν10 y10 + ν20 y20 ] + ν1 L[y1 ] + ν2 L[y2 ] = g(x)
And since y1 and y2 are solutions to the homogeneous part L[y] = 0, then L[y1 ] = 0 and
L[y1 ] = 0.
This gives ν10 y10 + ν2 y20 = g(x). Then together with (8.5) we have
)
ν10 y1 + ν20 y2 = 0,
(8.8)
ν10 y10 + ν20 y20 = g(x).
EE
And solving simultaneously (8.8) for ν10 (x) and ν20 (x) gives
−g(x)y2 (x) g(x)y1 (x)
ν10 (x) = 0 0
and ν20 (x) = (8.9)
y1 y2 − y2 y1 y1 y20 − y2 y20
But we note in (8.9) that y1 y20 − y2 y10 = W (y1 , y2 ). Then
DC

gy2 gy1
ν10 (x) = − and ν20 (x) = (8.10)
W (y1 , y2 ) W (y1 , y2 )
Remark: Division by W (y1 , y2 ) is permissible since y1 , y2 are linearly independent solutions
and so W (y1 , y2 ) is never zero (or can never vanish) in the interval defining the solutions. Thus
Z Z
gy2 gy1
ν1 (x) = − dx and ν2 (x) = dx
W (y1 , y2 ) W (y1 , y2 )
-

[Note that the coefficient of y 00 must be 1, to determine the actual g(x) to be used]. And

yp = ν1 (x)y1 (x) + ν(x)y2 (x)


AK

gives Z Z
gy2 gy1
yp = y1 − dx + y2 dx
W (y1 , y2 ) W (y1 , y2 )
then the general solution is
Z Z
gy2 gy1
y = yc + yp ⇒ y = c1 y1 + c2 y2 + y1 − dx + y2 dx
W (y1 , y2 ) W (y1 , y2 )

Dr. Joseph Ssebuliba - DCEE & Maths Dept page 47 of 76


Makerere University EMT 1201 - Engineering Mathematics II

1
Important observations: The system of equations

20
y1 ν10 + y2 ν20 = 0
y10 ν10 + y20 ν20 = g(x)
  0     
y1 y2 ν1 0 y1 y2
can be written as 0 = . If A = , then |A| = W and we
y1 y20 ν20 g(x) y10 y20
y y
have W = 10 20 = y1 y20 − y2 y10

1
y1 y2
 
0
(a) Replacing the first column in W with the column of constant terms gives

MT
g(x)


0 y2
W1 =
= −gy2 (8.11)
g(x) y20

 
0
(b) Replacing the second column in W with the column of constant terms gives


y
W2 = 10
0
y1 g(x)
-E

= gy1

g(x)

(8.12)

Functions (8.11) and (8.12) are the numerators in (8.10). Then, clearly we can write
EE
W1 (y1 , y2 ) W2 (y1 , y2 )
ν10 (x) = and ν20 (x) =
W (y1 , y2 ) W (y1 , y2 )
where W1 (y1 , y2 ) is the Wronskian obtained by replacing the first column in W (y1 , y2 ) with a
column of RHS terms and W2 (y1 , y2 ) is theWronskian
 obtained by replacing the second column
0
in W (y1 , y2 ) with a column of the RHS [Note of the subscript 1 on W1 to denote
DC

g(x)
first column and 2 on W2 to denote second column ]. This helps us to avoid working with long
expressions.

Examples 8.3
ex
1. Solve the differential equation: y 00 − 2y 0 + y = 1+x2
.
Solution: The auxiliary equation of the homogeneous part is r2 − 2r + 1 = 0 ⇒ r = 1.
Then yc = (c 1 + c2 x)e x ⇒ x x
yx1 = e , yx2 = xe are the two linearly independent solutions.
-

y y e xe
W (y1 , y2 ) = 10 20 = x x

= e2x (x + 1 − x) = e2x .
y1 y2 e e (x + 1)
0 xex
AK

= xe2x2 .
x 2

Since g(x) = e /(1 + x ), then W1 (y1 , y2 ) = ex x
1+x2
e (x + 1) 1+x

W1 (y1 , y2 ) xe2x x
And ν10 (x) = =− 2 2x
=−
W (y1 , y2 ) (1 + x )e 1 + x2
2x
Z x
x 1 2
e 0 = e

⇒ ν1 (x) = − dx = − ln (1 + x ). Also W 2 (y 1 , y2 ) = x
e ex
1 + x2 2 1+x2
1 + x2

Dr. Joseph Ssebuliba - DCEE & Maths Dept page 48 of 76


Makerere University EMT 1201 - Engineering Mathematics II

1
e2x
Z
W2 (y1 , y2 ) 1 1
⇒ ν20 (x) = = 2 2x
= ⇒ ν2 (x) = dx = tan−1 x.
W (y1 , y2 ) (1 + x )e 1 + x2 1 + x2

20
1
Thus yp = ν1 y1 + ν2 y2 ⇒ yp = − ln (1 + x2 ).ex + (tan−1 x)(xex )
2
1 x
= − e ln (1 + x2 ) + xex tan−1 x.
2

1
And y = yc + yp ⇒ y = c1 ex + c2 xex − 12 ex ln (1 + x2 ) + xex tan−1 x.
2. Solve the differential equation: y 00 + y = sec x

MT
Solution: The auxiliary equation is r2 + 1 = 0 so that and yc = A cos x + B sin x, so
the two linearly independent solutions are y1 = cos x and y2 = sin x.

cos x sin x
W (y1 , y2 ) = = cos2 x + sin2 x = 1
− sin x cos x

0 sin x
Since g(x) = sec x, W1 (y1 , y2 ) = = − sin x sec x = − tan x.
sec x cos x

0
Thus ν1 (x) =
W1 (y1 , y2 )
W (y1 , y2 )

cos x
W2 (y1 , y2 ) =
-E 0
− sin x sec x


Z
= − tan x ⇒ ν1 (x) = − tan xdx = ln cos x.

=1

Z
W2 (y1 , y2 )
Thus ν20 (x) = = 1 ⇒ ν2 (x) = dx = x
EE
W (y1 , y2 )
Then yp = ν1 y1 + ν2 y2 = (cos x) ln cos x + x sin x and the general solution is
y = yc + yp ⇒ y = c1 cos x + c2 sin x + (cos x) ln cos x + x sin x.
3. Solve the differential equation: y 00 + y = tan x + 3x − 1
Solution: The two linearly independent solutions are y1 = cos x, y2 = sin x. The
DC

method of variation of parameters will solve this equation but it becomes simpler
(or quicker) if we use the principle of superposition. Thus we solve

y 00 + y = tan x for yp1 and y 00 + y = 3x − 1 for yp2 . (8.13)

and in (8.13) we use the method of variation of parameters for g(x) = tan x, to get
yp1 = − cos x ln(sec x + tan x) and we use method of undetermined coefficients for
g(x) = 3x − 1 (because it is simpler in this case) with yp2 = Ax + B; so that yp2 = 3x − 1.
Then yp = yp1 + yp2 = −(cos x) ln (sec x x + tan x) + 3x − 1. And the general solution is
-

y = yc + yp ⇒ y = c1 cos x + c2 sin x + (3x − 1) − (cos x) ln(sec x + tan x).


AK

Generalisation: If we have an nth-order differential equation

an (x)y (n) + an−1 (x)y (n−1) + . . . + a1 (x)y 0 + a0 (x)y = g(x)

with y1 , y2 , . . . , yn linearly independent solutions to the homogeneous part then by method


of variation of parameters, the particular solution will take the form

yp = ν1 y1 + ν2 y2 + . . . + ν1 yn (8.14)

Dr. Joseph Ssebuliba - DCEE & Maths Dept page 49 of 76


Makerere University EMT 1201 - Engineering Mathematics II

1
so that
yp0 = [ν1 y10 + ν2 y20 + . . . + νn yn ] + [ν10 y1 + ν20 y2 + . . . + νn0 yn ]

20
Setting
ν10 y1 + ν20 y2 + . . . + νn0 yn = 0 (8.15)

gives
yp0 = ν1 y10 + ν2 y20 + . . . + νn yn0

1
⇒ yp00 = [ν1 y100 + ν2 y200 + . . . + νn yn00 ] + [ν10 y10 + ν20 y20 + . . . νn0 yn0 ]
And setting

MT
ν10 y10 + ν20 y20 + . . . + νn0 yn0 = 0 (8.16)
gives y 00 = ν 0 y100 + ν2 y200 + . . . + νn yn00 .
Continuing this process through (n-1) derivatives gives
(m) (m)
yp(m) = ν1 y1 + ν2 y 2 + . . . + νn yn(m) (8.17)

With the (n-1)th condition

This gives (n-1) equations


(n−1)
ν1 y 1 + ν20 y2
(n−1) -E
+ . . . + νn0 yn(n−1) = g(x) (8.18)

y1 ν10 + y2 ν20 + . . . + yn νn0 = 0




y10 ν10 + y20 ν20 + . . . + yn0 νn0 = 0


EE


y100 ν10 + y200 ν20 + . . . + yn00 νn0 = 0




.
. 



. 



(n−1) 0 (n−1) 0 (n−1) 0
y1 ν1 + y 2 ν2 + . . . + y n νn = g(x)

DC

The sufficient condition for (8.19) to have solutions is that the determinant of coefficients
is not zero. Hence using Cramer’s rule we can get

g(x)W1 (y1 , y2 , . . . , yn ) g(x)W2 (y1 , y2 , . . . , yn )


ν10 (x) = , ν20 (x) = ,...,
W (y1 , y2 , . . . , yn ) W (y1 , y2 , . . . , yn )
n Z
0 g(x)Wm (y1 , y2 , . . . , yn ) X g(t)Wm (y1 , y2 , . . . , yn )
νm (x) = ⇒ yp = dt
W1 (y1 , y2 , . . . , yn ) m=1
W (y 1 , y2 , . . . , y n )
-

Examples 8.4
AK

Solve the differential equation: y 000 − y 00 − y 0 + y = e5x


Solution: The linearly independent solutions to the homogeneous part are
y1 = ex , y2 = xex and y3 = e−x .

Dr. Joseph Ssebuliba - DCEE & Maths Dept page 50 of 76


Makerere University EMT 1201 - Engineering Mathematics II

1
x
e
x xex e−x
Then W (y1 , y2 , y3 ) = e (x + 1)ex −e−x = 4ex . And

20
ex (x + 2)ex e−x
x −x

0 xe e

W1 (y1 , y2 , y3 ) = 0 (x + 1)ex −e−x = e5x (−1 − 2x)
e5x (x + 2)ex e−x

W1 (y1 , y2 , y3 ) e5x (−1 − 2x) 1 1


Therefore ν10 (x) = = e4x − xe4x

1
= x
W (y1 , y2 , y3 ) 4e 4 2
Z
1 1 1 1 1 1 1
⇒ ν1 (x) = ( e4x − xe4x )dx = e4x − [ xe4x − e4x ] = e4x − xe4x

MT
4 2 16 4 16 8 4
x −x

e
x 0 e−x


W2 (y1 , y2 , y3 ) = e 0 e = e5x [−1 − 1] = −2e5x

ex e5x e−x
Therefore
2e5x
Z
W2 (y1 , y2 , y3 ) 1 4x 1 1
ν20 (x) =
W (y1 , y2 , y3 ) 4e
x
e
x
2

xex
W3 (y1 , y2 , y3 ) = e (x + 1)e
-E
= − x = − e ⇒ ν2 (x) = − e4x dx = − e4x

x

0
2

0 = e5x (e2x ) = e7x


ex (x + 2)ex e5x
8

Therefore
e7x
EE
Z
W3 (y1 , y2 , y3 ) 1 1 6x 1
ν30 (x) = = x = e6x ⇒ ν3 (x) = e dx = e6x .
W (y1 , y2 , y3 ) 4e 4 4 24

Then

yp = ν1 y1 + ν2 y2 + ν3 y3
1 1 −1 4x 1
DC

= ( e4x − xe4x )ex + e .(xex ) + e6x .(e−x )


8 4 8 24
1 5x 1 5x 1 5x 1 5x 1 5x 3 5x
= e − xe − xe + e = e − xe
8 4 8 24 6 8
So the general solution is y = yc + yp ⇒ y = c1 ex + c2 xex + c3 e−x + 61 e5x − 38 xe5x .

1. If all the coefficients of the differential equation are constants (i.e if a differential equation
is constant coefficient linear) it is always possible to find the linearly independent solutions
-

to the homogeneous part. A particular solution can then be obtained by method of


variation of parameters and hence the complete solution.
2. If g(x) is of appropriate form, it is probably easier to use method of undetermined coef-
AK

ficients than the method of variation of parameters.


3. If the coefficients are not constants (i.e the differential equation is variable coefficient
linear differential equation) then it requires that one solution of the homogeneous part be
known so that we use the Wronskian technique or method of order reduction to obtain
the second linearly independent solution. Then the particular solution can be obtained
by method of variation of parameters.

Dr. Joseph Ssebuliba - DCEE & Maths Dept page 51 of 76


Makerere University EMT 1201 - Engineering Mathematics II

1
Exercise 8.2 1. Solve the equations by method of variation of parameters.
(a) y 00 − 5y 0 + 6y = 2ex (b) y 00 − y 0 − 2y = 2e−x

20
(c) y 00 + 2y 0 + y = 3e−x (d) y 00 + 4y = 3cosec 2x
(e) y 00 + 9y = 9 sec2 3x (f ) y 00 + 4y 0 + 4y = x−2 e−2x
2. Verify that x and xex are solutions of the homogeneous part of the differential equation
x2 y 00 − x(x + 2)y 0 + (x + 2)y = 2x3 and find the general solution.

1
3. If y1 = ex is a solution to the equation xy 00 − (1 + x)y 0 + y = 0 find the second linearly
independent solution. Hence solve the equation xy 00 − (1 + x)y 0 + y = x2 e2x
1 1
4. Show that x− 2 cos x and x− 2 sin x are linearly independent solutions to the differential

MT
3
equation xy 00 + xy 0 + (x2 − 14 )y = 3x 2 sin x
5. Given that y1 = ex is a solution to the equation (1 − x)y 00 + xy 0 − y = 0 obtain the second
linearly independent solution. Hence solve the differential equation (1 − x)y 00 + xy 0 − y =
2(x − 1)2 e−x .
6. Solve the differential equations by method of variation of parameters
(a) y 00 + y 0 = tan x (b) y 000 − y = x
000 00 0
(c) y − 2y − y + 2y = e
-E
4x

7. Given that x, x2 , x1 are solutions to the homogeneous part of


x3 y 000 + x2 y 00 − 2xy 0 + 2y = 2x4 , find the particular solution.

8.6 Special substitutions: Cauchy-Euler equations


EE
Definition 8.2 A linear second order differential equation that can be expressed in the form
d2 y dy
ax2 2
+ bx + cy = h(x) (8.19)
dx dx
where a, b, c are constants, is Cauchy-Euler equation. For example

1. 3x2 y 00 − 2xy 0 + 7y = sin x is called Cauchy-Euler


DC

2. 2y 00 − 3xy 0 + 11y = 3x − 1 is not Cauchy-Euler


(because the coefficient of y 00 is not in form of ax2 ).

The process of solving a Cauchy-Euler equation involves the use of substitution x = et .


Thus if x = et , dy
dt
dy dx
= dx dy t
. dt = dx dy
.e = x dx .
dy dy
Hence x = (8.20)
dx dt
-

Differentiating (8.20) with respect to t gives


d2 y
     
d dy d dy dx dy d dy dy
= = x = . +x . Let M =
AK

dt 2 dt dt dt dx dt dx dt dx dx
2
 
dy dy dM dy dM dx dy d dy dx
⇒ 2 = +x = +x . = +x .
dt dt dt dt dx dt dt dx dx dt
dy d2 y dx dy d2 y dy d2 y
= + x 2. = + x 2 .et = + x 2 .x
dt dx dt dt dx dt dx
2
dy d y
= + x2 2
dt dx
Dr. Joseph Ssebuliba - DCEE & Maths Dept page 52 of 76
Makerere University EMT 1201 - Engineering Mathematics II

1
d2 y d2 y dy
Hence x2 = − (8.21)

20
dx2 dt2 dt
The general principle is that the substitution x = et , transforms the second order variable
coefficient linear nonhomogeneous differential equation
d2 y dy
ax2
2
+ bx + cy = h(x)
dx dx

1
to a second order linear, constant-coefficient, nonhomogeneous differential equation
d2 y dy
a 2
+ (b − a) + cy = h(et )
dt dt

MT
which can then be solved by the methods we have seen before. (This is got by using equa-
tions (8.20) and (8.21) into equation (8.19)).

Examples 8.5

1. Solve the Cauchy-Euler equation


d2 y dy

d2 y dy
3(
dt2

dt
) + 11
dy
dt

3x2

3y
dx

= 0
2

-E
+ 11x − 3y = 0.


dx
Solution: Using (8.20) and (8.21) in the differential equation we get

3
d2 y
dt2
+ 8
dy
dt
− 3y = 0

which is a constant coefficient with auxiliary equation 3r2 + 8r − 3 = 0


1 1 1
⇒ r1 = 31 , r2 = −3. Thus y1 = e 3 t = (et ) 3 = x 3 and y2 = e−3t = (et )−3 = x−3 .
EE
1
The general solution y = c1 y1 + c2 y2 ⇒ y = c1 x 3 + c2 x−3
2. Solve the differential equation
d2 y dy dy 4
3x2 + 11x − 3y = 8 − 3 ln x; y(1) = 1, (1) =
dx2 dx dx 3
DC

Solution: This is a Cauchy-Euler equation. Let x = et , then (8.20) and (8.21) in the
differential equation give
d2 y dy t d2 y dy
3 2 + 8 − 3y = 8 − 3 ln e ⇒ 3 2 + 8 − 3y = 8 − 3t
dt dt dt dt
The equation is constant coefficient and we can use method of undetermined coefficients
to solve for yp too. Thus auxiliary equation is 3r2 + 8r − 3 = 0 ⇒ r = 13 , r = −3.
1
Therefore y1 = e 3 t , y2 = e−3t . To find the particular solution we try yp = At + B. This
gives (8A − 3B) − 3At = 8 − 3t ⇒ A = 1, B = 0. Thus the particular solution is yp = t.
-

1
Hence the general solution is y = yc + yp ⇒ y(t) = c1 e 3 t + c2 e−3t + t
1
This gives y(x) = c1 x 3 + c2 x−3 + ln x (8.22)
AK

dy 1 2 1
From (8.22) we have = c1 x− 3 − 3c2 x−4 +
dx 3 x

y(1) = 1 ⇒ c1 + c2 + 0 = 1
Therefore dy c1 = 1, c2 = 0
dx
(1) = 43 ⇒ 13 c − 3c2 = 34
1
Then y = x 3 + ln x

Dr. Joseph Ssebuliba - DCEE & Maths Dept page 53 of 76


Makerere University EMT 1201 - Engineering Mathematics II

1
Exercise 8.3

20
Solve the Cauchy-Euler equations
2d y dy 2
d y dy
1. x2 dx 2 + 7x dx − 7y = 0 2. x2 dx 2 − 3x dx + 4y = 0
2
d y 2
1 dy 5 d y dy
3. dx 2 − x dx + x2 y = 0 4.x2 dx 2 − 3x dx + 6y = 0
2
d y dy 2
d y
3 2
5. x dx 2 + 3 dx − x y = x 6. x4 dx 2
2 − 6x y = 1 − 6x
2
2
d y dy 2
d y dy
7. x2 dx 2 + 3x dx + 5y = x
2
8.x2 dx 2 + x dx + y = (ln x) sin (ln x)

1
2
d y dy 0
9. x2 dx 2 − 4x dx + 4y = 0; y(1) = −2, y (1) = −11

A third order Cauchy-Euler equation can be reduced into a contant-coefficient equation. This

MT
is expressed in the exercise below.
Use substitution x = et to show that the third order Cauchy-Euler differential equation
d3 y 2
2d y dy
ax3 3
+ bx 2
+ cx + dy = 0
dx dx dx
is transformed into
d3 y d2 y dy
a + (b − 3a) + (2a − b + c) + dy = 0

1. x3d
dx
3
y
3
− 2x
dt3

2d y
dx
2
2
dy
dt2

+ 3x − 3y = 0 2. x
dx
-E
3d y
dx
3
3
+x
dt
Hence solve the third-order Cauchy-Euler differential equations
3 2 3 2
2d y
dx 2

2
dy
− 8x − 4y = 0
dx
dy dy dy dy dy dy
3. x3 3 + x2 2 − 2x + 2y = 0 4. x3 3 + 2x2 2 − x + y = 0
dx dx dx dx dx dx
EE
8.7 Further Cauchy-Euler equations
We have noted that the subset x = et transforms the 2nd order (C-E) differential equation
d2 y dy
ax2 2
+ bx + cy = 0, (8.23)
dx dx
DC

into a second order homogeneous equation


d2 y dy
a 2
+ (b − a) + cy = 0.
dt dt

Proof:
dy dy dt dy 1 dy
= = e−t . = (8.24)
dx dt 
dx  dt  x dt 
-

d2 y d2 y dy −2t 1 d2 y

d dy d 1 dy 1 dy
2
= = = 2
− e = 2 2
− 2 (8.25)
dx dt dx dt x dt dt dt x dt x dt
Substituting (8.24) and (8.25) into (8.23) gives
AK

1 d2 y
   
2 1 dy 1 dy
ax − 2 + bx + cy = 0
x2 dt2 x dt x dt
d2 y dy dy
a 2 − a + b + cy = 0
dt dt dt
d2 y dy
a 2 + (b − a) + cy = 0
dt dt
Dr. Joseph Ssebuliba - DCEE & Maths Dept page 54 of 76
Makerere University EMT 1201 - Engineering Mathematics II

1
This being constant-coefficient; let the auxiliary equation be aλ2 + (b − a)λ + c = 0. Then λ1 , λ2
are the two auxiliary roots.

20
1. If λ1 6= λ2 , λ1 , λ2 real and distinct:

y1 = eλ1 t , y2 = eλ2 t ⇒ y = c1 eλ1 t + c2 eλ2 t


⇒ y = c1 (et )λ1 + c2 (et )λ2

1
⇒ y = c1 x λ 1 + c2 x λ 2 .

2. If λ1 = λ2 = λ, then y = (c1 + c2 t)eλt since x = et , then t = ln x

MT
⇒ y = (c1 + c2 ln x)(et )λ ⇒ y = (c1 + c2 ln x)xλ .

3. If λ1 + α = βi, λ2 = α − iβ then eλ1 t = eα+βit

y = eαt (A cos βt + B sin βt)


= (et )α (A cos βt + B sin βt)
= xα (A cos (β ln x) + B sin(β ln x)) (8.26)

-E
Conclusion: The results (8.26) ⇒ for Cauchy-Euler equations we substitute y = xλ
in the Cauchy Euler equation. This gives clear equation in λ. The following example
illustrates this point.

Solve the Cauchy-Euler equation: x3 y 000 − x2 y 00 − 2xy 0 − 4y = 0


Solution: Let y = xλ , y 0 = λxλ−1 , y 00 = λ(λ − 1)xλ−2 , y 000 = λ(λ − 1)(λ − 2)xλ−3 Then the
differential equation gives xλ λ(λ − 1)(λ − 2) − xλ λ(λ − 1) − 2λxλ − 4xλ = 0
EE
⇒ λ(λ − 1)(λ − 2) − λ(λ − 1) − 2λ − 4 = 0 ⇒ λ3 − 4λ2 + λ − 4 = 0
⇒ (λ2 + 1)(λ − 4) = 0. Therefore λ = 4, λ = ±i and the solution is
y = c1 x4 + c2 cos(ln x) + c3 sin(ln x).

Exercise 8.4
DC

Solve the Cauchy-Euler equations.

1. 5x2 y 00 − 3xy 0 + 3y = 0; x > 0 2. x2 y 00 − xy 0 + y = 0; x > 0


3. 3x2 y 00 + 4xy 0 + y = 0; x < 0 4. x2 y 00 + 3xy 0 + 2y = 0
5. x2 y 00 + 4xy 0 − 4y = 0 6. 2x2 y 00 + xy 0 − 3y = 0; x > 0
7. x3 y 000 + 3x2 y 00 − 2xy 0 = 2y = 0; x > 0 8. x2 y 00 − 6y = 0
-

Exercise 8.5

A. Use the order reduction to solve


AK

1. x3 y 00 + (5x3 − x2 )y 0 + 2(3x3 − x2 )y = 0; y1 = e2x 2. x2 y 00 + xy 0 − y = 0; y1 = x


3. x2 y 00 + x2 y 0 − (x + 2)y = 0; y1 = x−1 e−x 4. x2 (1 − ln x)y 00 + xy 0 − y = 0; y1 = x
5. x2 y 00 + (2x2 − x)y 0 − 2xy = 0; y1 = e−2x 6. y 00 + x2 y 0 + x94 y = 0; y1 = cos x3 .

Dr. Joseph Ssebuliba - DCEE & Maths Dept page 55 of 76


Makerere University EMT 1201 - Engineering Mathematics II

1
B. Solve the following differential equations with appropriate method

20
1. y 000 − 6y 00 − y 0 + 6y = 0 2. y 000 + y 00 − 6y 0 + 4y = 0
3. y 000 − 3y 00 + 3y 0 + y = 0 4. y 000 + 2y 00 − 4y 0 − 8y = 0
5. y 00 − 4y 0 + 4y = 0; y(1) = 1, y 0 (1) = 1 6. y 00 − 2y 0 + 2y = 0
7. y 00 − 2y 0 − 2y = 0; y(0) = 0; y 0 (0) = 3 9. y 000 − y 00 + y 0 + 3y = 0
10. y 000 + 2y 00 + 5y 0 − 26y = 0 11. y (4) + 2y 00 + y = 0
12. y 000 − y 00 − y 0 + y = 0 13. y (6) − y (2) = 0

1
14. 2y 000 − 4y 00 − 2y 0 + 4y = 0 15. y (iv) − 4y 000 + 4y 00 = 0
16. y 00 − 4y 0 − 5y = 0; y(−1) = 3, y 0 (−1) = 9 17. y (4) + y = 0.

MT
C. Solve the nonhomogeneous equations

1. y 00 + 2y 0 + y = ex cos x 2.y 00 + y 0 + y = sin2 x


000 0 −2x
3. y − 4y = x + 3 cos x + e 4. y 000 − y 00 − y 0 + y = 2e−x + 3
5. y 000 + y 00 + y 0 + y = e−x + 4x 6. y 00 + 16y = sec 4x
7. 2y 00 − 2y 0 − 4y = 2e3x 8. y 00 − 2y 0 + y = x−1 ex
00
9. y + 4y = tan 2x 10. y 00 + 4y = cosec2 2x
11. y 00 + y = tan x + e3x − 1
00
13. y + y = 3sec x − x + 1 2
-E 12. y 00 + 4y = sec4 x
14. 21 y 00 + 2y = tan x − 12 x
15. xy 00 − (x + 1)y 0 + y = x2 , y1 = ex , y2 = x + 1 16. y 00 + y = sec3 x
17. y 00 + 4y 0 + 4y = e−2x ln x
19. xy + (x − 1)y − 5y = x e , y1 = 5x − 1, y2 = xe−5x
00 0 2 −5x
18. y 00 + y = tan2 x

D. Solve Cauchy-Euler equations


EE
2
d y dy d y 2 dy
1. x2 dx 3
2 + 3x dx − 8y = (ln x) − 2 ln x 2. x2 dx 2 + 6x dx + 4y = 0
2
d y dy 2
d y dy
3. 9x2 dx 2 + 15 dx + y = 0 4. x2 dx 2
2 − dx = (ln x) − 1
2
d y dy 0
5. x2 dx 2
2 − 3x dx = 9(ln x) + 4; y(1) = 6, y (1) = 8

9 Systems of linear differential equations


DC

In many applications of differential equations, one is led to simultaneously consider several


ordinary differential equations with several dependent variables and one independent variable.
Such systems may be linear or nonlinear, homogeneous or nonhomogeneous.
Depending on the nature of the equations, one may find that dealing with a system of differential
equations is easier than dealing with one higher-order differential equation; or the converse may
hold too.
-

This then leads to two senarios. The first being that if a system of lower-order differential
equations (especially first order differential equations) is not easy to solve, we can use them to
form one higher-order differential equation that we could use familiar techniques to solve. The
AK

second one being that given one higher-order differential equation, it could be easy to solve it
if transformed into a system of lower-order differential equations.
In this chapter therefore we present two ways of solving systems of differential equations namely:
writing the system as one higher order differential equation; and writing one higher order
differential equation as a system of differential equations.

Dr. Joseph Ssebuliba - DCEE & Maths Dept page 56 of 76


Makerere University EMT 1201 - Engineering Mathematics II

1
9.1 Transforming an equation into a system of differential equations

20
Examples 9.1

Reduce the differential equations into systems of differential equations

1. x00 (t) + x(t) = 0


Solution: Let x1 = x0 (t). Then x01 = x00 (t) = −x(t). This gives the system

1
x0 (t) = x1 (t)
x01 (t) = −x(t)

MT
2. y 00 + 2y = 4t
Solution: Let y = x1 , y 0 = x2 . Then x01 = y 0 = x2 and x02 = y 00 = 4t − 2y = −2x1 + 4t.
Then we have the system
x01 = x2
x02 = −2x1 + 4t

3. 2y 000 − 6y 00 + 4y 0 + y = sin t
-E
Solution: Let y = x1 , y 0 = x2 , y 00 = x3 . Then
x01 = y 0 = x2
x02 = y 00 = x3
1 1
x03 = y 000 = 3y 00 − 2y 0 − y − sin t
2 2
EE
1 1
= 3x3 − 2x2 − x1 + sin t.
2 2
This gives the system
x01 = x2
x02 = x3
DC

1 1
x03 = − x1 − 2x2 + 3x3 + sin t.
2 2
4. t3 x000 + 4t2 x00 − 8tx0 + 8x = 0.
Solution: Let x = x1 , x0 = x2 , x00 = x3 . Then
x01 = x2 = x2
x02 = x00 = x3
-

1
x03 = x000 = − 3 (4t2 x00 − 8tx0 + 8x)
t
8 8 4
= − 3 x1 + 2 x2 − x3
AK

t t t
Then we have the system
x01 = x2
x02 = x3
8 8 4
x03 = − 3 x1 + 2 x2 − x3
t t t
Dr. Joseph Ssebuliba - DCEE & Maths Dept page 57 of 76
Makerere University EMT 1201 - Engineering Mathematics II

1
5.
x00 + 3x0 − y 00 + y = sin t

(9.1)

20
x0 − 4x + 5y 00 − 6y 0 = cos t
Solution: Let x1 = x0 , x2 = y 0 . Then x01 = x00 , x02 = y 00 . And the system (9.1) becomes

x01 + 3x1 − x02 + y = sin t 
x1 − 4x + 5x02 − 6x2 = cos t (9.2)
0
y − x2 = 0

1
If in example 4 we had initial conditions x(2) = 3, x0 (2) = −6, x00 (2) = 14. Then
x1 (t) = x(t), x2 (t) = x0 (t), x3 (t) = x00 (t) would give x1 (2) = 3, x2 (2) = −6, and
x3 (2) = 14 as the initial conditions associated with the system of the differential equations

MT
obtained. Clearly the system is of first order and so the initial conditions are of first order.

9.2 Reducing a system of differential equations into one equation


Examples 9.2

Reduce the system of differential equations into a single higher order differential equation.

1.
x0 = x + y
y0 = x − y
-E
Solution: If x0 = x + y, then x00 = x0 + y 0 so that x00 = x0 + (x − y) = x0 + x − (x0 − x).
This gives x00 = 2x or x00 − 2x = 0; a second order differential equation.
EE
2.
x0 = x + 2y + t − 1
y 0 = 3x + 2y − 5t − 2

Solution: From x0 = x + 2y + t − 1, we have x00 = x0 + 2y 0 + 1. This gives


DC

x00 = x0 + 2(3x + 2y − 5t − 2) + 1
= x0 + 6x + 4y − 10t − 4 + 1
= x0 + 6x + 2(x0 − x − t + 1) − 10t − 4 + 1
= x0 + 6x + 2x0 − 2x − 2t + 2 − 10t − 3
= 3x0 + 4x − 12t − 1.
Thus x00 − 3x0 − 4x = −12t − 1; which is a second order constant coefficient, linear,
nonhomogeneous differential equation.
-

3.
x0 = x + sin x cos x + 2y
AK

y 0 = = sin2 x(x + sin x cos x + 2y) + x


Solution: Proceeding as before we have
x00 = x0 (1 + cos2 x + 2(x + sin x cos x + 2y) sin2 x + 2x
= 2x0 cos2 x + 2x0 sin2 x + 2x = 2x0 + 2x.

Thus x00 − 2x0 − 2x = 0; a second order, constant coefficient, linear differential equation.

Dr. Joseph Ssebuliba - DCEE & Maths Dept page 58 of 76


Makerere University EMT 1201 - Engineering Mathematics II

1
10 Solving systems of differential equations

20
10.1 Solutions by Method of elimination
This process involves building up the system of differential equation into a single differential
equation that can be solved in one dependent variable. Then the solution thereafter is used to
solve the second dependent variable.

1
Examples 10.1

MT
Solve the system of differential equations by elimination method.

1.

x0 = x + y , x(0) = 1
y 0 = x − y y(0) = 0

Solution: Differentiating the differential equation gives x00 = x0 + y 0 = x0 + x − y =


x0 + x − (x0 − x) = 2x. Then we have an equation x00 − 2x = 0. Whose solution is

And equation (10.1) gives


x(t) = c1 e



-E 2t


+ c2 e −



2t
(10.1)

x0 (t) = 2c1 e 2t
− 2c2 e 2t (10.2)

Since x0 = x + y gives y = x0 − x, then (10.1) and (10.2) give


EE
√ √ √ √ √ √
y = 2c1 e 2t − 2c2 e− 2t − c1 e 2t − c2 e− 2t
√ √ √ √
y = ( 2 − 1)c1 e 2t − ( 2 + 1)c2 e− 2t
√ √
And x(0) = 1 ⇒ c1 + c2 = 1, √y(0) = 0 ⇒ ( 2 − 1)c √ 1 − ( 2 + 1)c2 = 0 which we solve
simultaneously to give c1 = 21 ( 2 + 1) c2 = 14 (2 − 2). Thus √
√ √ √ √ √
DC

p
x(t) = 12 ( (2 + 1)e 2t + 14 (2 − 2)e− 2t and y(t) = 21 e 2t − 42 e− 2t .
2. Solve the system by elimination method

x0 = 2x + y + t
y 0 = x + 2y + t2

Solution:

x00 = 2x0 + y 0 + 1
-

= 2x0 + (x + 2y + t2 ) + 1
= 2x0 + (x + 2x0 − 4x − 2t + t2 ) + 1
AK

= 4x0 − 3x + t2 − 2t + 1

Simplifying to x00 − 4x0 + 3x = t2 − 2t + 1 = (t − 1)2 . The differential equation x00 −


4x0 + 3x = (t − 1)2 has x(t) = c1 et + c2 e3t as the solution to the homogeneous part
and a particular solution is easily found to be 31 t2 + 29 t + 271
. So the general solution is
x(t) = c1 e + c2 e + 3 t + 9 t + 27 . With x (t) = c1 e + 3c2 e + 32 t + 29 and y = x0 − 2x − t
t 3t 1 2 2 11 0 t 3t

we get y(t) = −c1 et + c2 e3t − 23 t2 − 79 t − 16


27
.

Dr. Joseph Ssebuliba - DCEE & Maths Dept page 59 of 76


Makerere University EMT 1201 - Engineering Mathematics II

1
3. Solve the system

20
x0 − 4x + y 00 = t2
x0 + x + y 0 = 0.

Solution: From the two equations, we have

x00 − 4x0 + y 000 = 2t (10.3)

1
x00 + x0 + y 00 = 0 (10.4)

Equations (10.3)and (10.4) give

MT
−5x0 + y 000 − y 00 = 2t (10.5)

Eliminating x from the system gives

5x0 + y 00 + 4y 0 = t2 (10.6)

Adding (10.5) to (10.6) gives

y 000 + 4y 0 = t2 + 2t

-E
Equation (10.7) is a third order differential equation whose auxiliary equation is
r3 + 4r = 0. This gives r = 0, r = ±2i. Then the solution to the homogeneous part is
1 3
yc = c1 + c2 cos 2t + c3 sin 2t. Clearly the particular solution is yp = 12
1 3 1 2 1
the general solution is y = c1 + c2 cos 2t + c3 sin 2t + 12 t + 4 t − 8 t.
(10.7)

t + 14 t2 − 18 t. And

Eliminating y from the system we have


EE
x0 − 4x + y 00 = t2

⇒ x00 + 4x = −t2 (10.8)
x00 + x0 + y 00 = 0

The auxiliary equation to the differential equation (10.8) is r2 + 4 = 0. This gives


r = ±2i so that the solution to the homogeneous part of (10.8) is
x = c4 cos 2t + c5 sin 2t, and the particular solution is xp = − 41 t2 + 18 . And hence we get
the solution x(t) = c4 cos 2t + c5 sin 2t − 14 t2 + 18 .
DC

10.2 Solutions by matrix method


Every system of first order differential equations can be written in matrix form as below.
dx
     
= 3x + 4y x 3 4 x
1. dtdy is equivalent to dtd =
dt 
= x − 5y  y 1 −5 y
 
-

3 4 x
⇒ dX = X where X =
dt 1 −5 y
dx
     
dt
= 2x + 3y − 4t dX 2 3 x −4t
2. is equivalent to dt = +
AK

dy
dt
= −x + e−t 1 0 y e−t
And generally we can write a system as dX
dt
= A(t)X+F(t). If F(t) = 0 then we have dX
dt
= AX.
The general system is in many cases written as X0 = AX + F if nonhomogeneous or X0 = AX
if homogeneous.
The process of finding solution to systems of first order linear differential equation rests on the
use of the matrix A.

Dr. Joseph Ssebuliba - DCEE & Maths Dept page 60 of 76


Makerere University EMT 1201 - Engineering Mathematics II

1
11 Homogeneous linear systems

20
Consider the system
dx
  
= a11 x1 (t) + a12 x2 (t) 0 a11 a12
dt
dy written as X (t) = X(t) = X0 = AX,.
dt
= a x
21 1 (t) + a x
22 2 (t) a 21 a 22

Then using matrix A, we compute |A − λI| = 0 where λ is an eigenvalue of the matrix A. This
enables us to obtain the corresponding eigenvectors and hence the solution corresponding to

1
the particular eigenvalue.
The nature of the solution is dictated by the status of the eigenvalue. The eigenvalues may
take on real and distinct, real and equal (repeated), and complex conjugate forms.

MT
11.1 Real and distinct eigenvalues.
Consider |A − λI| = 0. Let  λ1 , λ2be two real
 anddistinct eigenvalues associated with the
ξ2 ν1
equation |A − λI| = 0. If ξ = and ν = are the corresponding eigenvectors then
ξ1 ν2

X2 (t) = νe =λ2 t

ν1
ν2
 -E
the two linearly independent solution are X1 (t) = ξe = λ1 t

ξ1
ξ 2

eλ1 t and

eλ2 t The two solutions will be linearly independent if the Wronskian


W (X1 (t0 ), X2 (t0 )) 6= 0, for some t0 .
If X1 (t) = ξeλ1 t and X2 (t) = νeλ2 t are the two linearly independent solutions to the system of
linear differential equations then general solution is
EE
X(t) = c1 X1 (t) + c2 X2 (t) = c1 ξeλ1 t + c2 νeλ2 t

If λ1 , λ2 , . . . , λn are n eigenvalues associated with a system of n first order linear differential


equations, and ξ1 , ξ2 , . . . , ξn are the corresponding eigenvectors, then the n linearly independent
solutions to the system are X1 (t) = ξ1 eλ1 t , X2 (t) = ξeλ2 t , . . . , Xn = ξ2 eλn t and the general
DC

solution is X(t) = c1 ξ1 eλ1 t + c2 ξ2 eλ2 t + . . . + cn ξn eλn t .

Examples 11.1

1. Solve the system of differential equations


dx
= x + 3y
dt
dy
-

= 5x + 3y
dt
 
0 1 3
AK

Solution: This system is written in matrix form as X = X


  5 3
1 3
in which we have the matrix A = . We compute |A − λI| = 0. And we have
5 3
1−λ 3
= λ2 − 4λ − 12 = 0. This gives λ1 = −2 and λ2 = 6 as the two real and
5 3−λ

Dr. Joseph Ssebuliba - DCEE & Maths Dept page 61 of 76


Makerere University EMT 1201 - Engineering Mathematics II

1
distinct eigenvalues. To find eigenvectors corresponding to λ1 and λ2 we use (A−λI)ξ = 0.
Thus we have

20
    
1−λ 3 ξ1 0
= (11.1)
5 3−λ ξ2 0
    
3 3 ξ1 0
For λ = −2; (11.1) gives = from which we have
5 5 ξ2 0

1

3ξ1 + 3ξ2 = 0
⇒ ξ1 = −ξ2 . Choosing ξ2 = −1 gives ξ1 = 1. Thus we have an
5ξ1 + 5ξ2 = 0 

MT

1
eigenvector ξ = so that one solution corresponding to λ1 = −2 is X1 = ξeλt =
  −1
1
e−2t . For λ = 6; we have equation (11.1)
−1      
−5 3 ν1 0 −5ν1 + 3ν2 = 0
giving = , from which we have ⇒ 5ν1 =
5 −3 ν2 0 5ν1 − 3ν2 = 0
3ν2 . Choosing ν1= 3,gives ν2 = 5. Thus, corresponding to the eigenvalue λ2 = 6 we have
3
eigenvector ν =

X2 = νeλ2 t =
 
3
5
5
-E
. And the second solution is

e6t . Then the general solution is

   
1 −2t 3
X = c1 e + c2 e6t (11.2)
−1 5
EE
   −2t 
1 −2t e
The two solutions X1 = e = −2t and
   6t  −1 −e
3 6t 3e
X2 = e = 6t are linearly independent; for the Wronskian
5 5e−2t
e 6t
3e = 5e4t + 3e4t = 8e4t 6= 0.
W (X1 (t), X2 (t)) =
−e−2t 5e6t
DC

Solution (11.2) is equivalent to x(t) = c1 e−2t + 3c2 e6t and y(t) = −c1 e−2t + 5c2 e6t .
dx

dt
= 2x + 3y
2. Solve the system of differential equations dy , subject
dt
= 2x + y
to x(0) = −4, y(0) = −1.
   
0 2 3 2
Solution: This system can be written as X = X; X(0) = . Then
2 1 −1
-

2−λ 3
|A − λI| = 0 gives = λ2 − 3λ − 4 = 0
2 1−λ
⇒ λ1 = −1 and λ2 = 4.
AK

    
3 3 ξ1 0
For λ1 = −1, we have = from which we have
 2 2 ξ2 0
3ξ1 + 3ξ2 = 0
⇒ ξ1 = −ξ2 . Choosing ξ2 = −1 gives ξ1 = 1. Thus the
2ξ1 + 2ξ2 = 0    
1 1
eigenvector is ξ = and the solution is X1 = e−t .
−1 −1

Dr. Joseph Ssebuliba - DCEE & Maths Dept page 62 of 76


Makerere University EMT 1201 - Engineering Mathematics II

1
     
−2 3 ν1 0 −2ν1 + 3ν2 = 0
For λ = 4, we have = . This gives ⇒
2 −3 ν2 0   2ν1 − 3ν2 = 0

20
3
2ν1 = 3ν2 . Choosing ν2 = 2 gives ν1 = 3 and we have ν = . Then the
  2
3
second solution is X2 = e4t and the general solution is X = c1 X1 + c2 X2 =
    2
1 3
c1 e−t + c2 e4t . Thus x(t) = c1 e−t + 3c2 e4t and y(t) = −c1 e−t + 2c2 e4t .
−1 2

1
The initial conditions x(0) = −4 ⇒ c1 + 3c2 = −4 and y(0) = −1
⇒ −c1 + 2c2 = −1. This gives c1 = −1, and c2 = −1. Thus, we have

MT
x(t) = −e−t − 3e4t and y(t) = e−t − 2e4t .
3. Find the general solution to the system
dx
= −4x + y + z
dt
dy
= x + 5y − z
dt
dz
dt
= y − 3z
-E

−4 1 1
Solution: The system in matrix form is X0 =  1 5 −1  X
0 1 −3


−4 − λ 1 1

Then |A−λI| = 0 gives 1 5−λ −1 = (λ + 3)(λ + 4)(λ − 5) = 0 and the
EE
0 1 −3 − λ
eigenvalues are λ1 = −3, λ2 = −4, λ3 = 5.
    
−1 1 1 ξ1 0
For λ1 = −3; we have  1 8 −1   ξ2  =  0  from which we get
 0 1 0 ξ3 0
DC

 
−ξ1 + ξ2 + ξ3 = 0  1
−ξ1 + 8ξ2 − ξ3 = 0 ⇒ ξ1 = ξ3 . Choosing ξ1 = 1 gives ξ3 = 1. Thus ξ =  0  and
ξ2 = 0 1

 
1
the first solution is X1 =  0  e−3t .
 1    
0 1 1 ν1 0
For λ2 = −4, we have  1 9 −1   ν2  =  0  . This gives
-

 0 1 1 ν3 0
ν2 + ν3 = 0 
ν1 + 9ν2 − ν3 = 0 ⇒ ν1 = 10ν3 and ν2 = −ν3 . Choosing ν3 = 1 gives ν2 = −1, ν1 =
AK

ν2 + ν3 =0

  
10 10
10 ⇒ ν =  −1  . Thus the second solution is X2 =  −1  e−4t .
1 1
      
−9 1 1 ρ1 0 1
For λ = 5, we have  1 0 −1   ρ2  =  0  . This yields ρ =  8  and the
0 1 −8 ρ3 0 1

Dr. Joseph Ssebuliba - DCEE & Maths Dept page 63 of 76


Makerere University EMT 1201 - Engineering Mathematics II

1

1
third solution is X3 =  8  e5t . Then the general solution

20
1      
1 10 1
−3t −4t
X = c1 X1 + c2 X2 + c3 X3 becomes X = c1 0 e + c2 −1 e + c3 8  e5t .
    
1 1 1

Exercise 11.1

1
Find the general solution for the system of differential equations

MT
dx dx dx
1. dt
= x + 2y 2. dt
= 2y 3. dt
= −4x + 2y
dy dy dy
= 4x + 3y
dt dt
= 8x = − 52 x + 2y
dt
   
10 −5 −6 2
4. X0 = X 5. X0 = X
8 −12 −3 1
dx dx
6. dt
=x+y−z 7. dt
= 2x − 7y
dy dy
dt
dz
dt

0
= 2y
=y−z

−1

1 0

dt
dz
dt


= 5y + 2z

1 0 1

-E
= 5x + 10y + 4z

8. X =  1 2 1 X 9. X0 =  0 1 0  X
0 3 −1  1 0 1 
−1 −1 0 −1 4 2
EE
10. X0 =  3 4
− 23 3  X 11. X0 =  4 −1 −2  X
1 1
8 4
− 12  0 0 6  
 1    1 1 4 1
0 3
12. X0 = 2 X, X(0) = 13. X 0
= 0 2 0 X, X(0) = 3 
1 − 12
  
5
1 1 1 0
DC

11.2 Case II: Complex conjugate eigenvalues


Consider the system of differential equations given by
dx
= 6x − y
dt
dy
= 5x + 4y
dt
-


6−λ 1
Then |A − λI| = 0 gives = λ2 − 10λ + 29 = 0 from which we find λ1 =
5 4−λ
AK

5 + 2i, λ2 = 5 − 2i
  
6 − (5 + 2i) −1 ξ1
For λ = 5 + 2i, we have =0
  5 4 − (5 + 2i) ξ2
1 − 2i −1 ξ1
⇒ = 0; from which we have
5 −1 − 2i ξ2

(1 − 2i)ξ1 − ξ2 = 0 (11.3)

Dr. Joseph Ssebuliba - DCEE & Maths Dept page 64 of 76


Makerere University EMT 1201 - Engineering Mathematics II

1
5ξ1 − (1 + 2i)ξ2 = 0 (11.4)

20
Equation (11.3) gives ξ2 = (1 − 2i)ξ1 and choosing ξ1 = 1, we get ξ2 = (1 − 2i) (note
thatequation (11.4) is simply (1 + 2i) times equation (11.3)). Then for λ1 = 5 +2i we have

1 1
ξ= . Similarly, for λ = 5−2i, we find that the other eigenvector is ν = .
1 − 2i 1 + 2i
Consequently the two linearly independent solutions are

1
   
1 (5+2i)t 1
X1 = e and X2 = e(5−2i)t
1 − 2i 1 + 2i

MT
And the general solution is
   
1 (5+2i)t 1
X = c1 e + c2 e(5−2i)t (11.5)
1 − 2i 1 + 2i

Clearly equation (11.5) is

Then it follows that


x(t) = c1 e(5+2i)t + c2 e(5−2i)t

-E
y(t) = c1 (1 − 2i)e(5+2i)t + c2 (1 + 2i)e(5−2i)t

x(t) = c1 e5t (cos 2t + i sin 2t) + c2 e5t (cos 2t − i sin 2t)


= e5t [(c1 + c2 ) cos 2t + (c1 − c2 )i sin 2t]
EE
and

y(t) = c1 (1 − 2i)e5t (cos 2t + i sin 2t) + c2 (1 + 2i)e5t (cos 2t − i sin 2t)


= e5t [(c1 + c2 ) − 2(c1 − c2 )i] cos 2t + e5t [2(c1 − c2 ) + (c1 − c2 )i sin 2t]


DC

x(t) = e5t (A cos 2t + B sin 2t)


y(t) = e5t (A − 2B) cos 2t + e5t (2A + B) sin 2t.

This in terms of vectors is


     
x cos 2t 5t sin 2t
X= =A e +B e5t
y cos 2t + 2 sin 2t − cos 2t + sin 2t
-

   
1 1
The entries in eigenvectors ξ = and ν = corresponding to λ1 = 5+2i
1 − 2i 1 + 2i
and λ2 = 5 − 2i are clearly complex conjugates of each other ( much as the eigenvalues are
AK

complex conjugates).
One eigenvector ξ corresponding to the eigenvalue λ1 is obtained if it is clear enough that the
second eigenvector ν is its complex conjugate.
Thus we have the following generalisation:

Dr. Joseph Ssebuliba - DCEE & Maths Dept page 65 of 76


Makerere University EMT 1201 - Engineering Mathematics II

1
Let ξ and ξ¯ be complex conjugate eigenvectors corresponding to the complex conjugate eigen-
values λ and λ̄, where λ = α + βi. Then

20
X1 = ξeλt = ξe(α+βi)t = ξeαt (cos βt + i sin βt)
¯ λ̄t = ξe
and X2 = ξe ¯ (α−β)t = ξe
¯ αt (cos βt − i sin βt)

This yields on addition and subtraction

1
1 λt ¯ λt ¯ 1 ¯ αt cos βt − 1 (−ξ + ξ)e
¯ αt sin βt
(ξe + ξe ) = (ξ + ξ)e
2 2 2
i ¯ λ̄t ) = i (−ξ + ξ)e
¯ αt cos βt + 1 (ξ + ξ)e
¯ αt sin βt
(−ξeλt + ξe

MT
2 2 2
For any complex number z = a + ib we note that 21 (z + z̄) = a and 2i (−z + z̄) = b are Real
numbers . Therefore the entries in the column vectors
1 ¯ and 1 (−ξ + ξ)
¯
(ξ + ξ)
2 2
are real numbers. By the assertion above, we write
1
B1 = (ξ + ξ)
2
And we have the following conclusion:
-E
¯ and B2 = i (−ξ + ξ)
2
¯ (11.6)

Let λ = α + βi be a complex eigenvalue of the coefficient matrix A in the homogeneous system


of differential equation and let B1 and B2 denote the columns defined in (11.6). Then
EE
X1 = (B1 cos βt − B2 sin βt)eαt
X2 = (B2 cos βt + B1 sin βt)eαt

are the two linearly independent solutions. The matrices


 B1 andB2 are
 clearly
  
1 1 0
B1 = Re(ξ) and B2 = Im(ξ). For example ξ = = + i has
i − 2i 1 −2
DC

   
1 0
B1 = Re(ξ) = and B2 = Im(ξ) = .
1 −2

Examples 11.2

Solve the system of differential equations


dx
= x + 2y
-

dt
dy 1
= − x+y
dt 2
AK


1−λ 2
Solution: |A − λI| = 1
= λ2 − 2λ + 2 = 0 ⇒ λ1 = 1 + i and
−2 1 − λ
  
¯ 1 − (1 + i) 2 ξ1
λ2 = λ1 = 1 − i. For λ1 = 1 + i, we have = 0; from which
      − 12 1 − (1+ i) ξ1
2 2 0 2
we get ξ = = + i. Then B1 = Re(ξ) = and
i 0 1 0

Dr. Joseph Ssebuliba - DCEE & Maths Dept page 66 of 76


Makerere University EMT 1201 - Engineering Mathematics II

1
 
0
B2 = Im(ξ) = . And the two linearly independent solutions are
1

20
   
2 0
X1 = (B1 cos βt − B2 sin βt)eαt = [ cos t − sin t]et and
  0   1
αt 0 2
X2 = (B2 cos βt + B1 sin βt)e = [ cos t + sin t]et . The general solution is then
    1   0  
2 0 0 2
X(t) = c1 [( cos t − sin t)et ] + c2 [( cos t + sin t)et ] which simplifies to
0 1 1 0

1
   
2 cos t t 2 sin t
X(t) = c1 e + c2 et .
− sin t cos t

MT
Exercise 11.2

Find the general solution to system of differential equations


dx dx dx
1. dt
= 6x − y 2. dt
=x+y 3. dt
= 5x + y
dy dy dy
dt
= 5x + 2y dt
= −2x − y dt
= −2x + 3y
dx dx dx
4. dt
= 4x + 5y 5. dt
= 4x − 5y 6. dt
= x − 8y

7.
dy
dt
dy
dt
dy
dt
dz
dt
= −2x + 6y
= −z
=z
=z
8.
dy
dt
dx
dt
dy
dt
dz
dt
= 5x − 4y
= 2x + y + 2z
= 3x + 6z
= −4x − 3z
-E 9.
dy
dt
dx
dt
dy
dt
dz
dt
= x − 3y
= x − y + 2z
= −x + y
= −x + z
dx dx dx
10. dt
= 4x + y 11. dt
= 2x + 5y + z 12. dt
= x − 12y − 14z
dy dy dy
dt
= 6y dt
= −5x − 6y + 4z dt
= x + 2y − 3z
EE
dz dz dz
dt
= −4x + 4z dt
= 2z dt
= x + y − 2z
dx dx
13. dt
= 2x + 4y + 4z 14. dt
= 6x − y; x(0) = −2
dy dy
dt
= −x − 2y dt
= 5x + 4y; y(0) = 8
dz
dt
= −x − 2z

Case III: Repeated eigenvalues


DC

Consider the system


dx
= 3x − 18y
dt
dy
= 2x − 9y
dt

3 − λ −18
Then |A − λI| = = (λ + 3)2 = 0 gives λ1 = λ2 = −3.
-

2 −9 − λ
 
3
For λ = −3 we find that ξ = , and so the solution corresponding to this is
1
AK

 
3
X1 = e−3t . But this gives only one solution and since we are interested in the general
1
solution we need to find the second linearly independent solution.
Suppose λ1 is an eigenvalue of multiplicity two and there is only one eigenvector associated
with this eigenvalue. A second solution can be found of the form
X2 = ξteλ1 t + νeλ1 t (11.7)

Dr. Joseph Ssebuliba - DCEE & Maths Dept page 67 of 76


Makerere University EMT 1201 - Engineering Mathematics II

1
   
ξ1 ν1
where ξ = and ν = . Then using (11.7) in the system X0 = AX gives (Aξ −
ξ2 ν2

20
λ1 ξ)teλ1 t + (Aν−λ1 ν − ξ)eλ1 t = 0. Since this equation is to hold for all values of t we have

(A − λ1 I)ξ = 0 (11.8)
and (A − λ1 I)ν = ξ (11.9)

Solving (11.8) gives one solution X1 = ξeλ1 t . To find the second solution X2 we simply solve

1
(11.9) for ν, for a known ξ.

MT
Examples 11.3
    
6 −18 ξ1 6ξ1 − 18ξ2 = 0 ξ1 − 3ξ2 = 0
= 0. This gives or .
2 −6 ξ2 2ξ1 − 6ξ2 = 0 − 3ξ
ξ1  2 = 0
3
The two give ξ1 = 3ξ2 . Choosing ξ2 = 1, gives ξ1 = 3. Thus ξ = and the first solution is
  1
3
X1 = e−3t . To find the second solution, we solve (A − λI)ν = ξ.
1

Thus

5 −18
2 −6

ν1
ν2
  

Choosing ν2 = 0 gives ν1 =
=
3
1
, gives
1
2
.
6ν1 − 18ν2 = 3
2ν1 − 6ν2 = 1
(This
 1 
2


-E
, ⇒ ν1 − 3ν2 = 21

choice is not unique. One could choose ν1 = 1 to

1  . And from X2 = ξteλt + νeλt we have the second


give ν2 = 6
.) Thus we have ν = 
0
1
 
EE
 
3 2
solution as X2 = te−3t +   e−3t Then the general solution X = c1 X1 + c2 X2 gives
1
0 
1

   
3 3 2
X = c1 e−3t + c2 [ te−3t +   e−3t ].
1 1
0
DC

If λ is of multiplicity three we have the three linearly independent solutions as


t2
X1 = ξeλt X2 = ξteλt + νeλt and X3 = ξ eλt + νteλt + ρeλt ,
2
   
ξ1 ν1
where upon substituting X3 into X0 = AX, the eigenvectors ξ =  ξ2  , ν =  ν2 and
  ξ3 ν3
ρ1
-

ρ =  ρ2  must satisfy
ρ3
AK

(A − λI)ξ = 0
(A − λI)ν = ξ
(A − λI)ρ = ν

Examples 11.4

Dr. Joseph Ssebuliba - DCEE & Maths Dept page 68 of 76


Makerere University EMT 1201 - Engineering Mathematics II

1
Solve the system of differential equations
 

20
2 1 6
X0 =  0 2 5  X
0 0 2

Solution: |A − λI| = 0 gives the characteristic equation (λ − 2)3 = 0. This leads to λ1 =


λ2 =λ3 =2, an eigenvalue of multiplicity 3.  Thenfor λ = 2, we have (A − λI)ξ = 0 giving

1
1 1
ξ=  0  so that the first solution is X1 =  0  e2t .
0 0

MT
λt λt
To
 find the second solution,
  we use X2= ξte  + νe (A− λI)ν
 , where  = ξgives
2−λ 1 6 ν1 1 0 1 6 ν1 1
 0 2−λ 5   ν2  =  0  or  0 0 5   ν2  =  0  . Thus we
0 0 2−λ ν3 0 0 0 0 ν3 0
have ν2 + 6ν3 = 1 and 5ν3 =0, from which we see that ν3 = 0 and ν2 = 1. And the choice
0
of ν1 = 0 gives ν2 =  1  . Thus the second solution X2 = ξteλt + νeλt is X2 =
0
 
1

0
 
0

0 
0 1 6

ρ1
-E
 0  te2t +  1  e2t . To find the third solution we use X3 = ξ t2 eλt + νteλt + ρeλt where
  
0
2!

(A − λI)ρ = ν. This gives  0 0 5   ρ2  =  1  from which we have ρ2 + 6ρ3 = 0


0 0 0 ρ3 0
0
 
EE
6
and 5ρ3 = 1. Thus ρ3 = 51 and ρ2 = − 56 . Then the choice of ρ1 = 0 gives  − 5  . Then the
1
5
0
     
1 0
2 2 6
third solution X3 = ξ t2! eλt + νteλt + ρeλt gives X3 =  0  t2 e2t +  1  te2t +  − 5  e2t .
0 0 1
5
DC

And the general solution X = c1 X1 + c2 X2 + c3 X3 becomes


0
           
1 1 0 1 0
2 6
X = c1  0  e2t + c2 [ 0  te2t +  1  e2t ] + c3 [ 0  t2 e2t +  1  te2t +  − 5 ].
0 0 0 0 0 1 2t
e
5
If λ is of multiplicity four then the four linearly independent solutions would be
X1 = ξeλt
X2 = ξteλt + νeλt
-

t2
X3 = ξ eλt + νteλt + ρeλt
2!
t3 t2
X4 = ξ eλt + ν eλt + ρteλt + γeλt
AK

3! 2
where ξ, ν, ρ and γ are obtained by solving, respectively, equations
(A − λI)ξ = 0
(A − λI)ν = ξ
(A − λI)ρ = ν
(A − λI)γ = ρ

Dr. Joseph Ssebuliba - DCEE & Maths Dept page 69 of 76


Makerere University EMT 1201 - Engineering Mathematics II

1
Exercise 11.3

20
Find the general solution of the given system.

dx dx dx
1. dt
= 3x − y 2. dt
= −6x + 5y 3. dt
= −x + 3y
dy dy dy
dt
= 9x − 3y dt
= −5x + 4y dt
= −3x + 5y
dx dx dx
4. = 12x − 9y 5. = 3x − y − z 6. = 3x + 2y + 4z

1
dt dt dt
dy dy dy
dt
= 4x =x+y−z
dt dt
= 2x + 2z
dz dz
=x−y−z = 4x + 2y + 3z

MT
dt dt
     
5 −4 0 1 0 0 1 0 0
0
7. X =  1 0 2  X 8. X0 =  0 3 1  X 9. X0 =  2 2 −1  X
0 2 5 0 −1 1 0 1 0
4 1 1
10. X0 =  0 4 1 X
0 0 4

11. X0 =

2 4
−1 6

X, X(0) =

−1
6


-E
Solve the given systems subject to the indicated initial conditions.
0 0 1
  
1
12. X0 =  0 1 0  X, X(0) =  2 
1 0 0 5

12 Nonhomogeneous system of differential equations


EE
A nonhomogeneous system of differential equations takes the form

X0 = AX + F(t); F(t) 6= 0.

The process of solving nonhomogeneous system of differential equations involves solving for the
complementary solution and the particular solution.
DC

The methods of undetermined coefficients and variation of parameters can both be adopted in
this case too.

12.1 Method of undetermined coefficients


We demonstrate this method with the following examples:
-

1. Solve the system


dx
= −x + 2y − 8
dt
AK

dy
= −x + y + 3
dt
   
−1 2 −8
Solution: This system in matrix form is X0 = X+ . We first solve the ho-
  −1 1 3
0 −1 2 −1 − λ 2
mogeneous system X = X. The determinant |A−λI| = 0 gives
=
−1 1 −1 1−λ

Dr. Joseph Ssebuliba - DCEE & Maths Dept page 70 of 76


Makerere University EMT 1201 - Engineering Mathematics II

1
λ2 + 1 =0, giving the complementary
  solution 
cos t + sin t cos t − sin t

20
Xc = c 1 + c2 .
cos t − sin t
   
−8 a1
Since F(t) = is a constant we assume a particular solution Xp = . This
 3 b1  
0 0
gives X0 p = which on substitution into the equation X0 = AX + F(t) gives =
0 0

1
    
−1 2 a1 −8
+ ⇒ 0 = −a1 + 2b1 − 8 and 0 = −a1 + b1 + 3. Solving the equations
−1 1 b1 3  
14

MT
simultaneously gives a1 = 14 and b1 = 11 and so Xp = . Thus X = Xc + Xp =
      11
cos t + sin t cos t − sin t 14
c1 + c2 + .
cos t − sin t 11

2. Solve the system


dx
= 6x + y + 6t
dt
dy
dt

Solution: This system in matrix form is X = 0



-E
= 4x + 3y − 10t + 4

6 1
4 3

X+

6t
−10t + 4

. We first solve the
 
0 6 1 6−λ 1
homogeneous system X = X. The determinant |A − λI| = = λ2 −
4 3 4 3 −λ
EE
1
9λ + 14 = 0 gives λ1 = 2 and λ2 = 7. The respective eigenvectors are ξ = for λ1 = 2
  −4  
1 1
and ν = , forλ2 = 7. Consequently the complementary solution is Xc = c1 e2t +
  1 −4
1
c2 e7t .
1
DC

     
6t 6t 0
To solve for the particular solution, F(t) = = + . So we
  −10t + 4 −10t 4
a1 t + a2 a1
assume Xp = . This leads to X0 p = which when used in the system gives
   b1t+b2    b1
a1 6 1 a1 t + a2 6t
= + . After multiplying out and collecting terms
b1 4 3 b t
1  2+ b −10t +4 
a1 (6a1 + b1 + 6)t + (6a2 + b2 )
together we get = . Equating coefficients we
b1  (4a1 + 3b1 − 10)t + (4a2 + 3b 2 + 4)
-

6a1 + b1 + 6 = 0 6a2 + b2 − a1 =0
have and .
4a1 + 3b1 − 10 = 0 4a2 + 3b2 − b1 + 4 = 0
AK

Solving the first two equations simultaneously gives a1 = −2 and b1 = 6. And using these
values into the second set of equations and solving for a1 and b1 gives a2 = − 74 and b2 = 10
7
.
4 4
    
−2t − 7 −2 −7
Then we have Xp = 10 = t+ 10 . Thus, the general solution is
 6t
 + 7   6   7  4 
1 1 −2 −7
X = Xc + Xp = c 1 e2t + c2 e7t + t+ 10 .
−4 1 6 7

Dr. Joseph Ssebuliba - DCEE & Maths Dept page 71 of 76


Makerere University EMT 1201 - Engineering Mathematics II

1
3. Determine the form of the particular solution vector Xp for the system

20
dx
= 5x + 3y − 2e−t + 1
dt
dy
= −x + y + e−t − 5t + 7
dt
Solution:
 The system
 in matrix
 form
 is   
5 3 −2 0 1
X0 = X+ e−t + t+ . Clearly for homogeneous part, |A−λI| =

1
−1 1   1  −5  7
1 2t 3
0 yields Xc = c1 e + c2 e4t .
−1 −1

MT
     
−2 −t 0 1
Since F(t) = e + t+ we assume a particular solution
  1   −5
  7
a1 −t a2 a3
Xp = e + t+
b1 b2 b3
Remarks:
   
−2t2 + e2t a1 t2 + a2 t + a3 + a4 e2t
1. If F(t) = we would assume Xp =
10t + e−t

-E b1 t + b2 + b3 e−t
2. The method of undetermined coefficients is not as simple as the last examples may seem
to suggest. As in the case of solving nonhomogeneous differential equations that are
not systems, the method can only be applied when the entries in the matrix F(t) are
constants, polynomials, exponentials, sines and cosines ; or finite sums and products of
these functions. The assumption for Xp is actually predicted on a prior knowledge of the
complementary solution Xc . For example if F(t) is a constant vector and λ = 0 is an
EE
eigenvalue, in which case
 Xc 
contains
 a constant
 vector, then Xp cannot be a constant
a2 a1
vector but rather Xp = t+ .
b2 b1
−t
Similarly if we
 −t
 have λ = −1 then  Xc wouldcontain
 a vector term with e , say F(t) =
10t + e 1 0
2 2t , where Xc = e−t + e−4t instead of
2t + te 1 1
DC

a1 + a2 t + a3 e−t
 
Xp = (the difference being on the term with e−t ) then
b1 + b2 + b3 t2 + (b4 + b5 t)e2t
requires multiplication through the first row by t.
The arithmetic and algebraic manipulation go on becoming complicated with the method
of undetermined coefficients. Rather than persue these difficulties we turn our attention
to the method of variation of parameters

Exercise 12.1
-

In numbers 1-8 use the method of undetermined coefficients to solve the given systems
dx dx dx
1. = 2x + 3y − 7 2. = 5x + 9y + 2 3. = x + 3y − 2t2
AK

dt dt dt
dy dy dy
dt
= −x − 2y + 5 = −x + 11y + 6
dt
= x − 4y + 4t + 9e6t
dt
1
       
0 4 3
−3 t 0 −1 5 sin t
4. X = X+ e 5. X = X+
9 6  10
   −1 1  −2 cos 
 t
1 1 1 1 0 0 5 5
6. X0 =  0 2 3 X +  −1  e−4t 7. X0 =  0 5 0  X +  −10 
0 0 5 2 5 0 0 40

Dr. Joseph Ssebuliba - DCEE & Maths Dept page 72 of 76


Makerere University EMT 1201 - Engineering Mathematics II

1
     
0 −1 −2 3 −4
8. Solve X = X+ subject to X(0) =
3 4 3 5

20
     
0 1 −1 3t 2
9. Solve the system X = X+ subject to X(0) =
3 4 3te−2t −1

12.2 Method of variation of parameters

1
Consider the system whose general solution is
   
1 2t 3
X = c1 e + c2 e3t (12.1)

MT
−3 2
Then this solution can be written as
x(t) = c1 e2t + 3c2 e3t
y(t) = −3c1 e2t + 2c2 e3t
which in turn is equivalent to
    
x e2t 3e3t c1


y
=


-E
−3e2t 2e3t c2
System (12.2) can be written as X = φ(t)C and this is a solution to X0 = AX. And indeed
φ0 (t) = Aφ(t)
(12.2)

(12.3)
e2t 3e3t
The function φ(t) = that is essentially made of the column vectors of the
−3e2t 2e3t    
1 3
EE
linearly independent solutions X1 = e2t and X2 = e3t is called a fundamental
−3 2
matrix solution of the system and C is a column of arbitrary constants.
Suppose the constant C is replaced by a matrix of functions U (t) so that
Xp = φ(t)U (t) (12.4)
is a particular solution of the nonhomogeneous system
DC

X0 = AX + F(t) (12.5)

Then X0 p = φ(t)U 0 (t) + φ0 (t)U (t) (12.6)


Then (12.4) and (12.6) into (12.5) gives
φ(t)U 0 (t) + φ0 (t)U (t) = Aφ(t)U (t) + F(t) (12.7)
Since from (12.3) φ0 (t) = Aφ(t), then equation ( 12.7) is
-

φ(t)U 0 (t) + Aφ(t)U (t) = Aφ(t)U (t) + F(t). This simplifies to


φ(t)U 0 (t) = F(t) (12.8)
AK

−1 0 −1
Multiplying
R −1both sides of (12.8) by φ (t) gives U (t) = φ (t)F(t) so that
U (t) = φ (t)F(t)dt. Hence the assumed particular solution Xp = φ(t)U (t) becomes
Z
Xp = φ(t) φ−1 (t)F(t)dt (12.9)

The indefinite integral of the column matrix φ−1 (t)F(t) in (12.9) is evaluated by integrating
each entry. Thus the general solution X = Xc + Xp is X = φ(t)C + φ(t) φ−1 (t)F(t)dt.
R

Dr. Joseph Ssebuliba - DCEE & Maths Dept page 73 of 76


Makerere University EMT 1201 - Engineering Mathematics II

1
Examples 12.1

20
   
−3 1 3t
Find the general solution to the system X0 = X+ .
2 −4 e−t
 
−3 1
Solution: We first solve the homogeneous system X0 = X and
2 −4
−3 − λ 1
|A − λI| = = (λ + 2)(λ + 5) = 0 ⇒ λ1 = −2 and λ2 = −5. Clearly the
−4 − λ

1
2    
1 1
corresponding eigenvectors to λ1 and λ2 are ξ = and . And the solution vectors
1 −2

MT
   
1 1
are X1 = e−2t and X2 = e−5t . Then the fundamental matrix solution φ(t) is
1  −2
e−2t e−5t
  2 2t 1 2t 
−1 e e
given by φ(t) = ⇒ φ (t) = 3 3 .
e−2t −2e−5t 1 5t
3
e − 1 5t
3
e
 
3t
Now with F(t) = we have
e−t
Z
Xp = φ(t) φ−1 (t)F(t)dt

=
 −2t
e e−5t
e−2t −2e−5t
 −2t
e e−5t
Z 
-E
 Z  2 2t 1 2t  
3
e
1 5t
3
3
e − 13 e5t
2te2t
e

1 t
3
e

3t
e−t

dt

= dt
e−2t −2e−5t te5t − 13 e4t
 −2t
e−5t te2t − 12 e2t + 13 et
 
e
=
EE
e−2t −2e−5t 1 5t
5
te − 25 1 5t
e − 12 1 4t
e
+ 14 e−t
 6
t − 27

= 5 50
3
5
t − 50 + 12 e−t
21

     6   27   1 
1 −2t 1 −5t
Hence X = Xc + Xp = c1 e + c2 e + 53 t − 50 21 + 41 e−t .
1 −2 5 50 2
DC

If the solution of the system of differential equations is sought on an interval then the general
solution is Z t
X = φ(t)C + φ(t) φ−1 (s)F(s)ds (12.10)
t0
where t0 and t are points in the interval.
If the system is solved subject to an initial condition X(t0 ) = X0 then substituting t = t0
into (12.10) yields X0 = φ(t0 )C from which we have C = φ−1 (t0 )X0 and the solution to the
-

initial-value problem is
Z t
−1
X = φ(t)φ (t0 )X0 + φ(t) φ−1 (s)F(s)ds. (12.11)
AK

t0
   
0 3 −1 1
For example, given the system X = X, subject to X(0) = . The funda-
−1 3   1
e2t e4t
mental matrix for the homogeneous part is φ(t) = .
 1 e2t −e4t
1
 
1 1
For t0 = 0; φ(t0 ) = ⇒ φ−1 (t0 ) = 2
1
2 . And
1 −1 2
− 12

Dr. Joseph Ssebuliba - DCEE & Maths Dept page 74 of 76


Makerere University EMT 1201 - Engineering Mathematics II

1
    2t 
−1 e2t
1 e4t 1 1 1 e + e4t e2t − e4t
φ(t)φ (t0 ) = =
e2t −e4t  1 −1  2 e2t − e4t  e2t + e4t
2

20
2e2t e2t 4e2t
⇒ φ(t)φ−1 (t0 )X0 = 21 2t = 2t . Since F(t) = , we have
 1 −2s 2e1 −2s   e 2s   4e4t
e e 4e 2 + 2e2s
φ−1 (s)F(s) = 2
1 −4s
2 =
2
e − 1 e−4s 4e4s 2e−2s − 2
 R2 t   
R t −1 (2 + 2e2s )ds 2t + e2t − 1
⇒ t0 φ (s)F(s)ds = R t −2s 0 = . And
−e−2t − 2t + 1

1
0
 2t (2e − 2)ds
   
R t −1 e e4t 2t + e2t − 1 2(t − 1)(e2t − e4t )
φ(t) 0 φ (s)F(s)ds = = .
22t −e4t −2e−2t − 2t + 1 2t(e2t + e4t )

MT
Thus, the solution is given by
Z t
−1
X(t) = φ(t)φ (t0 )X0 + φ(t) φ−1 (s)F(s)ds
t0
 2t   
e 2(t − 1)(e2t − e4t )
= +
e2t 2t(e2t + e4t )

Exercise 12.2 -E
In the problems 1-16 use variation of parameters to solve the given system
dx dx
1. dt
= 3x − 3y + 4 2. dt
= 2x − y
dy dy
= 2x − 2y − 1
dt dt
= 3x − 2y + 4t
EE
       
0 3 −5 1 t
0 2 −1 sin 2t
3. X = 3 X+ e2 4. X = X+ e2t
 4 −1  −1 −t   4 2  2
 cos 2t
3 2 2e 3 2 1
5. X0 = X+ −t
0
6. X = X+
 −2 −1   e   −2 −1   1
0 −1 sec t 1 −1 3
7. X0 = X+ 8. X0 = X+
1 0  0  1 1 3 
DC

   
1 −1 cos t 2 −2 1 e−2t
9. X0 = X+ et 10. X0 = X+
1 −1  sin t   6 −6   3
t

0 0 1 0 0 0 1 1
11. X = X+ 12. X = X+
 −1 0   sec t tan t  −1 0   cot t 
1 2 csc t 1 −2 tan t
13. X0 = 1 X+ et 14. X0 = X+
 2 − 1  sec
 t  t  1 −1  1 
1 1 0 e 3 −1 −1 0
15. X0 =  1 1 0  X +  e2t  16. X0 =  1 1 −1  X +  t 
-

0 0 3 te3t 1 −1 1 2et
In problems 17 and 18 use equation (12.11) to solve the given system subject to the indicated
AK

initial condition
     
0 −2 2 5 sin 2t 2
17. X = X+ , X(0) =
 2 −5  0   −1
1 −1 1/t 2
18. X0 = X+ , X(1) =
1 −1 1/t −1

Dr. Joseph Ssebuliba - DCEE & Maths Dept page 75 of 76


Makerere University EMT 1201 - Engineering Mathematics II

1
REFERENCES FOR FURTHER READING

20
1. John Bird (2014), Understanding Engineering Mathematics. Routledge, Taylor & Francis
Group.

2. Stroud K. A. (2005), Engineering Mathematics. 5th Edition, Palgrave Macmillan. ,

3. Thomas M. Creese and Robert M. Haralick, (1978). Differential Equations for Engineers,

1
McGraw-Hill.

4. Boyce W.E. and Diprima, R.C. (1986) Elementary Differential Equations and Bound-

MT
ary value problems. 4th Edition. Jojn Wiley and sons New York, Chichester, Busbane,
Toronto, Singapore.

5. Derrick W.R. and Grossman, S.I (1976). Elemerntary Differential Equations with Appli-
cations Addison-Wesley Publishing company; Reading, Massachusetts London, Ontario,
Sydney.

6. Shepley L. Ross (1966), Introduction to Ordinary Differential Equations. Blaisdell Pub-


lishing Company.
-E
7. Erwin Kreyszig (2006), Advanced Engineering Mathematics. 8th Edition, John Wiley and
Sons Ltd.

8. Finizio N. and Ladas G. (1978), Ordinary Differential Equations with Modern applica-
tions. Wadsworth publishing company, inc. Belmont,Calfonia.
EE
9. Matthey R.M.M. and Molewaar J. (1996), Ordinary Differential Equations in Theory and
Practice. John Wiley and Sons Ltd.

10. Murray R. Spiegel (1981), Applied Differential Equations. 3rd Edition, Prentice-Hall.

11. Nagle R.K. and Saff E.B. (1989), Fundamentals of Differential Equations. 2nd Edition.
The Benjamin/cummings publishing company, Inc. Redwood city, Calfonia.
DC

12. Rabenstein A.L. (1972), Introduction to Ordinary Differential Equations. 2nd Edition,
Academic press. Newyork, San Francisco London.

13. David A. Sanchez, Richard C. Allen and Walter T. Kyner (1988), Differential Equations.
2nd Edition, Addison-Welsey publishing company.
-
AK

Dr. Joseph Ssebuliba - DCEE & Maths Dept page 76 of 76

You might also like