You are on page 1of 67

Stephen MBOYA

Ordinary Differential equation


Introduction to Ordinary Differential Equations

July 9, 2021

Faculty of Economics, University of Nairobi


Contents

1 Introduction and Definitions 1


1.1 Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.2 Formation of Ordinary Differential Equations . . . . . . . . . . . . . . . . . . . . . . 3
1.2.1 Elimination of arbitrary constants . . . . . . . . . . . . . . . . . . . . . . . . 3
1.3 Family of curves . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

2 First Order Differential Equations 8


2.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
2.2 Method of Solutions and Application . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.2.1 Method of Separation of Variables . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.3 Homogeneous Equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
2.4 Equation with Homogeneous Coefficients . . . . . . . . . . . . . . . . . . . . . . . . . 13
2.5 Equations Reducible to Homogeneous Form . . . . . . . . . . . . . . . . . . . . . . . 15
2.6 Exact Differential Equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18

3 Linear Equations of order one 23


3.1 Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
3.1.1 Compound interest . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
3.1.2 Chemical reactions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
3.1.3 Terminal velocity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
3.1.4 The logistic equation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30

4 Linear differential equations with constant coefficients 32


4.1 Basic Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
4.2 Linear Differential Equations with Constant Coefficients . . . . . . . . . . . . . . . . 35
4.2.1 Homogeneous Equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
4.3 Non Homogeneous Linear Differential Equations with Constant Coefficients . . . . . . 42
Course outline
1. First order equation
(a) Methods of solutions and applications
2. Linear Differential equations
(a) Homogeneous Equations and Non- homogeneous Equations
3. Methods of solutions of Linear differential equations with constant co-
efficients
(a) Method of undetermined coefficients
(b) Methods of Variation of parameters
4. The method of solutions for equations with constant and variable coef-
ficients, uniqueness of solutions
5. The power series solutions of linear differential equations of linear ordi-
nary points.
Chapter 1

Introduction and Definitions

The construction of mathematical models to approximate real world prob-


lem has been one of the most important aspect of the theoretical develop-
ment of each branch of science
It is often the case that those mathematical models involves an equation in
which a function and its derivatives plays important roles. Such equation
are called differential equations.

1.1 Definitions

The following are examples of differential equations.


1. dy
dx = cos x
d2 y
2. dx2
+ k2y = 0
3. y 0 + xy = 3 ( where y 0 = y 0(x) = dx )
dy

4. y 00 + 5y 0 + 6y = cos x
5. (x2 + y 2)dx − 2xydy = 0
6. y00 = (1 + y 0)(x2 + y 2)
2
7. dy
dt = h2( dx
d y
2)

Ld2 i
8. dt2
+ R dt
di
+ Ci = cos ωt

Remark.1
1. When an equation involves one or more derivatives with respect to
a particular variable, then that variable is called an independent
variable.
2. A variable is called dependent variable if a derivative of that variable
occurs
3. In example (1 − 4) and 6 the variable y is called dependent variable
while x the independent variable.
4. In example 8, i is the dependent variable and t is the independent
variable and L, R, C and ω are called parameters.
5. Equation 7 which has one dependent variable and 3 independent
variables x, y, t is called a partial differential equation.

Definition 1.1.1: Order


The order of a differential equation is the order of the highest ordered
derivative present in the equation.

Example 1.1.1
3
d2y dy
 

2
+ 2  + y = 0 (1.1)
dx dx
Is an equation of order two. It is also called a second order equation.

In general, the equation

F (x, y, y 0, . . . , y (n)) = 0 (1.2)

is called an nth order differential equation. Under suitable condition equa-


tion 1.2 may be solved for y (n) in terms of x, y, y 0 . . . , y (n−1) to obtain

y (n) = F (x, y, y 0, . . . , y (n−1)) (1.3)


dn y
where y (x) = dxn

Definition 1.1.2: Solution


A function φ(x) or y(x) defined on the interval a < x < b, is called
solution of the equation 1.3 if the derivative of φ exist on a < x < b
and
φ(n)(x) = F (x, φ(x), φ0(x), . . . φ(n−1)(x)
for any x ∈ (a, b)
Example 1.1.2
Consider the differential equation
y 00(x) + y(x) = 0 (1.4)
We claim that φ(x) = cos x is a solution over the interval (−∞, +∞).
In fact, putting φ(x) in 1.4. Given
φ(x) = cos x
φ0(x) = − sin x
φ00(x) = − cos x
Therefore y 00(x) + y(x) = − cos x + cos x = 0

Example 1.1.3
Let us verify that
y = e2x
is a solution of the equation
d2y dy
+ − 6y = 0 (1.5)
dx2 dx
We substitute our tentative solution into the left member of equation
(1.5) and find that
d2y dy
+ − 6y = 4e 2x
+ 2e 2x
− 6e 2x
≡0
dx2 dx
which completes the desired verification. All of the equations we shall
consider in Chapter 2 are of order one, and hence may be written
dy
= f (x, y)
dx

Definition 1.1.3: Linearity


Avery important concept in the study of differential equations is that
of linearity. An ordinary differential equation of order n is called linear
if it may be written in the form
dny dn−1y dy
b0(x) n + b1(x) n−1 + · · · + bn−1(x) + bn(x)y = R(x) (1.6)
dx dx dx

Example 1.1.4
For example, equation (1.1) above is nonlinear, and equation (1.5) is
linear. The equation
x y + xy + x − n y = 4x3
 
2 00 0 2 2

is also linear The notion of linearity may be extended to partial differ-


ential equations.

Example 1.1.5
For example, the equation
∂w ∂w
b0(x, y) + b1(x, y) = R(x, y)
∂x ∂y
is the general first-order linear partial differential equation with two
independent variables and
∂ 2w ∂ 2w ∂ 2w
b0(x, y) 2 + b1(x, y) + b2(x, y) 2
∂x ∂x∂y ∂y
∂w ∂w
+b3(x, y) + b4(x, y) + b5(x, y)w = R(x, y)
∂x ∂y
is the general second-order linear partial differential equation with two
independent variables.

Exercise 1.1.1
For each of the following, state whether the equation is ordinary or
partial, linear or nonlinear, and give its order.
2 2 2
1. ddt2x + k 2x = 0. 2. ∂∂tw2 = a2 ∂∂xw2
3. (x2 + y 2) dx + 2xydy = 0. 4. y 0 + P (x)y = Q(x)
5. y 000 − 3y 0 + 2y = 0. 6. yy 00 = x
2 2 2 d4 y
7. ∂∂xu2 + ∂∂yu2 + ∂∂zu2 = 0. 8. dx 4 = w(x).
2 2
9. x ddt2y − y ddt2x = c1 10. L dt
di
+ Ri = E
11.(x + y)dx + (3x2 − 1) dy = 0. 12. x (y 0)3 + (y 4 − y = 0)

1.2 Formation of Ordinary Differential Equations

1.2.1 Elimination of arbitrary constants

In practice, differential equations arise in many ways, some of which we


shall encounter later. There is one way of arriving at a differential equation,
however, that is useful in that it gives us a feeling for the kinds of solutions
to be expected. In this section we shall start with a relation involving
arbitrary constants and, by elimination of those arbitrary constants, come
to a differential equation consistent with the original relation. In a sense we
start with the answer and find the problem.
Methods for the elimination of arbitrary constants vary with the way in
which the constants enter the given relation. A method that is efficient for
one problem may be poor for another. One fact persists throughout. Be-
cause each differentiation yields a new relation, the number of derivatives
that need be used is the same as the number of arbitrary constants to be
eliminated. We shall in each case determine the differential equation that is
1. Of order equal to the number of arbitrary constants in the given relation.
2. Consistent with that relation.
3. Free from arbitrary constants.

Example 1.2.1
Eliminate the arbitrary constants c1 and c2 from the relation
y = c1e−2x + c2e3x (1.7)
Since two constants are to be eliminated, obtain the two derivatives,
y 0 = −2c1e−2x + 3c2e3x (1.8)
y 00 = 4c1e−2x + 9c2e3x (1.9)
The elimination of c1 from equations (1.8) and (1.9) yields
y 00 + 2y 0 = 15c2e3x (1.10)
the elimination of c2 from equations (1.8) and (1.9) yields
y 0 + 2y = 5c2e3x
Hence
y 00 + 2y 0 = 3 (y 0 + 2y)
or
y 00 − y 0 − 6y = 0

Another method for obtaining the differential equation in this example


proceeds as follows: We know from a theorem in elementary algebra that
the three equations (1.7), (1.8), and (1.9), considered as equations in the
two unknowns c1 and c2, can have solutions only if

−y e−2x e3x



−y 0 −2e−2x 3e3x = 0




−y 00 4e−2x 9e3x


Since e−2x and e3x cannot be zero, equation (1.10) may be rewritten, with
the factors −1, e−2x, and e3x removed, as *
By differentiations and pertinent legitimate mathematical procedures.
Elimination by erasure, for instance, is not permitted.

y 1 1




y 0 −2 3 = 0




y 00 4 9


from which the differential equation


y 00 − y 0 − 6y = 0
follows immediately. This latter method has the advantage of making it easy
to see that the elimination of the constants c1, c2, . . . , cn from a relation of
the form
y = c1em1x + c2em2x + · · · + cnemnx
will always lead to a linear differential equation

dny dn−1y dy
a0 n + a1 n−1 + · · · + an−1 + any = 0
dx dx dx
in which the coefficients a0, a1, . . . , an are constants. The study of such
differential equations will receive much of our attention.

Example 1.2.2
Eliminate the constant a from the equation
(x − a)2 + y 2 = a2
Direct differentiation of the relation yields
2(x − a) + 2yy 0 = 0
from which
a = x + yy 0
Therefore, using the original equation, we find that
2 2
(yy 0) + y 2 = (x + yy 0)
or
y 2 = x2 + 2xyy 0
which may be written in the form
x − y dx + 2xydy = 0
 
2 2

Another method will be used in this example as an illustration of a device


that is often helpful. The method is based upon the isolation of an arbitrary
constant.
The equation
(x − a)2 + y 2 = a2 (1.11)
may be put in the form
x2 + y 2 − 2ax = 0
OI
x2 + y 2
= 2a
x
Then differentiation of both members leads to
x(2xdx + 2ydy) − (x2 + y 2) dx
=0
x2
or
x − y dx + 2xydy = 0
 
2 2

as desired. It is interesting to speculate here about the significance of x = 0


upon the argument just used. The student should draw a few of the members
of this family of circles and observe what is peculiar about their behavior at
x = 0.

Example 1.2.3
Eliminate B and α from the relation
x = B cos(ωt + α) (1.12)
in which ω is a parameter (not to be eliminated). First we obtain two
derivatives of x with respect to t :
dx
= −ωB sin(ωt + α) (1.13)
dt
d2x
= −ω 2
B cos(ωt + α). (1.14)
dt2
Comparison of equations (1.12) and (1.14) shows at once that
d2x
+ ω 2
x=0
dt2

Example 1.2.4
Eliminate c from the equation
cxy + c2x + 4 = 0
At once we get
c (y + xy 0) + c2 = 0
Since c 6= 0, c = −(y + xy) and substitution into the original equation
leads us to the result
2
x3 (y 0) + x2yy 0 + 4 = 0
Our examples suggest that in a certain sense the totality of solutions of
an nth-order equation depends on n arbitrary constants.
Practice Problem 1.2.1
In each of the following eliminate the arbitrary constants.

Questtion Amswer
x sin y + x2y = c. (sin y + 2xy)dx + (x cos y + x2) dy = 0
3x2 − xy 2 = c (6x − y 2) dx − 2xydy = 0
xy 2 − 1 = cy y 3dx + (xy 2 + 1) dy = 0.
cx2 + x + y 2 = 0 (x + 2y 2) dx − 2xydy = 0.
x = A sin(ωt + β);
d2 x
ω a parameter, not to be eliminated. dt2
+ ω 2x = 0.
x = c1 cos α + c2 sin ut;
d2 x
ω a paramete dt2
+ ω2x = 0
y = cx + c2 + 1 .y = xy 0 + (y 2 + 1
y = mx + mh ;
h a parameter , m to be eliminated. y = xy 0 + yh0
y 2 = 4ax. 2xdy − ydx = 0.
y = c1 + c2e3x y 0 − 3y 0 = 0
y = 4 + c1 e x y 0 − 3y = −12.
y = c1 + c2e−4x y 00 + 4y 0 = 0
y = c1ex + c2e−x, y2 − y − 0

1.3 Family of curves

An equation involving a parameter, as well as one or both of the coordi-


nates of a point in a plane, may represent a family of curves, one curve
corresponding to each value of the parameter.
For instance, the equation
(x − c)2 + (y − c)2 = 2c2 (1.15)
or
x2 + y 2 − 2c(x + y) = 0 (1.16)
may be interpreted as the equation of a family of circles, each having its
center on the line y = x and each passing through the origin. Figure 1
shows several elements, or members, of this family.
If the constant c in equation (1.15) or in equation (1.16) is treated as an
arbitrary constant and eliminated as in the preceding section, the result is
called the differential equation of the family represented by equation (1.15).
In this example, the elimination of c is easily performed by isolating c, then
differentiating throughout the equation with respect to x. Thus, from
x2 + y 2
= 2c (1.17)
x+y
we find that

(x + y)(2xdx + 2ydy) − (x2 + y 2) (dx + dy)


= 0.
(x + y)2
Therefore
x + 2xy − y dx − x − 2xy − y dy = 0 (1.18)
   
2 2 2 2

is the differential equation of the family of circles represented by equation


(1.15).
Note that equation (1.18) associates a definite slope with each point (x, y)
in the plane
dy x2 + 2xy − y 2
= (1.19)
dx x2 − 2xy − y 2
except where the denominator on the right in equation (4) vanishes. When
the denominator vanishes, the curve passing through that point must have
a vertical tangent. From
x2 − 2xy − y 2 = 0
we see that √
y = (−1 + 2)x
or √
y = (−1 − 2)x
Example 1.3.1
Obtain a differential equation of the family of a plane curve described
by:
1. straight line through the origin
2. Straight line with slope and y-intercept equal.
Solution
(1). The equation of a line is given by y = mx + c, where m is the
slope and c is the y-intercept.
In our case c = 0 and dxdy
= m = y0
Therefore, y = y 0x =⇒ y = x dx dy
=⇒ x dxdy
−y = 0 or y 0 − x1 y = 0
(2.) y = mx + c for m = c, we will have that;
y = mx + m =⇒ y = m(x + 1)
Therefore, dx
dy
= m = y0
The resulting differential equation is: y = (x + 1) dx
dy
or ydx = (x =
1)dy = 0
Chapter 2

First Order Differential Equations

2.1 Introduction

First order equation are of the form


dy
F (x, y, )=0 (2.1)
dx
where f is the given function of the three argument x, y and dy
dx
Equation 2.1 may be written in several ways:
dy
= f (x, y) (2.2)
dx
or
M (x, y)dx + N (x, y)dy = 0 (2.3)
Theorem 2.1.1 (Existence and Uniqueness). Any method for solving
a differential equation makes the assumption that, the solution to the
given equation exact and thus it is unique
Proof. Consider the equation of order one
dy
= f (x, y) (2.4)
dx
We assume that 2.4 represent the motion of a particle whose velocity at
time x is given by f (x, y) where y is the position of the particle at time x.
Since we imagine that we are observing the motion of the particle, it is clear
that if we know its position, yo at the time xo, if the

y(xo) = yo or y x=x = yo (2.5)



0

Then we should be able to find its position at a later time x. Starting at


the time xo the particle will move in a unique path.
That is equation 2.4 has a solution that satisfies the condition 2.5 and
moreover, it has only one solution i.e. the motion we are observing.
Definition 2.1.1: I.V.P
The condition 2.5 is called an initial condition and equation 2.4 together
with intial condition 2.5 is called an initial value problem (I.V.P)

In equation 2.4 yo is the initial of the particle at position stated, at initial


time xo

Theorem 2.1.2 (Existence and Uniqueness). Consider the I.V.P. dx dy


=
f (x, y) with y(xo) = yo. Assume that the function f and dx
dy
are contin-
uous in some rectangle


 |x − xo| < a
R = {(x, y) : 

}
  |y − yo| < b

with the point (xo, yo) at its centre. Then there is a positive number
h ≤ a, such that, the initial value problem (I.V.P) has one and only
one solution in the interval |x − xo| < h

2.2 Method of Solutions and Application

2.2.1 Method of Separation of Variables

We now consider one of the methods for solving first order differential equa-
tion.

Definition 2.2.1: Separability


The first order equation
dy
= f (x, y) (2.6)
dx
is said to have the variable x and y separable if f can be written as
M (x)
f (x, y) = (2.7)
N (y)
where M and N are function of simple variables x and y respectively.
In this case we can write the first equation as;
dy M (x)
= or N (y)dy = M (x)dx (2.8)
dx N (y)
Thus if two variables x and y are separable, then it should be possible
to place them together with their respective differential on opposite sides of
the equality sign.

Example 2.2.1

Solve the differential equation dy


dx = 2y
x for x > 0, y > 0

Solution
We separate the variable to obtain,
dy 2
= dx
y x
Integrating each term, we get;
dy Z 2
= dx =⇒ ln |y| = 2 ln|x| + c
Z

y x
or
y = ecx2 (since |x| = x) (2.9)
If x is in the first quadrant.
Or
y = c1 x2
where c1 = ec is any positive constant.

Example 2.2.2
Solve the differential equation
xdx − (5y 4 + 3)dy = 0

Solution

xdx = (5y 4 + 3)dy


and clearly he variable and their differentials are separable.
xdx = (5y 4 + 3)dy
Z Z

1 2
x =y 5 + 3y + c
2
This is the required general solution
Exercise 2.2.1
Solve the Initial Value Problem of:
2x(y + 1)dx − ydy = 0, y(0) = −2 (2.10)

Solution

2x(y + 1)dx − ydy = 0


2x(y + 1)dx = ydy
y
2xdx = dy
y+1
y
2xdx =
Z Z
dy
y+1
x2 = y − ln |y + 1| + c
We now look fo the particular solution satisfying the boundary condi-
tions
When x = 0, y = −2
x2 =y − ln |(y + 1)| + c
0 = − 2 − ln |(−2 + 1)| + c
= − 2 − ln | − 1| + c
0 = −2 + c =⇒ c = 2
Hence x2 = y −ln |y +1|+2 is the particular solution for the differential
equation.

Exercise 2.2.2
Find the general solution of each of the following differential equations.
1. y dx
dy
= sin x Soln: y 2 = −2 cos x + c
2. 1 dy
x dx = 1
y 2 −2
Soln: 3x2 = 2y 3 − 12y + c

3. sin y dx
dy
= 1
x Soln: cos y = c − ln |x|
4. cos y dx
dy
=4 Soln: sin y = 4x + c
y 2 dy
5. x3 dx
= ln x Soln. 16y 3 = 12x4 ln |x| − 3x4 + 48c
Practice Problem 2.2.1
Examples of Word problems

1. Curve
A curve passes through the points (1, 2) and ( 15 , −10) and if the
gradient is inversely propositional to x2, find the equation of the
curve.
Solution
Its gradient is inversely proportional to x2
dy 1 dy k
=⇒ ∝ 2 =⇒ = 2
dx x dx x
where k is a constant to be determined, i.e. the constant of
proportionality .
k k
dy = =⇒ = +c
Z Z
dx y −
x2 x
This is the general solution of the differential equation.
Now the curve passes through (1, 2) and ( 51 , −10)
k
y =− +c
x

2 = −k + c

−10 = −5k + c

12 = 4k
Thus k = 3 and c = 5
The particular solution becomes y = −3
x +5

2. Finance
The sum of kshs.5000 is invested at the rate of 8% per year com-
pounded continuously. What will the amount be after 25 years?.
Solution
Ley y(t) be the amount of money (capital+ interest) at a time
t
Then the rate of change of the money at time t is given by ;
dy 8
= y (2.11)
dt 100
Equation 2.11 is separable differential equation, i.e. it can be
written as;
dy 8
= dt (2.12)
y 100
and the solution is obtained by integrating both sides of the
equation.
dy 8 8
= dt =⇒ ln |y| = t+c (2.13)
Z

y 100 100
Since y(t) is a positive and ln y = + c ln e =⇒ ln y =
 
8t
100
8t
ln e 100 +c Moving from logarithm form, we obtain
8t c
y = e 100 ×e (2.14)
This is the general solution.
Now at time t = 0 we have that y(0) = e0ec =⇒ y(0) = ec
8t
Hence y(t) = y(0)e 100
Now since y(0) = 5000 (The initial amount invested )
 8×25 
We find that y(25) = y(0) e 100 = kshs.36, 945.28

2.3 Homogeneous Equations

Definition 2.3.1
A function f (x, y) is said to be homogeneous of degree n, if on replacing
x and y by λx and λy, where λ is a parameter, then we have.
f (λx, λy) = λnf (x, y) (2.15)
Example 2.3.1

1. A function f (x, y) = x4 − x3y is homogeneous of degree 4 since


f (λx, λy = (λx)4 − (λx)3(λy)
f (λx, λy) =λ4(x4 − x3y)
=λ4f (x, y)
y
2. A function f (x, y) = e x + tan( xy ) is homogeneous of degree zero
since
λy λy
f (λx, λy) =e λx + tan( )
λx
y y y
=e x + tan( ) + tan( )
x x
y y y
=λ0[e x + tan( ) + tan( )]
x x
3. The function f (x, y) = x2 +sin x cos y is not homogeneous equation
since,
f (λx, λy) =(λx)2 + sin(λx) cos(λy)
=λ2x2 + sin λx cos λy 6= λnf (x, y)

Theorem 2.3.1. If M (x, y) is homogeneous and N (x, y) are both ho-


(x,y)
mogeneous, and of the same degree, then the function M
N (x,y) is homo-
geneous of degree zero.

2.4 Equation with Homogeneous Coefficients

Definition 2.4.1
A differential equation
dy M (x, y)
M (x, y)dx + N (x, y)dy = 0 or =− (2.16)
dx N (x, y)
is said to be homogeneous, if the coefficients (or the function) M (x, y)
and N (x, y) are homogeneous and of the same degree in x and y
By the proceeding theorem, the ratio M
N is a function of y
x alone i.e.

dy y dy y
= −g( ) or + g( ) = 0 (2.17)
dx x dx x

To solve this equation, let

y
x = v =⇒ y = vx

This substitution has the advantage of reducing equation 2.16 or 2.17 to


separable differential equation.
In fact from y = vx we have

dy d dv
= (vx) = v + x (2.18)
dx dx dx

and 2.17 now becomes

xdv
+ v + g(v) = 0 (2.19)
dx

In which the variables are now separable.


Solving 2.19 by separating the variables and then substituting v = y
x we
obtain the solution of the equation.

Example 2.4.1
Solve the differential equation
(x2 − xy + y 2)dx − xydy = 0 (2.20)
Solution
Here M (x, y) = x2 −xy+y 2 and N (x, y) = −xy are homogeneous
of degree 2. in x and y
Let y = vx then 2.20 becomes
(x2 − x2v + x2v 2)dx − x2v(vdx + xdv) = 0 (2.21)
From 2.18 dy
dx = v + x dx
dv
=⇒ dy = vdx + xdv

=⇒ (1 + v + v 2)dx − v(vdx + xdv) = 0


(1 − v)dx − vxdv = 0
separating the variable we get
dx v dx v
= dv or + dv = 0
x 1−v x v−1
Z dx v
+ dv = 0
Z

x 1−v
ln |x| + v + ln |v − 1| + c = 0
Moving from logarithmic form to power form, we obtain;
ln(xev (v − 1)) = ln c
or
xev (v − 1) = ec = C1
Substituting v = xy , we get
y y
xe x ( x −1) = c1
y y −x
xe x ( ) = c1
y
x
e x (y − x) = c1
Where c1 = ec is a positive constant.

Exercise 2.4.1

Problems T/A
Solve the differential equations
1. xydx + (x2 + y 2)dy = 0 by means of the substitution x = vy where
dx = vdy + ydv
2. dy
dx = 5x+4y
2x−y by means of substitution y = vx
Solution
2 1
1. y( 2x
y2
+ 1) 4 = ec OR (2x2 + y 2)y 2 = c41
2 +2xy+5x2
2. ln[ y x2
] − 3 tan−1( y+1
2x ) = −2 ln x + c

2.5 Equations Reducible to Homogeneous Form

The method of homogeneous equations may also be extended to some non-


homogeneous equations.

1. Case 1.
Consider the equation
dy a1x + b1y + c1
=− or (a1x + b1y + c1) + (a2x + b2y + c2)dy = 0
dx a2x + b2y + c2
(2.22)
where
a1 b2 − a2 b1 = 0 (2.23)
In this case we let a1x + b1y = t, then
dt − a1dx
a1dx + b1dy = dt =⇒ dy = (2.24)
b1
Replacing the variable y and dy in 2.22 we obtain

P (x, t)dx + Q(x, t)dt = 0 (2.25)

In which the variables x and t are now separable.

Example 2.5.1
Solve the differential equation
(x + y)dx + (3x + 3y − 4)dy = 0 (2.26)
Solution
Here a1 = 1, b1 = 1, a2 = 3, b2 = 3, =⇒ a1b2 − a2b1 = 0
We therefore apply the transformation of type 2.24, namely
x+y =t
Then x + y = t =⇒ dy = dt − dx and so the equation 2.26
becomes
tdx+(3t−4)(dt−dx) = 0 =⇒ tdx+3tdt−3tdx−4dt+4dx = 0
Which implies that
(4 − 2t)dx + (3t − 4)dt = 0
in which the variables are now separable.
2(2 − t)dx + (3t − 4)dt = 0
3t − 4
2dx + dt = 0
2−t
Z 3t − 4
2dx + dt = 0
Z

2−t
Z 3t − 4
I1 = 2dx = 2x, I2 =
Z
dt
2−t
To integrate I2 we use (synthetic/long) division to obtain I2 =
= (−3 + 2−t )dt
R 3t−4 R 2
2−t
Thus I2 = (−3 + 2−t 2
)dt = −3t − 2 ln |2 − t| = c
R

Therefore we obtain
2x = 3t + 2 ln |2 − t| + c
2x − 3(x + y) − 2 ln |2 − x − y| = c
Is the required general solution.

Example 2.5.2
Find the differential equation (x + 2y − 1)dx + 3(x + 2y)dy = 0
Solution
We notice that a1 = 1, b1 = 2, a2 = 3, b2 = 6 =⇒ a1b2 −
a2b1 = 0
So we let x + 2y = t =⇒ dx = dt − 2dy and the differential
equation becomes
(t − 1)(dt − 2dy) + 3tdy = 0
tdt − 2tdy − dt2dy + 3tdy = 0
(t − 1)dt + (t + 2)dy = 0
(t − 1)
dt + dy = 0
(t + 2)
Integrating each term, we obtain
t−1
dt = − dy
Z Z

t+2
Z t+2−3
dt = −y + c
t+2
Z t+2 3
( − )dt = −y + c
t+2 t+2
3
(1 − )dt = −y + c
Z

t+2
t − 3 ln(t + 2) = −y + c. or − y = t − 3 ln |t + 2| + c
But t = x + 2y
− y = x + 2y − 3 ln |x + 2y + 2| + c
x + 3y − 3 ln |x + 2y + 2| + c = 0
Thus the general solution for the differential equation is given
by
x + 3y = 3 ln |x + 3y + 2| + c

2. Case 2.

Consider the differential equation


(a1x + b1y + c1)dx + (a2x + b2y + c2) = 0 (2.27)
But with a2b2 − a2b1 6= 0 In this case the equation 2.27 rendered ho-
mogeneous by introducing the transformation

x=u+h
(2.28)
y =v+k

where u and v are new variable and h and k are constants.

h = x and y = k satisfy (i.e. are solution ) of the equation.

a1x + b1y + c1 = 0
(2.29)
a2x + b2y + c2 = 0

The point (h, k) lies on the point of intersection of the lines given by
equation 2.29
The substitution 2.28 now reduces equation 2.27 to homogeneous form
given by

(a1u + b1v)du + (a2u + b2v)dv = 0 (2.30)

which can then be solved by separating the variables.

Example 2.5.3
Solve the differential equation
(x + 2y − 4)dx − (2x + y − 5)dy = 0 (2.31)
Solution
Here a1 = 1, b1 = 2, a2 = −2, b2 = 1 =⇒ a1b2 − a2b1 6= 0
We use the transformation 2.28 by first solving the simultane-
ous equation
x + 2y − 4 = 0
(2.32)
2x + y − 5 = 0
It is easy to see that y = 1 and x = 2 are solution of 2.32 i.e.
the point (2, 1) is a point of intersection of the two lines.
Then using 2.28 we have
x = u + h =⇒ x = u + 2
(2.33)
y = v + k =⇒ y = v + 1
From 2.33 it is obvious that dx = du and dy = dv
Substituting for x and y from (x+2y−4)dx−(2x+y−5)dy =
0, we have
(u + 2 + 2v+2 − 4)du − (2u + 4 − v + 1 − 5)dv
(2.34)
(u + 2v)du − (2u + v)dv = 0
To solve this, we let u = zv =⇒ du = vdz + zdv
(vz + 2v)(vdz + zdv) − (2vz + v)dv = 0
v(z + 2)(vdz + zdv) − v(2z + 1dv) = 0
(z + 2)(vdz + zdv) − (2z + 1)dv = 0
zvdz + z 2dv + 2vdz + 2zdv − 2zdv − dv = 0
(z 2 − 1)dv + v(z + 2)dz = 0
z2 − 1 v
+ =0
(z + 2)dz dv
z+2 dv
dz = =0
z2 − 1 v
By integrating each term, I1 = dv = ln |v|, I = z+2
dz
R R
v 2 z 2 −1
To integrate I2 we use the method of partial fraction decom-
position. i.e.
z+2 z+2 A B
= = +
z 2 − 1 (z − 1)(z + 1) z − 1 z + 1
=⇒ z + 2 = A(z + 1) + B(z − 1)
Solution
It is easy to see that A = 23 and B = − 12
Now I2 = = =

R z+2 1R 3 1
z 2 −1
dz 2 z−1 − z+1 dz
2 [3 ln |z − 1| − ln |z + 1|] + c
1

We finally have the general solution


3 1
ln |v| + ln |z − 1| − ln |z + 1| = c ln e
2 2
Moving fro logarithmic form to power form, we have that,
2 ln |v| + 3 ln |z − 1| − ln |z + 1| = 2c ln e
=⇒ 2 ln |v| + 3 ln |z − 1| = 2c ln e + ln |z + 1|

u
Substituting back z = =⇒ v 2 · (z − 1)3 =
v
u u
v 2( − 1)3 = c( + 1)
v v
(u − v) 3
(u + v)
v2 = c
v3 v
=⇒ (u + v)3 = c(u + v)
On which by substituting back 2.33 we get,
(x − 2 − (y + 1))3 = c(x + y − 3)

Practice Problem 2.5.1


Solve the differential equation:
1. .(2x + 3y − 1)dx + (2x + 3y + 2)dy = 0 Soln. x + y + 3 ln |2x +
3y − 7| = c
2. (2x − 5y + 3)dx − (2x + 4y − 6)dy = 0 Soln. (2x + y −
3)2(x − 4y + 3)4 = c(x − 1)3

2.6 Exact Differential Equations

We now consider a method of solving first order differential equation for


which the method of separation of variable may not be applicable.
Definition 2.6.1: Total Differentiation
The total differentiation of a function f (x, y) is given by:
∂f ∂f
dF = dx + dy (2.35)
∂x ∂y
∂f ∂f
provided that the partial derivative ∂x and ∂y exist.

Definition 2.6.2: Exact Differential Equation


A differential equation of the form
M (x, y)dx + N (x, y)dy = 0 (2.36)
is called exact if there is a function f (x, y) where total differentiation
is equal to the left and side of 2.36 i.e.
dF = M dx + N dy (2.37)
where M = M (x, y), N (x, y), f = f (x, y). In this case f (x, y) is
called an integral of the exact differential equation.

Remark.2
We note that if 2.36 is exact then (because of 2.36 and 2.37) it is
equivalent to dF = 0 and so f (x, y) = c

Example 2.6.1
Show that the differential equation
(2x − y)dx + (−x + 4y)dy = 0 (2.38)
is an exact equation.
Solution

d 2 d
d(x2 − xy + 2y 2) = (x − xy + 2y 2)dx + (x2 − xy + 2y 2)dy
dx dy
=(2x − y)dx + (−x + 2y)dy
The general solution of 2.38 is given implicitly as (x2 −xy+2y 2) = c
Remark.3
The following two questions are important:
1. Is there a systematic way to check id the differential equation 2.36
is exact?
2. If we know the differential equation 2.36 is exact, is there a system-
atic way to solve it?

Theorem 2.6.1 (Criteria). If M, N and the partial derivative ∂N


∂y and
∂N
∂x are continuous function of x and y in some rectangle, then the
first order differential equation
M (x, y)dx + N (x, y)dy = 0 (2.39)
is exact iff
∂M ∂N
= (2.40)
dy dx
Proof. First, we consider equation 2.36 is exact, then by definition, there
exist a function f such that its total differential
∂f ∂f
dF = dx + dy = 0
∂x ∂y
2 2
Now M (x, y) = ∂f
∂x , N (x, y) = ∂f
∂y and ∂M
∂y = ∂ f
∂x∂y , ∂N
∂x = ∂ f
∂x∂y
Also from Calculus, since f is continuous, we have that
∂ 2f ∂ 2f
= , (2.41)
∂y∂x ∂x∂y
provided that these partial derivatives are continuous. Hence from 2.41 it
follows that;
∂M ∂N
= (2.42)
∂y ∂x
2 2
Conversely: Assume that the equation the relation 2.40 hold i.e. ∂y∂x
∂ f
= ∂x∂y
∂ f

Now let φ(x, y) be a function for which ∂φ∂x = M and note that φ is the result
of integrating M dx with respect to x while keeping y fixed. Now
∂  dφ ∂ 2φ  dM
= = (2.43)
∂y dx ∂y∂x dy
and since 2.40 is satisfied we have
∂ 2φ ∂N
= (2.44)
∂x∂y ∂x
By integrating the latter equation 2.44 w.r.t. x the arbitrary constant may
be any function of y, call it B 0(y) we obtain

∂φ
= N + B 0(y) (2.45)
∂y

where B (y) =
 
0 d
dy B(y)
Now let

∂φ ∂φ
f = φ(x, y) = B(y) =⇒ df = dx + dy − B 0(y)dy
∂x ∂y
=M dx + [N + B(y)]dy − B 0(y)dy
=M dx + N dy

Hence we say equation 2.38 is exact and its L.H.S is expression as the total
differential of f.

Example 2.6.2
Solve the differential equation
3x(xy − 2)dx + (x3 + 2y)dy = 0 (2.46)
Solution
Let M (x, y) = 3x(xy − 2) = 3x2y − 6x and N (x, y) = x3 + 2y
Then
∂M ∂N
= 3x2 =
∂y ∂x
Thus this differential equation is exact and its solution is f (x, y) =
c whose
dF
= M = 3x2y − 6x (2.47)
dx
dF
= N = x3 + 2y (2.48)
dy
Integrating 3.7 with respect to x while keeping y fixed we get
f (x, y) = x3y − 3x2 + φ(y) (2.49)
Where φ(y) is unknown function satisfying 3.9. We differentiate
2.49 w.r.t y and then compare with 3.9
f (x, y) = x3y − 3x2 + φ(y)
∂f
= x3 + φ0(y) = x3 + 2y (2.50)
∂y
i.e. φ0(y) = 2y Or φ(y) = y 2
Hence 2.49 now becomes f (x, y) = x3y − 3x2 + y 2. Again, Recall
that f (x, y) = c Thus
f (x, y) = x2y − 3x2 + y 2 = c

Practice Problem 2.6.1


Solve the following differential equation showing whether or not the
equations are exact.
1. (2x3 − xy 2 − 2y + 3)dx − (x2y + 2x)dy = 0
2. (x2 + 4xy + y 2)dx + (2x2 + 2xy − 3y 2)dy = 0
3. (4x − 2y + 5)dx + (2y − 2x)dy = 0
4. (x + 2y)dx + (2x + y)dy = 0
5. (cos x cos y − cot x)dx − sin x sin ydy = 0.
We will solve question 1 and 5 in class and the rest shall be left as an
assignment for all students undertaking this course and all the workings
to be submitted.

Solution
We have (2x3 − xy 2 − 2y + 3)dx − (x2y + 2x)dy = 0
Let M (x, y) = (2x3 − xy 2 − 2y + 3), N (x, y) = −x2y − 2x
∂f ∂f
= −2xy − 2 =
∂y ∂x
Hence the equation is exact.
Let f (x, y) = c and dx
df
= M = 2x3 − xy 2 − 2y + 3 and df
dy = −x2y − 2x
Integrating
df 1 4 x2 2
= 2x − xy − 2y + 3dx = x − y − 2xy + 3x + φ(y)
Z
3 2
dx 2 2
and
df
= − x2y − 2x + φ0(y)
dy
=⇒ − x2y − 2x + φ0(y) = −x2y − 2x
Thus φ0(y) = 0
And hence the general solution is given by f (x, y) = 21 x4 − 12 x2y 2 −
2xy + 3x = c

5. (cos x cos y − cot x)dx − sin x sin ydy = 0.

Solution
Let M (x, y) = cos y − cot x and N (x, y) = − sin x sin y
∂M
= − cos x sin y
∂y
∂N
= − sin x cos y
∂x
Therefore, ∂M
∂y = ∂N
∂x = − cos x sin y and thus the equation is exact.
The required differential equation is f (x, y) = c
dF
= M = cos x cos y − cot x
dx
dF
= N = − sin x sin y.
dy Z
f (x, y) = (cos x cos y − cot x)dx
= sin x cos y − ln | sin x| + φ(y)

Now, ∂f
∂y = − sin x sin y + φ (y)
0

Comparing the two, we have that, ∂f ∂y = − sin x sin y + φ (y) =


0

− sin y sin x =⇒ φ0(y) = 0


Thus the required solution is f (x, y) = sin x sin y − ln(sin x) = 0
Chapter 3

Linear Equations of order one

If an equation is not exact, it is natural to make it exact by introducing an


appropriate factor which we call integrating factor.
The linear first order differential equation (linear in y and its derivatives)
can be written in the form
dy
A(x) + B(x)y = g(x), (3.1)
dx
By dividing each term by A(x) we obtain an equation of the form
dy
+ p(x)y = g(x), (3.2)
dx
(which is the standard linear first order differential equation) with the initial
conditions y(x0) = y0. Linear first order equations can be integrated using
an integrating factor µ(x). We multiply 3.2 by µ(x)
 
dy
µ(x) + p(x)y  = µ(x)g(x) (3.3)
dx
and try to determine µ(x) so that
 
dy d
µ(x) + p(x)y  = [µ(x)y] (3.4)
dx dx
Equation 3.3 then becomes
d
[µ(x)y] = µ(x)g(x) (3.5)
dx
Equation 3.5is exact and easily integrated using µ(x0) = µ0 and y(x0) = y0:
x
µ(x)y = µ0y0 = (3.6)
Z

x0
µ(x)g(x)dx,
or
1  Zx
 

y= µ0 y0 + µ(x)g(x)
 (3.7)
µ(x) x0
We now determine µ(x) from 3.4. Differentiating and expanding yields

dy dµ dy
µ + pµy = y+µ (3.8)
dx dx dx

and upon simplifying


= pµ (3.9)
dx

Equation 3.9 is separable and can be integrated:

Zµ dµ Zx
= p(x)dx,
µ0 µ x0
µ Zx
ln = p(x)dx,
µ 0 x0
Zx
 

µ(x) = µ0 exp 
 )
p(x)dx
x0

Notice that since µo cancels out of 3.7, it is customary to assign µ0 = 1. The


solution to 3.2 satisfying the initial condition y(x0) = y0 is then commonly
written as

1  Zx
 

y= y0 + µ(x)g(x)dx
 (3.10)
µ(x) x0

with
Zx
 

µ(x) = exp 
 p(x)dx
 (3.11)
x0

the integrating factor

Example 3.0.1
Solve the differential equation 2(y − 4x2)dx + xdy = 0
Solution
The equation is linear in y, when we put in standard form becomes
2ydx − 8x2dx + xdy = 0
xdy + 2ydx = 8x2
dy 2
+ y = 8x (3.12)
dx x
We now obtain the integrating factor
µ(x) =e
R
p(x)dx
R 2 2
=e x dx = e2 ln x = eln x = x2
Multiplying equation 3.12 with the integrating factor, we obtain
the exact equation
dy
x2 + 2xy = 8x3 (3.13)
dx
Solving the exact equation 3.13
d 2
(x y) = 8x3 (3.14)
dx
By integrating 3.14 we obtain
d 2
(x y) = 8x3dx
Z Z

dx
x2y = 2x4 + c
This is the required general solution.

Example 3.0.2

Solve the differential equation dx


dy
+ y cot x = 5ecos x, find the particular
solution for differential given by the initial condition x = π2 , y = −4
Solution

dy
+ y cot x =5ecos x
dx
µ(x) = e = e cot xdx
R R
p(x)dx
R cos x
=e sin x dx = eln sin x
= sin x.
multiplying the equation by the integrating factor µ(x) = sin x we
get.
dy cos x
sin x +y sin x = 5ecos x sin x
dx sin x
dy
sin x + y cos x = 5ecos x sin x
dx
d
(y sin x) = 5ecos x sin x
dx
d(y sin x) = 5ecos x sin xdx
Z Z

I1 = y sin x, I2 = 5 ecos x sin xdx


Z

Let t = cos x =⇒ dt = − sin t


=⇒ 5 etdt = 5et + c = 5ecos x + c
Z

We get the general solution as y sin x = −5ecos x + c


We now look for the particular solution, satisfying the condition
y( π2 ) = −4

π π
−4 sin( ) = −5ecos( 2 ) + c
2
−4(1) = −5e0 + c =⇒ c = 1
Thus the particular solution is y sin x = −5ecos x + 1

Example 3.0.3

Solve dy
dx + 2y = e−x with y(0) = 3
4
Solution
Note that this equation is not separable. With p(x) = 2 and
g(x) = e−x, we have
Zx
 

µ(x) = exp 
 2dx

0
=e 2x

and
−2x  3
Zx
 

y =e  + e2xe−xdx
4 0

3 x
 

=e−2x 
 +
Z
exdx
4 0

3
 

=e−2x  + (ex − 1)


4
1
 

=e−2x ex − 
4 
1

=e−x 1 − e−x
4

Example 3.0.4

Solve dy
dx − 2xy = x, with y(0) − 0

Solution
This equation is separable and we solve it in two ways. First, using an
integrating factor with p(x) = −2x and g(x) = x

Zx
µ(x) = exp(−2 xdx)
0
−x2
=e
and
Zx
x2 2
y=e xe−x dx
0
The integral can be done by substitution with u = x2, du = 2xdx,
2
Zx
−x2 1 Zx −u
xe dx = e du
0 20
x2
1 −u
= − e
2 0
1 2
= (1 − e−x )
2
Therefore,
1 2 2
y = ex (1 − e−x )
2
1 2
= (ex − 1)
2
Second, we integrate by separating variables:
dy
− 2xy = x
dx
dy
= x(1 + 2y)
dx
Zy dy Zx
= xdx
0 1 + 2y 0
1 1
ln(1 + 2y) = 2
2 x
2
1 + 2y = ex
1 2
y = (ex − 1)
2
The results from two different solution methods are the same , and the
choice of method is a personal preference.

3.1 Applications

3.1.1 Compound interest

The equation for the growth of an investment with continuous compounding


of interest is a first-order differential equation. Let S(t) be the value of the
investment at time t, and let r be the annual interest rate compounded after
every time interval ∆t. We can also include deposits (or withdrawals). Let k
be the annual deposit amount, and suppose that an instalment is deposited
after every time interval ∆t. The value of the investment at the time t + ∆t
is then given by
S(t + ∆t) = S(t) + (r∆t)S(t) + k∆t (3.15)
where at the end of the time interval ∆tr r∆tS(t) is the amount of interest
credited and k∆t is the amount of money deposited (k > 0) or withdrawn
(k < 0). As a numerical example, if the account held $10, 000 at time t,
and r = 6% per year and k = $12, 000 per year, say, and the compounding
and deposit period is ∆t = 1 month = 1/12 year, then the interest awarded
after one month is r∆tS = (0.06/12)× $10, 000 = $50, and the amount
deposited is k∆t = $1000.
Rearranging the terms of (2.14) to exhibit what will soon become a deriva-
tive, we have
S(t + ∆t) − S(t)
= rS(t) + k (3.16)
∆t
The equation for continuous compounding of interest and continuous de-
posits is obtained by taking the limit ∆t → 0. The resulting differential
equation is
dS
= rS + k (3.17)
dt
which can solved with the initial condition S(0) = S0, where S0 is the
initial capital. We can solve either by separating variables or by using an
integrating factor; I solve here by separating variables. Integrating from
t = 0 to a final time ts
Z S dS Z t

S0 rS + k
= 0 dt
1  rS + k 
 

ln =t
r rS0 + k
rS + k = (rS0 + k) ert (3.18)
rS0ert + kert − k
S=
r
k rt 
S = S0e + e 1 − e

rt −rt
r
where the first term on the right-hand side of (3.18) comes from the initial
invested capital, and the second term comes from the deposits (or with-
drawals). Evidently, compounding results in the exponential growth of an
investment.
Example 3.1.1
As a practical example, we can analyze a simple retirement plan. It
is easiest to assume that all amounts and returns are in real dollars
(adjusted for inflation). Suppose a 25 year-old plans to set aside a fixed
amount every year of his/her working life, invests at a real return of
6%, and retires at age 65. How much must he/she invest each year to
have HK$8, 000, 000 at retirement? (Note: US$1 ≈ HK$8. ) We need
to solve (3.18) for k using t = 40 years, S(t) = $8, 000, 000, S0 = 0,
and r = 0.06 per year. We have
rS(t)
k=
ert − 1
0.06 × 8, 000, 000
k=
e0.06 × 40 − 1
= $47, 889 year −1
To have saved approximately one million US$ at retirement, the worker
would need to save about HK$50,000 per year over his/her work-
ing life. Note that the amount saved over the worker’s life is ap-
proximately 40 × $50, 000 = $2, 000, 000, while the amount earned
on the investment (at the assumed 6% real return) is approximately
$8, 000, 000 − $2, 000, 000 = $6, 000, 000. The amount earned from the
investment is about 3× the amount saved, even with the modest real
return of 6%. Sound investment planning is well worth the effort.

3.1.2 Chemical reactions

Suppose that two chemicals A and B react to form a product C, which we


write as
k
A+B → C
where k is called the rate constant of the reaction. For simplicity, we will
use the same symbol C, say, to refer to both the chemical C and its concen-
tration. The law of mass action says that dC
dt is proportional to the product
of the concentrations A and B, with proportionality constant k; that is,
dC
= kAB (3.19)
dt
Similarly, the law of mass action enables us to write equations for the
time-derivatives of the reactant concentrations A and B :
dA dB
= −kAB, = −kAB (3.20)
dt dt
The ode given by (3.19) can be solved analytically using conservation laws.
We assume that A0 and B0 are the initial concentrations of the reactants,
and that no product is initially present. From (3.19) and (320) ,
d
(A + C) = 0 =⇒ A + C = A0
dt
d
(B + C) = 0 ⇒ B + C = B0
dt
Using these conservation laws, ( 3.19 ) becomes
dC
= k (A0 − C) (B0 − C) , C(0) = 0
dt
which is a nonlinear equation that may be integrated by separating variables,
Separating and integrating, we obtain

C dC Z t
= k 0 dt
Z

0 (A0 − C) (B0 − C) (3.21)


= kt.
The remaining integral can be done using the method of partial fractions.
We write
1 a b
= + (3.22)
(A0 − C) (B0 − C) A0 − C B0 − C
The cover-up method is the simplest method to determine the unknown
coefficients a and b. To determine a, we multiply both sides of (3.22) by
A0 − C and set C = A0 to find
1
a=
B0 − A0
Similarly, to determine b, we multiply both sides of (3.22) by B0 − C and
set C = B0 to find
1
b=
A0 − B0
Therefore,
1 1 1 1 
 

= −
(A0 − C) (B0 − C) B0 − A0 A0 − C B0 − C

and the remaining integral of (3.21) becomes (using C < A0, B0)
dC 1 dC dC 
 
[ Z C Z C
=
Z

(A0 − C) (B0 − C) B0 − A0 0 A0 − C 0 B −C

0
0
1 A − C B − C
    
0 0
= − ln   + ln  
B0 − A0  A0 B0
1 A0 (B0 − C) 

= ln 
B0 (A0 − C)
 
E0 − A0
Using this integral in (3.21) multiplying by (B0 − A0) and exponentiat-
ing, we obtain
A0 (B0 − C)
= e(B0−A0)kt
B0 (A0 − C)
Solving for C, we finally obtain
e(B0−A0)kt − 1
C(t) = A0B0 (3.23)
B0e(B0−A0)kt − A0
As one would expect, the reaction stops after one of the reactants is depleted;
and the final concentration of product is equal to the initial concentration
of the depleted reactant.

3.1.3 Terminal velocity

Using Newton’s law, we model a mass m free falling under gravity but with
air resistance. We assume that the force of air resistance is proportional to
the speed of the mass and opposes the direction of motion. We define the x
-axis to point in the upward direction, opposite the force of gravity. Near the
surface of the Earth, the force of gravity is approximately constant and is
given by −mg, with g = 9.8 m/s2 the usual gravitational acceleration. The
force of air resistance is modelled by −kv, where v is the vertical velocity
of the mass and k is a positive constant. When the mass is falling, v < 0
and the force of air resistance is positive, pointing upward and opposing the
motion. The total force on the mass is therefore given by F = −mg − kv.
With F = ma and a = dv/dt, we obtain the differential equation
dv
m = −mg − kv (3.24)
dt
The terminal velocity v∞ of the mass is defined as the asymptotic velocity
after air resistance balances the gravitational force, When the mass is at
terminal velocity, dv/dt = 0 so that
mg
v∞ = −. (3.25)
k
The approach to the terminal velocity of a mass initially at rest is obtained
by solving (3.25) with initial condition v(0) = 0. The equation is both linear
and separable, and I solve by separating variables:
dv
= − 0t dt
R0
m
R
0 mg+kv

k ln = −t
 
m mg+kv
mg
1 + mgkv
= e−kt/m
=− k 1−e
 
mg −kt/m
v

Therefore, v = v∞ 1 − e , and v approaches v∞ as the exponential


 
−k+/π

term decays to zero.

Example 3.1.2
As an example, a skydiver of mass m = 100 kg with his parachute
closed may have a terminal velocity of 200 km/hr. With
g = 9.8 m/s 10 km/m (60 s/min)2(60 min/hr)2 = 127, 008 km/hr2
  
2 −3

one obtains from (2.22), k = 63, 504 kg/hr. One-half of the ter-
minal velocity for free-fall (100 km/hr) is therefore attained when
1 − e−kt/m = 1/2, or t = m ln 2/k ≈ 4 sec . Approximately 95%
 

of the terminal velocity (190 km/hr) is attained after 17sec

3.1.4 The logistic equation

Let N (t) be the number of individuals in a population at time t, and let


b and d be the average per capita birth rate and death rate, respectively.
In a short time ∆t, the number of births in the population is b∆tN , and
the number of deaths is d∆tN , An equation for N at time t + ∆t is then
determined to be
N (t + ∆t) = N (t) + b∆tN (t) − d∆f N (t)
which can be rearranged to
N (t + ∆t) − N (t)
= (b − d)N (t);
∆t
and as ∆t → 0, and with r = b − d, we have
dN
= rN.
dt
This is the Malthusian growth model (Thomas Malthus, 1766 − 1834 ), and
is the same equation as our compound interest model.
Under a Malthusian growth model, the population size grows exponen-
tially like
N(t) = N0ert
where N0 is the initial population size, However, when the population
growth is constrained by limited resources, a heuristic modification to the
Malthusian growth model results in the Verhulst equation,
dN N
 

= rN 1 −  (3.26)
dt K
where K is called the carrying capacity of the environment. Making (3.26)
dimensionless using τ = rt and x = N/K leads to the logistic equation,
dx
= x(1 − x)

where we may assume the initial condition x(0) = x0 > 0. Separating
variables and integrating
x dx Z τ
= 0 dτ
Z

x0 x(1 − x)

The integral on the left-hand-side can be done using the method of partial
fractions:
1 a b
= +
x(1 − x) x 1 − x
and the cover-up method yields a = b = 1. Therefore,
x dx Z x dx Z x dx
= +
Z

x0 x(1 − x) x0 x x0 (1 − x)
x 1−x
= ln − ln
x0 1 − x0
x (1 − x0)
= ln
x0(1 − x)

Solving for x, we first exponentiate both sides and then isolate x :
= et
x(1−x0 )
x0 (1−x)
x (1 − x0) = x0eτ − xx0eτ
x 1 − x0 + x0e> = x0cτ


x = x0+(1−x
x0
0 )e
−t

We observe that for x0 > 0, we have limτ →∞ x(τ ) = 1, corresponding to


lim N (t) = K
t→∞

The population, therefore, grows in size until it reaches the carrying capacity
of its environment.
Chapter 4

Linear differential equations with


constant coefficients

4.1 Basic Properties

The general differential equation of order n is of the form

dny dn−1y dy
b0(x) n + b1(x) n−1 + . . . + bn−1(x) + bn(x)y = Q(x) (4.1)
dx dx dx

where both Q(x) and bi(x) : (i = 0, 1, 2 . . . , n) are assumed to be con-


tinuous function in some interval I and are independent of y and also the
leading coefficients bo(x) 6= 0 for all x ∈ I

Definition 4.1.1
We consider equation 4.1, we have that:
1. If Q(x) = 0, then the equation 4.1 is said to be linear and
homogeneous.

2. If Q(x) 6= 0, then the equation 4.1 is said to be linear and


non-homogeneous.

3. If all the coefficients bi(x), i = 0, 1, . . . , n are constant, then we


refer to 4.1 as a linear differential equation with constant coeffi-
cient, otherwise, it is a linear differential equation with variable
coefficients.
Example 4.1.1
The following are examples of Linear differential equation:
1. xy 0 − 2y = x3
d2 y
2. dx2
+ 2 dx
dy
+ 3y = cos x
dn y
3. y (4) − y = 0 here y n = dxn

1. Equation (1) is a non-homogeneous linear differential equations of


order one with variable coefficients
2. Equation (2) is a non homogeneous linear differential equation of
order2 with constant coefficients.
3. Equation (3) is homogeneous equation of order (4) with constant
coefficients.

Remark.4
The term linear refers to the fact that each expression in the differential
equation is of degree 1 And for degree zero in the variable y, y 0, . . . , y n

The following are non linear different equations


1. y 00 + y 2 = sin x
2. y 000 + yy 0 = x
3. y 00 + sin y = 0
• Equation 4 is a non linear because of the term y 2

• Equation 5 is non linear because of the term yy 0 and 6 because of the


3 5
term sin y ( Recall sin y = y − y3! + y5! − . . . )
Lemma 4.1.1. Let y1, . . . , yn be the solution of the homogeneous equa-
tion 4.1
dny dn−1y dy
b0(x) n + b1(x) n−1 + . . . + bn−1(x) + bn(x)y = Q(x)
dx dx dx
and let c1 and c2 be any constants, then
y = c1y1 + c2y2 + . . . + cnyn
is also a solution to 4.1
i.e. Any linear combination of the solution of a linear homogeneous
differential equation is also a solution.

Definition 4.1.2: Linear dependency


A set of function, f1, f2 . . . , fn are said to be linearly dependent if the
exist constant c1, c2, . . . , cn, not all zero such that
c1f1(x) + c2f2(x) + . . . + cnfn(x) = 0 ∀ x ∈ [a, b] (4.2)
otherwise they are linearly independent.

Theorem 4.1.2 (Existence and Uniqueness). Let the functions P1, P2 . . . , Pn a


be continuous on an interval I = (a, b), suppose x0 is a real number in
(a, b) and that y0, y1 . . . , yn−1 are arbitrary real numbers, then there exist
a function y = y(x) defined on (a, b) which is a solution of the equation

y n + P1y n−1 + . . . + Pny = R (4.3)

on (a, b) and satisfies the initial conditions

y(x0) = y0, y 0(x0) = y1, . . . y n−1(x0) = yn−1

Example 4.1.2
Find the unique solution of the following I.V.P
y 00 + y = 0, y(0) = 0, y 0(0) = 1 (4.4)
Solution
The solution of above differential equations are sin x and cos x
For y 00 + y = 0 =⇒ y1 = sin x, y10 = cos x, y 00 = − sin x

y 00 + y = − sin x + sin x = 0

For y2 = cos x, y20 = − sin x, y00 = − cos x


y 00 + y = − cos x + cos x = 0
Hence by preceding lemma, we observe that for any constants c1
and c2, the function
y = c1 sin x + c2 cos x
is a general solution of the equation4.4

Now to get a particular solution we substitute the initial conditions in


4.4 in the general solution y = c1 sin x + c2 cos x

y(0) = 0 =⇒ y = 0 when x = 0
y(0) = c1 sin(0) + c2 cos(0) = 0 =⇒ y(0) = 0 + c2 = 0 =⇒ c2 = 0‘and
y 0(0) = c1 cos(0) − c2 cos(0) = 1 =⇒ y 0(0) = c1 = 1
and so y = sin x is the only solution of the I.V.P, which satisfy given
conditions.

The best way of telling whether or not the solution of a linear differential
equations are linearly dependent is by the means of Wronskian
Definition 4.1.3: Wronskian
Consider a sequence of functions f1, f2, . . . , fn each of which is dif-
ferentiable at least (n − 1) times in [a, b]. Then the Wronskian of
f1, f2, . . . , fn is the determinant function



f1 f2 f3 . . . fn
f10 f20 f30 . . . fn0




W (f1, f2, . . . , fn) = f100 f200 f300 . . . fn00 (4.5)






... ... ... ... ...

n−1 n−1 n−1 n−1


f1 f2 f3 . . . fn
and its value at x ∈ [a, b] = W (f1, f2, . . . , fn)(x)

Example 4.1.3
Given f1(x) = x2, f2 = cos x. Find W (f1, f2)
Solution
From the definition of W and of the functions f1 and f2, we have,
x2 cos x


W (f1, f2) = = −x sin x − 2x cos x
2
(4.6)


2x − sin x


Remark.5
If it happens that the Wronskian is not zero, then the functions
f1, f2, . . . , fn are linearly independent.

4.2 Linear Differential Equations with Constant Coefficients

4.2.1 Homogeneous Equations

Linear homogeneous equations are of the form

a0y n + a1y n−1 + . . . + an−1y 0 = 0 (4.7)

where a0, a1, . . . , an are constants and a0 6= 0


The equation F (m) = a0mn + a1mn−1 + . . . + an−1m + an = 0 is called
auxiliary equation or characteristics equation associated with equation 4.7
and its roots m1, m2, . . . , mn are called auxiliary or characteristic roots.
The roots of a quadratic equation ax2 + bx + c = 0 are given by:

−b ± b2 − 4ac
x1,2 =
2a
The discriminant D = b2 − 4ac are such that, if D > 0,the roots are are
real and distinct.
If D = 0, the roots are coincident (repeated) and If D < 0, the roots are
complex.
1. Case 1. The auxiliary equation; distinct roots

Any linear homogeneous differential equation with constant coefficients,


dny dn−1y dy
a0 n + a1 n−1 + · · · + an−1 + any = 0 (4.8)
dx dx dx
may be written in the form

f (D)y = 0 (4.9)

where f (D) is a linear differential operator. As we saw in the preceding


chapter, if m is any root of the algebraic equation f (m) = 0, then

f (D)emx = 0 (4.10)

which means simply that y = emx is a solution of equation (4.9). The


equation

f (m) = 0 (4.11)
is called the auxiliary equation associated with (4.8) or (4.9). The aux-
iliary equation for (4.8) is of degree n. Let its roots be m1, m2, . . . , mn.
If these roots are all real and distinct, then the n solutions

y1 = exp (m1x) , y2 = exp (m2x) , . . . , yn = exp (mnx)

are linearly independent and the general solution of (4.8) can be written
at once. It is

y = c1 exp (m1x) + c2 exp (m2x) + · · · + cn exp (mnx)

in which c1, c2, . . . , cn are arbitrary constants.


Example 4.2.1
Solve the equation
d3y d2y dy
−4 2 + + 6y = 0
dx3 dx dx
First write the auxiliary equation
m3 − 4m2 + m + 6 = 0
whose roots m = −1, 2, 3 may be obtained by synthetic division.
Then the general solution is seen to be
y = c1e−x + c2e2x + c3e3x

Example 4.2.2
Solve the equation
3D + 5D − 2D y = 0
 
3 2

The auxiliary equation is


3m3 + 5m2 − 2m = 0
and its roots are m = 0, −2, 13 . Using the fact that e0x = 1, the
desired solution
may be written
1
 

y = c1 + c2e−2x + c3 exp  x
3

Example 4.2.3
Solve the equation
d2x
− 4x = 0
dt2
with the conditions that when t = 0, x = 0 and dx
dt = 3.
The auxiliary equation is
m2 − 4 = 0
with roots m = 2, −2. Hence the general solution of the differential
equation is
x = c1e2t + c2e−2t
It remains to enforce the conditions at t = 0. Now
dx
= 2c1e2t − 2c2e−2t
dt
Thus the condition that x = 0 when t = 0 requires that
0 = c1 + c2
and the condition that dx
dt = 3 when t = 0 requires that

Thus the condition that x = 0 when t = 0 requires that


0 = c1 + c2
and the condition that dx/dt = 3 when t = 0 requires that
3 = 2c1 − 2c2
From the simultaneous equations for c1 and c2 we conclude that
c1 = 43 and c2 = − 43 . Therefore
3  2t
x= e −e

−2t
4
which can also be put in the form
3
x= sinh(2t)
2
ex −e−x ex +e−x
Recall that, sinh x = 2 and cosh x = 2

Exercise 4.2.1
In exercises 1 through 22, find the general solution. When the
operator D is used, it is implied that the independent variable is x.
(a) (D2 − D − 2) y = 0 ANS. y = c1e−x + c2e2x.
(b) (D2 + 3D) y = 0 ANS. y = c1 + c2e−3x.
(c) (D2 − D − 6) y = 0 ANS. y = c1e−2x + c2e3x.
(d) (D2 + 5D + 6) y = 0 ANS. y = c1e−2x + c2e−3x.
(e) (D3 + 2D2 − 15D) y = 0 ANS.
y = c1 + c2e3x + c3e−5x.
(f) (D3 + 2D2 − 8D) y = 0 ANS.
y = c1 + c2e2x + c3e−4x.
(g) (D3 − 3D2 − D + 3) y = 0. ANS.
y = c1e3x + c2ex + c3e−x.
(h) (4D3 − 13D + 6) y = 0 ANS.
y = c1ex/2 + c2e3x/2 + c3e−2x.
(i) (4D3 − 49D − 60) y = 0. ANS.
y = c1e4x + c2e−5x/2 + c3e−3x/2.
d3 x 2
(j) dt3 dt = 0.
− 2 ddt2x − 3 dx ANS. x = c1 + c2e−t + c3e3t.
d3 x
(k) dt3
− 7 dx
dt + 6x = 0. ANS.x = c1et + c2e2t + c3e−3t.
(l) (10D3 + D2 − 7D + 2) y = 0. ANS.
y = c1e−x + c2ex/2 + c3e2x/5.
(m) (D3 − 3D2 − 3D +√1) y = 0. √ ANS.
y = c1e−x + c2e(2+ 3)x + c3e(2− 3)x.
Find the particular solution as indicated.

i. (D2 − 2D − 3) y = 0; when x = 0, y = 0, y 0 = −4
ANS. y = e−x − e3x.
ii. (D2 − D − 6) y = 0; when x = 0, y = 0, and when x =
1, y = e3.
AN S.y = e − e / 1−e
   
3x −2x −5

Find for x = 1 the y value for the particular solution re-


quired.

i. (D2 − 2D − 3) y = 0; when x = 0, y = 4, y 0 = 0 ANS.


When x = 1, y = e3 + 3e−1 = 21.2.
ii. (D3 − 4D) y = 0; when x = 0, y = 0, y 0 = 0, y 00 = 2
ANS. . When x = 1, y = sinh2 1
iii. (D2 − D − 6) y = 0; when x = 0, y = 3, y 0 = −1.
ANS.. When x = 1, y = 20.4.
iv. (D2 + 3D − 10) y = 0; when x = 0, y = 0, and when
x = 2, y = 1. ANS. When x = 1, y = 0.135.
v. (D3 − 2D2 − 5D + 6) y = 0; when x = 0, y = 1, y 0 =
−7, y 00 = −1. ANS. When x = 1, y = −19.8.

2. Case 2. The auxiliary equation; repeated roots


Suppose that in the equation
f (D)y = 0 (4.12)

the operator f (D) has repeated factors ; that is, the auxiliary equation
f (m) = 0 has repeated roots. Then the method of the previous section
does not yield the general solution. Let the auxiliary equation have
three equal roots m1 = b, m2 = b, m3 = b. The corresponding part of
the solution yielded by previous method is
y = c1ebx + c2ebx + c3ebx
(4.13)
y = (c1 + c2 + c3) ebx
Now (4.13) can be replaced by
y = c4ebx (4.14)
with c4 = c1 + c2 + c3. Thus, corresponding to the three roots under
consideration, this method has yielded only the solution (4.14).

The difficulty is present, of course, because the three solutions corre-


sponding to the roots m1 = m2 = m3 = b are not linearly independent.
What is needed is a method for obtaining n linearly independent solu-
tions corresponding to n equal roots of the auxiliary equation. Suppose
that the auxiliary equation f (m) = 0 has the n equal roots
m1 = m2 = · · · = mn = b
Then the operator f (D) must have a factor (D − b)n. We wish to find
n linearly independent y ’s for which
(D − b)ny = 0 (4.15)
Writing m = b, we find that

(D − b) =0 for k = 0, 1, 2, . . . , (n − 1) (4.16)
 
n k bx
x e

The functions yk = xk ebx where k = 0, 1, 2, . . . , (n − 1) are linearly


independent because, aside from the common factor ebx, they contain
only the respective powers x0, x1, x2, . . . , xn−1·. The general solution
of equation (4.15) is

y = c1ebx + c2xebx + · · · + cnxn−1ebx (4.17)

Furthermore, if f (D) contains the factor (D − b)n, then the equation

f (D)y = 0

can be written
g(D)(D − b)ny = 0 (4.18)
where g(D) contains all the factors of f (D) except (D − b)n. Then any
solution of
(D − b)ny = 0 (4.19)
is also a solution of (4.18) and therefore of (4.12)
The auxiliary equation; repeated roots Now we are in a position to write
the solution of equation (4.12) whenever the auxiliary equation has only
real roots. Each root of the auxiliary equation is either distinct from all
the other roots or it is one of a set of equal roots. Corresponding to a
root mi distinct from all others, there is the solution

yi = ci exp (mix) (4.20)

and corresponding to n equal roots m1, m2, . . . , mn, each equal to b,


there are the solutions

c1ebx, c2xebx, . . . , cnxn−1ebx (4.21)

The collection of solutions (4.21) has the proper number of elements, a


number equal to the order of the differential equation, because there is
one solution corresponding to each root of the auxiliary equation. The
solutions thus obtained can be proved to be linearly independent.
Example 4.2.4
Solve the equation
D − 7D + 18D − 20D + 8 y = 0 (4.22)
 
4 3 2

With the aid of synthetic division, it is easily seen that the auxiliary
equation
m4 − 7m3 + 18m2 − 20m + 8 = 0 (4.23)
has the roots m = 1, 2, 2, 2. Then the general solution of equation
(4.22) is
y = c1ex + c2e2x + c3xe2x + c4x2e2x
or
y = c1e + c2 + c3x + c4x e2x
 
x 2

Example 4.2.5
Solve the equation Solve the equation
d4 y d3y d2y
+2 3 + 2 =0
dx4 dx dx
The auxiliary equation is
m4 + 2m3 + m2 = 0
with roots m = 0, 0, −1, −1. Hence the desired solution is
y = c1 + c2x + c3e−x + c4xe−x

Exercise 4.2.2
Find the general solution
(a) (D3 − 4D2 + 4D) y = 0
(b) (9D3 + 6D2 + D) y = 0
(c) (2D4 − 3D3 − 2D2) y = 0
(d) (2D4 − 5D3 − 3D2) y = 0
(e) (D3 + 3D2 − 4) y = 0
(f) (4D3 − 27D + 27) y = 0
(g) (D3 + 3D2 + 3D + 1) y = 0
(h) (D3 + 6D2 + 12D + 8) y = 0
(i) (D5 − D3) y = 0 or y = c1 + c2x + c3x2 + c6 cosh x + c7 sinh x
(j) (D5 − 16D3) y = 0
(k) (4D4 + 4D3 − 3D2 − 2D + 1) y = 0
(l) (4D4 − 4D3 − 23D2 + 12D + 36) y = 0
(m) (D4 + 3D3 − 6D2 − 28D − 24) y = 0

Practice Problem 4.2.1

(a) (27D4 − 18D2 + 8D − 1) y = 0


(b) (4D5 − 23D3 − 33D2 − 17D − 3) y = 0
(c) (4D5 − 15D3 − 5D2 + 15D + 9) y = 0
(d) (D4 − 5D2 − 6D − 2) y = 0
(e) (D5 − 5D4 + 7D3 + D2 − 8D + 4) y = 0
Find the particular solution of the following O.D.E.
i. (D2 + 4D + 4) y = 0; when x = 0, y = 1, y 0 = −1
ii. The equation of exercise (i) with the condition that the
graph of the solution pass through the points (0, 2) and
(2, 0)
iii. (D3 − 3D − 2) y = 0; when x = 0, y = 0, y 0 = 9, y 00 = 0

iv. (D3 − 3D − 2) y = 0; when x = 0, y = 0, y 0 = 9, y 00 = 0


v. (D4 + 3D3 + 2D2) y = 0; when x = 0, y = 0, y 0 = 4, y 00 =
−6, y 000 = 14
vi. The equation of exercise (v) with the conditions that when
x = 0, y = 0, y 0 = 3, y 00 = −5, y 000 = 9.
vii. (D3 + D2 − D − 1) y = 0; when x = 0, y = 1, when x =
2, y = 0, and also as x → ∞, y → 0
In each exercises below, find for x = 2 the y value for the
particular solution required.
i. (4D2 − 4D + 1) y = 0; when x = 0, y = −2, y 0 = 2
ii. (D3 + 2D2) y = 0; when x = 0, y = −3, y 0 = 0, y 00 = 12
iii. (D3 + 5D2 + 3D − 9) y = 0; when x = 0, y = −1, when
x = 1, y = 0, and also as x → ∞, y → 0

3. Case 3. The auxiliary equation; imaginary roots


Consider a differential equation f (D)y = 0 for which the auxiliary
equation f (m) = 0 has real coefficients. From elementary algebra we
know that if the auxiliary equation has any imaginary roots those roots
must occur in conjugate pairs. Thus if
m1 = a + ib (4.24)
is a root of the equation f (m) = 0, with a and b real and b 6= 0, then
m2 = a − ib (4.25)

is also a root of f (m) = 0. It must be kept in mind that this result is


a consequence of the reality of the coefficients in the equation f (m) =
0. Imaginary roots do not necessarily appear in pairs in an algebraic
equation whose coefficients involve imaginaries. We can now construct
in usable form solutions of
f (D)y = 0 (4.26)
corresponding to imaginary roots of f (m) = 0. For, since f (m) is as-
sumed to have real coefficients, any imaginary roots appear in conjugate
pairs
m1 = a + ib and m2 = a − ib
Then, according to the preceding section, equation (4.26) is satisfied by
y = c1 exp[(a + ib)x] + c2 exp[(a − ib)x] (4.27)
Taking x to be real along with a and b, we get from (4.28) the result
y = c1eax(cos bx + i sin bx) + c2eax(cos bx − i sin bx) (4.28)
Now (4.28) may be written
y = (c1 + c2) eax cos bx + i (c1 − c2) eax sin bx (4.29)
Finally, let c1 + c2 = c3, and i (c1 − c2) = c4, where c3 and c4 are new
arbitrary constants. Then equation (4.26) is seen to have the solutions
y = c3eax cos bx + c4eax sin bx (4.30)
corresponding to the two roots m1 = a + ib and m2 = a − ib (b 6= 0)
of the auxiliary equation.

The reduction of the solution (4.27) above to the desirable form (4.29)
has been done once and that is enough. Whenever a pair of conjugate
imaginary roots of the auxiliary equation appears, we write down at
once, in the form given on the right in equation (4.29), the particular
solution corresponding to those two roots.

Example 4.2.6
EXAMPLE (a): Solve the equation
D − 3D + 9D + 13 y = 0
 
3 2

For the auxiliary equation


m3 − 3m2 + 9m + 13 = 0
one root, m1 = −1, is easily found. When the factor (m + 1) is
removed by synthetic division, it is seen that the other two roots
are solutions of the quadratic equation
m2 − 4m + 13 = 0
Those roots are found to be m2 = 2 + 3i and m3 = 2 − 3i. The
auxiliary equation has the roots m = −1, 2±3i. Hence the general
solution of the differential equation is
y = c1e−x + c2e2x cos 3x + c3e2x sin 3x

Repeated imaginary roots lead to solutions analogous to those brought


in by repeated real roots. For instance, if the roots m = a ± ib occur
three times, then the corresponding six linearly independent solutions
of the differential equation are those appearing in the expression
c1 + c2x + c3x e cos bx + c4 + c5x + c6x eax sin bx
   
2 ax 2
Example 4.2.7
Solve the equation
D + 8D + 16 y = 0
 
4 2

The auxiliary equation m4 + 8m2 + 16 = 0 may be written


2
m +4 =0

2

so its roots are seen to be m = ±2i, ±2i. The roots m1 = 2i and


m2 = −2i occur twice each. Thinking of 2i as 0 + 2i and recalling
that e0x = 1, we write the solution of the differential equation as
y = (c1 + c2x) cos 2x + (c3 + c4x) sin 2x

In such exercises as those below a fine check can be obtained by direct


substitution of the result and its appropriate derivatives into the dif-
ferential equation. The verification is particularly effective because the
operations performed in the check are so different from those performed
in obtaining the solution.

4.3 Non Homogeneous Linear Differential Equations with


Constant Coefficients

Let
f (x) = a0y (n) + a1y (n−1) + . . . + any = Q(x) (4.31)
be a differential equation with real constant coefficients a0, a1, . . . , an
Theorem 4.3.1. The general solution of the non-homogeneous equa-
tion ?? is equal to the sum of the general solution of the corresponding
homogeneous equation and some particular solution of the non homo-
geneous equations.
yg = yh + yp (4.32)

Example 4.3.1
Find the general solution of the non homogeneous equation
y 00 − 2y 0 − 3y = 1 − x2 (4.33)
Solution
For ygeneral we have y 00 −2y 0 −3y = 0 and the characteristic equation
is
f (m) = m2 − 2m − 3 = 0
f (m) = (m − 3)(m + 1) = 0 =⇒ m1 = −1, m2 = 3 and
general solution is
yh = c1e−x + c2e3x
We have to look for yp solutions in the term.
yp = Ax2 + Bx + C
Where A, B, C are constants to be determined.
yp =Ax2 + Bx + C
yp0 = 2Ax + B
yp00 = 2A
We substitute these derivatives in the equation ??
y 00 − 2y 0 − 3y = 1 − x2
2A − 4Ax − B − 3(Ax2 + Bx + C) = 1 − x2
2A − 4Ax − 2B − 3Ax2 − 3Bx − 3C = 1 − x2
− 3Ax2 − (4A + 3B)x + (2A − 2B − 3C) = 1 − x2
Comparing the coefficients
1
3Ax2 = x2 =⇒ A =
3
−(4A + 3B)x = 0 =⇒ 4A + 3B = 0 or x = 0
2A − 2B − 3C = 1
i.e. 3B = −4 3 =⇒ B = 9
4

Also 23 + 98 − 3C = 1 =⇒ C = 5
27

So yg = yh + yp = c1e−x + c2e3x + 13 x2 − 49 x + 27
5

You might also like