Download as pdf or txt
Download as pdf or txt
You are on page 1of 137

S. B.

Waluya
Preface i

PREFACE

Differential Equation arises in many areas of science, engineering, and other, especially
whenever a deterministic relation involving an unknown function and one or more
derivatives of these function. The study of differential equations is wide field in pure
(analysis, algebra, geometry), applied mathematics, physics, engineering. Because many
fields use the differential equation so it is important to know about differential equations.
However, the models which describe the daily life phenomena usually arise to the
nonlinear differential equations. So, not all mathematical models in the differential
equations can be solved analytically.

This book gives an overview the concept of differential equations. This book starts from
the simple problem to the more difficult problem. Study from the linear problems to the
nonlinear one. So, this book is good for the student who study the differential equations
in the undergraduate and also for the student who want to do their research.

A lot of figures are made in this book to give more illustrations about the problems. Many
exercises also are given in this book to give more clearly about the topics that are
discussed. I would like to refer to the reader to study more about differential equations
and the application in the books of the references.

This book is organized as follows. In chapter 1 we will discuss about introduction of


differential equations. First order differential equations with many types of differential
equations and also the applications of the first order differential equations are discussed
in chapter 2 of this book. Chapter 3, it will be discussed the second differential equations.
The higher order differential equations will be discussed in chapter 4 of this book.
Systems of linear differential equations and nonlinear differential equations will be
discussed in chapter 5 and chapter 6 respectively.

I would like to thank my former supervisor Dr. ir . Wim T. van Horssen (Wim) for
helping me and discussing about differential equations and also for the comment about
ii Preface

this book. I would like to thank the Delft University of Technology, the Netherlands and
the Semarang State University, Indonesia (UNNES) for giving me the opportunity to
carry out writing this book. This work would not have been possible without the financial
support from the Indonesian Government, under Directorate General of Higher
Education, so I am very thankful. Finally, I am very grateful to my big family, especially
to my dearest wife Evi and our beloved sons Albertus and Andre for their love, support,
patience, and understanding during my absence from them. All the above cannot happen
without the power of God, so I am very thankful to God that everything becomes
possible.

S. B. Waluya
Contents iii

CONTENTS

Preface i

Contents iii

I. Introduction to Differential Equations 1


1.1. Ordinary and Partial Differential Equation 1
1.2. System of Differential Equations 2
1.3. Order of Differential Equations 2
1.4. Solutions of Differential Equations 3
1.5. Linear and Nonlinear Differential Equations 5
1.6. Directions Field 6

II. First Order Differential Equations 11


2.1. Linear Differential Equations 11
2.2. Separable Differential Equations 21
2.3. Bernoulli Differential Equations 25
2.4. Exact Differential Equations 30
2.5. Homogeneous Differential Equations 37
2.6. Applications of First Order Differential Equations 41

III. Second Order Differential Equations 57


3.1. Homogeneous Differential Equations with Constant Coefficients 57
3.2. Linear Dependence and Wronskian 76
3.3. Nonhomogeneous Differential Equations 81
3.4. Undetermined Coefficient 82
3.5. Variations of Parameters 91
3.6. Application of Second Order Differential Equations 97

IV. Higher Order Differential Equations 111


4.1. Concept of 𝑛𝑡ℎ Order Linear Equations 111
4.2. Homogeneous 𝑛𝑡ℎ Order Linear Diff. Eq. with Constant Coefficients 113
4.3. Undetermined Coefficients 118
4.4. Variations of Parameters 124

V. System of Differential Equations 129


5.1. Homogeneous Differential Equation with Constant Coefficient 130
5.2. Complex Eigenvalues 141
5.3. Repeated Eigenvalues 152
5.4. Nonhomogeneous Linear System 160
iv Contents

VI. Introduction to Nonlinear Differential Equations 165


6.1. Pendulum 165
6.2. Duffing Equation 170
6.3. Limit Cycle 172
6.4. Van der Pol Equation 174

References 177

Appendix 179
CHAPTER I
INTRODUCTION TO DIFFERENTIAL EQUATIONS

In this chapter it will be discussed definitions in Differential Equations.


Differential Equation arises in many areas of science, engineering, and other, especially
whenever a deterministic relation involving an unknown function and one or more
derivatives of these function. The study of differential equations is wide field in pure
(analysis, algebra, geometry), applied mathematics, physics, engineering. Consider
Newton’s law 𝐹 = 𝑚 × 𝑎. If 𝑦 𝑡 is the position of the particle with mass 𝑚 at the time
𝑡 acted by a force𝐹. Then it will be obtained the equation
𝑑2𝑦 𝑑𝑦
𝑚 𝑑𝑡 2 = 𝐹 𝑡, 𝑦, 𝑑𝑡 , (1.0.1)
𝑑𝑦
where 𝐹 may be a functions of 𝑡, 𝑦, and . If 𝐹 is given then it is necessary to find a
𝑑𝑡

function 𝑦 that satisfy the equation (1.0.1).


It will be introduced in this chapter ordinary and partial differential equations,
system of differential equations, order of differential equations, solutions of differential
equations, linear and nonlinear differential equations, and direction field of differential
equations respectively.

1.1. Ordinary and Partial Differential Equation


The classification of differential equations based on whether the unknown function
depends on single independent variable or more than one variable. The differential
equations where the unknown function is one variable (usually 𝑦(𝑥) or sometimes 𝑦(𝑡))
are called ordinary differential equations. Otherwise the differential equations with two
or more variables of unknown functions are called partial differential equations. Consider
the following differential equations.
𝑑𝑦
= sin 𝑥 ; 𝑦 ′′ + 4𝑦 = 0; 𝑦 ′′′ 𝑥 + sin 𝑥 = 0. (1.1.1)
𝑑𝑥

Equation (1.1.1) gives examples of ordinary differential equations. Consider


𝜕𝑢 𝜕𝑢 𝜕2𝑢 𝜕2𝑢
+ 𝜕𝑦 = 0 ; 𝜕𝑥 2 + 𝜕𝑦 2 = 0. (1.1.2)
𝜕𝑥
2 Chapter 1-Introduction ODEs

Equation (1.1.2) gives examples of partial differential equations.

1.2. System of Differential Equations


The differential equations can be classified by the number of unknown functions that
are involved. If there are two or more unknown functions in the equations then need a
system of equations. For example, the Lotka–Volterra, or predator–prey, equations are
important in ecological modeling. The equation system can be given in equation (1.2.1)
𝑑𝑦
= −𝑐𝑦 + 𝛾𝑥𝑦,
𝑑𝑡
𝑑𝑥 (1.2.1)
= 𝑎𝑥 − 𝛼𝑥𝑦,
𝑑𝑡

where 𝑦(𝑡) and 𝑥(𝑡) are the respective populations of the predator and prey species. The
constants𝑎, 𝛼, 𝑐 and 𝛾 are based on empirical observations and depend on the particular
species being studied.

1.3. Order of Differential Equations


The order of a differential equation is the order of the highest differential or
derivative that appears in the equation. In equation (1.1.1) are the ordinary differential
equations with one, two, and three respectively. In equation (1.1.2) are partial differential
equations with order one and two. The general form of ordinary differential equation of
the nth order can be given by
𝐹 𝑡, 𝑢 𝑡 , 𝑢′ 𝑡 , … , 𝑢(𝑛 ) (𝑡) = 0. (1.3.1)
Equation (1.3.1) represents a relation between the independent variable 𝑡 and the values
of the function 𝑢 and its first 𝑛 derivative, 𝑢′′ , … , 𝑢(𝑛) . For example,
𝑦 ′′ + sin 𝑡 𝑦 ′ + 𝑦 2 = 𝑡 2 + 2. (1.3.2)
Equation (1.3.2) is the second order ordinary differential equation for 𝑦 = 𝑢(𝑡).
𝑑4 𝑥 𝑑2 𝑥
+ + 𝑥 = sin(2𝑥) ; 𝑦 (3) + 𝑦 ′′ 4
= 𝑡,
𝑑𝑡 4 𝑑𝑡 2
are the fourth and the third order ordinary differential equations respectively. While,
𝑢𝑥𝑥 + 2𝑢𝑦𝑦 + 𝑢𝑧𝑧 = 0; 𝑢𝑢𝑥 + 𝑢𝑦𝑦𝑥 + 𝑢 = 0,
are the second and the third order partial differential equations respectively.
Chapter 1-Introduction ODEs 3

1.4. Solutions of Differential Equations


A function 𝑦 = 𝑓 𝑡 is called a solution of a given differential equation on some
open interval 𝑎 < 𝑡 < 𝑏 if 𝑓(𝑡) is defined and differentiable throughout the interval and
is such that the equation becomes an identity if 𝑦 and the derivatives of 𝑦 are replaced
with 𝑓 and the derivatives of 𝑓. The curve (the graph) of 𝑓 is called a solution curve.
The open interval 𝑎 < 𝑡 < 𝑏 means that the end points 𝑎 and 𝑏 are not regarded as points
belonging to the interval. For example,
𝑑𝑇
= −𝑘𝑇, (1.4.1)
𝑑𝑡

has solution 𝑇 𝑡 = 𝑐 𝑒 −𝑘𝑡 , where −∞ < 𝑡 < ∞, and where 𝑐 is an arbitrary constant.
Is 𝑦 𝑥 = 𝑐1 cos 3𝑥 + 𝑐2 sin 3𝑥 where 𝑐1 and 𝑐2 are arbitrary constants, a solution of the
differential equation
𝑦 ′′ + 9𝑦 = 0.
To do this, we have 𝑦 𝑥 = 𝑐1 cos 3𝑥 + 𝑐2 sin 3𝑥 , then are obtained 𝑦′ 𝑥 =
−3𝑐1 sin 3𝑥 + 3𝑐2 cos 3𝑥 and 𝑦 ′′ 𝑥 = −9𝑐1 cos 3𝑥 − 9𝑐2 sin 3𝑥.
So,
𝑦 ′′ + 9𝑦 = −9𝑐1 cos 3𝑥 − 9𝑐2 sin 3𝑥 + 9 𝑐1 cos 3𝑥 + 𝑐2 sin 3𝑥 = 0.
Then it will be said that 𝑦 𝑥 = 𝑐1 cos 3𝑥 + 𝑐2 sin 3𝑥 satisfied the differential
equation𝑦 ′′ + 9𝑦 = 0. It is mean that 𝑦 𝑥 = 𝑐1 cos 3𝑥 + 𝑐2 sin 3𝑥 is a solution of the
differential equation 𝑦 ′′ + 9𝑦 = 0 on the interval−∞ < 𝑥 < ∞. An example for partial
differential equation is given follows. Show that 𝑢 𝑥, 𝑦 = 𝐹1 𝑦 𝑥 + 𝐹2 (𝑦) is a solution
of the partial differential equation 𝑢𝑥𝑦 = 0 . From the function 𝑢 𝑥, 𝑦 = 𝐹1 𝑦 𝑥 +
𝐹2 (𝑦), it can be found 𝑢𝑥 = 𝐹1 (𝑦) and 𝑢𝑥𝑦 = 0. So, can be concluded that 𝑢 𝑥, 𝑦 =
𝐹1 𝑦 𝑥 + 𝐹2 (𝑦) is solution of the partial differential equation 𝑢𝑥𝑦 = 0.
General solution of a differential equation is a set of all solutions (involve the
number of arbitrary constants or functions). Usually is called a complete solution of the
differential equation. The particular solution of a differential equation is any one solution.
For example 𝑦 = 𝑎 cos 𝑥 + 𝑏 sin 𝑥 with 𝑎 and 𝑏 are arbitrary constants is a general
solution of the differential equation in the form of 𝑦 ′′ + 𝑦 = 0. Equation 𝑦 = 2 sin 𝑥 and
𝑦 = cos 𝑥 are the particular solutions of the equation 𝑦 ′′ + 𝑦 = 0. The general solution
constructs a family of the solutions. Each value of 𝑎 and 𝑏 gives a solution curve. A
4 Chapter 1-Introduction ODEs

function 𝑦 = 𝑥 + 𝑐 where 𝑐 is arbitrary constant is a general solution of the differential


equation 𝑦 ′ = 1. The solution curves can be given on Figure 1.4.1.

Figure 1.4.1. Solution curves for several values of c from the general solution 𝑦 = 𝑥 + 𝑐 of the differential
equation 𝑦 ′ = 1.

Initial value problem is an differential equation together with specified value, called
the initial condition, of the unknown function at a given point in the domain of the
solution. A simple example is to solve ordinary differential equation
𝑦 ′ + 𝑦 = 0, 𝑦 0 = 2. (1.4.2)
We have to find the function 𝑦(𝑡) that satisfies these two equations. Please note that 𝑦′
𝑑𝑦 𝑑𝑦 𝑑𝑦
can be written by 𝑦 ′ = , so we have 𝑑𝑡 + 𝑦 = 0, and = −𝑦. Rearrange the equation
𝑑𝑡 𝑑𝑡

using separation variable and will be obtained


𝑑𝑦
= −𝑑𝑡. (1.4.3)
𝑦

We integrate both sides equation (1.4.3) (this introduces the unknown constant 𝑐1 ),
ln 𝑦 = −𝑡 + 𝑐1 . (1.4.4)
Eliminate ln from equation (1.4.4) and we obtain
𝑦 = 𝑒 𝑐1 𝑒 −𝑡 .
Let introduce new unknown constant 𝑐 = ±𝑒 𝑐1 , so the equation becomes
Chapter 1-Introduction ODEs 5

𝑦 = 𝑐𝑒 −𝑡 . (1.4.5)
We use initial condition 𝑦 0 = 2 equation (1.4.2) to find unknown constant 𝑐,
substituting 𝑡 = 0 and 𝑦 = 2 to the equation (1.4.5) and will be obtained 𝑐 = 2. Then it
will be obtained the solution of differential equation (1.4.2) that satisfy the given
condition, that is 𝑦 = 2𝑒 −𝑡 . The solution curves can be given on Figure 1.4.2 for several
values of 𝑐.

Figure 1.4.2. Solution curves for several values of c from the differential equation 𝑦 ′ + 𝑦 = 0. The thick
line is the solution with the initial condition that given.

1.5. Linear and Nonlinear Differential Equations


A differential equation is said to be linear if each term in the equation has only one
order of derivative, e.g., no term has both 𝑦 and the derivative of 𝑦 with respect to time.
Also, no derivative is raised to a power. In the simple word linear means that the variable
1
in an equation appears only with a power of one. So 𝑥 is linear but 𝑥 2 , 𝑥 3 , 𝑥 are non-
6 Chapter 1-Introduction ODEs

2
linear. Also any function like sin 𝑥 , cos 𝑥 are non-linear. Sometimes it can be said
that linear generally means "simple" and non-linear means "complicated". The theory for
solving linear equations is very well developed because linear equations are simple
enough to be solvable. Non-linear equations can usually not be solved exactly and are the
subject of much on-going research. Here is a brief description of how to recognize a
linear equation. Let, the equation for a line is
𝑦 = 𝑎𝑥 + 𝑏,
where 𝑎, 𝑏 are constants ( 𝑎 is the slope, and 𝑏 is the 𝑦 -intercept). In a differential
equation, when the variables and their derivatives are only multiplied by constants, then
the equation is linear. The variables and their derivatives must always appear as a simple
first power. The examples can be given as follows.
2𝑥′′ + 𝑥 = 1 and 𝑥′′ + 2𝑥′ + 𝑥 = 0 are linear,
1 1
𝑥 ′′ + 𝑥 = 0 is non-linear because 𝑥 is not a first power,

𝑥′ + 𝑥 3 = 0 is non-linear because 𝑥 3 is not a first power ,


𝑥 ′′ + cos 𝑥 = 0 is non-linear because cos 𝑥 is not a first power,
𝑥 𝑥 ′ + 𝑥 = 0 is non-linear because 𝑥′ is not multiplied by a constant.
Similar rules apply to multiple variable problems.
𝑥 2 + 2𝑦′ = 0 is linear
𝑦 𝑦 ′ + 𝑥 = 1 is non-linear because 𝑦′ is not multiplied by a constant.
Note, however, that an exception is made for the time variable 𝑡 (i.e. the variable that we
are differentiating by). We can have any function of 𝑡 appear in the equation, but still
𝑑𝑥
have an equation that is linear in 𝑥. 𝑥 ′′ + 𝑥 ′ + 𝑥 = cos 𝑡 and + 𝑡𝑥 = 0 are
𝑑𝑡

linear in 𝑥.

1.6. Directions Field


Consider the first order ordinary differential equation in the form
𝑑𝑦
= 𝑓(𝑥, 𝑦). (1.6.1)
𝑑𝑥

Differential equation (1.6.1) has a simple geometric interpretation. From calculus it can
𝑑𝑦
be known that the derivative of 𝑦(𝑥) is the slope of 𝑦(𝑥). Therefore a solution curve
𝑑𝑥
Chapter 1-Introduction ODEs 7

𝑑𝑦
of (1.6.1) that passes through a point (𝑥0 , 𝑦0 ) must have at that point the slope 𝑑𝑥 (𝑥0 )

equal to the value of 𝑓 at that point, that is,


𝑑𝑦
𝑥 = 𝑦 ′ 𝑥0 = 𝑓 𝑥0 , 𝑦0 .
𝑑𝑥 0
A useful direction field for equations of the general form (1,6.1) can be constructed
by evaluating 𝑓 at each point of a rectangular grid consisting of at least a few hundred
points. Then, at each point of the grid, a short line segment is drawn whose slope is the
value of 𝑓 at that point. Thus each line segment is tangent to the graph of the solution
passing through that point. A direction field drawn on a fairly fine grid gives a good
picture of the overall behavior of solutions of a differential equation. The construction of
a direction field is often a useful first step in the investigation of a differential equation.
The direction field method is important for two reasons. First, we need not solve
differential equation (1.6.1). This is essential because many ordinary differential
equations have complicated solution formulas or none at all. Second, the method shows,
in graphical form, the whole family of solutions and their typical properties.
Suppose that we want to know what the solution of the differential equation 𝑦 ′ =
2 − 𝑦 that has the value 𝑦 0 = 4 looks like. It can be seen from direction field and start
at 4 on the vertical axis. At this point it is known that the solution is decreasing. So we
start drawing a decreasing solution and when we hit an arrow we just make sure that we
stay parallel to that arrow. This complete illustration can be given on Figure 1.6.1.

Figure 1.6.1. Direction field for differential equation y ′ = 2 − y, and plot its solution with 𝑦 0 = 4
8 Chapter 1-Introduction ODEs

From Figure (1.6.1) that the solutions are decreasing functions when 𝑦 > 2, that they
are increasing functions when 𝑦 < 2, and all solutions appear to tend the value 3 as 𝑥 →
∞.
To get a better idea of how all the solutions are behaving, let's put a few more
solutions in. The solution curves for several initial conditions can be given on Figure
1.6.2.

Figure 1.6.2. Direction field for differential equation y ′ = 2 − y, and plot their solution for several initial
conditions

Exercises
1. Determine the order, unknown function, and the independent variable in each of
the following differential equations.
𝑑3𝑦 𝑑2𝑦
a. 𝑑𝑡 3 + 2 𝑑𝑡 2 = sin 𝑡 + 𝑒 2𝑡
b. 𝑦 ′′′ + 2𝑦𝑦 ′ = 𝑡 2
c. 𝑥 ′′ + 𝑥 ′ 2 𝑥 = 𝑠 2 + 2
d. 1 + 𝑦 2 𝑦 ′′′ + 𝑦 ′′ = sin 𝑡
e. 𝑦 (4) + 𝑦 2 𝑦 ′′ = 𝑥 + cos 𝑥
𝑑5𝑦 𝑑𝑦
f. 𝑑𝑥 5 − sin 𝑥 𝑑𝑥 = 𝑒 𝑥 + 1
g. 𝑦 ′′ + 𝑦 ′ 3 𝑦 = 𝑠 2 + tan 𝑠
h. 𝑢𝑥𝑥 + 𝑢𝑦 = 1
Chapter 1-Introduction ODEs 9

i. 𝑢𝑥 𝑢𝑦 + 𝑢𝑥𝑥𝑦 = sin 𝑥
j. 𝑢𝑥𝑦𝑧 + 𝑢𝑥𝑦 + 𝑢𝑦𝑧 = 1

2. Verify that the given function or functions is a solution of the following


differential equations
1
a. 𝑦 ′ + 𝑦 = 1, 𝑦1 𝑡 = 1 + 𝑒 −𝑡 , 𝑦2 𝑥 = 1 − 2 𝑒 −𝑡
𝑑2𝑦 1
b. − 𝑦 𝑡 = 1, 𝑦1 𝑡 = 𝑒 𝑡 − 2𝑒 −𝑡 − 1, 𝑦2 𝑡 = 2𝑒 𝑡 − 2 𝑒 −𝑡 − 1
𝑑𝑡 2
1
c. 𝑦 − 2𝑦 ′ + 𝑦 = sin 𝑡 , 𝑦1 𝑡 = 𝑒 𝑡 + 2𝑡𝑒 𝑡 + 2 cos 𝑡 ;
′′

1 1 1
𝑦2 𝑡 = 𝑒 𝑡 + 𝑡𝑒 𝑡 + cos 𝑡
2 4 2
𝑑𝑦 𝑥 2 𝑥 −𝑠 2 𝑥2
d. − 2𝑥𝑦 = 1, 𝑦 = 𝑒 0
𝑒 𝑑𝑠 + 𝑒
𝑑𝑥

𝑑2𝑦 𝜋
e. + 𝑦 = sec 𝑥, 0 < 𝑥 < 2 , 𝑦1 𝑥 = sin 𝑥 + 2 cos 𝑥 + 𝑥 sin 𝑥 +
𝑑𝑥 2
ln(cos 𝑥) cos 𝑥; 𝑦2 𝑥 = cos 𝑥 + 𝑥 sin 𝑥 + ln(cos 𝑥 )) cos 𝑥

f. 𝑢𝑥 + 𝑢 = 0, 𝑢1 𝑥, 𝑦 = 𝑦𝑒 −𝑥 ; 𝑦2 𝑥, 𝑦 = sin 𝑦 𝑒 −𝑥

𝜕2𝑢
g. + 𝑢 = 1; 𝑢1 = 𝑦 sin 𝑥 + 2 cos 𝑥 + 1 ∶ 𝑢2 = 𝑦 sin 𝑥 + 𝑦 2 cos 𝑥 + 1
𝜕𝑥 2

h. 𝑢𝑥𝑥 − 𝑢𝑦𝑦 = 0; 𝑢1 = sin 𝑥 + 𝑦 + cos 𝑦 − 𝑥 ; 𝑢2 = 𝑥 + 𝑦 + sin 𝑦 − 𝑥

i. 𝑢𝑥𝑥 = 𝑎 𝑢𝑥 ; 𝑢1 = 𝑦 + 2𝑦𝑒 𝑎𝑥 ; 𝑢2 = sin 𝑦 + 𝑦 𝑒 𝑎𝑥


3
j. 𝑢𝑥 − 𝑏𝑢𝑦 = 0; 𝑢1 = sin 𝑦 + 𝑏𝑥 ; 𝑢2 = 𝑦 + 𝑏𝑥

3. Solve the following differential equations by integration.


a. 𝑦 ′ = sin 𝑥
𝑑𝑦
b. 𝑑𝑡 = 𝑒 𝑡 + 1
2
c. 𝑦 ′ = 𝑥𝑒 𝑥
d. 𝑦 ′ = 𝑥 2 + 𝑥
e. 𝑦 ′ = 𝑒 𝑥 𝑥

4. Please find the values of 𝑟 such that the solutions of the following differential
equations in the form of 𝑦 = 𝑒 𝑟𝑡 .
a. 𝑦 ′′ + 4𝑦 = 0
b. 2𝑦 ′′ + 3𝑦 ′ + 𝑦 = 0
c. 𝑦 ′′′ − 6𝑦 ′′ + 11𝑦 ′ − 6𝑦 = 0
13 3 1
d. 𝑦 ′′′ − 12 𝑦 ′′ + 8 𝑦 ′ − 24 𝑦 = 0
13 23
e. 𝑦 (4) − 𝑦 ′′′ + 14𝑦 ′′ − 𝑦 ′ + 3𝑦 = 0
2 2
10 Chapter 1-Introduction ODEs

5. In each of the following problems draw a direction field for the given differential
equation. Based on the direction field, determine the behavior of 𝑦 as 𝑡 → ∞. If
this behavior depends on the initial value of 𝑦 at 𝑡 = 0 , describe this
dependency. Note that the right sides of these equations depend on 𝑡 as well as𝑦;
therefore their solutions can exhibit more complicated behavior than those in the
text.
a. 𝑦 ′ + 3𝑦 = 𝑡 + 𝑒 2𝑡
b. 𝑦 ′ + 2𝑦 = 𝑡 2 𝑒 −2𝑡
c. 𝑦 ′ + 𝑦 = 𝑒 𝑡 + 2
d. 𝑦 ′ + 1 + 𝑡 𝑦 = 3 cos 𝑡 𝑡 > 0
e. 𝑦 ′ + 2𝑦 = 3𝑒 −𝑡
f. 𝑡𝑦 ′ + 2𝑦 = sin 𝑡, 𝑡 > 0
g. 𝑦 ′ + 2𝑡𝑦 = 2𝑡𝑒 −𝑡
1
h. 𝑦 ′ + 2 𝑦 = 𝑡𝑒 −𝑡
i. 𝑦 ′ + 𝑦 = 5 sin 𝑡
j. 2𝑦 ′ + 𝑦 = 3𝑡 2
k. 𝑦 ′ + 3𝑦 = 3𝑡𝑒 −2𝑡
l. 𝑦 ′ + 𝑦 = 𝑒 −𝑡 sin 𝑡
m. 𝑦 ′ − 𝑦 = 𝑡𝑒 −2𝑡
CHAPTER II
FIRST ORDER DIFFERENTIAL EQUATIONS

In this chapter it will discussed a first order ordinary differential equation in the
following form
𝑑𝑦
= 𝑓 𝑡, 𝑦 , (2.0.1)
𝑑𝑡

where 𝑓(𝑡, 𝑦) is a given function of 𝑡 and 𝑦. In general, we cannot solve the differential
equation (2.0.1) with arbitrary 𝑓(𝑡, 𝑦). However, there are many forms of 𝑓(𝑡, 𝑦) for
which it can be solved the first order differential equation (2.0.1) explicitly.
It will be described in this chapter several methods. This chapter will be organized
as follows. In section 2.1 it will be studied linear equations, separable equations will be
discussed in section 2.2, in section 2.3 will be discussed Bernoulli equation. Exact
differential equation will be studied in section 2.4. Section 2.5 will discuss homogenous
equations, and applications of the first order differential equations will be given in
section 2.6.

2.1. Linear Differential Equations


If the function 𝑓 in differential equation (2.0.1) depends linearly on the variable 𝑦,
then the function 𝑓 can be written as 𝑓 𝑡, 𝑦 = −𝑝 𝑡 𝑦 + 𝑞(𝑡) (that is, as a function of 𝑥
times 𝑦, plus another function of 𝑥), and then the differential equation (2.0.1) becomes
𝑦′ + 𝑝 𝑡 𝑦 = 𝑞 𝑡 , (2.1.1)
where 𝑝(𝑡) and 𝑞(𝑡) are functions in 𝑡 . The differential equation (2.1.1) is called first
order linear equation. For example, if 𝑝 𝑡 = 𝑟 and 𝑞 𝑡 = 𝑘 with 𝑟 and 𝑘 are constants,
𝑟 ≠ 0. Then equation (2.1.1) becomes
𝑦 ′ + 𝑟𝑦 = 𝑘. (2.1.2)
Equation (2.1.2) can be solved by straightforward integration method. First rewrite
equation (2.1.2) in the form
𝑑𝑦
𝑘 = −𝑟𝑑𝑡. (2.1.3)
𝑦−
𝑟

Then, by integration can be obtained


12 Chapter 2-First Order ODEs

𝑘
ln |𝑦 – | = −𝑟𝑡 + 𝑐1 , (2.1.4)
𝑟

where 𝑐1 in an arbitrary constant. By taking the exponential both sides we will obtain
𝑘
𝑦 − 𝑟 = ±𝑒 𝑐1 𝑒 −𝑟𝑡 , (2.1.5)

and solving for 𝑦, finally will be obtained


𝑘
𝑦 = 𝑟 + 𝑐𝑒 −𝑟𝑡 , (2.1.6)

where 𝑐 = ±𝑒 𝑐1 . For example, if 𝑟 = 2 and 𝑘 = 3, then equation (2.1.2) becomes


𝑦 ′ + 2𝑦 = 3, (2.1.7)
and its general solution can be given by
3 −2𝑡
𝑦 = 2 + 𝑐𝑒 . (2.1.8)
3
From equation (2.1.8) if 𝑐 = 0 then we have a constant function 𝑦 = 2 that also solution

of the linear differential equation (2.1.7). It can be observed that if 𝑡 → ∞ then 𝑒 −2𝑡 → 0.
3
So, the graph for every solution approaches the asymptote 𝑦 = 2 . The constant solution
3 𝑑𝑦
𝑦 = 2 is often called an equilibrium solution since is always zero for this solution. The
𝑑𝑡

equilibrium solution can be found without solving the differential equation, by setting
𝑑𝑦
= 0 and then solving for 𝑦 . The general curves (general solutions) of linear
𝑑𝑡

differential equation (2.1.7) for several initial conditions can be shown in Figure 2.1.1.
The direction field can be given in Figure 2.1.2.

3 −2𝑡
Figure 2.1.1. Solution curves for several values of c from the general solution 𝑦 = 2 + 𝑐𝑒 of the

differential equation 𝑦 ′ + 2𝑦 = 3.
Chapter 2-First Order ODEs 13

Figure 2.1.2. Direction field of the differential equation 𝑦 ′ + 2𝑦 = 3.

However, the above direct method of solution cannot be used to solve the general
equation (2.1.1), so we need to use a different method of solution for it. The method can
be given as follows. First rewrite equation (2.1.6) in the form
𝑘
𝑦𝑒 𝑟𝑡 = 𝑟 𝑒 𝑟𝑡 + 𝑐 . (2.1.9)

Differentiate equation (2.1.9) with respect to 𝑡 , will obatin


𝑦 ′ + 𝑟𝑦 𝑒 𝑟𝑡 = 𝑘𝑒 𝑟𝑡 . (2.1.10)
Equation (2.1.10) is equivalent to the differential equation (2.1.2). It can be observed that
differential equation (2.1.2) can be solved by reversing the correspondence steps. First,
multiply the differential equation (2.1.2) by 𝑒 𝑟𝑡 and will be obtained equation (2.1.10).
Please note that the left side equation (2.1.10) is the derivative of the left side equation
(2.1.9), so equation becomes
𝑦𝑒 𝑟𝑡 ′
= 𝑘𝑒 𝑟𝑡 . (2.1.11)
Finally, we integrate both sides equation (2.1.11) and will obtain equation (2.1.9) and we
obtain equation (2.1.6) which solution of the linear differential equation (2.3). The
function 𝑒 𝑟𝑡 that can make equation (2.11) integrable is called integrating factor. This
method can effective to solve the differential equation (2.1.2) if we can obtain the
integrating factor directly from the original differential equation. Let we check the
integrating factor of equation (2.1.7) is 𝑒 2𝑡 . We assume that equation (2.1.7) has an
14 Chapter 2-First Order ODEs

integrating factor. Let the integrating factor is 𝜇(𝑡). We multiply the differential equation
(2.1.7) by 𝜇(𝑡) and we obtain
𝜇 𝑦 ′ + 2𝑦 = 3𝜇. (2.1.12)
The left side equation (2.1.12) might be the derivative of the product 𝜇𝑦. For this to be
true the second term on the left side equation (2.1.12) 𝜇2𝑦, should be same as 𝜇 ′ 𝑦. This
means that
𝜇 ′ = 2𝜇,
or
𝜇′
= 2.
𝜇
And
𝑑
ln 𝜇 = 2.
𝑑𝑡
By integrating both sides, then will be obtained
ln 𝜇 = 2𝑡 + 𝑘,
where 𝑘 is constant. Without loss of generality we might choose 𝑘 = 0 and then we
obtain
𝜇 = 𝑒 2𝑡 .
Substituting 𝜇 = 𝑒 2𝑡 into equation (2.1.12) and we will obtain
𝑦 ′ 𝑒 2𝑡 + 𝑦𝑒 2𝑡 = 3𝑒 2𝑡 . (2.1.13)
Please note that equation (2.1.13) can be written by
𝑦𝑒 2𝑡 ′
= 3𝑒 2𝑡 . (2.1.14)
By integrating equation (2.1.14) we obtain
3
𝑦𝑒 2𝑡 = 3𝑒 2𝑡 𝑑𝑡 = 2 𝑒 2𝑡 + 𝑐. (2.1.15)

So by dividing both sides equation (2.1.15) with 𝑒 2𝑡 we then obtain


3
+ 𝑐𝑒 −2𝑡 .
𝑦=
2
By using similar way, now we apply to the general equation (2.1.1). Assume that the
equation (2.1.1) has an integrating factor 𝜇(𝑡). We multiply equation (2.1.1) by 𝜇(𝑡) the
we obtain
𝜇𝑦 ′ + 𝜇𝑝 = 𝜇𝑞. (2.1.16)
Chapter 2-First Order ODEs 15

The left side equation (2.1.16) might be the derivative of the product 𝜇𝑦. For this to be
true the second term on the left side equation (2.1.16) 𝜇𝑝𝑦, should be same as 𝜇 ′ 𝑦. This
means that
𝜇 ′ = 𝑝𝜇,
or
𝜇′
= 𝑝.
𝜇
And
𝑑
ln 𝜇 = 𝑝.
𝑑𝑡
By integrating both sides, then will be obtained

ln 𝜇 = 𝑝 𝑑𝑡 + 𝑘,

where 𝑘 is constant. Without loss of generality we might choose 𝑘 = 0 and then we


obtain
𝜇 = exp 𝑝𝑑𝑡. (2.1.17)
Substituting 𝜇 = exp 𝑝𝑑𝑡 into equation (2.1.16) and we will obtain
𝑦 ′ exp 𝑝𝑑𝑡 + 𝑦 exp 𝑝𝑑𝑡 = 𝑞 exp 𝑝𝑑𝑡. (2.1.18)
Please note that equation (2.1.18) can be written by

𝑦 exp 𝑝𝑑𝑡 = 𝑞 exp 𝑝𝑑𝑡. (2.1.19)
By integrating equation (2.1.19) we obtain
𝑦 exp 𝑝𝑑𝑡 = 𝑞 exp 𝑝𝑑𝑡 𝑑𝑡 + 𝑐. (2.1.20)
So by dividing both sides equation (2.1.20) with exp 𝑝𝑑𝑡 we then obtain
𝑞 exp 𝑝𝑑𝑡 𝑑𝑡 + 𝑐
𝑦= .
exp 𝑝𝑑𝑡

Example 1. Find solution of the initial value problem


𝑦 ′ − 𝑦 = 𝑡 + 𝑒 −𝑡 ; 𝑦 0 = 1. (2.1.21)
To solve the initial value problem (2.1.21) we have to find the first integral. According to
the factor integral in formula (2.1.17), we then obtain
𝜇 = exp −1𝑑𝑡 = 𝑒 −𝑡 . (2.1.22)
Multiply integrating factor (2.1.22) to the differential equation (2.1.21), and we obtain
16 Chapter 2-First Order ODEs

𝑦 ′ 𝑒 −𝑡 − 𝑦𝑒 −𝑡 = 𝑡𝑒 −𝑡 + 𝑒 −𝑡 ,
or
𝑦𝑒 −𝑡 ′
= 𝑡𝑒 −𝑡 + 𝑒 −2𝑡 . (2.1.23)
By integrating then equation (2.1.23) becomes
1
𝑦𝑒 −𝑡 = −𝑡𝑒 −𝑡 − 𝑒 −𝑡 − 2 𝑒 −2𝑡 + 𝑐. (2.1.24)

Divide both sides equation (2.1.24) by 𝑒 −𝑡 then we obtain general solution of differential
equation (2.1.21), that is
1
𝑦 = −𝑡 − 1 − 2 𝑒 −𝑡 + 𝑐𝑒 𝑡 . (2.1.25)

To satisfy the initial condition (2.1.21) we substitute 𝑡 = 0 and 𝑦 = 1 in equation (2.1.25)


5
and solve for constant 𝑐. We obtain the value 𝑐 = 2, so the solution of the given initial

value problem is
1 5
𝑦 = −𝑡 − 1 − 𝑒 −𝑡 + 𝑒 𝑡 .
2 2
The graph of the solution and solution curves for several initial values can be given in
Figure 2.1.3 and in Figure 2.1.4 can be shown

1
Figure 2.1.3. Solution curves for several values of c from the general solution 𝑦 = −𝑡 − 1 − 𝑒 −𝑡 + 𝑐𝑒 𝑡
2

of the differential equation 𝑦 ′ − 𝑦 = 𝑡 + 𝑒 −𝑡 .


Chapter 2-First Order ODEs 17

Figure 2.1.4. Direction field of the differential equation 𝑦 ′ − 𝑦 = 𝑡 + 𝑒 −𝑡 .

Example 2. Find solution of the initial value problem


𝑦 ′ + 𝑡𝑦 = 2𝑡; 𝑦 0 = 1. (2.1.26)
To solve the initial value problem (2.1.26) we have to find the first integral. According to
the factor integral in formula (2.1.17), we then obtain
1 2
𝜇 = exp 𝑡𝑑𝑡 = 𝑒 2 𝑡 . (2.1.27)
Multiply integrating factor (2.1.27) to the differential equation (2.1.26), and we obtain
1 2 1 2 1 2
𝑦 ′ 𝑒 2𝑡 + 𝑡𝑦𝑒 2𝑡 = 2𝑡𝑒 2𝑡 ,
or
1 2 ′ 1 2
𝑦𝑒 2𝑡 = 2𝑡𝑒 2 𝑡 . (2.1.28)

By integrating then equation (2.1.28) becomes


1 2 1 2
𝑦𝑒 2𝑡 = 2𝑒 2𝑡 + 𝑐. (2.1.29)
Divide both sides equation (2.1.29) by 𝑒 −𝑡 then we obtain general solution of differential
equation (2.1.26), that is
18 Chapter 2-First Order ODEs

1 2
𝑦 = 2 + 𝑐𝑒 −2𝑡 . (2.1.30)
To satisfy the initial condition (2.1.26) we substitute 𝑡 = 0 and 𝑦 = 1 in equation (2.1.30)
and solve for constant 𝑐. We obtain the value 𝑐 = −1, so the solution of the given initial
value problem is
1 2
𝑦 = 2 − 𝑒 −2𝑡 .
The graph of the solution curves for several initial values and the direction field can be
given in Figure 2.1.5 and in Figure 2.1.6 respectively.

Figure 2.1.5. Solution curves for several values of c from the general solution
1 2
𝑦 = 2 − 𝑒 −2𝑡 of the differential equation 𝑦 ′ + 𝑡𝑦 = 2𝑡.
Chapter 2-First Order ODEs 19

Figure 2.1.6. Direction field of the differential equation 𝑦 ′ + 𝑡𝑦 = 2𝑡

Exercises.
1. Find the general solution of the following first order linear differential equations.
a. 𝑦 ′ + 𝑦 = 𝑒 2𝑡 + 𝑡
b. 2𝑦 ′ − 𝑦 = sin t
c. 𝑡𝑦 ′ + 𝑦 = 𝑡 2 + 1
d. 𝑦 ′ − 2𝑦 − sin 𝑥 = 0
e. 𝑡𝑦 ′ − 𝑦 = 𝑡 + 𝑡 2 𝑒 𝑡
f. 2𝑦 ′ − 𝑦 = 𝑒 2𝑡 + sin 𝑡
g. 𝑡𝑦 ′ + 2𝑦 = 2𝑡 3 + 𝑡 2
1
h. 𝑦 ′ + 𝑡 𝑦 = 𝑡 −2
1
2
i. 𝑦 ′ − 𝑡 𝑦 = 𝑡 2
1 1
j. 𝑦 ′ + 𝑡 𝑦 = 𝑡 sin 𝑡
20 Chapter 2-First Order ODEs

2. Solve the given initial value problem for the following linear differential
equations.
a. 𝑦 ′ + 𝑦 = 𝑒 2𝑡 + 𝑡, 𝑦 0 = 1
b. 2𝑦 ′ − 𝑦 = sin t , 𝑦 0 = 1
c. 𝑡𝑦 ′ + 𝑦 = 𝑡 2 + 1, 𝑦 1 = 1
d. 𝑦 ′ − 2𝑦 − sin 𝑥 = 0 , 𝑦 0 = 0
e. 𝑡𝑦 ′ − 𝑦 = 𝑡 + 𝑡 2 𝑒 𝑡 , 𝑦 0 = 0
f. 𝑡𝑦 ′ − 𝑦 = 𝑒 2𝑡 + sin 𝑡 , 𝑦 0 = 2
g. 𝑡𝑦 ′ + 2𝑦 = 2𝑡 3 + 𝑡 2 , 𝑦 0 = 1
1
h. 𝑦 ′ + 𝑦 = 𝑡 −2 , 𝑦 1 = 1
𝑡
1
2
i. 𝑦 ′ − 𝑡 𝑦 = 𝑡 2 , 𝑦 1 = 1
1 1
j. 𝑦 ′ + 𝑡 𝑦 = 𝑡 sin 𝑡 , 𝑦 1 = 1

3. By Maple please give direction field the differential equations in problem 1.


4. Please do similar for the differential equations problems 2 and do also the
particular with given condition.
𝑑𝑦
5. Give the direction field for differential equation = 1 − 2𝑦 and in it the
𝑑𝑡

solution satisfying 𝑦(0) = 2. What is the limit of any solution directly from the
differential equation? For what initial condition will the solution be increasing?
Constant? Decreasing?
6. Do similar question in number 5 with the initial value problem𝑦 ′ + 𝑦 = −1 +
𝑒 −𝑡 ; 𝑦 0 = 1 and also 𝑦 ′ + 𝑡𝑦 = −𝑡, 𝑦 0 = 1.
7. What is the differential equation if we have the general solution 𝑦 𝑥 =
𝑥 sin 𝑥 + 𝑐 𝑒 −𝑥 .
8. Find the differential equation with the particular solution 𝑦 𝑡 = 𝑒 −𝑡 + 𝑒 2𝑡 sin 2𝑡
9. Find the differential equation that all its solutions have limit 2 if 𝑡 → ∞.
10. Do similar question as number 9 if all solutions are asymptotic to line 𝑦 = 𝑡 −
1
as 𝑡 → ∞.
2

11. Solve the initial value problem


Chapter 2-First Order ODEs 21

𝑑𝑦
1 − 𝑡2 − 𝑡𝑦 = 𝑡 1 − 𝑡 2 , 𝑦 0 = 1
𝑑𝑡

12. Find the solution curve of the following differential equation


𝑑𝑦
𝑡 𝑡+2 + 2 𝑡 + 1 𝑦 = 1 + 3𝑡 2 , 𝑦 −1 = 0
𝑑𝑡
13. Solve the first order differential equation
𝑑𝑦
+ 2𝑦 = 𝑕 𝑡 , 𝑕 𝑡 = 𝑡, 𝑡 > 1, 𝑕 𝑡 = 𝑒 𝑡 , 𝑡 ≤ 1
𝑑𝑡
14. Find the solution curve for the initial value problem equation
𝑑𝑦 1
+𝑦− ,𝑦 0 = 0
𝑑𝑥 1 + 𝑒 −𝑥
15. Find the general solution of the differential equation in the form
1
𝑦′ + 𝑦 + =0
1 − 𝑒𝑡

2.2. Separable Differential Equations


If the function f in differential equation (2.0.1) can be written in the form of
𝑀 𝑡 𝑁(𝑦) so the differential equation (2.0.1) is called separable. For example, the
𝑑𝑦
equation = 𝑒 𝑡 𝑦 is separable. While 𝑥 + 𝑦 𝑑𝑦 + 𝑥 − 𝑦 𝑑𝑥 = 0 is not separable. In
𝑑𝑡

the general form the formula of separable differential equation can be given by
𝑝 𝑥 𝑑𝑥 + 𝑞 𝑦 𝑑𝑦 = 0. (2.2.1)
The solution of differential equation (2.2.1) can be given as follows. If 𝑃(𝑥) is an
antiderivative of 𝑝(𝑥) and 𝑄(𝑦) is an antiderivative of 𝑞(𝑦) , that is 𝑃′ 𝑥 = 𝑝 𝑥 ,
𝑄 ′ 𝑦 = 𝑞 𝑦 the equation (2.2.1) can be written as
𝑑𝑦
𝑃′ 𝑥 + 𝑄′ 𝑦 = 0,
𝑑𝑥
or
𝑑
𝑃 𝑥 +𝑄 𝑦 = 0. (2.2.2)
𝑑𝑥

This is because of the chain rule


𝑑 𝑑𝑦
𝑄 𝑦 = 𝑄′ 𝑦 .
𝑑𝑥 𝑑𝑥
22 Chapter 2-First Order ODEs

From (2.2.2) by integration can be obtained


𝑃 𝑥 + 𝑄 𝑦 = 𝑐, (2.2.3)
where 𝑐 is an arbitrary constant. So, equation (2.2.3) is solution of separable differential
equation (2.2.1).

Example 1. Show that the differential equation


𝑑𝑦
+ 𝑦 cos 𝑥 = 0, (2.2.24)
𝑑𝑥

is separable. Find the solution and the solutions curves.


We rewrite equation (2.2.24) in the form equation (2.2.1), that is
1
𝑑𝑦 + cos 𝑥 𝑑𝑥 = 0.
𝑦
So we conclude that differential equation (2.2.24) is separable. By integrating we will
obtain
ln 𝑦 + sin 𝑥 = 𝑐.
For several values of constant 𝑐, the direction field can be given in Figure 2.2.1.

𝑑𝑦
Figure 2.2.1. Direction field of the differential equation + 𝑦 cos 𝑥 = 0.
𝑑𝑥
Chapter 2-First Order ODEs 23

Example 2. Solve and give the solution curves of the following separable differential
equation
𝑦 ′ + 𝑡𝑦 = 0. (2.2.25)
We rewrite equation (2.2.25) in the form equation (2.2.1), that is
𝑑𝑦
+ 𝑡𝑑𝑡 = 0.
𝑦

By integrating we will obtain


1
ln 𝑦 + 𝑡 2 = 𝑐1 .
2
1 2
Or we can write 𝑦 = 𝑐𝑒 −2𝑡 , where 𝑐 = ±𝑒 𝑐1 .
For several values of constant 𝑐, the direction field can be given in Figure 2.2.2.

Figure 2.2.2. Direction field of the differential equation 𝑦 ′ + 𝑡𝑦 = 0.

Exercises.
1. Find the general solution of the following first order separable differential
equations.
a. 𝑦 ′ + 𝑥𝑦 = 0
𝑑𝑦 𝑥
b. +𝑦 =0
𝑑𝑥
𝑑𝑦
c. + 𝑡2 𝑦 = 0
𝑑𝑡
24 Chapter 2-First Order ODEs

d. 𝑦 ′ = 𝑒 𝑥−𝑦 + 𝑥𝑒 −𝑦
𝑑𝑥
e. = 1 + 𝑥2
𝑑𝑡

f. 𝑦 ′ = 𝑡𝑦 2 + 4𝑡
g. 𝑡𝑥 ′ = 𝑥 2 − 2𝑥 + 2
h. 𝑒 −𝑥 𝑑𝑥 − 𝑦𝑑𝑦 = 0
i. 𝑒 𝑥 + 𝑒 −𝑥 + 𝑦 2 𝑦 ′ = 0
𝑑𝑦 1−𝑒 −𝑥
j. =
𝑑𝑥 2+𝑦

2. Solve the given initial value problem for the following separable differential
equations.
a. 𝑦 ′ + 𝑥𝑦 = 0, 𝑦 0 = 1
𝑑𝑦 𝑥
b. + 𝑦 = 0, 𝑦 1 = 1
𝑑𝑥
𝑑𝑦
c. + 𝑡 2 𝑦 = 0, 𝑦 1 = 1
𝑑𝑡

d. 𝑦 ′ = 𝑒 𝑥−𝑦 + 𝑥𝑒 −𝑦 , 𝑦 0 = 1
𝑑𝑥
e. = 1 + 𝑥2 , 𝑥 1 = 1
𝑑𝑡

f. 𝑦 ′ = 𝑡𝑦 2 + 4𝑡, 𝑦 0 = 1
g. 𝑡𝑥 ′ = 𝑥 2 − 2𝑥 + 2, 𝑥 1 = 1
h. 𝑒 −𝑥 𝑑𝑥 − 𝑦𝑑𝑦 = 0, 𝑦 0 = 1
i. 𝑒 𝑥 + 𝑒 −𝑥 + 𝑦 2 𝑦 ′ = 0, 𝑦 0 = 1
𝑑𝑦 1−𝑒 −𝑥
j. = ,𝑦 0 = 1
𝑑𝑥 2+𝑦

3. Solve the general solution of the following differential equations.


a. 3𝑦 ′ = 𝑡𝑦(4 − 𝑦)
b. 𝑐𝑦 + 𝑑 𝑑𝑦 = 𝑎𝑦 + 𝑏 𝑑𝑡, 𝑎, 𝑏 , 𝑐 and 𝑑 are constants
c. 𝑦 2 − 3𝑦 𝑑𝑦 = 1 + 3𝑥 2 𝑑𝑥
d. 𝑦 ′ cos 3𝑦 + sin 2𝑥 = 0
𝑑𝑦 2𝑡
e. − 1+2𝑦 = 0
𝑑𝑡

𝑑𝑦 𝑒 𝑥 −2
f. + =0
𝑑𝑥 2+𝑦

g. 2 + 𝑦 𝑦 ′ = (𝑥 2 + 𝑥 + 1)
h. 𝑒 2𝑦 + 𝑦 𝑦 ′ = 1 − 𝑒 𝑥 sin 𝑥
Chapter 2-First Order ODEs 25

𝑑𝑦
i. = (sin 𝑥 + 𝑒 −𝑥 )𝑦 2
𝑑𝑥
1
j. 𝑦 2 + 𝑒 𝑦 1 − 𝑥 2 𝑦 ′ = arcsin 𝑥

2.3. Bernoulli Differential Equations


One of the types of linear differential equation is the differential equation which is
called Bernoulli differential equation. The general form the Bernoulli equation can be
given by
𝑦′ + 𝑝 𝑥 𝑦 = 𝑞 𝑥 𝑦𝑏 , (2.3.1)
where 𝑏 is a real number. It is clear that if 𝑏 = 0 or 𝑏 = 1 then differential equation
(2.3.1) becomes linear differential equation. Otherwise it is non linear differential
equation. The procedure to solve Bernoulli differential equation is by introducing new
variable in the equation (2.3.1). First, dividing equation (2.3.1) by 𝑦 𝑏 and will be
obtained
𝑦 ′ 𝑦 −𝑏 + 𝑝 𝑥 𝑦 1−𝑏 = 𝑞 𝑥 . (2.3.2)
Let introduce new variable
1−𝑏
𝑣 𝑥 =𝑦 𝑥 . (2.3.3)
Differentiating equation (2.3.3) with respect to 𝑥 then becomes
𝑣 ′ = 1 − 𝑏 𝑦 −𝑏 𝑦 ′ . (2.3.4)
Substituting equation (2.3.3) and (2.3.4) into equation (2.3.2) and we obtain
1
𝑣′ + 𝑝 𝑥 𝑣 = 𝑞 𝑥 .
1−𝑏
We obtain the first order differential equation, that is
𝑣 ′ + 1 − 𝑏 𝑝 𝑥 𝑣 = 1 − 𝑏 𝑞(𝑥). (2.3.5)
By using method to solve first order linear differential equation (2.3.5) as are presented in
section 2.1 then we will obtain 𝑣. Substituting 𝑣 into equation (2.3.3) then finally will be
obtain 𝑦(𝑥) which is solution of Bernoulli differential equation (2.3.1).

Example 1. Solve the first order differential equation in the form


𝑑𝑦
+ 3𝑥𝑦 = 𝑥𝑦 2 . (2.3.6)
𝑑𝑥
26 Chapter 2-First Order ODEs

And then plot the solution curves and the direction field.

Equation (2.3.6) is one of the differential equations which is in the form equation (2.3.1)
so differential equation (2.3.6) is Bernoulli differential equation. In this case we have
𝑝 𝑥 = 2𝑥, 𝑞 𝑥 = 𝑥, 𝑏 = 2. Dividing equation (2.3.6) by 𝑦 2 and we obtain
𝑦 −2 𝑦 ′ + 3𝑥𝑦 −1 = 𝑥. (2.3.7)
Let 𝑦 −1 = 𝑣 the we obtain 𝑣 ′ = −1𝑦 −2 𝑦′. By substituting into equation (2.3.7) so we
obtain
−𝑣 ′ + 3𝑥𝑣 = 𝑥.
We can writte
𝑣 ′ − 3𝑥𝑣 = −𝑥. (2.3.8)
Equation (2.3.8) is linear differential equation. By using step as given in section 2.1, we
can find integrating factor for equation (2.3.8), that is
3 2
𝜇 = exp( −3𝑥 𝑑𝑥) = 𝑒 −2𝑥 .
Multiplying this integrating factor into equation (2.3.8) and we obtain
3 2 3 2 3 2
𝑣 ′ 𝑒 −2𝑥 − 3𝑥𝑒 −2𝑥 𝑣 = −𝑥𝑒 −2𝑥 . (2.3.9)
Equation (2.3.9) can be written in the form
3 2 ′ 3 2
𝑣𝑒 −2𝑥 = −𝑥𝑒 −2𝑥 . (2.3.10)

Integrating both sides equation (2.3.10) and we will obtain


3 2 3 2 1 3 2 1 3 2
𝑣𝑒 −2𝑥 = −𝑥𝑒 −2𝑥 𝑑 𝑥 = 𝑑 𝑒 −2𝑥 = 𝑒 −2𝑥 + 𝑐.
3 3
So, we obtain
1 3 2
𝑣= + 𝑐𝑒 2𝑥 .
3
Finally we will obtain
3 2
1
𝑦 −1 = 𝑣 = 3 + 𝑐𝑒 2𝑥 . (2.3.11)

Equation (2.3.11) is solution of Bernoulli differential equation (2.3.6) in the implicit


function form. It is not necessary to state the solution in the explicit function.
Chapter 2-First Order ODEs 27

For several values of constant 𝑐, the direction field of the differential equation (2.3.6) can
be given in Figure 2.3.1.

Figure 2.3.1. Direction field and solution curves of the differential equation 𝑦 ′ + 3𝑥𝑦 = 𝑥𝑦 2 .

Example 2. Find the general equation and the particular solution of the Bernoulli
differential equation
1
𝑑𝑦 1
− 4 𝑦 = 𝑥3𝑦2 , 𝑦 0 = 1 . (2.3.12)
𝑑𝑥

Give also the solution curve and the direction field.

1 1
Equation (2.3.12) is in the form of equation (2.3.6) with 𝑝 𝑥 = − 4 , 𝑞 𝑥 = 𝑥 3 , 𝑏 = 2 .
1
Dividing equation (2.3.12) by 𝑦 2 , and we obtain
1 1
1
𝑦𝑦 −2 − 4 𝑦 2 = 𝑥 3 . (2.3.13)
1
Let 𝑦 2 = 𝑣. Differentiating with respect to 𝑡 and we will obtain
1 1
𝑣 ′ = 𝑦 −2 𝑦′.
2
28 Chapter 2-First Order ODEs

So equation (2.3.13) can be written by


1
2𝑣 ′ − 𝑣 = 𝑥 3 .
4
We write
1 1
𝑣′ − 8 𝑣 = 2 𝑥3 . (2.3.14)

We can find integrating factor for equation (2.3.14), which is


1 1
𝜇 𝑥 = exp − 𝑑𝑥 = 𝑒 −8𝑥 .
8
Multiplying this integrating factor to the equation (2.3.14), and will be obtained
1 1 1
− 𝑥 1 1
𝑣′ 𝑒 8
− 8 𝑒 −8𝑥 𝑣 = 2 𝑥 3 𝑒 −8𝑥 . (2.3.15)

Equation (2.3.15) can be written by



1 1 3 −1𝑥
𝑣𝑒 −8𝑥 = 𝑥 𝑒 8 .
2
Integrating both sides then we will obtain
1 1 3 −1𝑥 1
𝑣𝑒 −8𝑥 = 𝑥 𝑒 8 𝑑𝑥 = −4 3072 + 383𝑥 + 24𝑥 2 + 𝑥 3 𝑒 −8𝑥 + 𝑐.
2
So we obtain
1
𝑣 = −4 3072 + 383𝑥 + 24𝑥 2 + 𝑥 3 + 𝑐𝑒 8𝑥 .
And finally, we obtain the general solution of (2.3.12), that is
1 1
𝑦 2 = 𝑣 = −4 3072 + 383𝑥 + 24𝑥 2 + 𝑥 3 + 𝑐𝑒 8𝑥 .
Substituting 𝑡 = 0, 𝑦 = 1 then we will obtain 𝑐 = 12289. The particular solution of
initial value problem equation (2.3.13) is
1 1
𝑦 2 = −4 3072 + 383𝑥 + 24𝑥 2 + 𝑥 3 + 12289𝑒 8𝑥 .
The direction field and solution curve for 𝑦 0 = 1 of the differential equation (2.2.12)
can be given in Figure 2.3.2.
Chapter 2-First Order ODEs 29

1
1
Figure 2.3.2. Direction field and solution curve of the differential equation 𝑦 ′ − 𝑦 = 𝑥 3 𝑦 2 , 𝑦 0 = 1.
4

Exercises.
1. Show that the following differential equations are the Bernoulli differential
equation the find their general solution and Plot the direction field.
a. 𝑦 ′ − 𝑦 − 𝑥𝑦 5 = 0
b. 𝑦 ′ + 2𝑡𝑦 + 𝑦 2 𝑡 = 0
𝑑𝑦 1 1
c. + 3 𝑦 − 3 1 − 2𝑥 𝑦 4 = 0
𝑑𝑥

d. 𝑦 ′ + 𝑦 − 𝑦 2 (cos 𝑥 − sin 𝑥) = 0
𝑑𝑦
e. + 2𝑦 = 𝑡𝑦 −2
𝑑𝑡
𝑑𝑦 𝑦
f. + 𝑥 = 𝑦3
𝑑𝑥
𝑑𝑦
g. + 𝑦 − 𝑦2 = 0
𝑑𝑡

h. 𝑦 ′ − 𝑦 − 𝑒 𝑥 𝑦 2 = 0
i. 𝑦 ′ − 𝑦 − 𝑥𝑦 2 = 0
j. 𝑦 ′ + 2𝑦 = 𝑦 2 = 0
2. Find the solution curve each initial value problem of the following Bernoulli
differential equations
a. 𝑦 ′ − 𝑦 − 𝑥𝑦 5 = 0, 𝑦 0 = 1
b. 𝑦 ′ + 2𝑡𝑦 + 𝑦 2 𝑡 = 0, 𝑦 1 = 1
30 Chapter 2-First Order ODEs

𝑑𝑦 1 1
c. + 3 𝑦 − 3 1 − 2𝑥 𝑦 4 = 0, 𝑦 0 = 1
𝑑𝑥

d. 𝑦 ′ + 𝑦 − 𝑦 2 (𝑐𝑜𝑠 𝑥 − 𝑠𝑖𝑛 𝑥) = 0 , 𝑦 0 = 0
𝑑𝑦
e. + 2𝑦 = 𝑡𝑦 −2 , 𝑦 0 = 1
𝑑𝑡
𝑑𝑦 𝑦
f. + 𝑥 = 𝑦3, 𝑦 1 = 1
𝑑𝑥
𝑑𝑦
g. + 𝑦 − 𝑦 2 = 0, 𝑦 0 = 1
𝑑𝑡

h. 𝑦 ′ − 𝑦 − 𝑒 𝑥 𝑦 2 = 0, 𝑦 0 = 1
i. 𝑦 ′ − 𝑦 − 𝑥𝑦 2 = 0, 𝑦 0 = 2
j. 𝑦 ′ + 2𝑦 = 𝑦 2 = 0, 𝑦 0 = 1

2.4. Exact Differential Equations


Consider the differential equation
𝑥 − 𝑦 𝑑𝑦 + 𝑥 + 𝑦 𝑑𝑥 = 0. (2.4.1)
Equation (2.4.1) of course is one type of the first order linear differential equations.
However, the formula not in the form of equation (2.1.1) is studied in the previous
section. So we cannot solve differential equation (2.4.1) using the method on section 2.1.
Differential Equation (2.4.1) is also not separable equation and not in the form of
Bernoulli equation so we cannot use that methods to find the general equation. We will
study in this section one type of the first order differential equation which is called exact
differential equation. Please note that equation (2.4.1) has a condition. Observer that, the
1 1
function 𝜋 𝑥, 𝑦 = 2 𝑥 2 + 𝑥𝑦 − 2 𝑦 2 has properties
𝜕𝜋 𝜕𝜋
= 𝑥 + 𝑦, = 𝑥 − 𝑦. (2.4.2)
𝜕𝑥 𝜕𝑦

By using equation (2.4.2) we rewrite differential equation (2.4.1) in the form


𝜕𝜋 𝜕𝜋
𝑑𝑦 + 𝑑𝑥 = 0,
𝜕𝑦 𝜕𝑥
or
𝜕𝜋 𝜕𝜋 𝑑𝑦
+ 𝜕𝑦 = 0. (2.4.3)
𝜕𝑥 𝑑𝑥

Let we assume that 𝑦 = 𝑓(𝑥) then using chain rule we can write equation (2.4.3) in the
form
Chapter 2-First Order ODEs 31

𝑑𝜋 𝑑 1 1
= 𝑑𝑥 𝑥 2 + 𝑥𝑦 − 2 𝑦 2 = 0. 2.4.4)
𝑑𝑥 2

Integrating both sides equation (2.4.4) with respect to 𝑥 then will be obtained
1 1
𝜋 𝑥, 𝑦 = 2 𝑥 2 + 𝑥𝑦 − 2 𝑦 2 = 𝑐. (2.4.5)

Equation (2.4.5) is the solution of the differential equation (2.4.1). The problem is how to
find such equation (2.4.5) as a solution of the differential equation (2.4.1)?
Consider the general first order differential equation
𝑝 𝑥, 𝑦 𝑑𝑥 + 𝑞 𝑥, 𝑦 𝑑𝑦 = 0. (2.4.6)
Assuming there is a function 𝜋 𝑥, 𝑦 = 𝑐, with 𝑦 = 𝑓(𝑥) is differentiable function with
respect to 𝑥. The function 𝜋 𝑥, 𝑦 = 𝑐 satisfy
𝜕𝜋 𝜕𝜋
= 𝑝 𝑥, 𝑦 , = 𝑞(𝑥, 𝑦). (2.4.7)
𝜕𝑥 𝜕𝑦

The differential equation (2.4.6) can be written in the form


𝜕𝜋 𝜕𝜋 𝑑𝑦 𝑑
+ 𝜕𝑦 = 𝑑𝑥 𝜋(𝑥, 𝑓(𝑥) = 0. (2.4.8)
𝜕𝑥 𝑑𝑥

Then integrating both sides equation (2.4.8) and will be obtained solution of the
differential equation (2.4.6), that is
𝜋 𝑥, 𝑦 = 𝑐.
The differential equation (2.4.6) that satisfies condition in equation (2.4.7) and expression
(2.4.8) is called exact differential equation. How to know that a differential equation is
exact by condition (2.4.7) and expression (2.4.8) are satisfied. First, from multivariable
calculus that
𝜕2𝜋 𝜕2𝜋
= 𝜕𝑦𝜕𝑥 . (2.4.9)
𝜕𝑥𝜕𝑦

So, from equation (2.4.7) we may have


𝜕 𝜕𝜋 𝜕𝑝 𝜕 𝜕𝜋 𝜕𝑞
= 𝜕𝑦 = 𝑝𝑦 and = 𝜕𝑥 = 𝑞𝑥 . (2.4.10)
𝜕𝑦 𝜕𝑥 𝜕𝑥 𝜕𝑦

From equation (2.4.9) and (2.4.10) we conclude


𝑝𝑦 = 𝑞𝑥 . (2.4.11)
Equation (2.4.11) is the simple way to know whether the differential equation (2.4.6)
exact or not. How to find the solution 𝜋 𝑥, 𝑦 = 𝑐 is that we have to solve the system of
differential equation (2.4.7).
32 Chapter 2-First Order ODEs

Example 1. Solve the differential equation


𝑑𝑦
𝑦 + 𝑒 𝑥 + 𝑥 𝑑𝑥 = 0. (2.4.12)

Equation (2.4.12) is a linear differential equation as equation (2.4.6). Of course that


differential equation (2.4.12) is not separable. We check whether equation (2.4.12) exact
or not by using equation (2.4.11). We have 𝑝 𝑥, 𝑦 = 𝑦 + 𝑒 𝑥 and 𝑞 𝑥, 𝑦 = 𝑥 . So
𝑝𝑦 = 1 = 𝑞𝑥 . We conclude that differential equation (2.4.12) is exact. By using equation
(2.4.7) we have
𝜕𝜋
= 𝑦 + 𝑒𝑥 ,
𝜕𝑥
𝜕𝜋 (2.4.13)
= 𝑥.
𝜕𝑦

From the second equation of equation (2.4.13) we can integrate and we will obtain
𝜋 𝑥, 𝑦 = 𝑥𝑦 + 𝑓(𝑥), (2.4.14)
where 𝑓(𝑥) is arbitrary function in 𝑥. Substituting equation (2.4.14) into the first equation
of equation (2.4.13) and will be obtained
𝜕
𝑥𝑦 + 𝑓 𝑥 = 𝑦 + 𝑒𝑥 .
𝜕𝑥

We obtain
𝑦 + 𝑓 ′ 𝑥 = 𝑦 + 𝑒 𝑥 or 𝑓 ′ 𝑥 = 𝑒 𝑥 .
Integrating 𝑓 ′ 𝑥 = 𝑒 𝑥 and we obtain 𝑓 𝑥 = 𝑒 𝑥 . Substituting function 𝑓(𝑥) into
equation (2.4.14) and will be obtain
𝜋 𝑥, 𝑦 = 𝑥𝑦 + 𝑒 𝑥 = 𝑐.

Example 2. Solve the differential equation


𝑑𝑦
sin 𝑥 + 𝑥 cos 𝑥 + 𝑒 𝑥 𝑦 + 𝑒 𝑥 𝑑𝑥 = 0. (2.4.15)

Equation (2.4.15) is a linear differential equation as equation (2.4.6). Of course that


differential equation (2.4.15) is not separable. We check whether equation (2.4.12) exact
or not by using equation (2.4.11).
We have 𝑝 𝑥, 𝑦 = sin 𝑥 + 𝑥 cos 𝑥 + 𝑒 𝑥 𝑦 and 𝑞 𝑥, 𝑦 = 𝑒 𝑥 . So 𝑝𝑦 = 𝑒 𝑥 = 𝑞𝑥 . We
conclude that differential equation (2.4.15) is exact. By using equation (2.4.7) we have
𝜕𝜋
= sin 𝑥 + 𝑥 cos 𝑥 + 𝑒 𝑥 𝑦,
𝜕𝑥
𝜕𝜋 (2.4.16)
= 𝑒𝑥 .
𝜕𝑦
Chapter 2-First Order ODEs 33

From the second equation of equation (2.4.16) we can integrate and we will obtain
𝜋 𝑥, 𝑦 = 𝑒 𝑥 𝑦 + 𝑓(𝑥), (2.4.17)
where 𝑓(𝑥) is arbitrary function in 𝑥. Substituting equation (2.4.17) into the first equation
of equation (2.4.13) and will be obtained
𝜕
𝑒𝑥 𝑦 + 𝑓 𝑥 = sin 𝑥 + 𝑥 cos 𝑥 + 𝑒 𝑥 𝑦.
𝜕𝑥

We obtain
𝑒 𝑥 𝑦 + 𝑓 ′ 𝑥 = sin 𝑥 + 𝑥 cos 𝑥 + 𝑒 𝑥 𝑦,
and
𝑓 ′ 𝑥 = sin 𝑥 + 𝑥 cos 𝑥. (2.4.18)
Integrating equation (2.4.18) and we obtain
𝑓 𝑥 = 𝑥 sin 𝑥.
Substituting function 𝑓(𝑥) into equation (2.4.14) and will be obtain solution of the
differential equation (2.4.15), that is
𝜋 𝑥, 𝑦 = 𝑥 sin 𝑥 + 𝑒 𝑥 𝑦 = 𝑐.

Now, consider the linear differential equation


𝑦 + 2𝑥 − 𝑦 𝑦 ′ = 0. (2.4.19)
Of course separable that equation (2.4.19) is not separable equation so we cannot
integrate the equation by using separable method. We use condition (2.4.11) to check
whether equation (2.4.19) is exact or not. We have
𝑝 𝑥, 𝑦 = 𝑦 → 𝑝𝑦 = 1,
and
𝑞 𝑥, 𝑦 = 2𝑥 − 𝑦 → 𝑞𝑥 = 2.
Because 𝑝𝑦 ≠ 𝑞𝑥 , then we can conclude that equation (2.4.19) is not exact. However, if
we multiply equation (2.4.19) by 𝜇 𝑥, 𝑦 = 𝑦 then we obtain
𝑦 2 + 2𝑥𝑦 − 𝑦 2 𝑦 ′ = 0. (2.4.20)
In this case we can easily check that 𝑝𝑦 = 2𝑦 = 𝑞𝑥 . So, we may conclude that equation
(2.4.20) is an exact differential equation. Then we use equation system on equation
(2.4.7) to find the general solution. That is,
34 Chapter 2-First Order ODEs

𝜕𝜋
= 𝑦2,
𝜕𝑥
𝜕𝜋 (2.4.21)
= 2𝑥𝑦 − 𝑦 2 .
𝜕𝑦

Integrating the first of equation (2.4.21) and will be obtained


𝜋 𝑥, 𝑦 = 𝑥𝑦 2 + 𝑓 𝑦 .
Substituting to the second equation in (2.4.21) and we will obtain
𝜕
𝑥𝑦 2 + 𝑓(𝑦) = 2𝑥𝑦 − 𝑦 2 .
𝜕𝑦
We obtain
2𝑥𝑦 + 𝑓 ′ 𝑦 = 2𝑥𝑦 − 𝑦 2 .
We have
𝑓 ′ 𝑦 = −𝑦 2 .
Integrating both sides and will be obtain
1
𝑓 𝑦 = − 𝑦3.
3
We will obtain solution of equation (2.4.20), that is
1
𝜋 𝑥, 𝑦 = 𝑥𝑦 2 − 𝑦 3 = 𝑐.
3
1
The solution 𝜋 𝑥, 𝑦 = 𝑥𝑦 2 − 3 𝑦 3 = 𝑐 of course is also solution of the differential

equation (2.4.19). The problem in here is that how to find such the function by 𝜇 𝑥, 𝑦 =
𝑦 so that equation (2.4.20) becomes exact differential equation? We will do in the general
form as follows. Consider again differential equation (2.4.6) but we have condition
that 𝑝𝑦 ≠ 𝑞𝑥 . It is mean that the equation is not exact. Assuming there is a function
𝜇(𝑥, 𝑦) such that equation becomes exact. We multiply this function to equation (2.4.6)
and we will have
𝜇𝑝 𝑑𝑥 + 𝜇𝑞 𝑑𝑦 = 0. (2.4.22)
To have the condition (2.2.11) we have
𝜇𝑝 𝑦 = 𝜇𝑞 𝑥 .
So, we have
𝜇𝑦 𝑝 + 𝜇𝑝𝑦 = 𝜇𝑥 𝑞 + 𝜇𝑞𝑥 . (2.4.23)
Chapter 2-First Order ODEs 35

To find 𝜇 such that satisfy equation (2.4.23) is look like more difficult that to solve
differential equation (2.4.6). So we may assume several steps. Firstly, we assume that the
function 𝜇 is only depending on variable 𝑥 . Then equation (2.4.23) becomes
𝜇𝑝𝑦 = 𝜇𝑥 𝑞 + 𝜇𝑞𝑥 . (2.4.24)
Now, equation (2.4.24) is separable equation then we can solve the function 𝜇. That is,
𝜇𝑥 𝑞 = 𝜇 𝑝𝑦 − 𝑞𝑥 ,
or
𝑑𝜇 𝑝𝑦 − 𝑞𝑥
= 𝑑𝑥.
𝜇 𝑞
By integration we can obtain the function 𝜇. Secondly, if the first assumption is not
satisfied then we assume 𝜇(𝑥, 𝑦) is a function depending on variable 𝑦 only. Then
equation (2.4.23) becomes
𝜇𝑦 𝑝 + 𝜇𝑝𝑦 = 𝜇𝑞𝑥.
And we will have
𝜇𝑦 𝑝 = 𝜇 𝑞𝑥 − 𝑝𝑦 ,
or
𝑑𝜇 𝑞𝑥 − 𝑝𝑦
= .
𝜇 𝑝
Integrating both sides and we can obtain the function 𝜇. If both above assumptions are
not satisfied then we have to use others methods to solve it.

Example 3. Solve the differential equation


3𝑥𝑦 + 𝑦 2 + 𝑥 2 + 𝑥𝑦 𝑦 ′ = 0.
Exercises
1. Show that each of the following differential equations is exact and find its general
solution.
a. 2𝑥 + 𝑦 𝑑𝑥 + 𝑥 + 2𝑦 𝑑𝑦 = 0
b. 𝑥2 + 𝑦 + 𝑥 + 𝑦2 𝑦′ = 0
𝑑𝑦
c. (sin 𝑥 + 𝑦) + (𝑥 + cos 𝑦) 𝑑𝑥 = 0

d. 2𝑥 + 𝑦 2 𝑑𝑥 + (2𝑥𝑦 + sin 𝑦)𝑑𝑦 = 0


36 Chapter 2-First Order ODEs

e. (1 + sin 𝑦) 𝑑𝑥 + (𝑥 cos 𝑦 + 1)𝑑𝑦 = 0


f. 𝑥 + 𝑒 𝑦 𝑑𝑥 + 𝑥𝑒 𝑦 + 𝑦 𝑑𝑦 = 0
g. 𝑥 + 𝑥 2 𝑦 2 + (𝑥 2 𝑦 + sin 𝑦) 𝑦 ′ = 0
1 𝑑𝑦
h. 𝑒 𝑥 + 𝑥𝑦 + 𝑥2 + 𝑦2 =0
2 𝑑𝑥

i. 𝑒 𝑥 + 𝑒 𝑦 𝑑𝑥 + 𝑥𝑒 𝑦 + 𝑦 + 1 𝑑𝑦 = 0
j. 𝑥𝑒 𝑥 + 𝑦 𝑑𝑥 + (𝑥 + cos 2𝑦 𝑑𝑦 = 0
2. Find the integrating factors for the following differential equations to have exact
differential equations and solve it.
𝑑𝑦
a. − 𝑦 = 𝑒 2𝑡 + 1
𝑑𝑡
𝑑𝑦
b. 1 + 2𝑥𝑦 − 𝑒 −𝑦 =0
𝑑𝑥

c. 𝑥 2 + 𝑥𝑦 𝑑𝑥 + 𝑥 2 + 𝑥𝑦 2 𝑑𝑦 = 0
d. 𝑥 2 𝑦 + 2𝑦 2 𝑑𝑥 + 2𝑥𝑦 + 𝑦 3 𝑑𝑦 = 0
𝑑𝑦
e. 𝑥 + 𝑦 2 + 𝑥𝑦 + 𝑦 =0
𝑑𝑥
𝑥
f. 𝑑𝑥 + + 𝑦 𝑑𝑦 = 0
𝑦
1 𝑑𝑦
g. 𝑥+𝑦 + 𝑥+𝑦 =0
2 𝑑𝑥
2𝑒 𝑦 2𝑦
k. 2+ 𝑑𝑥 + 2𝑒 𝑦 + 𝑑𝑦 = 0
𝑥 𝑥

l. 𝑥 2 + 𝑥 2 𝑦 2 + (𝑥 3 𝑦 + sin 𝑦) 𝑦 ′ = 0
𝑥 𝑥2 sin 𝑦 𝑑𝑦
h. +𝑥 + + =0
𝑦2 𝑦 𝑦2 𝑑𝑥

𝑥 𝑒𝑦 𝑥𝑒 𝑦 1
i. + 2𝑦 𝑑𝑥 + + 2 𝑑𝑦 = 0
2𝑦 2𝑦

𝑒𝑦 𝑦
j. 1+ 𝑑𝑥 + 𝑒 𝑦 + 𝑥 𝑑𝑦 = 0
𝑥

3. Solve the following initial value problems.


a. 2𝑥 + 𝑦 𝑑𝑥 + 𝑥 + 2𝑦 𝑑𝑦 = 0, 𝑦 0 = 1
b. 𝑥 2 + 𝑦 + 𝑥 + 𝑦 2 𝑦 ′ = 0, 𝑦 1 = 1
𝑑𝑦
c. (sin 𝑥 + 𝑦) + (𝑥 + cos 𝑦) 𝑑𝑥 = 0 , 𝑦 0 = 1

d. 2𝑥 + 𝑦 2 𝑑𝑥 + (2𝑥𝑦 + sin 𝑦)𝑑𝑦 = 0, 𝑦 0 = 0


e. (1 + sin 𝑦) 𝑑𝑥 + (𝑥 cos 𝑦 + 1)𝑑𝑦 = 0, 𝑦 1 = 1
Chapter 2-First Order ODEs 37

f. 𝑥 + 𝑒 𝑦 𝑑𝑥 + 𝑥𝑒 𝑦 + 𝑦 𝑑𝑦 = 0, 𝑦 0 = 1
g. 𝑥 + 𝑥 2 𝑦 + (𝑥𝑦 2 + sin 𝑦) 𝑦 ′ = 0, 𝑦 1 = 0
1 𝑑𝑦
h. 𝑒 𝑥 + 𝑥𝑦 + 𝑥2 + 𝑦2 = 0, 𝑦 0 = 1
2 𝑑𝑥

i. 𝑒 𝑥 + 𝑒 𝑦 𝑑𝑥 + 𝑥𝑒 𝑦 + 𝑦 + 1 𝑑𝑦 = 0, 𝑦 0 = 0
j. 𝑥𝑒 𝑥 + 𝑦 𝑑𝑥 + (𝑥 + cos 2𝑦 𝑑𝑦 = 0 , 𝑦 1 = 0
4. Solve the following initial value problems.
𝑑𝑦
a. − 𝑦 = 𝑒 2𝑡 + 1, 𝑦 0 = 1
𝑑𝑡
𝑑𝑦
b. 1 + 2𝑥𝑦 − 𝑒 −𝑦 = 0, 𝑦 0 = 0
𝑑𝑥

c. 𝑥 2 + 𝑥𝑦 𝑑𝑥 + 𝑥 2 + 𝑥𝑦 2 𝑑𝑦 = 0, 𝑦 0 = 1
d. 𝑥 2 𝑦 + 2𝑦 2 𝑑𝑥 + 2𝑥𝑦 + 𝑦 3 𝑑𝑦 = 0, 𝑦 1 = 1
𝑑𝑦
e. 𝑥 + 𝑦 2 + 𝑥𝑦 + 𝑦 = 0, 𝑦 0 = 0
𝑑𝑥
𝑥
f. 𝑑𝑥 + + 𝑦 𝑑𝑦 = 0, 𝑦 1 = 1
𝑦
1 𝑑𝑦
g. 𝑥+𝑦 + 𝑥+𝑦 = 0, 𝑦 0 = 1
2 𝑑𝑥
2𝑒 𝑦 2𝑦
k. 2+ 𝑑𝑥 + 2𝑒 𝑦 + 𝑑𝑦 = 0, 𝑦 0 = 0
𝑥 𝑥

l. 𝑥 + 𝑥𝑦 2 + (𝑥 2 𝑦 + sin 𝑦) 𝑦 ′ = 0 , 𝑦 1 = 0
𝑥 sin 𝑦 𝑑𝑦
h. + 𝑥 2 + 𝑥𝑦 + = 0, 𝑦 1 = 0
𝑦 𝑦 𝑑𝑥

𝑥 𝑒𝑦 𝑥𝑒 𝑦 1
i. + 2𝑦 𝑑𝑥 + + 2 𝑑𝑦 = 0, 𝑦 0 = 0
2𝑦 2𝑦

𝑒𝑦 𝑦
j. 1+ 𝑑𝑥 + 𝑒 𝑦 + 𝑥 𝑑𝑦 = 0, 𝑦 0 = 0
𝑥

2.5. Homogeneous Differential Equations


In this section we will discuss a type of first order differential equations (2.0.1)
which is called homogeneous differential equation. Rewrite equation (2.0.1) and use 𝑥 as
is an independent variable instead of 𝑡 . We have
𝑑𝑦
= 𝑓 𝑥, 𝑦 . (2.5.1)
𝑑𝑥

If the function 𝑓 in the right side of equation (2.5.1) has property 𝑓 𝑡𝑥, 𝑡𝑦 = 𝑓(𝑥, 𝑦)
then the function can be said as homogeneous function and the differential equation
(2.5.1) can be called homogeneous differential equation. Then equation (2.5.1) can be
written by
38 Chapter 2-First Order ODEs

𝑑𝑦 𝑦
=𝑔 , (2.5.2)
𝑑𝑥 𝑥

for a function 𝑔. To solve homogeneous differential equation (2.5.2) we have to use a


transformation such that the equation (2.5.2) becomes separable differential equation and
finally can be solved by integration. We use a transformation
𝑦 = 𝑣𝑥, (2.5.3)
where 𝑣 is a function in 𝑥. By using integration we will obtain
𝑑𝑦 𝑑𝑣
= 𝑣 + 𝑥 𝑑𝑥 . (2.5.4)
𝑑𝑥

Substituting equation (2.5.4) into equation (2.5.2) and we obtain


𝑑𝑣
𝑣 + 𝑥 𝑑𝑥 = 𝑔 𝑣 . (2.5.5)

Equation (2.5.5) is separable differential equation. We can use the method is presented in
section 2.2. We obtain
𝑑𝑣 𝑑𝑥
= . (2.5.6)
𝑔 𝑣 −𝑣 𝑥

Integrating both sides equation (2.5.6) and will be obtained 𝑣 is a function of 𝑥 .


Substituting 𝑣 into equation (2.5.3) then finally we obtain 𝑦 is a function of 𝑥 which is
solution of differential equation (2.5.2).

Example 1. Solve the differential equation


𝑑𝑦
𝑥 𝑑𝑥 = 𝑥 + 𝑦 . (2.5.7)

Differential equation (2.5.7) is one of the types of homogeneous differential equations


(2.5.2) and we may rewrite in the form
𝑑𝑦 𝑥+𝑦 𝑦
= = 1 + 𝑥. (2.5.8)
𝑑𝑥 𝑥

Let 𝑦 = 𝑣𝑥 and use equation (2.5.4) then we will have


𝑑𝑣
𝑣+𝑥 = 1 + 𝑣.
𝑑𝑥
We obtain
𝑑𝑣
𝑥 = 1,
𝑑𝑥
or
𝑑𝑥
𝑑𝑣 = .
𝑥
Chapter 2-First Order ODEs 39

Integrating both sides and we will obtain


𝑣 = ln 𝑥 + 𝑐.
So, solution of the differential equation (2.5.7) can be given by
𝑦 = 𝑣𝑥 = 𝑥 ln 𝑥 + 𝑐𝑥.

Example 2. Find the general solution of the homogeneous equation


𝑥 + 𝑦 𝑑𝑦 + 𝑥 − 𝑦 𝑑𝑥 = 0. (2.5.9)
Actually, we can also use the exact differential equation method to solve the differential
equation (2.5.9). However, in here we will use the homogeneous method to solve it. The
differential equation (2.5.9) can be written in the form
𝑦
𝑑𝑦 𝑦 −𝑥 −1
𝑥
= 𝑦 +𝑥 = 𝑦 . (2.5.10)
𝑑𝑥 +1
𝑥

Let 𝑦 = 𝑣𝑥. Using equation (2.5.4) then equation (2.5.10) can be written in the form
𝑑𝑣 𝑣 − 1
𝑣+𝑥 = .
𝑑𝑥 𝑣 + 1
Then we obtain
𝑑𝑣 𝑣 − 1 𝑣 − 1 − 𝑣(𝑣 + 1) −𝑣 2 − 1
𝑥 = −𝑣 = = .
𝑑𝑥 𝑣 + 1 𝑣+1 𝑣+1
We write
𝑣+1 𝑑𝑥 𝑣 1 𝑑𝑥
𝑑𝑣 = ⟺ 𝑑𝑣 + 𝑑𝑣 = − .
−𝑣 2 − 1 𝑥 𝑣2 + 1 𝑣2 + 1 𝑥
Integrating both sides we will obtain
1
ln 𝑣 2 + 1 + arctan 𝑣 = − ln 𝑥 + 𝑐.
2
So the solution of the differential equation (2.5.9) can be given by
1 𝑦2 𝑦
ln 2 + 1 + arctan = − ln 𝑥 + 𝑐.
2 𝑥 𝑥

Example 3. Find the general solution of the homogeneous equation


𝑑𝑦 𝑥+𝑦−1
= . (2.5.11)
𝑑𝑥 𝑥+1
40 Chapter 2-First Order ODEs

Equation (2.5.11) looks like not in the form of homogeneous differential equation (2.5.2).
However, using small trick we can bring equation (2.5.11) in the homogeneous
differential equation. Using new variable letting
𝑋 = 𝑥 + 𝑘, 𝑌 = 𝑦 + 𝑙,
with 𝑘, 𝑙 are constants. The differential equation (2.5.11) can be written in the form
𝑑𝑌 𝑋−𝑘 + 𝑌−𝑙 −1 𝑋+𝑌 +(−𝑘−𝑙−1)
= = . (2.5.12)
𝑑𝑋 𝑋−𝑘 +1 𝑋+(−𝑘+1)

If we choose 𝑘 and 𝑙 in the equation (2.5.12) such that – 𝑘 − 𝑙 − 1 = 0 and – 𝑘 + 1 = 0


or 𝑘 = 1 and 𝑙 = −2 the equation (2.5.12) becomes
𝑑𝑌 𝑋+𝑌 𝑌
= = 1 + 𝑋. (2.5.13)
𝑑𝑋 𝑋

We can see that equation (2.5.13) is homogeneous differential equation. Let 𝑌 = 𝑣𝑋.
Using equation (2.5.4) then equation (2.5.13) can be written in the form
𝑑𝑣
𝑣 + 𝑋 𝑑𝑋 = 1 + 𝑣.

Then we obtain
𝑑𝑣
𝑋 𝑑𝑋 = 1.

We write
𝑑𝑋
𝑑𝑣 = .
𝑋
Integrating both sides we will obtain
𝑣 = ln 𝑋 + 𝑐.
We have
𝑌 = 𝑣𝑋 = 𝑋 ln 𝑋 + 𝑐𝑋.
Substituting 𝑋 = 𝑥 + 1 and 𝑌 = 𝑦 − 2 then we obtain the solution of the differential
equation (2.5.11) can be given by
𝑦 − 2 = 𝑥 + 1 ln 𝑥 + 1 + 𝑐 (𝑥 + 1).

Exercises
Show that the following differential equations are the homogeneous differential equations
and then find the general solutions of it.
1. 𝑥𝑦 2 𝑦 ′ − 2𝑦 3 − 𝑥 3 = 0
2. 𝑥 2 − 𝑦 2 𝑦 ′ = 2𝑥𝑦
Chapter 2-First Order ODEs 41

3. 𝑥 2 𝑑𝑦 − 𝑦 2 + 2𝑥𝑦 𝑑𝑥 = 0
4. 𝑥𝑑𝑦 = 𝑥 + 𝑦 𝑑𝑥
5. 𝑥 2 𝑑𝑦 − 𝑥 2 + 𝑥𝑦 + 𝑦 2 𝑑𝑥 = 0
6. 4𝑥 − 3𝑥 𝑑𝑥 − 2𝑥 − 𝑦 𝑑𝑦 = 0
𝑥+3𝑦
7. 𝑦 ′ = 𝑥 −𝑦

8. 𝑥 3 − 2𝑥𝑦 2 𝑑𝑦 − 4𝑥 2 𝑦 − 𝑦 3 𝑑𝑥 = 0
9. 2𝑥𝑦𝑑𝑦 − 𝑥 2 − 3𝑦 2 𝑑𝑥 = 0
𝑑𝑦 3𝑦 2 −𝑥 2
10. 𝑑𝑥 = 2𝑥𝑦
𝑑𝑦 𝑥+𝑦+3
11. 𝑑𝑥 = 𝑥−2

12. 𝑥 − 2 𝑑𝑦 − 4𝑦 − 3𝑥 + 1 𝑑𝑥 = 0
13. 𝑥 − 𝑦 + 2 𝑑𝑦 − 𝑥 + 3𝑦 − 5 𝑑𝑥 = 0
14. 𝑥 + 𝑦 − 3 𝑑𝑥 − 𝑥 + 2 𝑑𝑦 = 0
15. 4𝑦 − 3𝑥 + 2 𝑑𝑥 − 2𝑥 − 𝑦 − 6 𝑑𝑦 = 0
16. 𝑥 + 𝑦 𝑑𝑥 + 2 − 𝑥 𝑑𝑦 = 0
17. 𝑥 − 𝑦 𝑑𝑦 − 𝑥 + 3𝑦 − 1 𝑑𝑥 = 0
18. 2𝑥 + 2𝑦 + 2𝑥 − 2𝑦 𝑦 ′ = 0
19. 𝑏𝑥 − 𝑐𝑦 𝑑𝑦 + 𝑎𝑥 − 𝑏𝑦 𝑑𝑥 = 0, 𝑎, 𝑏, 𝑐 are constants.
20. 𝑏𝑥 − 𝑐𝑦 − 2 𝑑𝑦 + 𝑎𝑥 − 𝑏𝑦 + 1 𝑑𝑥 = 0, 𝑎, 𝑏, 𝑐 are constants.

2.6. Applications of First Order Differential Equations


In this section we will discuss application of the first order differential equations. In
real life there are many applications of the first order differential equations, for instance,
problem population growth and decay, temperature, falling body, electrical circuit,
orthogonal trajectory, etc. In this section we will discuss some topics.
42 Chapter 2-First Order ODEs

2.6.1. Population Growth and Decay


Let 𝑃(𝑡) measures the population of a species for a time 𝑡. If the rate of change of
the population is proportional to the existing population then we will have the exponent
model of the population. The formula is given by
𝑑𝑃 𝑡
= 𝑟𝑃 𝑡 , (2.6.1)
𝑑𝑡

where 𝑟 is a constant of proportionality serves. Equation (2.6.1) is a separable differential


equation. So the solution can easily be found, that is
𝑑𝑃
= 𝑟 𝑑𝑡.
𝑃
Integrating both sides will obtain
ln 𝑃 = 𝑟𝑡 + 𝑐1 .
We may write
𝑃 = 𝑐 𝑒 𝑟𝑡 , (2.6.2)

where 𝑐 is a constant and can be determined if 𝑃(𝑡) is given at certain time. We can see
that if 𝑟 > 0 then the population grows and continues to expand to infinity, that is,

lim 𝑃 𝑡 = ∞.
𝑡→∞

And if 𝑟 < 0 then the population will tend to 0.

It can be shown that the first case, 𝑟 > 0, is not tolerable and the model cannot be
applied. The main argument for this has to do with environmental limitations. The
complication is that population growth is eventually limited by many factor, usually one
from among many essential resources. When a population is far from its limits of growth
it can grow exponentially. However, when nearing its limits the population size can
fluctuate, even chaotically. Another model was studied more realistic model by Verhults.
The model population I called the logistic model (also called Verhulst-Pearl model). The
model can be given by
𝑑𝑃 𝑃
= 𝑟𝑃 1 − 𝑀 , (2.6.3)
𝑑𝑡
Chapter 2-First Order ODEs 43

where 𝑀 is a limiting size for the population (also called the carrying capacity). We can
see that when 𝑃 is small compared to 𝑀, the equation reduces to the exponential one. To
solve this equation we recognize a nonlinear equation which is separable. The constant
solutions are 𝑃 = 0 and 𝑃 = 𝑀. The non-constant solutions may obtained by separation
of the variables
𝑑𝑃
= 𝑟𝑑𝑡.
𝑃
𝑃 1−𝑀

Integrating both sides and we will obtain


𝑑𝑃
= 𝑟𝑑𝑡.
𝑃
𝑃 1−
𝑀
And we can rewrite
1
1 𝑀
+ 𝑑𝑃 = 𝑟𝑑𝑡.
𝑃 1− 𝑃
𝑀
We can integrate and will obtain
𝑃
ln 𝑃 − ln 1 − = 𝑟𝑡 + 𝑐1 ,
𝑀
or
𝑃
𝑃 = 𝑐 𝑒 𝑟𝑡 , (2.6.4)
1−
𝑀

where 𝑐 = 𝑒 𝑐1 , is a constant. For 𝑡 = 0 we have the population is 𝑃 0 = 𝑃0 , then from


equation (2.6.4) we obtain constant 𝑐, that is
𝑃0
= 𝑐.
𝑃0
1−𝑀

So the population model becomes


𝑃 𝑃0
= 𝑒 𝑟𝑡 .
𝑃 𝑃0
1−𝑀 1−𝑀

We can write 𝑃 is
𝑃0 𝑀 𝑒 𝑟𝑡 𝑃0 𝑀
𝑃= 𝑟𝑡
⟺𝑃= .
𝑀 − 𝑃0 + 𝑃0 𝑒 𝑀 − 𝑃0 𝑒 −𝑟𝑡 + 𝑃0

It is easy to see that


44 Chapter 2-First Order ODEs

𝑃0 𝑀
lim 𝑃(𝑡) = = 𝑀.
𝑡→∞ 𝑃0

Example 1. The population of a community is known to increase at a rate proportional to


the number of people present at a time 𝑡. If the population has doubled in 5 years, how
long it will take to triple?

Let 𝑃(𝑡) denote the population at time𝑡 . Let 𝑃 0 = 𝑃0 denote the initial population
(population at 𝑡 = 0). Solution can be give as (according to equation (2.6.2))
𝑃 = 𝑐 𝑒 𝑟𝑡 .
For 𝑡 = 0 we have 𝑃 0 = 𝑃0 so we can obtain
𝑐 = 𝑃0 .
Therefore we obtain
𝑃 = 𝑃0 𝑒 𝑟𝑡 .
From the condition when 𝑡 = 5, we will have 𝑃 5 = 2𝑃0 . So, we will obtain
2𝑃0 = 𝑃0 𝑒 5𝑟 .
So
2 = 𝑒 5𝑟 .
Taking ln both sides then we obtain
1
ln 2 = 5𝑟 ⟺ 𝑟 = ln 2.
5
We will have
1
𝑃 = 𝑃0 𝑒 𝑡 5 ln 2 .
To have population triple then before we will have relation
1
3𝑃0 = 𝑃0 𝑒 𝑡 5 ln 2 ,
or we write
1
3 = 𝑒 𝑡 5 ln 2 .
Taking ln both sides will be obtained
1
ln 3 = 𝑡 ( ln 2).
5
We will obtain
Chapter 2-First Order ODEs 45

ln 3
𝑡=5 ≈ 7.9.
ln 2
We conclude that the population becomes triple will take about 7.9 years.

Example 2. Let population of a country is decreasing at the rate proportional to its


population. If the population decreased to 10% in 15 years, how long will it take to be
half?

From equation (2.6.1) we have model of the population 𝑃(𝑡) for a time 𝑡. The solution
can also is given in equation (2.6.2). From the condition we have for 𝑡 = 15 the 𝑃 15 =
𝑃0 − 10% × 𝑃0 . 𝑃0 is the population for 𝑡 = 0. So we obtain
90% × 𝑃0 = 𝑃0 𝑒 15𝑟 .
In this case we obtain
9
= 𝑒 15𝑟 .
10
Taking ln both sides then we will obtain
9
ln = 15r,
10
so
1 9
r= ln .
15 10
Then the model of the population becomes
𝑡 9
ln
𝑃 = 𝑃0 𝑒 15 10 .
We are looking for how long the population becomes half of it. In this case we have
relation
1 𝑡
ln
9
𝑃 = 𝑃0 𝑒 15 10 ,
2 0
so
1 𝑡
ln
9
= 𝑒 15 10 .
2
Taking ln both sides and we will obtain
1 𝑡 9
𝑙𝑛 = 𝑙𝑛 ,
2 15 10
46 Chapter 2-First Order ODEs

and
1
ln 2
𝑡 = 15 = 98.68.
9
ln 10

We conclude that the population becomes half of it, will take around 98.68 years.

2.6.2. Radioactive decay


Radioactive materials decompose at a rate proportional to the amount present. For
example, if 𝐶 is the radioactive material and 𝑃(𝑡) is the amount present at time 𝑡, then the
rate of change of 𝑃(𝑡) with respect to time 𝑡 is given by
𝑑𝑃
= −𝑘𝑃, (2.6.5)
𝑑𝑡

where 𝑘 is a positive constant. Let for 𝑡 = 0 the initial quantity of the material 𝐶 is 𝑃0 ,
then we have
𝑃 𝑡 = 𝑃0 𝑒 −𝑘𝑡 . (2.6.6)
In order to determine 𝑃(𝑡) we need to find the constant𝑘. This can be done using what is
called the half-life 𝑇 of the material 𝐶. The half-life is the time span needed to decompose
half of the material. So, we have
1 1
𝑃 𝑇 = 𝑃 0 = 𝑃0 .
2 2
We substitute to equation (2.6.6) and will be obtained
1 1
𝑃0 = 𝑃0 𝑒 −𝑘𝑇 ⟺ = 𝑒 −𝑘𝑇 .
2 2
Taking ln both sides and we obtain
ln 2
− ln 2 = −𝑘𝑇 ⟺ 𝑘 = .
𝑇
Therefore, if we know 𝑇 , we can get 𝑘 and vice-versa. Many chemistry text-books
contain the half-life of some important radioactive materials. For example, the half-life of
Carbon-14 is 5730 ± 40 years. Therefore, the constant 𝑘 associated with Carbon-14 is
𝑘 = 1.21 × 10−4 . Please note that Carbon-14 is an important tool in the archeological
research known as radiocarbon dating.
Chapter 2-First Order ODEs 47

Example 1: A radioactive isotope has a half-life of 20 hours. You wish to have


20 𝑔𝑟𝑎𝑚𝑠 at the end of 20 hours. How much radioisotope should you start with?

Since the half-life is given in hours we will measure time in hours. Let 𝑃(𝑡) be the
amount present at time 𝑡 and 𝑃0 the amount we are looking for (the initial amount). From
equation (2.6.2) we have
𝑃 𝑡 = 𝑃0 𝑒 −𝑘𝑡 ,
where 𝑘 is a constant. We use the half-life 𝑇 to determine 𝑘. We obtain
ln 2 ln 2
𝑘= = .
𝑇 20
We also have
𝑃 20 = 20 = 𝑃0 𝑒 −𝑘 20 .
Therefore we will obtain
𝑃0 = 20 𝑒 20𝑘 = 20 𝑒 ln 2 = 20 × 2 = 40.
We conclude that radioisotope should you start with 40 𝑔𝑟𝑎𝑚𝑠.

Example 2. A radioactive isotope has an initial mass 100 𝑚𝑔. After five years later
becomes 40 𝑚𝑔. Find the expression for the amount of the isotope remaining at any time.
What is its half-life?

Let 𝑚 be the mass of the isotope remaining after 𝑡 years, and let 𝑘 be the constant of
proportionality. Then the rate of decomposition is modeled by
𝑑𝑚
= −𝑘𝑚,
𝑑𝑡
where minus sign indicates that the mass is decreasing. According to equation (2.6.2)
then the solution is given by
𝑚 = 𝑐 𝑒 −𝑘𝑡 .
For 𝑡 = 0 we have 𝑚 0 = 100. So we obtain
𝑚 = 100 𝑒 −𝑘𝑡 .
For 𝑡 = 5 we have 𝑚 = 40 so we have relation
2
40 = 100 𝑒 −5𝑘 ⟺ = 𝑒 −5𝑘 .
5
48 Chapter 2-First Order ODEs

Taking ln both sides then we get


1
ln 2 − ln 5 = −5 𝑘 ⟺ 𝑘 = (ln 5 − ln 2).
5
So the equation can be given by
𝑡
𝑚 = 100 𝑒 −5 (ln 5−ln 2) .
Let 𝑇 is called life then we will obtain relation
𝑇
50 = 100 𝑒 −5 (ln 5−ln 2) .
We obtain
1 𝑇
= 𝑒 −5 (ln 5−ln 2) .
2
Taking ln both sides we will obtain
𝑇
− ln 2 = − (ln 5 − ln 2),
5
or
5 ln 2
𝑇= = 3.78.
ln 5 − ln 2
We conclude that the half-life of the radioactive isotope is 3.78 years.

Example 3. Let we have an artifact; say a piece of fossilized wood, and measurements
show that the ratio of C-14 to carbon in the sample is 35% of the current ratio. Let us
assume that the wood died at time 0, then compute the time 𝑇 it would take for one gram
of the radioactive carbon to decay this amount.

Let 𝑃 𝑡 is a mass of the radioactive at time 𝑡. From equation (2.6.1) and (2.6.2) we have
𝑃 𝑡 = 𝑃0 𝑒 −𝑘𝑡 .
It at some later time 𝑇 we find that there are 𝑃𝑇 then we have relation
𝑃𝑇
𝑃𝑇 = 𝑃0 𝑒 −𝑘𝑇 ⟺ = 𝑒 −𝑘𝑇 .
𝑃0
Taking ln both sides we can obtain
𝑃𝑇 1 𝑃𝑇
ln = −𝑘𝑇 ⟺ 𝑘 = − ln .
𝑃0 𝑇 𝑃0
This gives us 𝑘 and determines the mass at any time, that is
Chapter 2-First Order ODEs 49

𝑡 𝑃
− ln 𝑇
𝑃 𝑡 = 𝑃0 𝑒 𝑇 𝑃0 .
Let 𝑇 be the time at which half of the mass has radiated away, that is, half-life. So, in this
𝑃0
time half of the mass remains, then 𝑃𝑇 = . Half-life of C-14 is 5730 years
2

approximately, so we have
1 1 ln 2
𝑘=− ln = ≈ 0.0001209680943,
5730 2 5730
and we have relation
𝑃 𝑡 = 𝑃0 𝑒 −0.0001209680943 𝑡 .

𝑃 𝑡
Because = 35% then we obtain
𝑃0

35
= 𝑒 −0.0001209680943 𝑡 .
100
Taking ln both sides and we ill get
1 35
𝑡=− ln ≈ 8678.5.
0.0001209680943 100
We conclude the radioactive will take 8678.5 years approximately.

2.6.3. Bank Interest


Let sum money is deposited in a bank with interest at an annual rate 𝑟. Let 𝐴(𝑡)
is the investment at any time 𝑡 depend on the frequency with which is compound. The
𝑑𝐴
rate of change of the value can be given by 𝑑𝑡 . The change of the value is proportional

with rare time of the investment. So, we have


𝑑𝐴
= 𝑟𝐴.
𝑑𝑡
Let for 𝑡 = 0 the investment is 𝐴0 then we obtain
𝐴 𝑡 = 𝐴0 𝑒 𝑟𝑡 . (2.6.7)
This result also can be found using the following methods.
Let, if interest is compounded once a year, then after 𝑡 year will be obtained
𝐴 𝑡 = 𝐴0 1 + 𝑟 𝑡 .
50 Chapter 2-First Order ODEs

If the interest is compounded twice a year, the after half year the investment will be
𝑟 𝑟 𝑟 𝑟 2
𝐴0 (1 + 2) then after one year the investment becomes 𝐴0 1 + 2 1 + 2 = 𝐴0 1 + 2 .

𝑟 𝑟𝑡
Then after 𝑡 year the money becomes 𝐴0 1 + 2 . In general if interest is compounded

𝑛 times per year, then we will have


𝑟 𝑛𝑡
𝐴 𝑡 = 𝐴0 1 + 𝑛 . (2.6.8)

From calculus we may check that


𝑟 𝑛𝑡
lim 𝐴0 1 + = 𝐴0 𝑒 𝑟𝑡 .
𝑛 →∞ 𝑛
This result is similar with equation (2.6.7).

Example 1. A young people invest 𝑅𝑝. 100.000.000 in a savings account which pays 4
percent interest per annum, compounded continuously. Find (a) the amount in the account
after two years, and (b) the time required for the account to triple in value, presuming no
withdrawals and no additional deposits.

In this case we have 𝐴 0 = 100.000.000, 𝑟 = 0.04. So from equation (2.6.7) we have


𝐴 𝑡 = 100.000.000 𝑒 0.04𝑡 .
After two year he has money
𝐴 2 = 100.000.000 𝑒 0.04×2 = 108.328.706,8.
The time such have triple can be solved by
3𝐴0 = 𝐴0 𝑒 0.04𝑡 ⟺ 3 = 𝑒 0.04𝑡 .
Taking ln both sides and we obtain
ln 3 = 0.04 𝑡,
so we obtain
ln 3
𝑡= ≈ 27.465.
0.04
We conclude that the young people need about 27.465 years to have triple of his money.
Chapter 2-First Order ODEs 51

2.6.4. Cooling/Warming law


We will be assuming that the question involves the temperature 𝑇 of a certain
body placed in a medium of constant temperature 𝑀 and as time 𝑡 varies, so does T, (so
𝑇 has a rate of change with respect to 𝑡). In this case Newton’s law of cooling tells us the
following
𝑑𝑇
=𝑘 𝑇−𝑀 , (2.6.9)
𝑑𝑡

for some constant 𝑘 . Another way of saying this is that the time rate of change of
temperature of the body is proportional to the difference in temperatures of the body and
the medium in which it is placed. This law is the source of a popular misconception,
namely that when placed in a freezer, warm water will freeze into ice cubes faster than
cold water. This is not true (of course) but what is true is that the ”rate of change” of
temperature of the warm water is much faster than that of the cold water since the
difference in temperature ( between the water and freezer) is much greater for the warm
water. Thus the warm water will cool at a much faster rate, but the cold water will still
freeze earlier.
Equation (2.6.9) is separable differential equation, so we rewrite
𝑑𝑇
= 𝑘𝑑𝑡.
𝑇−𝑀
Integrating both sides and we can obtain
ln 𝑇 − 𝑀 = 𝑘𝑡 + 𝑐1 .
So
𝑇 − 𝑀 = 𝑐𝑒 𝑘𝑡 ,
or
𝑇 = 𝑀 + 𝑐𝑒 𝑟𝑡 , (2.6.10)
with 𝑐 = ±𝑒 𝑐1 .

Example 1. When a cake is removed from an oven, its temperature is measured at 800 𝐶.
Three minutes later its temperature is 500 𝐶. How long will it take for the cake to 300 𝐶.
The room temperature is 200 𝐶.
52 Chapter 2-First Order ODEs

In this case we have 𝑀 = 200 , for 𝑡 = 0, 𝑇 = 800 . The differential equation of this
problem can be given in the equation (2.6.9) and the solution is equation (2.6.10), so we
obtain relation
80 = 20 + 𝑐 𝑒 0 ⟺ 𝑐 = 60.
So, we get
𝑇 = 20 + 60 𝑒 𝑟𝑡 .
For 𝑡 = 3 we have 𝑇 3 = 50, so we can obtain
50 = 20 + 60 𝑒 3𝑟 ,
or
1
30 = 60 𝑒 3𝑟 ⟺ = 𝑒 3𝑟 .
2
Taking ln both sides and will be obtained
1
− ln 2 = 3𝑟 ⟺ 𝑟 = − ln 2.
3
Finally, we have
𝑡
𝑇 = 20 + 60 𝑒 −3 ln 2 .
For 𝑇 = 30 we obtain
𝑡
30 = 20 + 60 𝑒 −3 ln 2 .
So
𝑡
10 = 60 𝑒 −3 ln 2 .
Then
1 𝑡
= 𝑒 −3 ln 2 .
6
Taking ln both sides and will be obtained
𝑡
− ln 6 = − ln 2.
3
Finally, we get
3 ln 6
𝑡= ≈ 7.755.
ln 2
The cake has temperature 300 𝐶 will take about 7.755 minutes.
We can observe that
Chapter 2-First Order ODEs 53

𝑡
lim𝑡→∞ 𝑇 = lim𝑡→∞ 20 + 60 𝑒 −3 ln 2 = 20.

The temperature variation is shown graphically in Figure 2.6.1. We observe that the
limiting temperature is 20.

𝑡
Figure 2.6.1. Curve of the solution 𝑇 = 20 + 60 𝑒 −3 ln 2

Example 2. A metal bar at a temperature 1000 𝐶 is set on a table where temperature room
is assumed to be constant at 250 𝐶. The metal cooled to 800 𝐶 after five minutes. (a) Find
a formula for the temperature 𝑇 of the metal, 𝑡 minutes after it is placed on the table. (b)
Determine how long it will take for the solution to cool to 350 𝐶.

In this case we have 𝑀 = 250 𝐶. For 𝑡 = 0, 𝑇 = 1000 𝐶. The differential equation which
is described this situation can be given in equation (2.6.9). So, the solution can be given
in equation (2.6.10), in this case we have
𝑇 = 𝑀 + 𝑐𝑒 𝑟𝑡 .
So
100 = 25 + 𝑐𝑒 0 ⟹ 𝑐 = 75.
We will obtain
𝑇 = 25 + 75 𝑒 𝑟𝑡 .
For 𝑡 = 5 then 𝑇 = 80. We have
54 Chapter 2-First Order ODEs

55
80 = 25 + 75 𝑒 5𝑟 ⟺ 55 = 75 𝑒 5𝑟 ⟺ = 𝑒 5𝑟 .
75
Taking ln both sides and we get
55 1 55
ln = 5𝑟 ⟹ 𝑟 = ln .
75 5 75
We will obtain
𝑡 55
𝑇 = 25 + 75 𝑒 5 ln 75 .
If the temperature of the metal 350 then we have
𝑡 55 𝑡 55
35 = 25 + 75 𝑒 5 ln 75 ⟺ 10 = 75𝑒 5 ln 75 ,
or we have
10 𝑡 55
= 𝑒 5 ln 75 .
75
Taking ln both sides and we will obtain
10 𝑡 55
ln = ln .
75 5 75
So
10
5 ln
𝑡= 75 ≈ 32.48.
55
ln
75
We conclude that the metal will take approximately 32.48 minutes such that the
temperature becomes 350 𝐶.

Exercises
1. A fossilized bone is found to contain one 400-th the original amount of C-14.
Determine the age of fossil.
2. Use the information provided in question 2 to determine the approximate age of a
piece of wood found in an archaeological excavation at the site to date prehistoric
paintings provided 65% of the C-14 had decayed.
3. A person places 𝑅𝑝. 200.000.000 in a savings account which pays 4 percent
interest per year, compounded continuously. Find (a) the amount in the account
Chapter 2-First Order ODEs 55

after three years, and (b) the time required for the account to double in value,
presuming no withdrawals and no additional deposits.
3
4. The number of Bacteria in 1 hour is measured to be 2 of the original. If the rate of

growth is proportional to the number of bacteria 𝑃(𝑡) present at time 𝑡, determine


the time necessary for the number of bacteria to double and triple.
5. Solve the following logistic differential equation
𝑑𝑃 𝑃2
=𝑟 𝑃− , 𝑡 ≥ 0, 𝑃 0 = 𝑃0
𝑑𝑡 𝑘
6. Insects in a tank increase at a rate proportional to the number present. If the
number increases from 20,000 to 90,000 in one hour, how many insects are
present at the end of two and three hours?
7. It was estimated that the Indonesia’s human population in 1990 was 150,000,000.
Assuming the population increases at the rate of 2.5% , find the Indonesia’s
population in 2005 using model of population growth. Find also the population in
2010.
8. Radioactive uranium converts into the isotope plutonium. After 20 years it is
determined that 0.015% of the initial amount 𝑃0 of plutonium has disintegrated.
Find the half-life of this isotope if the rate of disintegration in proportional to the
amount remaining.
9. A radioactive isotope 𝑃𝑏, decays at a rate proportional to the amount present at
time t and has a half-life of 5 hours. If 1 𝑔𝑟𝑎𝑚 of lead is present initially, how
long will it take for 60% of the lead to decay?
10. Suppose a person deposits 𝑅𝑝. 300.000.000 in a bank account at the rate of 5%
per annum compounded continuously. How much money will be in his bank
account 15 months later? How much he has in the account if the interest were
compounded monthly?
11. What constant interest rate is required if an initial deposit placed into an account
that accrues interest compounded continuously is to triple its value in ten years?
12. A thermometer reading 9000 𝐹 is placed in a pan of oil maintained at 1000 𝐹.
What is the temperature of the thermometer when 𝑡 = 20 minutes, if its
temperature is 6000 𝐹 when 𝑡 = 20 minutes?
56 Chapter 2-First Order ODEs

13. A thermometer is removed from a room where the air temperature is 300 𝐶 and is
taken outside, where the temperature is 150 𝐶. After one minute the thermometer
reads 270 𝐶. What is the reading of the thermometer at 𝑡 = 3 minutes? How long
will it take for the thermometer to reach 200 𝐶?
14. Oil at a temperature of 1000 𝐶 is placed in a room at a constant temperature
of 50 𝐶. If after 15 minutes the temperature of the oil is 500 𝐶, find the time it
will take the oil to reach a temperature of 250 𝐶 and the temperature of the bar
after 15 minutes.
15. Metal at an unknown temperature is placed in a room which is held at a constant
temperature of 300 𝐹. If after 15 minutes the temperature of the metal is 00 𝐹 and
after 20 minutes the temperature of the body is 200 𝐹, find the unknown initial
temperature.
CHAPTER III
SECOND ORDER DIFFERENTIAL EQUATIONS

In the previous chapter we have studied the first order differential equation. In this
chapter we will study a class of differential equations which is called second order
differential. The second order differential equations are important because they arise
frequently in engineering and physics. For instance, acceleration is given by the second
derivative, and force is mass times acceleration. The general form for the second order
differential equation can be given by
𝑑2𝑦 𝑑𝑦
+𝑝 𝑡 +𝑞 𝑡 𝑦 𝑡 =𝑔 𝑡 , (3.0.1)
𝑑𝑡 2 𝑑𝑡

where 𝑝 𝑡 , 𝑞 𝑡 , and 𝑔(𝑡) are continuous functions on an interval. The differential


𝑑2𝑦 𝑑𝑦
equations 𝑦 ′′ + 𝑥𝑦 ′ + 𝑦 = 𝑒 𝑥 , + 𝑑𝑡 = sin 𝑡, 𝑎𝑦 ′′ + 𝑏𝑦 ′ + 𝑐𝑦 = 𝑑, where 𝑎, 𝑏, 𝑐 ,
𝑑𝑡 2

and 𝑑 are constants, etc are examples of the second order differential equations (3.0.1).
This chapter will be organized as follows. In section 3.1 it will be studied
homogeneous differential equation with constant coefficients, linear dependence and
Wronskian will be discussed in section 3.2, in section 2.3 will be discussed
Nonhomogeneouse differential equations. Undetermined coefficient will be studied in
section 3.4. Section 3.5 will discuss variation of parameter method for solving second
order nonhomogeneous differential equations, and applications of the second order
differential equations will be given in section 3.6.

3.1. Homogeneous Differential Equation with Constant Coefficients


In general to solve the second order differential equations are also difficult
especially in nonlinear form. In this section we will study the second order differential
equation (3.0.1) with constants coefficients. If the function 𝑔(𝑡) in the right side equation
(3.0.1) is identically zero (𝑔 𝑡 = 0) then the equation is called homogeneous second
order differential equation. Otherwise, (𝑔(𝑡) ≠ 0) is called nonhomogeneous second
order differential equation. So we rewrite equation (3.0.1) by
𝑎𝑦 ′′ + 𝑏𝑦 ′ + 𝑐𝑦 = 0, (3.1.1)
58 Chapter 3-Second Order ODEs

where 𝑎, 𝑏, and 𝑐 are constants. We will study to solve equation (3.1.1) by using some
examples. These examples will lead us to a very important fact that we will use in every
problem from this point on. The example will also give us clues into how to go about
solving these in general. Consider the second order differential equation
𝑦 ′′ − 4𝑦 = 0, (3.1.2)
which is one of the second order homogeneous differential equation (3.1.1) with 𝑎 =
1, 𝑏 = 0, 𝑐 = −4. Using simple word, we are looking for a function 𝑦(𝑡) such that satisfy
equation (3.1.2). We need functions whose second derivative is 4 times the original
function. One of the first functions that can come back to it after twice derivatives is an
exponential function and with proper exponents the 4 will get taken care of as well. So, it
looks like the following two functions are solutions
𝑦1 = 𝑒 2𝑡 and 𝑦2 = 𝑒 −2𝑡 .
Because we have
𝑦1′′ − 4𝑦1 = 4𝑒 2𝑡 − 4𝑒 2𝑡 = 0,
and
𝑦2′′ − 4𝑦2 = 4𝑒 −2𝑡 − 4𝑒 −2𝑡 = 0.
So we sure that 𝑦1 = 𝑒 2𝑡 and 𝑦2 = 𝑒 −2𝑡 are solutions of the second order homogeneous
equation (3.1.2). By using similar inspection (substitution) can be shown that the
following functions are also solutions of the differential equation (3.1.2) 𝑦 = 2𝑒 2𝑡 ,
1
𝑦 = −5𝑒 −2𝑡 , 𝑦 = 𝑒 2𝑡 − 2 𝑒 −2𝑡 . We can think that any solution in the form of 𝑦 =

𝑐1 𝑒 2𝑡 + 𝑐2 𝑒 −2𝑡 , where 𝑐1 and 𝑐2 arbitrary is a solution of the second order homogeneous


equation (3.1.2). The other example if we consider equation 𝑦 ′′ − 𝑦 = 0. This equation is
also in the form of second order homogeneous differential equation (3.1.2) with 𝑎 = 1,
𝑏 = 0, and 𝑐 = −1. In this case we also can guess that all solutions will be given in the
form 𝑦 = 𝑐1 𝑒 𝑡 + 𝑐2 𝑒 −𝑡 , with 𝑐1 and 𝑐2 are arbitrary constants.

Principle of superposition: If 𝑦1 and 𝑦2 are solutions of a second order homogeneous


differential equation then 𝑦 = 𝑐1 𝑦1 + 𝑐2 𝑦2 is also solution of it. This principle can be
shown by substituting to the homogeneous differential equation (3.1.1). Because 𝑦1 and
Chapter 3-Second Order ODEs 59

𝑦2 are solutions of (3.1.1) then we have 𝑎𝑦1′′ + 𝑏𝑦1′ + 𝑐𝑦1 = 0 and 𝑎𝑦2′′ + 𝑏𝑦2′ + 𝑐𝑦2 =
0. So we obtain
′′
𝑎 𝑐1 𝑦1 + 𝑐2 𝑦2 + 𝑏2 𝑐1 𝑦1 + 𝑐2 𝑦2 ′ + 𝑐 𝑐1 𝑦1 + 𝑐𝑦2
= 𝑎 𝑐1 𝑦1′′ + 𝑐2 𝑦2′′ + 𝑏 𝑐1 𝑦1′ + 𝑐2 𝑦2′ + 𝑐 𝑐1 𝑦1 + 𝑐2 𝑦2
= 𝑐1 𝑎𝑦1′′ + 𝑏𝑦1′ + 𝑐𝑦1 + 𝑐2 𝑎𝑦2′′ + 𝑏𝑦2′ + 𝑐𝑦2 = 𝑐1 0 + 𝑐2 0 = 0.
We can conclude that 𝑦 = 𝑐1 𝑦1 + 𝑐2 𝑦2 is solution of the second order homogeneous
equation (3.1.1).

In general form how can solve the second order homogeneous differential equation with
constants coefficient (3.1.1) as follows. Suppose that the function 𝑦 = 𝑒 𝜆𝑡 , ( 𝜆 is a
constant which to be determined) is the solution of the second order homogeneous
differential equation (3.1.1). Then we have 𝑦 ′ = 𝜆𝑒 𝜆𝑡 and 𝑦 ′′ = 𝜆2 𝑒 𝜆𝑡 . Substituting
𝑦, 𝑦 ′ , and 𝑦′′ into equation (3.1.1) and will be obtained
𝑎 𝜆2 𝑒 𝜆𝑡 + 𝑏 𝜆𝑒 𝜆𝑡 + 𝑐 𝑒 𝜆𝑡 = 0,
Or we can write
𝑎𝜆2 + 𝑏𝜆 + 𝑐 𝑒 𝜆𝑡 = 0.
Because 𝑒 𝜆𝑡 ≠ 0 then we can get
𝑎𝜆2 + 𝑏𝜆 + 𝑐 = 0. (3.1.3)
Equation (3.1.3) is called characteristic equation for second order differential equation
(3.1.1). We can see that values of 𝜆 is on the root of quadratic equation (3.1.3). We know
from calculus that the root can be found by formula
−𝑏± 𝑏 2 −4𝑎𝑐
𝜆1,2 = . (3.1.4)
2𝑎

Base on equation (3.1.4) then there are three types of the root of quadratic equation
(3.1.3) that are
1. Real, distinct roots, 𝜆1 ≠ 𝜆2
2. Double roots 𝜆1 = 𝜆2 = 𝜆
3. Complex roots, 𝜆12 = 𝛼 ± 𝛽𝑖
We will discuss all possibilities of the solution of the second order homogeneous
differential equation (3.1.3).
60 Chapter 3-Second Order ODEs

The first case: Real root and distinct. Let we have real, distinct root of the characteristic
equation, said 𝜆1 ≠ 𝜆2 . We have solution 𝑦1 = 𝑒 𝜆 1 𝑡 and 𝑦2 = 𝑒 𝜆 2 𝑡 . So according to the
superposition principle then we have general solution of the second order homogeneous
differential equation (3.1.3) that is
𝑦 = 𝑐1 𝑒 𝜆 1 𝑡 + 𝑐2 𝑒 𝜆 2 𝑡 .

Example 1. Solve the second differential equation


𝑦 ′′ − 4𝑦 = 0.
The characteristic of the differential equation can be given by
𝜆2 − 4 = 0.
Root of the characteristic are
𝜆1 = 2, 𝜆2 = −2.
So, we have two distinct roots and real. The general solution of the differential equation
can be given by
𝑦 = 𝑐1 𝑒 2𝑡 + 𝑐2 𝑒 −2𝑡 .
Phase portrait of the second order homogeneous equation 𝑦 ′′ − 4𝑦 = 0 can be given in
Figure 3.1.1.

Figure 3.1.1. Phase portrait the second order differential equation 𝑦 ′′ − 4𝑦 = 0.


Chapter 3-Second Order ODEs 61

Example 2. Find the solution of the initial value problem


𝑦 ′′ + 4𝑦 ′ + 3𝑦 = 0, 𝑦 0 = 1, 𝑦 ′ 0 = 1.
The characteristic equation that correspond with the differential equation can be given by
𝜆2 + 4𝜆 + 3 = 0.
It is easy to solve that the root of the characteristic equation are real and distinct, that are
𝜆 + 1 𝜆 + 3 = 0 ⟺ 𝜆1 = −1 ∨ 𝜆2 = −3.
So the general solution will be given by
𝑦 = 𝑐1 𝑒 −𝑡 + 𝑐2 𝑒 −3𝑡 .
The derivative of the general solution is
𝑦 ′ = −𝑐1 𝑒 −𝑡 − 3𝑐2 𝑒 −3𝑡 .
From initial condition we obtain
1 = 𝑦 0 = 𝑐1 + 𝑐2 ,
1 = 𝑦 ′ 0 = −𝑐1 − 3𝑐2 .
Solving the system and we obtain
𝑐1 = 2, 𝑐2 = −1.
We then obtain
𝑦 = 2𝑒 −𝑡 − 𝑒 −3𝑡 .
Plot of the solution can be given in Figure 3.1.2. Phase portrait can be given in Figure
3.1.3.

Figure 3.1.2. Plot 𝑦 = 2𝑒 −𝑡 − 𝑒 −3𝑡 which is solution of the differential equation y ′′ + 4y ′ +


3y = 0, y 0 = 1, y ′ 0 = 1.
62 Chapter 3-Second Order ODEs

Figure 3.1.3. Phase portrait of the differential equation y ′′ + 4y ′ + 3y = 0.

Example 3. Find the second order homogeneous equation which has a general solution in
the form
𝑦 = 𝑐1 𝑒 3𝑡 + 𝑐2 𝑒 −𝑡 .
In this case we can easily see that the root of the characteristic equation are 𝜆1 = 3
and 𝜆2 = −1. So the characteristic equation is
𝜆 − 3 𝜆 + 1 = 0.
We can write
𝜆2 − 2𝜆 − 3 = 0.
So the second order homogeneous differential equation can be given by
𝑦 ′′ − 2𝑦 ′ − 3𝑦 = 0.

Example 4. Solve the initial value problem


3𝑦 ′′ + 5𝑦 ′ − 2𝑦 = 0, 𝑦 0 = 1, 𝑦 ′ 0 = −1.
The characteristic that correspond the differential equation can be given by
3𝜆2 + 5𝜆 − 2 = 0.
Using factorization to get the root of the characteristic equation, we obtain
3𝜆 − 1 𝜆 + 2 = 0.
Chapter 3-Second Order ODEs 63

We obtain
1
𝜆1 = 3 and 𝜆2 = −2.

So the general solution can be given


1
𝑦 = 𝑐1 𝑒 3𝑡 + 𝑐2 𝑒 −2𝑡 .
Differentiating the general solution and we obtain
1 1
𝑦 ′ = 𝑐1 𝑒 3𝑡 − 2𝑐2 𝑒 −2𝑡 .
3
Using initial condition we obtain
1
1 = 𝑐1 + 𝑐2 and −1 = 3 𝑐1 − 2 𝑐2 .

Solving those system and we can get


3 4
𝑐1 = 7 and 𝑐2 = 7.

Finally, we obtain the solution of the initial value problem, that is


3 1 4
𝑦 = 𝑒 3𝑡 + 𝑒 −2𝑡 .
7 7
Phase portrait of the second order homogeneous equation 3𝑦 ′′ + 5𝑦 ′ − 2𝑦 = 0 can be
given in Figure 3.1.4.

Figure 3.1.4. Phase portrait of the second order differential equation 3y ′′ + 5y ′ − 2y = 0.


64 Chapter 3-Second Order ODEs

The second case: double root. Let the root of characteristic equation is 𝜆1 = 𝜆2 = 𝜆.
In this case we have only one solution that is,
𝑏
𝑦1 = 𝑦2 = 𝑦 = 𝑒 𝜆𝑡 = 𝑒 −2𝑎 𝑡 .
Because for the second order differential equation we will have two solutions then we
have to find another solution. Let the one solution that we’ve got is
𝑏
𝑦1 = 𝑒 − 𝑡
2𝑎 .
We assume that the other solution in the form of
𝑏
𝑦2 = 𝑣𝑦1 = 𝑣 𝑒 − 𝑡
2𝑎 .
Differentiating twice and we obtain
𝑏
− 𝑡 𝑏 𝑏
𝑣𝑒 − 𝑡
𝑦2′ =𝑣 ′𝑒 2𝑎
− 2𝑎 ,
2𝑎
and


𝑏
𝑡 𝑏 ′ − 𝑏
𝑡 𝑏 ′ − 𝑏
𝑡 𝑏2 𝑏
𝑣𝑒 − 𝑡
𝑦2′′ ′′
=𝑣 𝑒 2𝑎 − 𝑣𝑒 2𝑎 − 𝑣𝑒 2𝑎 + 2
2𝑎 .
2𝑎 2𝑎 2𝑎
We get
𝑏 𝑏 𝑏 𝑏2 𝑏
𝑦2′′ = 𝑣 ′′ 𝑒 − 𝑡
− 𝑣′ 𝑒− 𝑡
𝑣𝑒 − 𝑡
2𝑎 2𝑎 + 2𝑎 .
𝑎 2𝑎 2
Substituting 𝑦, 𝑦′, and 𝑦′′ into equation (3.1.1) and will be obtained
𝑎𝑦2′′ + 𝑏𝑦2′ + 𝑐𝑦2
𝑏 𝑏2 𝑏
= 𝑎 𝑣 ′′ 𝑦1 − 𝑣 ′ 𝑦1 + 2 𝑣𝑦1 + 𝑏 𝑣 ′ 𝑦1 − 𝑣𝑦 + 𝑐𝑣𝑦1
𝑎 4𝑎 2𝑎 1
𝑏2 𝑏
= 𝑣 ′′ 𝑎𝑦1 + 𝑣 ′ −𝑏 + 𝑏 𝑦1 + 𝑣 𝑎 𝑦1 − 𝑦 + 𝑐𝑦1
4𝑎 2 2𝑎 1
= 𝑣 ′′ 𝑎𝑦1 + 0 + 𝑣 𝑎𝑦1′′ + 𝑏𝑦1 + 𝑐𝑦1 = 𝑣 ′′ 𝑎𝑦1 + 0 + 0
= 𝑣 ′′ 𝑎𝑦1 .
Because 𝑦2 is a solution then we obtain
𝑣 ′′ 𝑎𝑦1 = 0.

Because 𝑎𝑦1 ≠ 0 then we will have 𝑣 ′′ = 0. Integrating 𝑣 ′′ = 0 and we obtain

𝑣′ = 0𝑑𝑡 = 𝑘.
Chapter 3-Second Order ODEs 65

Integrating one more we will obtain

𝑣= 𝑘𝑑𝑡 + 𝑙 = 𝑘𝑡 + 𝑙.

So, we obtain
𝑦2 = 𝑣𝑦1 = 𝑘𝑡 + 𝑙 𝑒 𝜆𝑡 .
The general solution can be given by
𝑦 = 𝑐1 𝑦1 + 𝑐2 𝑦2 = 𝑐1 𝑒 𝜆𝑡 + 𝑐2 𝑘𝑡 + 𝑙 𝑒 𝜆𝑡 .
Simplify, we obtain
𝑦 = 𝑐1 + 𝑐2 𝑙 𝑒 𝜆𝑡 + 𝑐2 𝑘𝑡 𝑒 𝜆𝑡 ,
where 𝑐1 , 𝑐2 , 𝑘, and 𝑙 are constants. Because of any combination of the constants will
also constants. We rewrite all the constants as follows.
𝑦 = 𝑐1 𝑒 𝜆𝑡 + 𝑐2 𝑡𝑒 𝜆𝑡 . (3.1.5)
So in general we can take 𝑘 = 1 and 𝑙 = 0 for a function of 𝑣 and we will have the same
general solution. We conclude that if we have double root 𝜆1 = 𝜆2 = 𝜆 of the
characteristic equation the solution of correspond second order homogeneous differential
equation can be given by equation (3.1.5). This method usually also said method of
reduction of order.

Example 1. Solve the second order homogeneous differential equation


𝑦 ′′ − 6𝑦 ′ + 9𝑦 = 0.
The characteristic equation can be given by
𝜆2 − 6𝜆 + 9 = 0.
The root of the characteristic equation is
2
𝜆−3 = 0.
We have double root, that is 𝜆 = 3. then the general solution can be given by
𝑦 = 𝑐1 𝑒 3𝑡 + 𝑐2 𝑡 𝑒 3𝑡 .
Phase portrait of the second order homogeneous equation 𝑦 ′′ − 6𝑦 ′ + 9𝑦 = 0 can be
given in Figure 3.1.5.
66 Chapter 3-Second Order ODEs

Figure 3.1.5. Phase portrait of the second order differential equation y ′′ − 6y ′ + 9y = 0.

Example 2. Solve the initial value problem


𝑦 ′′ − 4𝑦 ′ + 4𝑦 = 0, 𝑦 0 = 1; 𝑦 ′ (0) = −1.
The characteristic equation for the second order homogeneous differential equation can
be given by
𝜆2 − 4𝜆 + 4 = 0.
The root of the characteristic is given by
2
𝜆−2 = 0 ⟺ 𝜆12 = 2.
So we obtain the double root, and we obtain the general solution, that is
𝑦 = 𝑐1 𝑒 2𝑡 + 𝑐2 𝑡 𝑒 2𝑡 .
Differentiating the general solution and will get
𝑦 ′ = 2𝑐1 𝑒 2𝑡 + 𝑐2 𝑒 2𝑡 + 2𝑐2 𝑡𝑒 2𝑡 .
From initial condition we have
1 = 𝑦 0 = 𝑐1 + 𝑐2 ,
−1 = 𝑦 ′ 0 = 2𝑐1 + 𝑐2 .
Solving the system and will obtain
𝑐1 = −2, 𝑐2 = 3.
So we obtain the solution of second order homogeneous differential equation, that is
𝑦 = −2𝑒 2𝑡 + 3𝑡𝑒 2𝑡 .
Chapter 3-Second Order ODEs 67

Plot of the solution can be given in Figure 3.1.6. Phase portrait can be given in Figure
3.1.7.

Figure 3.1.6. Plot 𝑦 = −2𝑒 −𝑡 + 3𝑡𝑒 2𝑡 which is solution of the differential equation−4y ′ + 4y = 0, y 0 =
1, y ′ 0 = −1.

Figure 3.1.7. Phase portrait of the second order differential equation y ′′ − 4y ′ + 4y = 0.


68 Chapter 3-Second Order ODEs

Example 3. Solve the initial value problem of the second order homogeneous differential
equation
4𝑦 ′′ + 4𝑦 ′ + 𝑦 = 0, 𝑦 0 = 1, 𝑦 ′ 0 = 2.
The characteristic equation can be given by
4𝜆2 + 4𝜆 + 1 = 0.
Factorizing the characteristic equation and will be obtained
2𝜆 + 1 2𝜆 + 1 = 0.
Root of the characteristic equation is
1
𝜆12 = − .
2
So, we have the double roots and we obtain the general solution, that is
1 1
𝑦 = 𝑐1 𝑒 −2𝑡 + 𝑐2 𝑡𝑒 −2𝑡 .
Differentiating the general solution and we get
1 1 1 1 1
𝑦 ′ = − 𝑐1 𝑒 −2𝑡 + 𝑐2 𝑒 −2𝑡 − 𝑐2 𝑡 𝑒 −2𝑡 .
2 2
Using initial condition we have system
1 = 𝑦 0 = 𝑐1 + 𝑐2 ,
1
2 = 𝑦 ′ 0 = − 𝑐1 + 𝑐2 .
2
Solving the system and will be obtain
2 5
𝑐1 = − , 𝑐2 = .
3 3
Then the solution of the second order homogeneous differential equation is

2 1 5 1
𝑦 = − 𝑒 −2𝑡 + 𝑡𝑒 −2𝑡 .
3 3

The third case: Complex root. Let we say that the complex root of the characteristic
equation can be written by 𝜆12 = 𝛼 ± 𝛽𝑖. In this case, we have solution of the second
order homogeneous equation 𝑦1 = 𝑒 𝜆 1 𝑡 and 𝑦2 = 𝑒 𝜆 2 𝑡 or we can write as 𝑦1 = 𝑒 𝛼+𝛽𝑖 𝑡

𝛼−𝛽𝑖 𝑡
and 𝑦2 = 𝑒 . By using Euler’s formula we know that
𝑒 𝛽𝑖𝑡 = cos 𝛽𝑡 + 𝑖 sin 𝛽𝑡,
Chapter 3-Second Order ODEs 69

and
𝑒 −𝛽𝑖𝑡 = cos 𝛽𝑡 − 𝑖 sin 𝛽𝑡.
Therefore we can rewrite the solution to
𝛼+𝛽𝑖 𝑡
𝑦1 = 𝑒 = 𝑒 𝛼𝑡 cos 𝛽𝑡 + 𝑖 sin 𝛽𝑡 ,
𝛼+𝛽𝑖 𝑡
𝑦2 = 𝑒 = 𝑒 𝛼𝑡 cos 𝛽𝑡 + 𝑖 sin 𝛽𝑡 .
According to the superposition principle then the general solution can be given by
𝑦 = 𝑐1 𝑦1 + 𝑐2 𝑦2 = 𝑐1 𝑒 𝛼𝑡 cos 𝛽𝑡 + 𝑖 sin 𝛽𝑡 + 𝑐2 𝑒 𝛼𝑡 cos 𝛽𝑡 − 𝑖 sin 𝛽𝑡 ,
or
𝑦 = 𝑒 𝛼𝑡 𝑐1 + 𝑐2 cos 𝛽𝑡 + 𝑐1 𝑖 − 𝑐2 𝑖 sin 𝛽𝑡 ,
where 𝑐1 , 𝑐2 , 𝑖𝑐1 , and 𝑖𝑐2 are constants. Because of any combination of the constants
will also constants. We rewrite all the constants as follows.
𝑦 = 𝑒 𝛼𝑡 𝑐1 cos 𝛽𝑡 + 𝑐2 sin 𝛽𝑡 . (3.1.6)
We conclude that if the roots of the characteristic equation are complex and can be said
by 𝜆12 = 𝛼 ± 𝛽𝑖 then the general solution of the second order homogeneous differential
equation can be given by equation (3.1.6).

Example 1. Solve the second order differential equation


𝑦 ′′ + 4𝑦 = 0.
The characteristic equation can be given by
𝜆2 + 4 = 0.
The roots of the characteristic equation are
𝜆1 = 2𝑖, 𝜆2 = −2𝑖.
We can see that in this case 𝛼 = 0 and 𝛽 = 2. So, the general solution according to the
equation (3.1.6) can be given by
𝑦 = 𝑒 0𝑡 𝑐1 cos 2𝑡 + 𝑐2 sin 2𝑡 = 𝑐1 cos 2𝑡 + 𝑐2 sin 2𝑡 .
Phase portrait for the second order differential equation 𝑦 ′′ + 4𝑦 = 0 can be shown in
Figure 3.1.8.
70 Chapter 3-Second Order ODEs

Figure 3.1.8. Phase portrait of the second order differential equation y ′′ + 4y = 0.

Example 2. Solve the initial value problem 𝑦 ′′ + 𝑦 = 0, 𝑦 0 = 1, 𝑦 ′ 0 = 2.


The characteristic equation can be given by
𝜆2 + 1 = 0.
The roots of the characteristic equation are
𝜆1 = 𝑖, 𝜆2 = −𝑖.
We can see that in this case 𝛼 = 0 and 𝛽 = 1. The general solution according to the
equation (3.1.6) can be given by
𝑦 = 𝑒 0𝑡 𝑐1 cos 𝑡 + 𝑐2 sin 𝑡 = 𝑐1 cos 𝑡 + 𝑐2 sin 𝑡 .
Differentiating the general solution, we obtain
𝑦 ′ = −𝑐1 sin 𝑡 + 𝑐2 cos 𝑡.
Using initial condition we obtain
1 = 𝑐1 ,
2 = 𝑐2 .
Finally, we obtain the solution which is given initial condition
𝑦 = cos 𝑡 + 2 sin 𝑡.
Plot the solution in 𝑦, 𝑦 ′ plane and phase portrait of the second order differential
equation 𝑦 ′′ + 𝑦 = 0 can be shown in Figure 3.1.9 and Figure 3.1.10 respectively.
Chapter 3-Second Order ODEs 71

Figure 3.1.9. Plot solution of y ′′ + y = 0, y 0 = 1, y ′ 0 = 2.

Figure 3.1.10. Phase portrait of the second order differential equation y ′′ + y = 0.

Example 3. Solve the initial value problem 𝑦 ′′ + 𝑦 ′ + 2𝑦 = 0, 𝑦 0 = 1, 𝑦 ′ 0 = −1.


The characteristic equation can be given by
𝜆2 + 𝜆 + 2 = 0.
The roots of the characteristic equation are
−1± 1−8 1 7
𝜆12 = = −2 ± 𝑖 .
2 2
1 7
We can see that in this case 𝛼 = − 2 and 𝛽 = . The general solution according to the
2

equation (3.1.6) can be given by


72 Chapter 3-Second Order ODEs

1 7 7
𝑦 = 𝑒 −2𝑡 𝑐1 cos 𝑡 + 𝑐2 sin 𝑡 .
2 2
Differentiating the general solution, we obtain
1 1
1 7 7 7 7 7 7
𝑦 ′ = − 2 𝑒 −2𝑡 𝑐1 cos 𝑡 + 𝑐2 sin 𝑡 + 𝑒 −2𝑡 −𝑐1 sin 𝑡 + 𝑐2 cos 𝑡 .
2 2 2 2 2 2

Using initial condition we obtain


1 = 𝑐1 ,
1 7
−1 = − 𝑐1 + 𝑐 .
2 2 2
1
Solving the system and we get 𝑐1 = 1, 𝑐2 = − .
7

Finally, we obtain the solution which is given initial condition


1 1
𝑦 = 𝑒 −2𝑡 cos 𝑡 − sin 𝑡 .
7
Plot the solution 𝑦 𝑡 with respect to 𝑡 and phase portrait of the second order differential
equation 𝑦 ′′ + 𝑦 ′ + 2𝑦 = 0 can be shown in Figure 3.1.11 and Figure 3.1.12
respectively.

Figure 3.1.11. Plot solution of y ′′ + y ′ + 2y = 0, y 0 = 1, y ′ 0 = −1.


Chapter 3-Second Order ODEs 73

Figure 3.1.12. Phase portrait of the second order differential equation y ′′ + y ′ + 2y = 0.

Example 4. Solve the initial value problem 𝑦 ′′ − 𝑦 ′ + 2𝑦 = 0, 𝑦 0 = 1, 𝑦 ′ 0 = −1.


The characteristic equation can be given by
𝜆2 − 𝜆 + 2 = 0.
The roots of the characteristic equation are
1± 1−8 1 7
𝜆12 = =2±𝑖 .
2 2
1 7
We can see that in this case 𝛼 = 2 and 𝛽 = . The general solution according to the
2

equation (3.1.6) can be given by


1
7 7
𝑦 = 𝑒 2𝑡 𝑐1 cos 𝑡 + 𝑐2 sin 𝑡 .
2 2

Differentiating the general solution, we obtain


1 1
1 7 7 7 7 7 7
𝑦 ′ = 2 𝑒 2𝑡 𝑐1 cos 𝑡 + 𝑐2 sin 𝑡 + 𝑒 2𝑡 −𝑐1 sin 𝑡 + 𝑐2 cos 𝑡 .
2 2 2 2 2 2

Using initial condition we obtain


1 = 𝑐1 ,
1 7
−1 = 𝑐1 + 𝑐 .
2 2 2
3
Solving the system and we get 𝑐1 = 1, 𝑐2 = − .
7

Finally, we obtain the solution which is given initial condition


74 Chapter 3-Second Order ODEs

1 3
𝑦 = 𝑒 2𝑡 cos 𝑡 − sin 𝑡 .
7
Plot the solution 𝑦 𝑡 with respect to 𝑡 and phase portrait of the second order differential
equation 𝑦 ′′ − 𝑦 ′ + 2𝑦 = 0 can be shown in Figure 3.1.13 and Figure 3.1.14
respectively.

Figure 3.1.13. Plot solution of y ′′ − y ′ + 2y = 0, y 0 = 1, y ′ 0 = −1.

Figure 3.1.14. Phase portrait of the second order differential equation y ′′ − y ′ + 2y = 0.

Exercises.
1. Find the general solution of the following second order homogeneous differential
equations. Sketch the graph of the solution and describe its behavior as 𝑡 increases.
a. 𝑦 ′′ + 9𝑦 = 0
Chapter 3-Second Order ODEs 75

𝑑2𝑦
b. − 9𝑦 = 0
𝑑𝑡 2

c. 𝑦 ′′ + 5𝑦 ′ + 9𝑦 = 0
𝑑2𝑦 𝑑𝑦
d. − 5 𝑑𝑡 + 9𝑦 = 0
𝑑𝑡 2

e. 𝑦 ′′ − 6𝑦 ′ + 9𝑦 = 0
f. 𝑦 ′′ + 6𝑦 ′ + 9𝑦 = 0
g. 𝑦 ′′ − 3𝑦 ′ + 𝑦 = 0
h. 𝑦 ′′ + 3𝑦 ′ + 𝑦 = 0
1
i. 2𝑦 ′′ − 2𝑦 ′ + 𝑦 = 0
2
′′
j. 2𝑦 − 𝑦 = 0
2. Find the solution of the following second order homogeneous differential
equations which given initial conditions. Sketch the graph of the solution and
describe its behavior as 𝑡 increases.
a. 𝑦 ′′ + 9𝑦 = 0, 𝑦 0 = 1, 𝑦 ′ 0 = 1
𝑑2𝑦
b. − 9𝑦 = 0, 𝑦 0 = 1, 𝑦 ′ 0 = 1
𝑑𝑡 2

c. 𝑦 ′′ + 5𝑦 ′ + 9𝑦 = 0, 𝑦 0 = 1, 𝑦 ′ 0 = 2
𝑑2𝑦 𝑑𝑦
d. − 5 𝑑𝑡 + 9𝑦 = 0, 𝑦 0 = 1, 𝑦 ′ 0 = 2
𝑑𝑡 2

e. 𝑦 ′′ − 6𝑦 ′ + 9𝑦 = 0, 𝑦 0 = −1, 𝑦 ′ 0 = 1
f. 𝑦 ′′ + 6𝑦 ′ + 9𝑦 = 0, 𝑦 0 = −1, 𝑦 ′ 0 = 1
g. 𝑦 ′′ − 3𝑦 ′ + 𝑦 = 0, 𝑦 0 = −1, 𝑦 ′ 0 = −1
h. 𝑦 ′′ + 3𝑦 ′ + 𝑦 = 0, 𝑦 0 = −1, 𝑦 ′ 0 = −1
1
i. 2𝑦 ′′ − 2𝑦 ′ + 2 𝑦 = 0, 𝑦 1 = 1, 𝑦 ′ 1 = 1

j. 2𝑦 ′′ − 𝑦 = 0, 𝑦 1 = 1, 𝑦 ′ 1 = 1
3. Find a differential equation whose general equation can be given as follows.
a. 𝑦 = 𝑐1 𝑒 2𝑡 + 𝑐2 𝑒 −2𝑡
1 1
b. 𝑦 = 𝑐1 𝑒 2𝑡 + 𝑐2 𝑒 −3𝑡
c. 𝑦 = 𝑐1 cos 2𝑡 + 𝑐2 sin 2𝑡
d. 𝑦 = 𝑐1 𝑒 3𝑡 + 𝑐2 𝑡 𝑒 3𝑡
1 1
e. 𝑦 = 𝑐1 𝑒 −3𝑡 + 𝑐2 𝑡 𝑒 −3𝑡
76 Chapter 3-Second Order ODEs

1 1
f. 𝑦 = 𝑒 −𝑡 𝑐1 cos 𝑡 + 𝑐2 sin 𝑡
3 3
1 1
g. 𝑦 = 𝑒 𝑡 𝑐1 cos 𝑡 + 𝑐2 sin 𝑡
3 3
3 3
h. 𝑦 = 𝑒 − 2𝑡
𝑐1 cos 𝑡 + 𝑐2 sin 𝑡
2 2

2𝑡 3 3
i. 𝑦 = 𝑒 𝑐1 cos 𝑡 + 𝑐2 sin 𝑡
2 2
1
𝑡 5 5
j. 𝑦 = 𝑒 2 𝑐1 cos 𝑡 + 𝑐2 sin 𝑡
2 2

4. Find a differential equation whose particular solution can be given as follows.


a. 𝑦 = 𝑒 −2𝑡 + 2 𝑒 2𝑡
1 1
1
b. 𝑦 = 𝑒 −2𝑡 + 𝑡 𝑒 −2𝑡
2
1
c. 𝑦 = 2 cos 𝑡 + 2 sin 𝑡
1
1 1 1
d. 𝑦 = 𝑒 −2𝑡 cos 𝑡 + 2 sin 𝑡
2 2
1
1 1 1
e. 𝑦 = 𝑒 2𝑡 cos 𝑡 + 2 sin 𝑡
2 2
3
3 1 3
f. 𝑦 = 𝑒 − 2 𝑡 cos 𝑡 + 2 sin 𝑡
2 2
3
3 1 3
g. 𝑦 = 𝑒 2 𝑡 cos 𝑡 + 2 sin 𝑡
2 2
1 1
− 𝑡 𝑡
h. 𝑦 = 𝑒 3 +2𝑒 2

1
1 1
i. 𝑦 = 2 𝑒 −3𝑡 + 3 𝑒 −3𝑡
1 1
j. 𝑦 = 2 𝑒 −𝑡 + 6 𝑡 𝑒 −𝑡

3.2. Linear Dependence and Wronskian


In this section we will study the important concept about linear dependence and
linear independent. We also study about Wronskian which is related to those concepts.
Consider the equation
𝑐1 𝑓 + 𝑐2 𝑔 = 0, (3.2.1)
where 𝑓 and 𝑔 are a functions From equation (3.2.1) can be happen when not 𝑐1 and 𝑐2
together zero (there is a value 𝑐1 ≠ 0 or 𝑐2 ≠ 0) so the functions 𝑓 and 𝑔 are linear
dependence. Otherwise, is called linear independence. For example, if we take 𝑓 𝑥 =
Chapter 3-Second Order ODEs 77

sin 𝑥 and 𝑔 𝑥 = 2 sin(𝑥). Of course we can take 𝑐1 = 2 and 𝑐2 = 1 such that satisfy
equation (3.2.1), that is
𝑐1 sin 𝑥 + 𝑐2 (2 sin 𝑥) = 2 sin 𝑥 − 2 sin 𝑥 = 0.
We conclude that 𝑓 = sin 𝑥 and 𝑔 = 2 sin 𝑥 are dependence. However, if we choose
𝑓 = 𝑒 𝑡 and 𝑔 = 𝑒 2𝑡 , then the only possibility to satisfy equation (3.2.1), is 𝑐1 = 𝑐2 = 0,
that is
𝑐1 𝑒 𝑡 + 𝑐2 𝑒 2𝑡 = 0 ⟹ 𝑐1 = 𝑐2 = 0.
So, we conclude that 𝑓 = 𝑒 𝑡 and 𝑔 = 𝑒 2𝑡 are linear independence. Let we consider again
equation (3.2.1) and we evaluate at 𝑡 = 𝑡0 then we have equation
𝑐1 𝑓 𝑡0 + 𝑐2 𝑔 𝑡0 = 0,
𝑐1 𝑓 ′ 𝑡0 + 𝑐2 𝑔 𝑡0 = 0.
In the matrix form we may write
𝑓(𝑡0 ) 𝑔(𝑡0 ) 𝑐1 0
𝑓 ′ (𝑡0 ) 𝑔′ (𝑡0 ) 𝑐2 = 0 .
To find 𝑐1 and 𝑐2 we can write
−1
𝑐1 𝑓 𝑡0 𝑔 𝑡0 0
𝑐2 = .
𝑓 ′ 𝑡0 𝑔′ 𝑡0 0
If the determinant of the
𝑓 𝑡0 𝑔 𝑡0
= 𝑓 𝑡0 𝑔′ 𝑡0 − 𝑓 ′ 𝑡0 𝑔(𝑡0 ) ≠ 0. (3.2.2)
𝑓 ′ 𝑡0 𝑔′ 𝑡0
Then the inverse matrix exists and we will obtain 𝑐1 = 𝑐2 = 0. So we say that 𝑓 and 𝑔 are
linear independence. Otherwise, we say 𝑓 and 𝑔 are linear dependence. The determinant
in equation (3.2.2) is called Wronskian and can be written by 𝑊(𝑓, 𝑔). Now, for the
second order differential equation, said
𝑎𝑦 ′′ + 𝑏𝑦 ′ + 𝑐𝑦 = 0. (3.2.3)
Let the solution of (3.2.3) are 𝑦1 and 𝑦2 . Suppose we have
𝑦1 𝑡0 𝑦2 𝑡0
𝑊 𝑦1 , 𝑦2 𝑡0 = = 𝑦 𝑡0 𝑦2 ′ 𝑡0 − 𝑦1′ 𝑡0 𝑦2 (𝑡0 ) ≠ 0.
𝑦1 ′ 𝑡0 𝑦2 ′ 𝑡0
Then we can say that two solutions are fundamental solutions of the equation (3.2.3) and
the general solution can be given by
𝑦 = 𝑐1 𝑦1 + 𝑐2 𝑦2 .
78 Chapter 3-Second Order ODEs

Example 1. Show that the fundamental solutions of the second order differential equation
𝑦 ′′ + 2𝑦 ′ + 𝑦 = 0,
are 𝑦1 = 𝑒 −𝑡 and 𝑦2 = 𝑡𝑒 −𝑡 . To show, we calculate the wronskian of these solutions,
that is
−𝑡
𝑊 𝑦1 , 𝑦2 = 𝑒 −𝑡 𝑡𝑒 −𝑡 = 𝑒 −𝑡 𝑒 −𝑡 − 𝑡𝑒 −𝑡 + 𝑒 −𝑡 𝑡𝑒 −𝑡 = 𝑒 −2𝑡 ≠ 0.
−𝑒 𝑒 −𝑡 − 𝑡𝑒 −𝑡
Because 𝑊(𝑦1 , 𝑦2 ) ≠ 0, then we conclude that 𝑦1 = 𝑒 −𝑡 and 𝑦2 = 𝑡𝑒 −𝑡 are fundamental
solutions of the given differential equation. The general solution can be given by
𝑦 = 𝑐1 𝑒 −𝑡 + 𝑐2 𝑡𝑒 −𝑡 .

1
Example 2. Show that 𝑦1 = 𝑡 and 𝑦2 = 𝑡 form fundamental solutions of
𝑑2𝑦 3𝑡 𝑑𝑦 1
𝑡 2 𝑑𝑡 2 + − 2 𝑦 = 0, 𝑡 > 0. (3.2.4)
2 𝑑𝑡

To show, we have to check whether both functions are solutions of the second order
differential equation (3.2.4). Substituting 𝑦1 and 𝑦2 into equation (3.2.4)
1 3𝑡 1 1 1 3 2
𝑡2 − + − 𝑡 =− 𝑡+ 𝑡− 𝑡 = 0,
4𝑡 𝑡 2 2 𝑡 2 4 4 4
2 3𝑡 1 1 1 4 3 1
𝑡2 3
+ − 2 − = − − = 0.
𝑡 2 𝑡 2 𝑡 2𝑡 2𝑡 2𝑡
1
We conclude that 𝑦1 = 𝑡 and 𝑦2 = are solutions of the second order differential
𝑡

equation (3.2.4). Now, we check the Wronskian of those solutions, that is


1
𝑡 1 1 3
𝑡
𝑊 𝑦1 , 𝑦2 = 1 1 = − 3 − 3 = − ≠ 0, 𝑡 > 0.
− 2 𝑡 2 2𝑡 2 2𝑡 𝑡
2 𝑡 𝑡
1
Because 𝑊(𝑦1 , 𝑦2 ) ≠ 0, we can conclude that that 𝑦1 = 𝑡 and 𝑦2 = 𝑡 are fundamental

solutions of the differential equation (3.2.4) and the general solution of the differential
equation (3.2.4) can be given by
1
𝑦 = 𝑐1 𝑦1 + 𝑐2 𝑦2 = 𝑐1 𝑡 + 𝑐2 .
𝑡
Chapter 3-Second Order ODEs 79

Abel’s Theorem.
Let 𝑦1 and 𝑦2 are solutions of the second order differential equation
𝑦 ′′ + 𝑝 𝑡 𝑦 ′ + 𝑞 𝑡 𝑦 = 0, (3.2.5)
where 𝑝(𝑡) and 𝑞(𝑡) are continuous functions on a interval 𝐼. Then Wronskian of 𝑦1 and
𝑦2 can be given by
𝑊 𝑦1 , 𝑦2 = 𝑐 𝑒 − 𝑝𝑑𝑡
,
where 𝑐 is a constant depend on 𝑦1 and 𝑦2 , not depend on 𝑡. So that 𝑊 = 0 (𝑐 = 0) for
all 𝑡 ∈ 𝐼 or 𝑊 ≠ 0 (𝑐 ≠ 0).
To prove the theorem we know that 𝑦1 and 𝑦2 are solutions then they must satisfy the
differential equation (3.2.5), that is
𝑦1′′ + 𝑝𝑦1′ + 𝑞𝑦1 = 0,
(3.2.6)
𝑦2′′ + 𝑝𝑦2′ + 𝑞𝑦2 = 0.
We multiply the fist equation (3.2.6) by – 𝑦2 and the second equation (3.2.6) by 𝑦1 and
we obtain
−𝑦2 𝑦1′′ − 𝑝𝑦2 𝑦1′ − 𝑞𝑦2 𝑦1 = 0,
(3.2.7)
𝑦1 𝑦2′′ + 𝑝𝑦1 𝑦2′ + 𝑞𝑦1 𝑦2 = 0.
Adding both equations in (3.2.7) and will be obtained
𝑦1 𝑦2′′ − 𝑦1′′ 𝑦2 + 𝑝 𝑦1 𝑦2′ − 𝑦1′ 𝑦2 = 0.
We know that 𝑊 𝑦1 , 𝑦2 = 𝑦1 𝑦2′ − 𝑦1′ 𝑦2 , then we will obtain
𝑊 ′ + 𝑃𝑊 = 0.
This equation is a first order separable differential equation which we have studied in the
previous chapter. The solution can be given by
𝑊 𝑦1 , 𝑦2 = 𝑐 𝑒 − 𝑝𝑑𝑡
.

Exercises.
1. By using Wronskian show that the following pairs functions linear dependence or
linear independence.
a. 𝑦1 = cos 𝑡, 𝑦2 = sin 𝑡
1
b. 𝑦1 = 𝑡, 𝑦2 = 𝑡
1
c. 𝑦1 = 𝑒 𝑡 , 𝑦2 = 𝑒 2𝑡
d. 𝑦1 = 𝑒 𝑡 , 𝑦2 = 𝑡 𝑒 𝑡
80 Chapter 3-Second Order ODEs

e. 𝑦 = sin 2𝑡 , 𝑦2 = sin 𝑡 cos 𝑡


2. Verify that the functions 𝑦1 and 𝑦2 are solutions of the given second order
differential equation. Are they made a fundamental solution?
a. 𝑦 ′′ + 𝑦 = 0, 𝑦1 = sin 𝑡, 𝑦2 = cos 𝑡
b. 𝑦 ′′ + 3𝑦 ′ + 2𝑦 = 0, 𝑦1 = 𝑒 −𝑡 , 𝑦2 = 𝑒 −2𝑡
c. 𝑦 ′′ + 4𝑦 ′ + 4𝑦 = 0, 𝑦1 = 𝑒 −2𝑡 , 𝑦2 = 𝑡𝑒 −2𝑡
d. 𝑡 2 𝑦 ′′ − 𝑡 𝑡 + 2 𝑦 ′ + 𝑡 + 2 𝑦 = 0, 𝑡 > 0, 𝑦1 = 𝑡, 𝑦2 = 𝑡𝑒 𝑡
3
e. 2𝑡 2 𝑦 ′′ + 3𝑡𝑦 − 𝑦 = 0, 𝑡 > 0, 𝑦1 = 2 𝑡, 𝑦2 = 𝑡 .

3. Without solving the following differential equation, find the Wronskian of their
solution.
3 1
a. 𝑡 2 𝑦 ′′ + 2 𝑡𝑦 ′ − 2 𝑦 = 0, 𝑡 > 0.

b. 𝑡𝑦 ′′ + 𝑦 ′ + 2𝑒 𝑡 𝑦 = 0, 𝑡 > 0
1
c. 𝑦 ′′ + 𝑡 𝑦 ′ + 𝑦 = 0, 𝑡 > 0.

d. 𝑦 ′′ + 2𝑦 ′ + 𝑦 = 0
1
e. 2𝑦 ′′ − 𝑦 ′ + 2 𝑦 = 0

f. 𝑦 ′′ + 9𝑦 = 0
g. 𝑦 ′′ − 𝑦 ′ + 9𝑦 = 0
h. 𝑦 ′′ + 𝑦 ′ + 9𝑦 = 0
i. 𝑦 ′′ + 𝑎𝑦 ′ + 𝑏𝑦 = 0
1 1
j. 𝑡
𝑦 ′′ + 𝑡 2 𝑦 ′ + 𝑦 = 0, 𝑡 > 0

4. Find the Wronskian of the following differential equations. Then using the
method of reduction of order find the other solution.
𝑡2
a. 𝑦 ′′ + 𝑡𝑦 ′ − 𝑦 = 0, 𝑡 > 0, 𝑦1 = 𝑡
2
𝑡2
b. 𝑦 ′′ − 2𝑡𝑦 ′ + 3𝑦 = 0, 𝑡 > 0, 𝑦1 = 𝑡 2
2

c. 𝑡 − 1 𝑦 ′′ − 𝑡𝑦 ′ + 𝑦 = 0, 𝑡 > 1, 𝑦1 = 𝑒 𝑡
1
d. 2𝑡 2 𝑦 ′′ + 6𝑡𝑦 ′ + 2𝑦 = 0, 𝑡 > 0, 𝑦1 = 𝑡

e. 2𝑡 2 𝑦 ′′ + 𝑡𝑦 ′ − 3𝑦 = 0, 𝑡 > 0, 𝑦1 = 𝑡 𝑡.
Chapter 3-Second Order ODEs 81

3.3. Nonhomogeneous Differential Equations


In this section we will study a second order nonhomogeneous differential eguation.
Consider the nonhomogeneous differential equation
𝑦 ′′ + 𝑝 𝑡 𝑦 ′ + 𝑞 𝑡 𝑦 = 𝑔 𝑡 , (3.3.1)
where 𝑝 𝑡 , 𝑞 𝑡 , 𝑔 𝑡 , are continuous functions on an interval 𝐼 and where 𝑔(𝑡) ≠ 0. In
this case we have homogeneous differential equation which is associated the
nonhomogeneous differential equation equation (3.3.1), that is
𝑦 ′′ + 𝑝 𝑡 𝑦 ′ + 𝑞 𝑡 𝑦 = 0. (3.3.2)
We have the following theorem.
Suppose that 𝑌1 and 𝑌2 are two solutions of the second order nonhomogeneous
differential equation (3.3.1) and 𝑦1 and 𝑦2 are fundamental solutions of the second order
homogeneous differential equation (3.3.2) then
𝑌 = 𝑌1 − 𝑌2 ,
is also solution of the second order homogeneous differential equation (3.3.2) and then
we can write
𝑌 = 𝑌1 − 𝑌2 = 𝑐1 𝑦1 + 𝑐2 𝑦2 .
To prove this theorem we know that 𝑌1 and 𝑌2 are solutions of second order
nonhomogeneous differential equation (3.3.1), so we have
𝑌1′′ + 𝑝𝑌1′ + 𝑞𝑌1 = 𝑔,
(3.3.3)
𝑌2′′ + 𝑝𝑌2 + 𝑞𝑌2 = 𝑔.
Using subtraction on equation (3.3.3) and we will obtain
𝑌1′′ − 𝑌2′′ + 𝑝 𝑌1′ − 𝑌2′ + 𝑞 𝑌1 − 𝑌2 = 0,
or we write
′′
𝑌1 − 𝑌2 + 𝑝 𝑌1 − 𝑌2 ′ + 𝑞 𝑌1 − 𝑌2 = 0.
It means that 𝑌1 − 𝑌2 satisfy second order homogeneous differential equation (3.3.2). So,
we conclude that 𝑌1 − 𝑌2 is solution of differential equation (3.3.2). Because 𝑦1 and 𝑦2
are fundamental solutions of the second order homogeneous differential (3.3.2), then any
solution of the differential equation (3.3.2) can be written in the combination linear of 𝑦1
and 𝑦2 . 𝑌1 − 𝑌2 is a solution of the second order homogeneous differential equation
(3.3.2), so we can conclude that
82 Chapter 3-Second Order ODEs

𝑌1 − 𝑌2 = 𝑐1 𝑦1 + 𝑐2 𝑦2 .
By using this theorem we can write down the form of the general solution to (3.3.1). Let’s
suppose that 𝑦(𝑡) is the general solution to (3.3.1) and that 𝑌𝑝 is any solution to (3.3.1).
Then using the second part of the theorem we know that
𝑦 − 𝑌𝑝 = 𝑐1 𝑦1 + 𝑐2 𝑦2 ,
where 𝑦1 and 𝑦2 are a fundamental of solutions for (3.3.2). So we can write the general
solution of second order nonhomogeneous differential equation (3.3.1) in the form
𝑦 = 𝑐1 𝑦1 + 𝑐2 𝑦2 + 𝑌𝑝 .
Or we can say
𝑦 = 𝑦𝑕 + 𝑌𝑝 ,
where 𝑦𝑕 = 𝑐1 𝑦1 + 𝑐2 𝑦2 is a solution of the homogeneous equation and 𝑌𝑝 is particular
solution of the nonhomogeneous differential equation. So we can conclude that to solve
the second order nonhomogeneous differential equation we have to solve the associate
second order homogeneous equation and then solve particular solution and we add both
of them. We will study the method how to find the particular solution in the next to
section.

3.4. Undetermined Coefficient


In this section we will study the first method that can be used to find a particular
solution to a second order nonhomogeneous differential equation
𝑦 ′′ + 𝑝 𝑡 𝑦 ′ + 𝑞 𝑡 𝑦 = 𝑔 𝑡 . (3.4.1)
The main advantage of this method is that it reduces the problem to an algebra problem.
The algebra can get nasty expression, but for most of the problems it will not be very
difficult. Another nice thing about this method is that the complimentary solution will not
be explicitly required, although as we will see knowledge of the complimentary solution
will be needed in some cases and so we’ll generally find that as well. There are two
disadvantages to this method. First, it will only work for quite small types of the
function 𝑔(𝑡) in equation (3.4.1). The types of 𝑔(𝑡) for which the method works, does
include some of the more common functions, however, there are many functions out
there for which undetermined coefficients simply doesn’t work. Second, it is generally
Chapter 3-Second Order ODEs 83

only useful for constant coefficient differential equations. The method is quite simple.
All that we need to do is look at the function 𝑔(𝑡) and make a guess as to the form of the
particular solution 𝑌𝑝 leaving the coefficient(s) undetermined (and hence the name of the
method). Substituting the guess into the differential equation and seeing if we can
determine values of the coefficients. If we can determine values for the coefficients then
we guessed correctly, if we cannot find values for the coefficients then we guessed
incorrectly. It is usually easier to see this method in action rather than to try and describe
it, so let we discuss some examples.

Example 1. Solve the second order nonhomogeneous differential equation


𝑦 ′′ − 3𝑦 ′ + 2𝑦 = 2𝑒 3𝑡 . (3.4.2)
To solve differential equation (3.4.2) we have to find the homogeneous differential
equation associated with differential equation (3.4.2). The homogeneous differential
equation can be given by
𝑦 ′′ − 3𝑦 ′ + 2𝑦 = 0.
Then the characteristic equation will be given by
𝜆2 − 3𝜆 + 2 = 0.
The roost of the characteristic are
𝜆 − 1 𝜆 − 2 = 0 ⟺ 𝜆 = 1 ∨ 𝜆 = 2.
So, we obtain the fundamental solutions for the homogeneous equation, that is
𝑦𝑕 = 𝑐1 𝑒 𝑡 + 𝑐2 𝑒 2𝑡 .
Now we want find the particular solution. Because the function 𝑔 𝑡 = 2𝑒 3𝑡 and the
derivative of the function always in the exponential form so we have to make a guess of
the particular solution in the form of
𝑌𝑝 = 𝐴𝑒 3𝑡 .
Differentiating the function 𝑌𝑝 twice and we obtain
𝑌𝑝′ = 3𝐴𝑒 3𝑡 , 𝑌𝑝′′ = 9𝐴𝑒 3𝑡 .
Substituting 𝑌𝑝 , 𝑌𝑝′ , and 𝑌𝑝 ′′ into equation (3.4.2) and we will obtain
9𝐴𝑒 3𝑡 − 3 3𝐴𝑒 3𝑡 + 2 𝐴𝑒 3𝑡 = 2𝑒 3𝑡 .
We will obtain
84 Chapter 3-Second Order ODEs

2𝐴𝑒 3𝑡 = 2𝑒 3𝑡 ⟹ 2𝐴 = 2 ⟹ 𝐴 = 1.
So, we obtain particular solution of the second order nonhomogeneous differential
equation (3.4.2) in the form
𝑌𝑝 = 𝑒 3𝑡 .
We finally obtain the general solution of the differential equation (3.4.2), that is
𝑦 = 𝑌𝑝 + 𝑦𝑕 = 𝑐1 𝑒 𝑡 + 𝑐2 𝑒 3𝑡 + 𝑒 3𝑡 .

Example 2. Find the general solution of the second order nonhomogeneous differential
equation
𝑦 ′′ − 3𝑦 ′ + 2𝑦 = 2𝑥 2 + 𝑥 + 1. (3.4.3)
The homogeneous differential equation associated with the nonhomogeneous equation
(3.4.3) is similar to the example 1 above. So we have the fundamental solutions for
homogeneous differential equation, that is
𝑦𝑕 = 𝑐1 𝑒 𝑥 + 𝑐2 𝑒 2𝑥 .
To find the particular solution for (3.4.3) we have to see the characteristic of the
function 𝑔 𝑡 = 2𝑥 2 + 𝑥 + 1. We know that the function 𝑔 𝑡 is polynomial and if we
differentiate this function will get also polynomial. So, we have to make a guess of the
particular solution in the form of
𝑌𝑝 = 𝐴2 𝑥 2 + 𝐴1 𝑥 + 𝐴0 .
Differentiating twice and we obtain
𝑌𝑝′ = 2𝐴2 𝑥 + 𝐴1 , 𝑌𝑝′′ = 2𝐴2 .
Substituting 𝑌𝑝 , 𝑌𝑝′ , and 𝑌𝑝 ′′ into equation (2.4.3), and we will obtain
2𝐴2 − 3 2𝐴2 𝑥 + 𝐴1 + 2 𝐴2 𝑥 2 + 𝐴1 𝑥 + 𝐴0 = 2𝑥 2 + 𝑥 + 1.
We can rewrite by
2𝐴2 𝑥 2 + 2𝐴1 − 6𝐴2 𝑥 + 2𝐴0 − 3𝐴1 + 2𝐴2 = 2𝑥 2 + 𝑥 + 1.
So we have a system
2𝐴2 = 2,
2𝐴1 − 6𝐴2 = 1,
2𝐴0 − 3𝐴1 + 2𝐴2 = 1.
Solving the system and we can obtain
19 7
𝐴0 = , 𝐴1 = , 𝐴2 = 1.
4 2
Chapter 3-Second Order ODEs 85

We obtain the particular solution of the second order nonhomogeneous differential


equation (3.4.3), that is
7 19
𝑌𝑝 = 𝑥 2 + 𝑥 + .
2 4
The general solution of the differential equation can be given by
7 19
𝑦 = 𝑐1 𝑒 𝑥 + 𝑐2 𝑒 2𝑥 + 𝑥 2 + 𝑥 + .
2 4

Example 3. Find the general solution of the second order nonhomogeneous differential
equation
𝑦 ′′ − 3𝑦 ′ + 2𝑦 = 2 sin 2𝑡. (3.4.4)
The homogeneous differential equation associated with the nonhomogeneous equation
(3.4.3) is similar to the example 1 above. So we have the fundamental solutions for
homogeneous differential equation, that is
𝑦𝑕 = 𝑐1 𝑒 𝑡 + 𝑐2 𝑒 2𝑡 .
To find the particular solution for (3.4.4) we have to see the characteristic of the
function 𝑔 𝑡 = 2 sin 2𝑡. We know that the function 𝑔 𝑡 is sinus and if we differentiate
this function will get also sinus and cosines. So, we have to make a guess of the
particular solution in the form of
𝑌𝑝 = 𝐴1 sin 2𝑡 + 𝐴2 cos(2𝑡).
Differentiating twice and we obtain
𝑌𝑝′ = 2𝐴1 cos 2𝑡 − 2𝐴2 sin 2𝑡,
𝑌𝑝′′ = −4𝐴1 sin 2𝑡 − 4𝐴2 cos 2𝑡.
Substituting 𝑌𝑝 , 𝑌𝑝′ , and 𝑌𝑝 ′′ into equation (2.4.4), and we will obtain
(−4𝐴1 sin 2𝑡 − 4𝐴2 cos 2𝑡) − 3 2𝐴1 cos 2𝑡 − 2𝐴2 sin 2𝑡 + 2 𝐴1 sin 2𝑡 +
𝐴2 cos(2𝑡) = 2 sin 2𝑡.
We can rewrite by
−4𝐴1 + 6𝐴2 + 2𝐴1 sin 2𝑡 + −4𝐴2 − 6𝐴1 + 2𝐴2 cos 2𝑡 = 2 sin 2𝑡.
So we have a system
−2𝐴1 + 6𝐴2 = 2,
−6𝐴1 − 2𝐴2 = 0.
Solving the system and we can obtain
86 Chapter 3-Second Order ODEs

1 3
𝐴1 = − , 𝐴2 = .
10 10
We obtain the particular solution of the second order nonhomogeneous differential
equation (3.4.4), that is
1 3
𝑌𝑝 = − sin 2𝑡 + cos 2𝑡.
10 10
The general solution of the differential equation can be given by
1 3
𝑦 = 𝑐1 𝑒 𝑡 + 𝑐2 𝑒 2𝑡 − sin 2𝑡 + cos 2𝑡.
10 10

Example 4. Find the general solution of the second order nonhomogeneous differential
equation
𝑦 ′′ − 3𝑦 ′ + 2𝑦 = 3𝑒 𝑡 . (3.4.5)
The homogeneous differential equation associated with the nonhomogeneous equation
(3.4.5) is similar to the example 1 above. So we have the fundamental solutions for
homogeneous differential equation, that is
𝑦𝑕 = 𝑐1 𝑒 𝑡 + 𝑐2 𝑒 2𝑡 .
To find the particular solution for (3.4.5) we have to see the characteristic of the
function 𝑔 𝑡 = 3𝑒 𝑡 . We know that the function 𝑔 𝑡 is exponential and if we
differentiate this function will get also differential. It is look like example 1. However, if
we use a guess function for particular solution in the form of
𝑌𝑝 = 𝐴𝑒 𝑡 .
Differentiating twice and we obtain
𝑌𝑝′ = 𝐴𝑒 𝑡 ,
𝑌𝑝′′ = 𝐴𝑒 𝑡 .
Substituting 𝑌𝑝 , 𝑌𝑝′ , and 𝑌𝑝 ′′ into equation (3.4.5), and we will obtain
𝐴𝑒 𝑡 − 3𝐴𝑒 𝑡 + 2𝐴𝑒 𝑡 = 3𝑒 𝑡 .
We can see from the last equation we cannot find the constant 𝐴. So, what actually the
problem come from? If we see carefully then we can note that the function 𝑔 𝑡 = 3𝑒 𝑡 is
one of the fundamental solutions. Therefore we have to use other guess function for the
particular solution. Now, we have to use a guess function as
𝑌𝑝 = 𝐴𝑡𝑒 𝑡 .
Chapter 3-Second Order ODEs 87

Differentiating twice and we obtain


𝑌𝑝′ = 𝐴𝑒 𝑡 + 𝐴𝑡𝑒 𝑡 ,
𝑌𝑝′′ = 2𝐴𝑒 𝑡 + 𝐴𝑡𝑒 𝑡 .
Substituting 𝑌𝑝 , 𝑌𝑝′ , and 𝑌𝑝 ′′ into equation (2.4.5), and we will obtain
2𝐴𝑒 𝑡 + 𝐴𝑡𝑒 𝑡 − 3 𝐴𝑒 𝑡 + 𝐴𝑡𝑒 𝑡 + 2 𝐴𝑡𝑒 𝑡 = 3𝑒 𝑡 .
We can rewrite by
2𝐴 − 3𝐴 𝑒 𝑡 = 3𝑒 𝑡 .
So, we can obtain
𝐴 = −3.
We obtain the particular solution of the second order nonhomogeneous differential
equation (3.4.5), that is
𝑌𝑝 = −3𝑡𝑒 𝑡 .
The general solution of the differential equation can be given by
𝑦 = 𝑐1 𝑒 𝑥 + 𝑐2 𝑒 2𝑥 − 3𝑡𝑒 𝑡 .

Example 5. Find the general solution of the second order nonhomogeneous differential
equation
𝑦 ′′ − 3𝑦 ′ + 2𝑦 = 3𝑒 3𝑡 sin 𝑡. (3.4.5)
Similar as previous examples we have the fundamental solutions for homogeneous
differential equation, that is
𝑦𝑕 = 𝑐1 𝑒 𝑡 + 𝑐2 𝑒 2𝑡 .
The function 𝑔(𝑡) is combination two functions exponential and trigonometry. So the
guess function for particular solution wills also combination of them. We have to use a
guess function as
𝑌𝑝 = 𝑒 3𝑡 (𝐴1 sin 𝑡 + 𝐴2 cos 𝑡).
Differentiating twice and we obtain
𝑌𝑝′ = 3𝑒 𝑡 (𝐴1 sin 𝑡 + 𝐴2 cos 𝑡) + 𝑒 3𝑡 𝐴1 cos 𝑡 − 𝐴2 sin 𝑡 ,
𝑌𝑝′′ = 2𝑒 3𝑡 4𝐴1 − 3𝐴2 sin 𝑡 + 2𝑒 3𝑡 3𝐴1 + 4𝐴2 cos 𝑡.
Substituting 𝑌𝑝 , 𝑌𝑝′ , and 𝑌𝑝 ′′ into equation (3.4.5), and we will obtain
2𝑒 3𝑡 4𝐴1 − 3𝐴2 sin 𝑡 + 2𝑒 3𝑡 3𝐴1 + 4𝐴2 cos 𝑡 − 3 3𝑒 𝑡 (𝐴1 sin 𝑡 + 𝐴2 cos 𝑡) +
𝑒 3𝑡 (𝐴1 cos 𝑡 − 𝐴2 sin 𝑡) + 2 𝑒 3𝑡 (𝐴1 sin 𝑡 + 𝐴2 cos 𝑡) = 3𝑒 3𝑡 sin 𝑡.
88 Chapter 3-Second Order ODEs

We collect terms in the similar form and we get


𝐴1 − 3𝐴2 𝑒 3𝑡 sin 𝑡 + 3𝐴1 + 𝐴2 𝑒 3𝑡 cos 𝑡 = 3𝑒 3𝑡 sin 𝑡.
We have a system
𝐴1 − 3𝐴2 = 3,
3𝐴1 + 𝐴2 = 0.
Solving the system and we get
3 9
𝐴1 = , 𝐴2 = − .
10 10
We obtain the particular solution of the second order nonhomogeneous differential
equation (3.4.5), that is
3 3𝑡 9
𝑌𝑝 = 𝑒 sin 𝑡 − 𝑒 3𝑡 cos 𝑡.
10 10
The general solution of the differential equation can be given by
3 9
𝑦 = 𝑐1 𝑒 𝑥 + 𝑐2 𝑒 2𝑥 + 𝑒 3𝑡 sin 𝑡 − 𝑒 3𝑡 cos 𝑡.
10 10

Example 6. Find the general solution of the second order nonhomogeneous differential
equation
𝑦 ′′ − 2𝑦 ′ + 𝑦 = 3𝑒 𝑡 . (3.4.6)
The differential equation (3.4.6) is almost similar with problem example 4 in this section.
However, there is an essential different. We have double root of the characteristic
equation and also function 𝑔 𝑡 is also fundamental solution. It is easy to check that the
fundamental solution can be given by
𝑦𝑕 = 𝑐1 𝑒 𝑡 + 𝑐2 𝑡𝑒 𝑡 .
The function 𝑔(𝑡) is a fundamental solution, so if we use a guess function for 𝑌𝑝 as
function in example 4 will doesn’t work (𝑌𝑝 = 𝐴𝑒 𝑡 ) (the reader should prove it) . We
have to use a guess function as
𝑌𝑝 = 𝐴𝑡 2 𝑒 𝑡 .
Differentiating twice and we obtain
𝑌𝑝′ = 2𝐴𝑡𝑒 𝑡 + 𝐴𝑡 2 𝑒 𝑡 ,
𝑌𝑝′′ = 2𝐴𝑒 𝑡 + 4𝐴𝑡𝑒 𝑡 + 𝐴𝑡 2 𝑒 𝑡 .
Substituting 𝑌𝑝 , 𝑌𝑝′ , and 𝑌𝑝 ′′ into equation (3.4.6), and we will obtain
2𝐴𝑒 𝑡 + 4𝐴𝑡𝑒 𝑡 + 𝐴𝑡 2 𝑒 𝑡 − 2 2𝐴𝑡𝑒 𝑡 + 𝐴𝑡 2 𝑒 𝑡 + 𝐴𝑡 2 𝑒 𝑡 = 3𝑒 𝑡 .
Chapter 3-Second Order ODEs 89

We collect terms in the similar form and we get


2𝐴𝑒 𝑡 = 3𝑒 𝑡 .
We obtain
3
𝐴= .
2
We obtain the particular solution of the second order nonhomogeneous differential
equation (3.4.5), that is
3 2 𝑡
𝑌𝑝 = 𝑡 𝑒 .
2
The general solution of the differential equation can be given by
3
𝑦 = 𝑐1 𝑒 𝑡 + 𝑐2 𝑡𝑒 𝑡 + 𝑡 2 𝑒 𝑡 .
2

Let function 𝑔(𝑡) in the second order nonhomogeneous differential equation (3.4.1) is
the sum of two or more function, let say 𝑔 𝑡 = 𝑔1 𝑡 + 𝑔2 𝑡 + 𝑔3 (𝑡), and suppose that
𝑌1 , 𝑌2 , and 𝑌3 are particular solution of the nonhomogeneous differential equation
𝑦 ′′ + 𝑝 𝑡 𝑦 ′ + 𝑞 𝑡 𝑦 = 𝑔1 𝑡 ,
𝑦 ′′ + 𝑝 𝑡 𝑦 ′ + 𝑞 𝑡 𝑦 = 𝑔2 𝑡 , (3.4.7)
𝑦 ′′ + 𝑝 𝑡 𝑦 ′ + 𝑞 𝑡 𝑦 = 𝑔3 𝑡 ,
respectively. Then 𝑌 = 𝑌1 + 𝑌2 + 𝑌3 is solution of the differential equation (3.4.1). To
show this statement we substitute 𝑌 = 𝑌1 + 𝑌2 + 𝑌3 to the equation (3.4.1), that is
′′
𝑌1 + 𝑌2 + 𝑌3 + 𝑝 𝑌1 + 𝑌2 + 𝑌3 + 𝑞 𝑌1 + 𝑌2 + 𝑌3 =
𝑌1′′ + 𝑌2′′ + 𝑌3′′ + 𝑝 𝑌1′ + 𝑌2′ + 𝑌3′ + 𝑞 𝑌1 + 𝑌2 + 𝑌3 =
𝑌1′′ + 𝑝𝑌1′ + 𝑞𝑌1 + 𝑌2′′ + 𝑝𝑌2′ + 𝑌2 + 𝑌3′′ + 𝑝𝑌3′ + 𝑞𝑌3 =
𝑔1 𝑡 + 𝑔2 𝑡 + 𝑔3 𝑡 = 𝑔 𝑡 .
We conclude that Y = Y1 + Y2 + Y3 is solution of differential equation (3.4.1).

The practical significance of this result is that for a differential equation whose
nonhomogeneous function 𝑔(𝑡) can be expressed as a sum, one can consider instead
several simpler equations and then add the results together. The following example is an
illustration of this procedure.
90 Chapter 3-Second Order ODEs

Example 7. Find the general solution of the second order nonhomogeneous differential
equation
𝑦 ′′ − 3𝑦 ′ + 2𝑦 = 2𝑒 3𝑡 + 2 sin 2𝑡 + 3𝑒 𝑡 . (3.4.8)
Splitting the function in the right side equation (3.4.8), we will obatain
𝑦 ′′ − 3𝑦 ′ + 2𝑦 = 2𝑒 3𝑡 ,
𝑦 ′′ − 3𝑦 ′ + 2𝑦 = 2 sin 2𝑡,
𝑦 ′′ − 3𝑦 ′ + 2𝑦 = 3𝑒 𝑡 .
General solutions of those differential equations have been found in the example 1,
example 3, and example 4 respectively. So the general solution of the second order
nonhomogeneous differential equation (3.4.8) can be given by
1 3
𝑦 = 𝑐1 𝑒 𝑡 + 𝑐2 𝑒 2𝑡 + 𝑒 3𝑡 + − sin 2𝑡 + cos 2𝑡 − 3𝑡𝑒 𝑡 − 3𝑡𝑒 𝑡 .
10 10
We give summary based on the types of function 𝑔 𝑡 the guess functions of particular
solutions can be given as follows.
No Function 𝑔(𝑡) Guess function for 𝑌𝑝
1 𝑃𝑛 𝑡 = 𝑎0 + 𝑎1 𝑡 + ⋯ + 𝑎𝑛 𝑡 𝑛 𝑡 𝑠 (𝐴0 + 𝐴1 𝑡 + ⋯ + 𝐴𝑛 𝑡 𝑛 )
2 𝑃𝑛 𝑡 𝑒 𝛼𝑡 𝑡 𝑠 (𝐴0 + 𝐴1 𝑡 + ⋯ + 𝐴𝑛 𝑡 𝑛 ) 𝑒 𝛼𝑡
3 𝑃𝑛 𝑡 𝑒 𝛼𝑡 sin 𝛽𝑡 or 𝑃𝑛 𝑡 𝑒 𝛼𝑡 cos 𝛽𝑡 𝑡 𝑠 𝐴0 + 𝐴1 𝑡 + ⋯ + 𝐴𝑛 𝑡 𝑛 𝑒 𝛼𝑡 cos 𝛽𝑡 + 𝑡 𝑠 𝐴0
+ 𝐴1 𝑡 + ⋯ + 𝐴𝑛 𝑡 𝑛 𝑒 𝛼𝑡 sin 𝛽𝑡
4 𝑔 = 𝑔1 + 𝑔2 + ⋯ + 𝑔𝑛 𝑌𝑝 = 𝑌1 + 𝑌2 + ⋯ + 𝑌𝑛
𝑠 = 0,1,2 (The number of time zero in the characteristic equation).

Exercises.
1. Find the general solution of the following second order nonhomogeneous
differential equation.
a. 𝑦 ′′ + 2𝑦 ′ − 3𝑦 = 2𝑒 2𝑡
b. 𝑦 ′′ + 2𝑦 ′ − 3𝑦 = 𝑒 −𝑡 + 1
c. 𝑦 ′′ + 2𝑦 ′ − 3𝑦 = 𝑒 𝑡 sin 𝑡
d. 𝑦 ′′ + 2𝑦 ′ − 3𝑦 = 𝑡 2 + 2 cos 𝑡
e. 𝑦 ′′ + 2𝑦 ′ − 3𝑦 = 𝑡𝑒 −3𝑡
f. 𝑦 ′′ − 6𝑦 ′ + 5𝑦 = 𝑡𝑒 𝑡
g. 𝑦 ′′ + 4𝑦 = sin 2𝑡 + 𝑒 𝑡
Chapter 3-Second Order ODEs 91

h. 𝑦 ′′ + 4𝑦 ′ + 4𝑦 = 𝑒 −2𝑡 + sin 𝑡
i. 𝑦 ′′ + 3𝑦 ′ + 4𝑦 = 𝑡 2 + 𝑒 𝑡
j. 𝑦 ′′ + 4𝑦 ′ + 3𝑦 = 𝑡 2 + 𝑡𝑒 −𝑡 + 𝑒 −𝑡 cos 𝑡
2. Solve the following initial values problems.
a. 𝑦 ′′ + 2𝑦 ′ + 𝑦 = 𝑒 −𝑡 + 1, 𝑦 0 = 1, 𝑦 ′ 0 = 2
b. 𝑦 ′′ + 2𝑦 ′ + 𝑦 = 𝑡 2 , 𝑦 0 = 1, 𝑦 ′ 1 = 0
c. 𝑦 ′′ + 2𝑦 ′ + 𝑦 = 𝑡𝑒 −𝑡 + 𝑒 𝑡 , 𝑦 0 = 0, 𝑦 ′ 0 = −1
d. 𝑦 ′′ + 𝑦 = 2 sin 𝑡 + 𝑒 𝑡 , 𝑦 0 = 1, 𝑦 ′ 0 = 2
e. 𝑦 ′′ + 4𝑦 ′ + 3𝑦 = 𝑡 2 + 𝑒 𝑡 , 𝑦 0 = −1, 𝑦 ′ 0 = 1.
f. 𝑦 ′′ + 4𝑦 ′ + 3𝑦 = 𝑒 −𝑡 + 𝑡, 𝑦 0 = 2, 𝑦 ′ 0 = 1
g. 𝑦 ′′ + 9𝑦 = 2 cos 3𝑡 + 𝑒 𝑡 , 𝑦 0 = 1, 𝑦 ′ 0 = −1
h. 𝑦 ′′ + 3𝑦 ′ + 2𝑦 = 2𝑡 2 + 1 + 𝑒 −𝑡 , 𝑦 0 = 2, 𝑦 ′ 0 = −1
i. 𝑦 ′′ + 7𝑦 ′ + 12𝑦 = 3𝑒 −3𝑡 + 𝑡 + 2, 𝑦 0 = −1, 𝑦 ′ 0 = 1
j. 𝑦 ′′ + 3𝑦 ′ + 3𝑦 = 𝑒 𝑡 + 𝑒 −𝑡 + 2, 𝑦 0 = 1, 𝑦 ′ 0 = 2

3.5.Variation of Parameter
The previous section we have studied the undetermined method to solve the second
order nonhomogeneous equations. In this section we will study more general method
which is called variation of parameter. The variation of parameter method also can be
used to find a particular solution of a second order nonhomogeneous differential equation
𝑦 ′′ + 𝑝 𝑡 𝑦 ′ + 𝑞 𝑡 𝑦 = 𝑔 𝑡 . (3.5.1)
Although the method of Variation of Parameters is a much more general method that
can be used in many more cases. However, there are two disadvantages to the method.
First, the fundamental solution is absolutely required to do the problem. This is in
contrast to the method of undetermined coefficients was not required. Second, as we will
see, in order to complete the method we will do with number of integrals and there is no
guarantee that we can do the integrals. So, while it will always be possible to write down
a formula to get the particular solution, we may not be able to actually find it if the
integrals are too difficult or if we are unable to find the fundamental solution.
92 Chapter 3-Second Order ODEs

Let the fundamental solutions of the second order homogeneous differential


equation corresponding with the second order nonhomogeneous differential equation
(3.5.1) are 𝑦1 and 𝑦2 . Then the general solution can be given by
𝑦𝑕 = 𝑐1 𝑦1 + 𝑐2 𝑦2 .
We are going to find two functions 𝑢1 and 𝑢2 such that
𝑌𝑝 = 𝑢1 𝑦1 + 𝑢2 𝑦2 , (3.5.2)
is a particular solution of the second order nonhomogeneous differential equation (3.5.1).
so, the equations (3.5.2) should satisfy the differential equation (3.5.1). Differentiating
equation (3.5.2) with respect to 𝑡 and we will obtain
𝑌𝑝′ = 𝑢1′ 𝑦1 + 𝑢1 𝑦1′ + 𝑢2′ 𝑦2 + 𝑢2 𝑦2′ ,
or we write
𝑌𝑝 ′ = 𝑢1′ 𝑦1 + 𝑢2′ 𝑦2 + 𝑢1 𝑦1′ + 𝑢2 𝑦2′ . (3.5.3)
To make easy the first derivative (3.5.3) we have to assume that functions 𝑢1 and 𝑢2
should satisfy
𝑢1′ 𝑦1 + 𝑢2′ 𝑦2 = 0. (3.5.4)
Using equations (3.5.3) and (3.5.4) if we differentiate again then will be obtained
𝑌𝑝 ′′ = 𝑢1′ 𝑦1′ + 𝑢2′ 𝑦2′ + 𝑢1 𝑦1′′ + 𝑢2 𝑦2 ′′. (3.5.5)
Substituting 𝑌𝑝 , 𝑌𝑝′ , and 𝑌𝑝 ′′ in equations (3.5.2), (3.5.3), and (3.5.5) respectively into
equation (3.5.1) and we will obtain
𝑢1′ 𝑦1′ + 𝑢2′ 𝑦2′ + 𝑢1 𝑦1′′ + 𝑢2 𝑦2′′ + 𝑝 𝑢1 𝑦1′ + 𝑢2 𝑦2′ + 𝑞 𝑢1 𝑦1 + 𝑢2 𝑦2 = 𝑔(𝑡),
or
𝑢1′ 𝑦1′ + 𝑢2′ 𝑦2′ + 𝑢1 𝑦1′′ + 𝑝𝑦1′ + 𝑞𝑦1 + 𝑢2 𝑦2′′ + 𝑝𝑦2′ + 𝑞𝑦2 = 𝑔 𝑡 . (3.5.6)
Because 𝑦1 and 𝑦2 are fundamental solutions then from equation (3.5.6) we can obtain
𝑢1′ 𝑦1′ + 𝑢2′ 𝑦2′ = 𝑔 𝑡 . (3.5.7)
So, we can obtain a system in 𝑢1 ′ and 𝑢2 ′ from equations (3.5.4) and (3.5.7), that is
𝑢1′ 𝑦1 + 𝑢2′ 𝑦2 = 0,
𝑢1′ 𝑦1′ + 𝑢2′ 𝑦2′ = 𝑔 𝑡 .
We can write in the form
𝑦1 𝑦2 𝑢1 ′ 0
𝑦1 ′ 𝑦2 ′ = . (3.5.8)
𝑢2 ′ 𝑔(𝑡)
Chapter 3-Second Order ODEs 93

From equation (3.5.8) by using Cramer’s method we can find the functions 𝑢1 and 𝑢2 ,
that are
0 𝑦2
𝑔 𝑦2 ′ 𝑔𝑦2
𝑢1′ = 𝑦 𝑦 =− ,
1 2 𝑊(𝑦1 , 𝑦2 )
𝑦1 ′ 𝑦2 ′
𝑦1 0
𝑦′ 𝑔 𝑔𝑦1
𝑢2′ = 𝑦 1 𝑦 = .
1 2 𝑊(𝑦1 , 𝑦2 )
𝑦1 ′ 𝑦2 ′
We finally, can get the functions 𝑢1 and 𝑢2 by integrating, that are
𝑔𝑦 2
𝑢1 = − 𝑑𝑡,
𝑊(𝑦 1 ,𝑦2 )
𝑔𝑦 1 (3.5.9)
𝑢2 = 𝑑𝑡.
𝑊(𝑦 1 ,𝑦 2 )

And the particular solution of second order nonhomogeneous differential equation


(3.5.10) can be given by
𝑔𝑦2 𝑔𝑦1
𝑌𝑝 = 𝑢1 𝑦1 + 𝑢2 𝑦2 = − 𝑑𝑡 𝑦1 + 𝑑𝑡 𝑦2 .
𝑊(𝑦1 , 𝑦2 ) 𝑊(𝑦1 , 𝑦2 )
The general solution can be given by
𝑔𝑦2 𝑔𝑦1
𝑦 = 𝑐1 𝑦1 + 𝑐2 𝑦2 − 𝑑𝑡 𝑦1 + 𝑑𝑡 𝑦2 .
𝑊(𝑦1 , 𝑦2 ) 𝑊(𝑦1 , 𝑦2 )

Example 1. Solve the following second order nonhomogeneous equation by using


variation of parameter
𝑦 ′′ − 3𝑦 ′ + 2𝑦 = 2𝑒 3𝑡 . (3.5.10)
First we know that the fundamental solutions is
𝑦𝑕 = 𝑐1 𝑒 𝑡 + 𝑐2 𝑒 2𝑡 .
To use the variation of parameter, then we have a system as given in the equation (3.5.8)
that is
𝑒𝑡 𝑒 2𝑡 𝑢1 ′ 0
= .
𝑒𝑡 2𝑒 2𝑡 𝑢2 ′ 2𝑒 3𝑡
The Wronskian of 𝑒 𝑡 and 𝑒 2𝑡 is
𝑡
𝑊 𝑒 𝑡 , 𝑒 2𝑡 = 𝑒 𝑡 𝑒 2𝑡 = 2𝑒 3𝑡 − 𝑒 3𝑡 = 𝑒 3𝑡 .
𝑒 2𝑒 2𝑡
94 Chapter 3-Second Order ODEs

The function 𝑢1 and 𝑢2 can be found by using equation (3.5.9), that is


2𝑒 3𝑡 𝑒 2𝑡
𝑢1 = − 𝑑𝑡 = − 2𝑒 2𝑡 𝑑𝑡 = −𝑒 2𝑡 ,
𝑒 3𝑡
2𝑒 3𝑡 𝑒 𝑡
𝑢2 = 𝑑𝑡 = 2𝑒 𝑡 𝑑𝑡 = 2𝑒 𝑡 .
𝑒 3𝑡
We obtain the particular solution of the differential equation (3.5.10), that is
𝑌𝑝 = −𝑒 2𝑡 𝑒 𝑡 + 2𝑒 𝑡 𝑒 2𝑡 = 𝑒 3𝑡 .
The general solution can be written by
𝑦 = 𝑐1 𝑒 𝑡 + 𝑐2 𝑒 2𝑡 + 𝑒 3𝑡 .
We can see to solve the second order nonhomogeneous differential equation (3.5.10) by
using variation of parameter is more complicated then the undetermined method is
studied in the previous section. However, the variation of parameter method can be
applied when the undetermined method cannot be applied. Please see the following
example.

Example 2. Find the general solution of the second order nonhomogeneous differential
equation
𝑦 ′′ + 4𝑦 = tan 2𝑡.
We can see that the function 𝑔 𝑡 = tan 2𝑡. We cannot apply the undetermined method
because there is no guess function such that the method work (the reader can prove it). In
this case we will use the variation of parameter to solve it. It is not difficult to find the
fundamental solution, that is
𝑦𝑕 = 𝑐1 cos 2𝑡 + 𝑐2 sin 2𝑡.
Let 𝑌𝑝 = 𝑢1 cos 2𝑡 + 𝑢2 sin 2𝑡. So the functions 𝑢1 and 𝑢2 should satisfy the equation
(3.5.8), that is
cos 2𝑡 sin 2𝑡 𝑢1 ′ 0
= .
−2 sin 2𝑡 2 cos 2𝑡 𝑢2 ′ tan 2𝑡
The Wronskian of the fundamental solutions is
cos 2𝑡 sin 2𝑡 2 2
𝑊 𝑦1 , 𝑦2 = = 2 cos 2𝑡 + 2 sin 2𝑡 = 2.
−2 sin 2𝑡 2 cos 2𝑡
The functions 𝑢1 and 𝑢2 can be found by using equations (3.5.9), that is
Chapter 3-Second Order ODEs 95

tan 2𝑡 sin 2𝑡 1 1
𝑢1 = − 𝑑𝑡 = sin 2𝑡 − ln sec 2𝑡 + tan 2𝑡 ,
2 4 4
tan 2𝑡 cos 2𝑡 1
𝑢2 = 𝑑𝑡 = − cos 2𝑡 .
2 4
We then obtain the particular solution, that is
1 1
𝑌𝑝 = sin 2𝑡 − ln(sec 2𝑡 + tan 2𝑡) cos 2𝑡
4 4
1 1
+ − cos 2𝑡 sin 2𝑡 = − cos 2𝑡 ln(sec 2𝑡 + tan 2𝑡) .
4 4
The general solution can be given by
1
𝑦 = 𝑐1 cos 2𝑡 + 𝑐2 sin 2𝑡 − cos 2𝑡 ln(sec 2𝑡 + tan 2𝑡) .
4

Example 3. Find the general solution of the second order nonhomogeneous differential
equation

′′
𝑒𝑡
𝑦 − 2𝑦 + 𝑦 = .
𝑡+1
The fundamental solutions of the homogeneous differential equation correspond to the
second order nonhomogeneous differential equation can be given by
𝑦𝑕 = 𝑐1 𝑒 𝑡 + 𝑐2 𝑡𝑒 𝑡 .
Let 𝑌𝑝 = 𝑢1 𝑦1 + 𝑢2 𝑦2 = 𝑢1 𝑒 𝑡 + 𝑢2 𝑡𝑒 𝑡 . Using the variation of parameter method then we
have system
0
𝑒𝑡 𝑡𝑒 𝑡 𝑢1 ′
= 𝑒𝑡 .
𝑒𝑡 𝑒 + 𝑡𝑒 𝑡
𝑡 𝑢2 ′
𝑡+1
The Wronskian of 𝑦1 and 𝑦2 can be given by
𝑡
𝑊 𝑦1 , 𝑦2 = 𝑒 𝑡 𝑡𝑒 𝑡 = 𝑒 2𝑡 + 𝑡𝑒 2𝑡 − 𝑡𝑒 2𝑡 = 𝑒 2𝑡 .
𝑒 𝑒 𝑡 + 𝑡𝑒 𝑡
The functions 𝑢1 and 𝑢2 can be found by
𝑡𝑒 2𝑡 𝑡
𝑢1 = − 𝑑𝑡 = − 𝑑𝑡 = −𝑡 + ln 𝑡 + 1 ,
𝑒 2𝑡 (𝑡 + 1) 𝑡+1
𝑒 2𝑡 1
𝑢2 = 𝑑𝑡 = 𝑑𝑡 = ln(𝑡 + 1) .
𝑒 2𝑡 (𝑡 + 1) 𝑡+1
We obtain the particular solution, that is
𝑌𝑝 = (−𝑡 + ln(𝑡 + 1)) 𝑒 𝑡 + ln(𝑡 + 1)𝑡𝑒 𝑡 .
96 Chapter 3-Second Order ODEs

The general solution then can be obtained


𝑦 = 𝑐1 𝑒 𝑡 + 𝑐2 𝑡𝑒 𝑡 + (−𝑡 + ln(𝑡 + 1)) 𝑒 𝑡 + ln(𝑡 + 1)𝑡𝑒 𝑡 .

Exercises.
1. Find the general solution of the following second order nonhomogeneous
differential equation by using variation of parameter. Compare your results by
using the undetermined coefficient.
a. 𝑦 ′′ + 2𝑦 ′ − 3𝑦 = 2𝑒 2𝑡
b. 𝑦 ′′ + 2𝑦 ′ − 3𝑦 = 𝑒 −𝑡 + 1
c. 𝑦 ′′ + 2𝑦 ′ − 3𝑦 = 𝑒 𝑡 sin 𝑡
d. 𝑦 ′′ + 2𝑦 ′ − 3𝑦 = 𝑡 2 + 2 cos 𝑡
e. 𝑦 ′′ + 2𝑦 ′ − 3𝑦 = 𝑡𝑒 −3𝑡
f. 𝑦 ′′ − 6𝑦 ′ + 5𝑦 = 𝑡𝑒 𝑡
g. 𝑦 ′′ + 4𝑦 = sin 2𝑡 + 𝑒 𝑡
h. 𝑦 ′′ + 4𝑦 ′ + 4𝑦 = 𝑒 −2𝑡 + sin 𝑡
i. 𝑦 ′′ + 3𝑦 ′ + 4𝑦 = 𝑡 2 + 𝑒 𝑡
j. 𝑦 ′′ + 4𝑦 ′ + 3𝑦 = 𝑡 2 + 𝑡𝑒 −𝑡 + 𝑒 −𝑡 cos 𝑡
2. Solve the following initial values problems by using variation of parameter.
a. 𝑦 ′′ + 2𝑦 ′ + 𝑦 = 𝑒 −𝑡 + 1, 𝑦 0 = 1, 𝑦 ′ 0 = 2
b. 𝑦 ′′ + 2𝑦 ′ + 𝑦 = 𝑡 2 , 𝑦 0 = 1, 𝑦 ′ 1 = 0
c. 𝑦 ′′ + 2𝑦 ′ + 𝑦 = 𝑡𝑒 −𝑡 + 𝑒 𝑡 , 𝑦 0 = 0, 𝑦 ′ 0 = −1
d. 𝑦 ′′ + 𝑦 = 2 sin 𝑡 + 𝑒 𝑡 , 𝑦 0 = 1, 𝑦 ′ 0 = 2
e. 𝑦 ′′ + 4𝑦 ′ + 3𝑦 = 𝑡 2 + 𝑒 𝑡 , 𝑦 0 = −1, 𝑦 ′ 0 = 1.
f. 𝑦 ′′ + 4𝑦 ′ + 3𝑦 = 𝑒 −𝑡 + 𝑡, 𝑦 0 = 2, 𝑦 ′ 0 = 1
g. 𝑦 ′′ + 9𝑦 = 2 cos 3𝑡 + 𝑒 𝑡 , 𝑦 0 = 1, 𝑦 ′ 0 = −1
h. 𝑦 ′′ + 3𝑦 ′ + 2𝑦 = 2𝑡 2 + 1 + 𝑒 −𝑡 , 𝑦 0 = 2, 𝑦 ′ 0 = −1
i. 𝑦 ′′ + 7𝑦 ′ + 12𝑦 = 3𝑒 −3𝑡 + 𝑡 + 2, 𝑦 0 = −1, 𝑦 ′ 0 = 1
j. 𝑦 ′′ + 3𝑦 ′ + 3𝑦 = 𝑒 𝑡 + 𝑒 −𝑡 + 2, 𝑦 0 = 1, 𝑦 ′ 0 = 2
3. Show that the given functions are fundamental solution of homogeneous
differential equations. Find the particular solution for the second order
nonhomogeneous differential equation.
Chapter 3-Second Order ODEs 97

1 1
a. 𝑦 ′′ − 1 + 𝑡 𝑦 ′ + 𝑡 𝑦 = 𝑡, 𝑦1 = 𝑡 + 1 , 𝑦2 = 𝑒 𝑡
2 1 1
b. 𝑡𝑦 ′′ − 𝑡 𝑦 = 3𝑡 − 𝑡 , 𝑡 > 0, 𝑦1 = 𝑡 , 𝑦2 = 𝑡 2 .

c. 𝑡 2 𝑦 ′′ − 3𝑡𝑦 ′ + 4𝑦 = 𝑡 2 ln 𝑡, 𝑡 > 0, 𝑦1 = 𝑡 2 ln 𝑡, 𝑦2 = 𝑡 2
d. 1 − 𝑡 𝑦 ′′ + 𝑡𝑦 ′ − 𝑦 = 𝑡 2 , 0 < 𝑡 < 1, 𝑦1 = 𝑒 𝑡 𝑦2 = 𝑡.
e. 1 − 𝑡 𝑦 ′′ + 𝑡𝑦 ′ − 𝑦 = 2𝑒 −𝑡 , 0 < 𝑡 < 1, 𝑦1 = 𝑡, 𝑦2 = 𝑒 𝑡 .

3.6.Application of Second Order Differential Equations


In this section we will study the application of second order differential equations.
The applications can be given in the following subsections.

3.6.1. Vibrating String


Consider Figure 3.15.

l l
l

M x =0

Figure 3.6.1. The Spring


From Figure 3.6.1 we have mass 𝑚 hanging on the end of a vertical spring of
length 𝑙, called the natural length. When the mass is attached to the spring the spring will
stretch a length of 𝐿. It will be called the equilibrium position the position of the center
of gravity for the object as it hangs on the spring with no movement. It is assumed that
all forces, velocities, and displacements in the downward direction will be positive. All
forces, velocities, and displacements in the upward direction will be negative. We will
measure all displacement of the mass from its equilibrium position. Therefore, the 𝑥 = 0
98 Chapter 3-Second Order ODEs

position will correspond to the center of gravity for the mass as it hangs on the spring
and is no movement. First, from Newton’s Second Law of Motion we know that
𝐹 = 𝑚 × 𝑎, (3.6.1)
where 𝐹 is force, 𝑚 is mass, and 𝑎 is acceleration. In this case, we use the second
derivative of the displacement 𝑥. So we can rewrite equation (3.6.1) into
𝑑2𝑥
𝐹 = 𝑚 𝑑𝑡 2 . (3.6.2)

There are some forces which acting to the system, that are
1. Gravity/ weight 𝐹𝑔 = 𝑚𝑔 of the mass always act downward.
2. Spring force 𝐹𝑠 = −𝑘 𝐿 + 𝑥 , 𝑘 > 0, this according to Hooke’s Law. The
displacement from the spring’s natural length is 𝐿 + 𝑥.
𝑑𝑥
3. Damping 𝐹𝑑 = −𝛾 𝑑𝑡 , always counterpart any movement.

4. External force 𝐹(𝑡). This external force can be negative or positive.


So, from equation (3.6.2) we will obtain
𝑑2𝑥 𝑑𝑥
𝑚 𝑑𝑡 2 = 𝑚𝑔 − 𝑘 𝐿 + 𝑥 − 𝛾 𝑑𝑡 + 𝐹 𝑡 . (3.6.3)

Because when the mass is at rest in its equilibrium position, only two forces acting on the
mass, that are gravity and force due to the spring, so we have
𝑚𝑔 = 𝑘𝐿.
Then equation (3.6.3) becomes
𝑑2 𝑥 𝑑𝑥
𝑚 2
= −𝑘𝑥 − 𝛾 +𝐹 𝑡 ,
𝑑𝑡 𝑑𝑡
or we can write as
𝑑2𝑥 𝑑𝑥
𝑚 𝑑𝑡 2 + 𝑘𝑥 + 𝛾 𝑑𝑡 = 𝐹 𝑡 , (3.6.4)

where 𝑚, 𝑘, and 𝛾 are positive. From equation (3.6.4) we have initial condition, that are
𝑥 0 = 𝑥0 (initial displacement from the equilibrium position), and 𝑥 ′ 0 = 𝑥0 ′ (initial
velocity). In the following it will be studied some specific cases.

Undamped Free Vibrations. Undamped Free Vibrations means that there is no forcing
𝐹 𝑡 = 0 and no damping 𝛾 in the equation (3.6.4). In this case the differential equation
(3.6.4) becomes
Chapter 3-Second Order ODEs 99

𝑑2𝑥
𝑚 𝑑𝑡 2 + 𝑘𝑥 = 0. (3.6.5)

We can rewrite as
𝑑2 𝑥 𝑘
+ 𝑥 = 0.
𝑑𝑡 2 𝑚
The characteristic equation can be given by
𝑘
𝜆2 + = 0.
𝑚
We obtain the roots of the characteristic equation, which are
𝑘
𝜆12 = ±𝜔0 𝑖, 𝜔0 = ,
𝑚

The general solution can be given by


𝑥 = 𝑐1 cos 𝜔0 𝑡 + 𝑐2 sin(𝜔0 𝑡) = 𝐴 cos(𝜔0 𝑡 − 𝛿),
where
𝐴= 𝑐12 + 𝑐22 ,
𝑐1 = 𝐴 cos 𝛿, 𝑐2 = 𝐴 sin 𝛿.

Example 1. A spring with a mass 5 𝑘𝑔 has natural length 0.5 𝑚. A force of 10 𝑁𝑒𝑤𝑡𝑜𝑛 is
stretched to a length of 0.6 𝑚. If the initial velocity is zero then find the position of mass
at any time 𝑡.
From Hook’s Law we will have
10
𝑘 0.6 − 0.5 = 10 ⟹ 𝑘 = = 100.
0.1
Then from equation (3.6.5), we can get
𝑑2 𝑥 𝑑2 𝑥
5 + 100 𝑥 = 0 ⟺ + 20 𝑥 = 0.
𝑑𝑡 2 𝑑𝑡 2
The general solution then can be given by
𝑥 = 𝑐1 cos 20𝑡 + 𝑐2 sin 20 𝑡 .
Differentiating the general solution and we get
𝑥 ′ = −𝑐1 20 sin 20𝑡 + 𝑐2 20 cos 20 𝑡 .
From initial conditions we have 𝑥 0 = 0.1, 𝑥 ′ 0 = 0, we can obtain
𝑐1 = 0.1, 𝑐2 = 0.
So the solution will be given by
100 Chapter 3-Second Order ODEs

𝑥 = 0.1 cos 20𝑡 .


The solution of undumped free vibration can be shown in Figure 3.6.2.

Figure 3.6.2. An undamped free vibration 𝑥 ′′ + 20 𝑥 = 0, 𝑥 0 = 0.1, 𝑥 ′ 0 = 0.

Damped Vibrations. In this case we still assume that there is no external forcing. But we
include the effect of the dumping, so from differential equation (3.6.4) we can obtain
𝑑2 𝑥 𝑑𝑥
𝑚 2
+𝛾 + 𝑘𝑥 = 0.
𝑑𝑡 𝑑𝑡
The characteristic equation then can be given by
𝑚𝜆2 + 𝛾𝜆 + 𝑘 = 0.
So, the roots of the characteristic equation can be given by
−𝛾 ± 𝛾 2 − 4𝑚𝑘
𝜆12 = .
2𝑚
Based on the roots of the characteristic equation we will have three cases. That are
1. 𝛾 2 − 4𝑚𝑘 > 0 (over damping). In this case we will have two real distinct roots.
Therefore, the general solution can be given by
𝑥 = 𝑐1 𝑒 𝜆 1 𝑡 + 𝑐2 𝑒 𝜆 2 𝑡 .
2. 𝛾 2 − 4𝑚𝑘 = 0 (critical damping). In this case we will have double roots, that is
𝛾
𝜆1 = 𝜆2 = − 2𝑚 . So, the general solution can be given by
𝛾 𝛾
𝑥 = 𝑐1 𝑒 − 2𝑚 + 𝑐2 𝑡𝑒 − 2𝑚 .
3. 𝛾 2 − 4𝑚𝑘 < 0 (under dumping). In this case we have complex roots, so we can
write
−𝛾 ± 𝛾 2 − 4𝑚𝑘
𝜆12 = = 𝛼 ± 𝛽𝑖.
2𝑚
Chapter 3-Second Order ODEs 101

So, the general solution can be written as


𝑥 = 𝑒 𝛼𝑡 (𝑐1 cos 𝛽𝑡 + 𝑐2 sin 𝛽𝑡).

Example 2. In the example 1 if the spring is attached a damping to it that will exert a
force 12 𝑁𝑒𝑤𝑡𝑜𝑛 when the velocity is 3 𝑚/𝑠𝑒𝑐. Find the position of mass at any time 𝑡.
From example 1, we already got the coefficient 𝑘 = 20. In this example we have
𝐹𝑑 = −𝛾𝑥 ′ ,
12 = −3𝛾 ⟹ 𝛾 = −4.
However, from equation (3.6.4) because term of damping already moves to left side then
we can drop the minus sign and we obtain 𝛾 = 4. So, according to equation (3.6.4) we
obtain
𝑑2 𝑥 𝑑𝑥
2
+4 + 20 𝑥 = 0.
𝑑𝑡 𝑑𝑡
The characteristic equation is
𝜆2 + 4𝜆 + 20 = 0.
The roots of characteristic equation are
−4 ± 42 − 4.20
𝜆12 = = −2 ± 4𝑖.
2
The general solution can be given by
𝑥 = 𝑒 −2𝑡 (𝑐1 cos 4𝑡 + 𝑐2 sin 4𝑡 . )
1 1
Using initial condition 𝑥 0 = 0.1, 𝑥 ′ 0 = 0 then we can obtain 𝑐1 = , 𝑐 = 10 . So,
20 2

we have solution of the initial value problem, that is


1 1
𝑥 = 𝑒 −2𝑡 cos 4𝑡 + sin 4𝑡 .
20 10
Plot the solution can be shown in Figure 3.6.3.
102 Chapter 3-Second Order ODEs

Figure 3.6.3. Damped free vibration 𝑥 ′′ + 4𝑥 ′ + 20 𝑥 = 0, 𝑥 0 = 0.1, 𝑥 ′ 0 = 0.

Example 3. The motion of a certain spring mass system can be given by second order
differential equation
𝑥 ′′ + 0.2 𝑥 ′ + 0.01 𝑥 = 0, 𝑥 0 = 1, 𝑥 ′ 0 = 0.
Find the position of the mass at any time 𝑡.
This problem is a critical damping problem. The general solution and the solution of the
initial value problem can be given by
1 0.1𝑡
𝑥 = 𝑐1 𝑒 0.1𝑡 + 𝑐2 𝑡 𝑒 0.1𝑡 , 𝑥 = 𝑒 0.1𝑡 + 𝑡𝑒 .
10
respectively.

Plots the free vibration with critical damping can be given in Figure 3.6.4.

Figure 3.6.4. Plots free vibration with critical damping.


Chapter 3-Second Order ODEs 103

Forced Vibrations. In this case we study a spring with periodic external force. Let the
external force is given by
𝐹 𝑡 = 𝐹0 sin 𝜔𝑡.
Then from equation (3.6.4) we have
𝑑2𝑥 𝑑𝑥
𝑚 𝑑𝑡 2 + 𝛾 𝑑𝑡 + 𝑘𝑥 = 𝐹0 sin 𝜔𝑡. (3.6.6)

First we study when the spring have no damping (𝛾 = 0), then equation (3.6.6) becomes
𝑑2𝑥
𝑚 𝑑𝑡 2 + 𝑘𝑥 = 𝐹0 sin 𝜔𝑡. (3.6.7)

Differential equation (3.6.7) is second order nonhomogeneous differential equation. We


have studied how to solve it. In this case we have solution of the homogeneous
differential equation related to the nonhomogeneous, that is
𝑥𝑕 = 𝑐1 cos 𝜔0 𝑡 + 𝑐2 sin 𝜔0 𝑡 , (3.6.8)

𝑘
𝜔0 = .
𝑚

The function in right side equation (3.6.7) is sinus, so we use guess function for particular
solution of (3.6.7) in the form
𝑥𝑝 = 𝐴0 cos 𝜔𝑡 + 𝐴1 sin 𝜔𝑡 . (3.6.9)
We will have problem in the guess function has 𝜔 = 𝜔0 . If this is happened then for
guess function should be added 𝑡 on it. If 𝜔 ≠ 𝜔0 then there is no problem with the
guess function for particular solution. We will study both cases in the following part.
1. The case 𝜔 ≠ 𝜔0 . In this case then differentiating the guess function (3.6.9) twice
and we substitute into equation (3.6.7) and we will obtain
−𝑚𝐴0 𝜔2 + 𝑘𝐴0 cos 𝜔𝑡 + −𝑚𝐴1 𝜔2 + 𝑘𝐴1 sin 𝜔𝑡 = 𝐹0 sin(𝜔𝑡).
We will obtain
−𝑚𝐴0 𝜔2 + 𝑘𝐴0 = 0,
−𝑚𝐴1 𝜔2 + 𝑘𝐴1 = 𝐹0.
So we get
𝐴0 = 0,
𝐹0
𝐴1 = .
𝑘 − 𝑚𝜔 2
And the particular solution can be given by
104 Chapter 3-Second Order ODEs

𝐹0
𝑥𝑝 = sin 𝜔𝑡
𝑘 − 𝑚𝜔 2
𝐹0
= sin 𝜔𝑡
𝑘
𝑚 𝑚 − 𝜔2
𝐹0
= 2 sin 𝜔𝑡 .
𝑚 𝜔0 − 𝜔 2
The general solution for the nonhomogeneous differential equation (3.6.7) can be
given by
𝐹0
𝑥 = 𝑐1 cos 𝜔0 𝑡 + 𝑐2 sin 𝜔0 𝑡 + sin 𝜔𝑡 .
𝑚 𝜔02− 𝜔2
We can rewrite
𝐹0
𝑥 = 𝐴 sin 𝜔0 𝑡 − 𝛿 + 𝑚 sin 𝜔𝑡 . (3.6.10)
𝜔 02 −𝜔 2

2. The case𝜔 = 𝜔0 . In this case we have to use the guess function as


𝑥𝑝 = 𝐴0 𝑡 cos 𝜔0 𝑡 + 𝐴1 t sin 𝜔0 𝑡 . (3.6.11)
Differentiating twice and substituting into equation (3.6.7) and we will obtain
−𝑚𝐴0 𝜔02 + 𝑘𝐴0 𝑡 cos 𝜔𝑡
+ −𝑚𝐴1 𝜔02 + 𝑘𝐴1 sin 𝜔𝑡
+ 2𝑚𝜔0 𝐴1 cos 𝜔0 𝑡 − 2𝑚𝜔0 𝐴0 sin(𝜔0 𝑡) = 𝐹0 sin(𝜔0 𝑡).
We know that
−𝑚𝐴0 𝜔02 + 𝑘𝐴0 = 0, −𝑚𝐴1 𝜔02 + 𝑘𝐴1 = 0,
So, we obtain
2𝑚𝜔0 𝐴1 = 0,
−2𝑚𝜔0 𝐴0 = 𝐹0.
So we get
𝐴0 = 0,
𝐹0
𝐴1 = − .
2𝑚𝜔0
And the particular solution can be given by
𝐹0
𝑥𝑝 = − 𝑡 cos 𝜔0 𝑡 .
2𝑚𝜔0
The general solution for the nonhomogeneous differential equation (3.6.7) if
𝜔0 = 𝜔 can be given by
Chapter 3-Second Order ODEs 105

𝐹0
𝑥 = 𝑐1 cos 𝜔0 𝑡 + 𝑐2 sin 𝜔0 𝑡 − 𝑡 cos 𝜔0 𝑡 .
2𝑚𝜔0
We can rewrite
𝐹0
𝑥 = 𝐴 sin 𝜔0 𝑡 − 𝛿 − 𝑡 cos 𝜔0 𝑡 . (3.6.12)
2𝑚 𝜔 0

The second case, we can see from the general solution that the oscillation will
grows in amplitude if 𝑡 increase. This case will be called resonance.

Example 4. The motion of a certain spring mass system can be given by second order
differential equation
4 3
𝑥 ′′ + 𝑥 = sin 𝑡 , 𝑥 0 = 0, 𝑥 ′ 0 = 0.
5 5
3 4
This spring in the case of forced vibration with no damping and 𝜔0 = 1, 𝜔 = 5, 𝐹0 = 5,

So from equation (3.6.10) the general solution is given by


0.8 3
𝑥 = 𝑐1 cos 𝑡 + 𝑐2 sin 𝑡 + sin 𝑡 ,
1 − 0.63 5
5 3
𝑥 = 𝑐1 cos 𝑡 + 𝑐2 sin 𝑡 + sin 𝑡 .
4 5
3
Using the initial condition we will obtain 𝑐1 = 0, 𝑐2 = − 8. The solution then becomes
3 5 3
𝑥 = − sin 𝑡 + sin 𝑡 .
4 4 5
Plots the forced vibration without damping can be given in Figure 3.6.5.

Figure 3.6.5. Plots forced vibration without damping.


106 Chapter 3-Second Order ODEs

Example 5. The motion of a certain spring mass system can be given by second order
differential equation
4
𝑥 ′′ + 𝑥 = sin 𝑡 , 𝑥 0 = 0, 𝑥 ′ 0 = 0.
5
4
This spring in the case of forced vibration with no damping and 𝜔0 = 𝜔 = 1, 𝐹0 = 5 , So

from equation (3.6.12) the general solution will be given by


0.8
𝑥 = 𝑐1 cos 𝑡 + 𝑐2 sin 𝑡 − 𝑡 cos 𝑡 ,
2
2
𝑥 = 𝑐1 cos 𝑡 + 𝑐2 sin 𝑡 − 𝑡 cos 𝑡 .
5
2
Using the initial condition we will obtain 𝑐1 = 0, 𝑐2 = . The solution then becomes
5

2 2
𝑥 = sin 𝑡 − 𝑡 cos 𝑡 .
5 5
Plots the forced vibration without damping in the resonance case can be given in Figure
3.6.6.

Figure 3.6.6. Plots forced vibration without damping, resonance case.

Secondly, we study when the spring with damping (𝛾 ≠ 0), then equation (3.6.6)
becomes
𝑑2𝑥 𝑑𝑥
𝑚 𝑑𝑡 2 + 𝛾 𝑑𝑡 + 𝑘𝑥 = 𝐹0 sin 𝜔𝑡. (3.6.13)

This case is also second order nonhomogeneous differential equation.


The solution can be given by
𝑥 = 𝑥𝑕 + 𝑥𝑃 .
Chapter 3-Second Order ODEs 107

From the case damped vibration, we know that the fundamental solution (𝑥𝑕 ) will tend to
zero if 𝑡 increases. The fundamental solution (𝑥𝑕 ) is called transient solution. Behavior of
the position of mass will start look like the particular solution if 𝑡 increase. The particular
solution is often called steady state solution or forced response.

Example 6. The motion of a certain spring mass system can be given by second order
differential equation
𝑥 ′′ + 2𝑥 ′ + 𝑥 = 2 sin 2𝑡 , 𝑥 0 = 0, 𝑥 ′ 0 = 0.
This spring in the case of forced vibration with no damping and𝛾 = 2, 𝐹0 = 2 , So the
general solution will be given by
8 6
𝑥 = 𝑐1 𝑒 −𝑡 + 𝑐2 𝑡𝑒 −𝑡 − cos 2𝑡 − sin 2𝑡.
25 26
8 4
Using the initial condition we will obtain 𝑐1 = 25 , 𝑐2 = 5. The solution then becomes
8 −𝑡 4 −𝑡 8 6
𝑥= 𝑒 + 𝑡𝑒 − cos 2𝑡 − sin 2𝑡.
25 5 25 26
Plots the forced vibration with damping can be given in Figure 3.6.7.

Figure 3.6.7. Plots forced vibration with damping.


108 Chapter 3-Second Order ODEs

3.6.2. Electric Circuits


In this sub section we will give a brief introduction the application of second order
differential equation in electric circuit. In a circuit there exists an electromotive force 𝐸
(supply by a battery or generator), a resistor 𝑅, an inductor 𝐿, and a capacitor 𝐶. If the
charge on the capacitor at the time 𝑡 is 𝑄 = 𝑄(𝑡), then the current is the rate of change of
𝑑𝑄
𝑄 with respect to 𝑡, that is 𝐼 = . From physic we know that voltage drops across the
𝑑𝑡
𝑑𝐼 𝑄
resistor, inductor, and the capacitor are 𝑅𝐼, 𝐿 𝑑𝑡 , 𝐶 respectively. From Kirchhoff’s law we

will have equation


𝑑𝐼 𝑄
𝐿 + 𝑅𝐼 + = 𝐸.
𝑑𝑡 𝐶
𝑑𝑄
Because of 𝐼 = , then we obtain
𝑑𝑡
𝑑2 𝑄 𝑑𝑄 1
𝐿 2 +𝑅 + 𝑄 = 𝐸,
𝑑𝑡 𝑑𝑡 𝐶

with 𝑄 0 = 𝑄0 , 𝑄 0 = 𝐼 0 = 𝐼0 .

Example 1. Find the charge and current as function of time 𝑡 in the circuit with 𝑅 =
27 Ω, 𝐿 = 1 𝐻, 𝐶 = 2 × 10−2 𝐹, 𝐸 = 20 cos 5𝑡, 𝑄 0 = 0, 𝑄 ′ 0 = 0.
In this case we will have second order differential equation, that is
𝑑2 𝑄 𝑑𝑄
2
+ 27 + 50𝑄 = 20 cos 5𝑡, 𝑄 0 = 0, 𝑄 ′ 0 = 0.
𝑑𝑡 𝑑𝑡
The general solution can be given by
10 54
𝑄 = 𝑐1 𝑒 −2𝑡 + 𝑐2 𝑒 −25𝑡 + cos 5𝑡 + sin 5𝑡 .
377 377

From initial condition we will obtain


40 −2𝑡 10 −25𝑡 10 54
𝑄=− 𝑒 + 𝑒 + cos 5𝑡 + sin 5𝑡 .
667 299 377 377
𝑑𝑄
And we can find 𝐼 = , that is
𝑑𝑡

80 −2𝑡 250 −25𝑡 50 270


𝐼= 𝑒 − 𝑒 − sin 5𝑡 + cos 5𝑡 .
667 299 377 377
Plot the charge and current as functions of time can be shown in Figure 3.6.8.
Chapter 3-Second Order ODEs 109

Figure 3.6.8. Plots charge and current as functions of 𝑡.

Exercises.
1. A spring with a mass 3𝑘𝑔 has coefficient of damping 8, a force 6 𝑁, is required to
stretch a spring up to 0.3 𝑚 as a natural length. The spring is stretched 0.5 𝑚
away from the natural length and the released with zero velocity. Find the position
of mass at any time 𝑡.
2. For the spring in exercise 1 if the velocity is2 𝑚/𝑠𝑒𝑐 then find the position of
mass at any time 𝑡.
3. Find the mass in exercise 1 that would produce critical damping.
4. The motion of a certain spring mass system can be given by second order
differential equation
𝑥 ′′ + 0.3 𝑥 ′ + 0.1 𝑥 = 0, 𝑥 0 = 2, 𝑥 ′ 0 = 0.
Find the position of the mass at any time 𝑡.
5. A spring with a mass 5 𝑘𝑔 has natural length 0.4 𝑚. A force of 10 𝑁𝑒𝑤𝑡𝑜𝑛 is
stretched to a length of 0.4 𝑚. If the initial velocity is zero then find the position
of mass at any time 𝑡.
6. In the exercise 5 if the spring is attached a damping to it that will exert a force
12 𝑁𝑒𝑤𝑡𝑜𝑛 when the velocity is 2 𝑚/𝑠𝑒𝑐. Find the position of mass at any time
𝑡.
7. The motion of a certain spring mass system can be given by second order
differential equation
110 Chapter 3-Second Order ODEs

1 2
𝑥 ′′ + 𝑥 = cos 𝑡 , 𝑥 0 = 0, 𝑥 ′ 0 = 0.
5 5
Find the position of mass at any time 𝑡.
8. The motion of a certain spring mass system can be given by second order
differential equation
2
𝑥 ′′ + 𝑥 = cos 𝑡 , 𝑥 0 = 0, 𝑥 ′ 0 = 0.
5
Find the position of mass at any time 𝑡.
9. Find the charge and current as function of time 𝑡 in the circuit with 𝑅 = 11 Ω,
1
𝐿 = 1 𝐻, 𝐶 = 30 𝐹, 𝐸 = 5 cos 2𝑡, 𝑄 0 = 0, 𝑄 ′ 0 = 0.

10. Do similar in exercise 9 if the battery is 𝐸 = 2 sin 3𝑡.


CHAPTER IV
HIGHER ORDER DIFFERENTIAL EQUATIONS

In the previous chapter we have studied the first order differential equation and
the second order differential equations. In this chapter we will study higher order
differential. The general form for the 𝑛th order differential equation can be given by
𝑦 (𝑛) + 𝑃𝑛 −1 𝑦 𝑛−1
+ ⋯ + 𝑃1 𝑦 ′ + 𝑃0 𝑦 = 𝑔 𝑡 , (4.0.1)
where 𝑃0 , 𝑃1 , … , 𝑃𝑛−1 and 𝑔(𝑡) are continuous functions on an interval and where

𝑛
𝑑𝑛 𝑦
𝑦 = 𝑛.
𝑑𝑡
This chapter will be organized as follows. In section 4.1 it will be studied basic
concepts for 𝑛𝑡ℎ order linear equations, homogeneous differential equation with constant
coefficients will be discussed in section 4.2. Undetermined coefficient will be studied in
section 4.3. In section 4.4 will be discussed variation of parameter method for solving
higher order nonhomogeneous differential equations.

4.1.Concepts of 𝒏𝒕𝒉 Order Linear Equations


In this section we give three theorems which related to the 𝑛𝑡ℎ order linear
differential equations. Let give initial value problem for 𝑛𝑡ℎ order linear differential
equations (4.0.1), that is
𝑦 𝑡0 = 𝑦0 , 𝑦 ′ 𝑡0 = 𝑦0′ , ⋯ , 𝑦 𝑛−1
𝑡0 = 𝑦0 𝑛−1 , (4.1.1)

where 𝑡0 is any point in the interval 𝐼, and where 𝑦0 , 𝑦0′ , ⋯ , 𝑦0 𝑛 −1 are constants. The
following theorems will tell that we can expect there is a unique solution to the initial
value problem given by equation (4.0.1) and (4.1.1).

Theorem 1. Let the functions 𝑃0 , 𝑃1 , … , 𝑃𝑛 −1 , and 𝑔(𝑡) are all continuous functions in
some interval 𝐼, then there is a unique solution to the initial value problem given by
(4.0.1) and (4.1.1) and the solution will exists for all 𝑡 ∈ 𝐼.

This theorem is extension of the similar theorem in the first order differential equations.
112 Chapter 4-Higher Order ODEs

Now consider the homogeneous 𝑛𝑡ℎ order linear differential equation related to the
equation (4.1.1) can be written by
𝑦 (𝑛) + 𝑃𝑛 −1 𝑦 𝑛−1
+ ⋯ + 𝑃1 𝑦 ′ + 𝑃0 𝑦 = 0 (4.1.2)
Let the functions 𝑦1 , 𝑦2 , ⋯ , 𝑦𝑛 are solutions of the 𝑛𝑡ℎ order linear differential equation
(4.1.2), then by the extension of superposition principle we will have
𝑦 = 𝑐1 𝑦1 + 𝑐2 𝑦2 + ⋯ + 𝑐𝑛 𝑦𝑛 , (4.1.3)
where 𝑐1 , 𝑐2 , ⋯ , 𝑐𝑛 are arbitrary constants that is also solution of the 𝑛𝑡ℎ order linear
differential equation (4.1.2). The equation (4.1.3) is a general form of the solution (4.1.2)
because we can find the constants 𝑐1 , 𝑐2 , ⋯ , 𝑐𝑛 for any choice of 𝑡0 ∈ 𝐼 and any choice of

𝑦0 , 𝑦0′ , ⋯ , 𝑦0 𝑛−1 . So we will have a system


𝑐1 𝑦1 𝑡0 + 𝑐2 𝑦2 𝑡0 + ⋯ + 𝑐𝑛 𝑦𝑛 𝑡0 = 𝑦0 ,
𝑐1 𝑦1′ 𝑡0 + 𝑐2 𝑦2′ 𝑡0 + ⋯ + 𝑐𝑛 𝑦𝑛′ 𝑡0 = 𝑦0′ ,
(4.1.4)

𝑛−1 𝑛−1
𝑡0 + ⋯ + 𝑐𝑛 𝑦𝑛𝑛−1 = 𝑦𝑛−1𝑛−1
𝑐1 𝑦1 𝑡0 + 𝑐2 𝑦2 .
System (4.1.4) can be written by
𝑦1 𝑦2 ⋯ 𝑦𝑛 𝑐1 𝑦0
𝑦1 ′ 𝑦2 ′ ⋯ 𝑦𝑛 ′ 𝑐2 𝑦0 ′
⋮ ⋮ ⋱ ⋮ ⋮ = ⋮ . (4.1.5)
𝑛 −1 𝑛−1 𝑛−1 𝑛−1
𝑦1 𝑦2 ⋯ 𝑦𝑛 𝑐𝑛 𝑦𝑛−1
The system (4.1.5) will consistent (has a solution) if the 𝑊(𝑦1 , 𝑦2 , ⋯ , 𝑦𝑛 ) ≠ 0, that is
𝑦1 𝑦2 ⋯ 𝑦𝑛
𝑦1 ′ 𝑦2 ′ ⋯ 𝑦𝑛 ′
𝑊 𝑦1 , 𝑦2 , ⋯ , 𝑦𝑛 = ⋮ ⋮ ⋱ ⋮ ≠ 0.
𝑦1 𝑛−1 𝑦2 𝑛−1 ⋯ 𝑦𝑛𝑛−1
So, if 𝑊(𝑦1 , 𝑦2 , ⋯ , 𝑦𝑛 ) ≠ 0 then we can find 𝑐1 , 𝑐2 , ⋯ , 𝑐𝑛 such that satisfy (4.1.4) and
finally we have solution (4.1.3). So we have the following theorem.

Theorem 2. Let the functions 𝑃0 , 𝑃1 , … , 𝑃𝑛 −1 , and 𝑔(𝑡) are all continuous functions in
some interval 𝐼 . And suppose 𝑦1 , 𝑦2 , ⋯ , 𝑦𝑛 are solutions of the 𝑛𝑡ℎ order linear
differential equation (4.1.2). If 𝑊(𝑦1 , 𝑦2 , ⋯ , 𝑦𝑛 ) ≠ 0 for every 𝑡 ∈ 𝐼 then the general
form of the fundamental solution can be given by
𝑦 = 𝑐1 𝑦1 + 𝑐2 𝑦2 + ⋯ + 𝑐𝑛 𝑦𝑛 .
Chapter 4-Higher Order ODEs 113

Theorem 3. Let 𝑌1 and 𝑌2 are solutions of (4.0.1) and suppose 𝑦1 , 𝑦2 , ⋯ , 𝑦𝑛 are


fundamental solutions of the 𝑛𝑡ℎ order linear differential equation (4.1.2) then
𝑌1 − 𝑌2 ,
is also solution of (4.0.1) and it can be given by
𝑌1 − 𝑌2 = 𝑐1 𝑦1 + 𝑐2 𝑦2 + ⋯ + 𝑐𝑛 𝑦𝑛 .

Now as we have studied in the second order differential equations if we let 𝑌 is general
solution of (4.0.1) and let 𝑌𝑝 is a particular solution of (4.0.1) then using theorem 3 we
will have
𝑌 = 𝑦ℎ + 𝑌𝑝 = 𝑐1 𝑦1 + 𝑐2 𝑦2 + ⋯ + 𝑐𝑛 𝑦𝑛 + 𝑌𝑝 .
We will study in the next section how to find the general solution of homogeneous and
nonhomogeneous 𝑛𝑡ℎ order linear differential equations.

4.2.Homogeneous 𝒏𝒕𝒉 Order Linear Differential Equation with


Constant Coefficients
Consider the 𝑛𝑡ℎ order linear homogeneous differential equation with constant
coefficients
𝑛 𝑛−1
𝑎𝑛 𝑦 + 𝑎𝑛−1 𝑦 + ⋯ + 𝑎0 𝑦 = 0, (4.2.1)
where 𝑎0 , 𝑎1 , ⋯ , 𝑎𝑛 are constants. Suppose that the solution of the differential equation
(4.2.1) in the form 𝑦 = 𝑒 𝜆𝑡 . Substituting this solution into equation (4.2.1) and we will
obtain
𝑒 𝜆𝑡 𝑎𝑛 𝜆𝑛 + 𝑎𝑛−1 𝜆 𝑛−1 + ⋯ + 𝑎1 𝜆 + 𝑎0 = 0,
To have zero then we will obtain
𝑎𝑛 𝜆𝑛 + 𝑎𝑛−1 𝜆 𝑛−1 + ⋯ + 𝑎1 𝜆 + 𝑎0 = 0.
This is called characteristic equation. The characteristic equation is 𝑛𝑡ℎ degree
polynomial. We know that 𝑛𝑡ℎ degree polynomial will have 𝑛 roots. The roots will be
divided in three cases, that is real distinct roots, repeated roots and complex roots (these
also can be repeated).
114 Chapter 4-Higher Order ODEs

If the roots of the characteristic equation real distinct that is 𝜆1 , 𝜆2 , ⋯ , 𝜆𝑛 then the
solutions will be 𝑦1 = 𝑒 𝜆 1 𝑡 , 𝑦2 = 𝑒 𝜆 2 𝑡 , ⋯ , 𝑦𝑛 = 𝑒 𝜆 𝑛 𝑡 . If the roots of the characteristic
equation are repeated roots then we can generalize the solution from the second order. Let
𝜆 is a root of multiplicity 𝑘 then the solution of differential equation is given by
𝑦1 = 𝑒 𝜆𝑡 , 𝑦2 = 𝑡𝑒 𝜆𝑡 , ⋯ , 𝑦𝑛 = 𝑡 𝑘−1 𝑒 𝜆𝑡 .
Finally, if the roots of the characteristic equation deal with complex root then we also
have the solution form similar the solution in second order differential equation. Let we
recall if the root are 𝜆12 = 𝛼 ± 𝛽𝑖, then two the solutions can be given by
𝑦1 = 𝑒 𝛼𝑡 cos(𝛽𝑡) , 𝑦2 = 𝑒 𝛼𝑡 sin 𝛽𝑡 .
If the root 𝜆12 = 𝛼 ± 𝛽𝑖 has multiplicity 𝑘 then the solution can be given by
𝛼 +𝛽𝑖 𝑡 𝛼 +𝛽𝑖 𝑡
𝑒 , 𝑡𝑒 , … , 𝑡 𝑘−1 𝑒 𝛼+𝛽𝑖 𝑡
,
𝛼 −𝛽𝑖 𝑡 𝛼 −𝛽𝑖 𝑡
𝑒 , 𝑡𝑒 , … , 𝑡 𝑘−1 𝑒 𝛼−𝛽𝑖 𝑡
.
We can write by
𝑒 𝛼𝑡 cos(𝛽𝑡) , 𝑡𝑒 𝛼𝑡 cos(𝛽𝑡) , … , 𝑡 𝑘−1 𝑒 𝛼𝑡 cos 𝛽𝑡 ,
𝑒 𝛼𝑡 sin 𝛽𝑡 , 𝑡𝑒 𝛼𝑡 sin 𝛽𝑡 , … , 𝑡 𝑘−1 𝑒 𝛼𝑡 sin 𝛽𝑡 .

Example 1. Find the general solution of the differential equation


𝑦 ′′′ − 6𝑦 ′′ + 11𝑦 − 6𝑦 = 0.
The characteristic equation can be given by
𝜆3 − 6𝜆2 + 11𝜆 − 6 = 0 = 𝜆 − 1 𝜆 − 2 𝜆 − 3 = 0.
The roots are 𝜆1 = 1, 𝜆2 = 2, 𝜆3 = 3. So the general solution can be given by
𝑦 = 𝑐1 𝑒 𝑡 + 𝑐2 𝑒 2𝑡 + 𝑐3 𝑒 3𝑡 .

Example 2. Solve the following initial value problem


4 3
𝑦 − 5𝑦 + 5𝑦 ′′ + 5𝑦 ′ − 6𝑦 = 0,
𝑦 0 = 1, 𝑦 ′ 0 = 1, 𝑦 ′′ 0 = −1, 𝑦 3
(0) = −1.
The characteristic equation can be given by
𝜆4 − 5𝜆3 + 5𝜆2 + 5𝜆 − 6 = 𝜆 + 1 𝜆 − 1 𝜆 − 2 𝜆 − 3 = 0.
Then the roots of the characteristic equations are
𝜆1 = −1, 𝜆2 = 1, 𝜆3 = 2, 𝜆4 = 3.
The general solution is given by
Chapter 4-Higher Order ODEs 115

𝑦 = 𝑐1 𝑒 −𝑡 + 𝑐2 𝑒 𝑡 + 𝑐3 𝑒 2𝑡 + 𝑐4 𝑒 3𝑡 .
Differentiating three times according to the initial value and we obtain
𝑦 ′ = −𝑐1 𝑒 −𝑡 + 𝑐2 𝑒 𝑡 + 2𝑐3 𝑒 2𝑡 + 3𝑐4 𝑒 3𝑡 ,
𝑦 ′′ = 𝑐1 𝑒 −𝑡 + 𝑐2 𝑒 𝑡 + 4𝑐3 𝑒 2𝑡 + 9𝑐4 𝑒 3𝑡 ,
𝑦 3 = −𝑐1 𝑒 −𝑡 + 𝑐2 𝑒 𝑡 + 8𝑐3 𝑒 2𝑡 + 27𝑐4 𝑒 3𝑡 .
From the initial conditions we will obtain a system, that is
𝑐1 + 𝑐2 + 𝑐3 + 𝑐4 = 1,
−𝑐1 + 𝑐2 + 2𝑐3 + 3𝑐4 = 1,
𝑐1 + 𝑐2 + 4𝑐3 + 9𝑐4 = −1,
−𝑐1 + 𝑐2 + 8𝑐3 + 27𝑐4 = −1.
We can write
1 1 1 1 𝑐1 1
−1 1 2 3 𝑐2 1
𝑐3 = ,
1 1 4 9 −1
−1 1 8 27 𝑐4 −1
Solving the system and we will obtain
5 5 4 1
𝑐1 = −
, 𝑐2 = , 𝑐3 = − , 𝑐4 = .
12 2 3 4
So, the solution of initial value problem can be given by
5 5 4 1
𝑦 = − 𝑒 −𝑡 + 𝑒 𝑡 − 𝑒 2𝑡 + 𝑒 3𝑡 .
12 2 3 4

Example 3. Solve the following 4𝑡ℎ order differential equation


𝑑4 𝑦 𝑑3 𝑦 𝑑2 𝑦 𝑑𝑦
4
+5 3 +6 2 −4 − 8𝑦 = 0.
𝑑𝑡 𝑑𝑡 𝑑𝑡 𝑑𝑡
The characteristic equation is given by
𝜆4 + 5𝜆3 + 6𝜆2 − 4𝜆 − 8 = 𝜆 − 1 𝜆 + 2 3
= 0.
The roots of the characteristic equation are
𝜆1 = 1, 𝜆2 = 𝜆3 = 𝜆4 = −2.
We have repeated roots, so the general solution can be written by
𝑦 = 𝑐1 𝑒 𝑡 + 𝑐2 𝑒 −2𝑡 + 𝑐3 𝑡𝑒 −2𝑡 + 𝑐4 𝑡 2 𝑒 −2𝑡 .

Example 4. Solve the following differential equation


6 5 4 3
𝑦 + 2𝑦 + 17𝑦 − 4𝑦 + 44𝑦 ′′ − 160𝑦 ′ + 100𝑦 = 0.
116 Chapter 4-Higher Order ODEs

The characteristic equation is


𝜆6 + 𝜆5 + 17𝜆4 − 4𝜆3 + 44𝜆2 − 160𝜆 + 100 = 0.
By factorization we can write
2
𝜆−1 𝜆2 + 2𝜆 + 10 2
= 0.
So, we will obtain double roots 𝜆 = 1 and double complex roots 𝜆 = −1 ± 3𝑖. Then the
general solution can be given by
𝑦 = 𝑐1 𝑒 𝑡 + 𝑐2 𝑡𝑒 𝑡 + 𝑒 −𝑡 (𝑐3 cos 3𝑡 + 𝑐4 sin 3𝑡 + 𝑐5 𝑡 cos 3𝑡 + 𝑐6 𝑡 sin(3𝑡)).

Example 5. Solve the following differential equation


4
𝑦 + 4𝑦 = 0.
The characteristic equation can be given by
𝜆4 + 4 = 0.
The characteristic equation is simple. However, to find the roots we have to compute the
fourth root of −4. We can see that
4 4
−4 = 2 −1.
In the complex number −1 can be written by −1 + 0𝑖. In the polar coordinate we write
−1 = cos 𝜋 + 𝑖 sin 𝜋 = 𝑒 𝑖𝜋 .
Because sinus and cosines periodic in 2𝜋 then we have
−1 = cos 𝜋 + 2𝑘𝜋 + 𝑖 sin 𝜋 + 2𝑘𝜋 = 𝑒 𝑖 𝜋+2𝑘𝜋
,
𝑘 is an integer number. So we have
4 4
1
−4 = 2 −1 = 2 −1 4 = 2 𝑒 𝑖 𝜋+2𝑘𝜋
𝜋 𝑘𝜋 𝜋 𝑘𝜋
= 2 cos + + 𝑖 sin + .
4 2 4 2
We can find the roots of −4 by setting 𝑘 = 0, 1, 2, and 3, and we will obtain
𝜆1 = 1 + 𝑖, 𝜆2 = −1 + 𝑖, 𝜆3 = −1 − 𝑖, 𝜆4 = 1 − 𝑖.
Finally, the general solution can be given by
𝑦 = 𝑒 𝑡 𝑐1 cos 𝑡 + 𝑐2 sin 𝑡 + 𝑒 −𝑡 (𝑐3 cos 𝑡 + 𝑐4 sin 𝑡).

There are many different kinds of combinations of basic cases than we have studied here.
The important problem to solve the higher order differential equations is that to solve the
characteristic equation and to solve the linear system.
Chapter 4-Higher Order ODEs 117

Exercises.
1. Find the general solution of the following 𝑛𝑡ℎ order homogeneous differential
equations.
a. 𝑦 (3) + 9𝑦′ = 0
3
b. 𝑦 + 3𝑦 ′′ − 𝑦 ′ − 3𝑦 = 0
4 3
c. 𝑦 + 4𝑦 + 2𝑦 ′′ − 4𝑦′ − 3𝑦 = 0
4 3
d. 𝑦 + 2𝑦 − 𝑦 ′′ + 4𝑦′ − 6𝑦 = 0
5 4 3
e. 𝑦 −𝑦 + 4𝑦 − 4𝑦 ′′ + 4𝑦 ′ − 4𝑦 = 0
5 4 3
f. 𝑦 +𝑦 + 2𝑦 + 2𝑦 ′′ + 𝑦 ′ + 𝑦 = 0
3
g. 𝑦 + 6𝑦 ′′ + 12𝑦 ′ + 8𝑦 = 0
6
h. 𝑦 +𝑦 =0
8
i. 𝑦 + 4𝑦 = 0
6 4
j. 𝑦 + 3𝑦 + 3𝑦 ′′ + 𝑦 = 0

2. Find the solution of the following given initial value problem.


3
a. 𝑦 + 9𝑦 ′ = 0, 𝑦 0 = 1, 𝑦 ′ 0 = 1, 𝑦 ′′ 0 = −1
3
b. 𝑦 + 3𝑦 ′′ − 𝑦 ′ − 3𝑦 = 0, 𝑦 0 = 1, 𝑦 ′ 0 = −1, 𝑦 ′′ 0 = 1
4
c. 𝑦 + 4𝑦 = 0, 𝑦 0 = 0, 𝑦 ′ 0 = 1, 𝑦 ′′ 0 = 1, 𝑦 3
0 =0
3
d. 𝑦 + 6𝑦 ′′ + 12𝑦 ′ + 8𝑦 = 0, 𝑦 0 = 1, 𝑦 ′ 0 = 0, 𝑦 ′′ 0 = 1
3
e. 𝑦 − 8𝑦 ′′ + 17𝑦 ′ − 10𝑦 = 0, 𝑦 0 = −2, 𝑦 ′ 0 = 1, 𝑦 ′′ 0 = −1
3
f. 𝑦 − 3𝑦 ′′ + 3𝑦 ′ − 𝑦 = 0, 𝑦 0 = 1, 𝑦 ′ 0 = −1, 𝑦 ′′ 0 = 1
3
g. 𝑦 − 𝑦 ′′ + 𝑦 ′ − 𝑦 = 0, 𝑦 0 = −1, 𝑦 ′ 0 = 1, 𝑦 ′ 0 = 1
3
h. 𝑦 + 𝑦 ′′ + 2𝑦 ′ + 2𝑦 = 0, 𝑦 0 = −1, 𝑦 ′ 0 = 1, 𝑦 ′′ 0 = 0
3
i. 𝑦 − 3𝑦 ′′ + 𝑦 ′ − 3𝑦 = 0, 𝑦 0 = 1, 𝑦 ′ 0 = −1, 𝑦 ′′ 0 = −1
3
j. 𝑦 − 6𝑦 ′′ + 12𝑦 ′ − 8𝑦 = 0, 𝑦 0 = 1, 𝑦 ′ 0 = −1, 𝑦 ′ 0 = 1.

3. Find the differential equation which has the following general solution.
a. 𝑦 = 𝑐1 𝑒 2𝑡 + 𝑐2 𝑒 3𝑡 + 𝑐3 𝑡𝑒 3𝑡
118 Chapter 4-Higher Order ODEs

b. 𝑦 = 𝑐1 𝑒 2𝑡 + 𝑐2 𝑡𝑒 2𝑡 + 𝑐3 cos 3𝑡 + 𝑐4 sin 3𝑡
c. 𝑦 = 𝑐1 𝑒 5𝑡 + 𝑐2 𝑡𝑒 5𝑡 + 𝑐3 𝑡 2 𝑒 5𝑡
d. 𝑦 = 𝑐1 𝑒 −𝑡 + 𝑒 3𝑡 𝑐2 cos 2𝑡 + 𝑐3 sin 2𝑡
e. 𝑦 = 𝑐1 𝑒 3𝑡 + 𝑐2 𝑡𝑒 3𝑡 + 𝑒 −2𝑡 𝑐3 cos 3𝑡 + 𝑐4 sin 3𝑡
f. 𝑦 = 𝑒 2𝑡 𝑐1 cos 2𝑡 + 𝑐2 sin 2𝑡 + 𝑒 −2𝑡 𝑐3 sin 𝑡 + 𝑐4 cos 𝑡
g. 𝑦 = 𝑒 𝑡 𝑐1 cos 2𝑡 + 𝑐2 sin 2𝑡 + 𝑒 𝑡 𝑐3 𝑡 cos 2𝑡 + 𝑐4 𝑡 sin 2𝑡
h. 𝑦 = 𝑐1 𝑒 𝑡 + 𝑐2 𝑡𝑒 𝑡 + 𝑐3 𝑡 2 𝑒 𝑡 + 𝑒 −2𝑡 𝑐4 cos 2𝑡 + 𝑐5 sin 2𝑡
i. 𝑦 = 𝑒 𝑡 𝑐1 cos 3𝑡 + 𝑐2 sin 3𝑡 + 𝑒 −𝑡 𝑐3 cos 3𝑡 + 𝑐4 sin 3𝑡
j. 𝑦 = 𝑐1 𝑒 2𝑡 + 𝑐2 𝑒 −2𝑡 + 𝑒 −2𝑡 𝑐3 cos 2𝑡 + 𝑐4 sin 2𝑡 + 𝑒 −2𝑡 𝑐5 𝑡 cos 2𝑡 +
𝑐6 𝑡 sin 2𝑡

4.3.Undetermined Coefficients
Consider the 𝑛𝑡ℎ order linear nonhomogeneous differential equation with constant
coefficients, Consider the differential equation
𝑛 𝑛−1
𝑎𝑛 𝑦 + 𝑎𝑛−1 𝑦 + ⋯ + 𝑎0 𝑦 = 𝑔 𝑡 . (4.3.1)
The general solution can be given by
𝑦 = 𝑦ℎ + 𝑌𝑝 ,
where 𝑦ℎ is solution of the 𝑛𝑡ℎ order homogeneous differential equation associated with
the differential equation (4.3.1). To find the particular solution 𝑌𝑝 by using the method of
undetermined coefficient we have to copy the method on the second order
nonhomogeneous differential equation. The important thing that in the second order
differential equation if any term in the guess is in the fundamental solution then we need
to multiply the part of our guess that contains that term by 𝑡. In the second order the
maximum possibility multiply by 𝑡 2 . However, in the higher order may need to be more
than 𝑡 2 . We will study the problem by using the following several examples.

Example 1. Solve the following differential equation


3
𝑦 − 3𝑦 ′′ − 4𝑦 ′ + 12𝑦 = 2𝑒 𝑡 .
Chapter 4-Higher Order ODEs 119

First we need to find the fundamental solution, we have the characteristic equation related
with the nonhomogeneous is given by
𝜆3 − 3𝜆2 − 4𝜆 + 12 = 𝜆 + 2 𝜆 − 2 𝜆 − 3 = 0.
We obtain the homogeneous solution, that is
𝑦ℎ = 𝑐1 𝑒 −2𝑡 + 𝑐2 𝑒 2𝑡 + 𝑐3 𝑒 3𝑡 .
Because the function 𝑔 𝑡 = 2𝑒 𝑡 is not one of the fundamental solutions then we use
guess function for particular solution is
𝑌𝑝 = 𝐴𝑒 𝑡 .
Differentiating three times and substituting the differential equation and we will obtain
𝐴 − 3𝐴 − 4𝐴 + 12 𝑒 𝑡 = 2𝑒 𝑡 ,
So, we obtain
1
6𝐴 = 2 ⟹ 𝐴 = 3.

The particular solution then can be given by


1
𝑌𝑝 = 3 𝑒 𝑡 .

Finally, we obtain the solution of the given initial value problem, that is
1
𝑦 = 𝑦ℎ + 𝑌𝑝 = 𝑐1 𝑒 −2𝑡 + 𝑐2 𝑒 2𝑡 + 𝑐3 𝑒 3𝑡 + 𝑒 𝑡 .
3

Example 2. Solve the following differential equation


3
𝑦 − 3𝑦 ′′ + 3𝑦 ′ − 𝑦 = 2𝑒 𝑡 + 3𝑒 2𝑡 − 1.

We have the characteristic equation related with the nonhomogeneous is given by


3
𝜆−1 = 0 ⟹ 𝜆 = 1 (multiplicity 3).
We obtain the homogeneous solution, that is
𝑦ℎ = 𝑐1 𝑒 𝑡 + 𝑐2 𝑡𝑒 𝑡 + 𝑐3 𝑡 2 𝑒 𝑡 .
We use guess function for particular solution is
𝑌𝑝 = 𝐴0 𝑒 𝑡 + 𝐴1 𝑒 2𝑡 + 𝐴2 .
However, the first term of the guess function is a solution of homogeneous problem and
because the root of characteristic equation has multiplicity 3, so we have to use guess
function as
120 Chapter 4-Higher Order ODEs

𝑌𝑝 = 𝐴0 𝑡 3 𝑒 𝑡 + 𝐴1 𝑒 2𝑡 + 𝐴2 .
Differentiating three times
𝑌𝑝′ = 3𝐴0 𝑡 2 𝑒 𝑡 + 𝐴0 𝑡 2 𝑒 𝑡 + 2𝐴1 𝑒 2𝑡 ,
𝑌𝑝′′ = 6𝐴0 𝑡𝑒 𝑡 + 6𝐴0 𝑡 2 𝑒 𝑡 + 𝐴0 𝑡 3 𝑒 𝑡 + 4𝐴1 𝑒 2𝑡 ,
𝑌𝑝 3 = 6𝐴0 𝑒 𝑡 18𝐴0 𝑡𝑒 𝑡 + 9𝐴0 𝑡 2 𝑒 𝑡 + 𝐴0 𝑡 3 𝑒 𝑡 + 8𝐴1 𝑒 2𝑡 .
Substituting the differential equation and we will obtain
6𝐴0 𝑒 𝑡 + 𝐴1 𝑒 2𝑡 − 𝐴2 = 2𝑒 𝑡 + 3𝑒 2𝑡 − 1.
So, we obtain
1
6𝐴0 = 2, 𝐴1 = 3, −𝐴2 = −1 ⟹ 𝐴0 = 3 , 𝐴1 = 3, 𝐴2 = 1.

The particular solution then can be given by


1
𝑌𝑝 = 3 𝑡 3 𝑒 𝑡 + 3𝑒 2𝑡 + 1.

Finally, we obtain the solution of the given initial value problem, that is
1
𝑦 = 𝑦ℎ + 𝑌𝑝 = 𝑐1 𝑒 𝑡 + 𝑐2 𝑡𝑒 𝑡 + 𝑐3 𝑡 2 𝑒 𝑡 + 𝑡 3 𝑒 𝑡 + 3𝑒 2𝑡 + 1.
3
To solve the problem in this example we can also divide the function of 𝑔 𝑡 = 2𝑒 𝑡 +
3𝑒 2𝑡 − 1 into three functions that are 𝑔1 = 2𝑒 𝑡 , 𝑔2 = 3 𝑒 2𝑡 , and then 𝑔3 = −1.

Example 3. Solve the following differential equation


3
𝑦 − 2𝑦 ′′ − 𝑦 ′ + 2𝑦 = 𝑡 2 + 2 sin 𝑡 + 𝑒 2𝑡 .

The characteristic equation of the homogeneous equation related with the


nonhomogeneous is given by
𝜆 + 1 𝜆 − 1 𝜆 − 2 = 0 ⟹ 𝜆1 = −1, 𝜆2 = 1, 𝜆3 = 2.
We obtain the homogeneous solution, that is
𝑦ℎ = 𝑐1 𝑒 −𝑡 + 𝑐2 𝑒 𝑡 + 𝑐3 𝑒 2𝑡 .
We use guess function for particular solution is 𝑌𝑝 = 𝑌𝑝1 + 𝑌𝑝2 + 𝑌𝑝3 , with
𝑌𝑝1 = 𝐴2 𝑡 2 + 𝐴1 𝑡 + 𝐴0,
𝑌𝑝2 = 𝐵1 sin 𝑡 + 𝐵2 cos 𝑡,
𝑌𝑝3 = 𝐶1 𝑡𝑒 2𝑡 .
Differentiating all three guess function three times and substituting the differential
equation and we will obtain
Chapter 4-Higher Order ODEs 121

5 1 1 2 1 1
𝐴0 = , 𝐴1 = , 𝐴2 = , 𝐵1 = , 𝐵2 = , 𝐶1 = .
4 2 2 5 5 3
The particular solution then can be given by
1 1 5
𝑌𝑝1 = 𝑡 2 + 𝑡 + ,
2 2 4
2 1
𝑌𝑝2 = sin 𝑡 + cos 𝑡,
5 5
1 2𝑡
𝑌𝑝3 = 𝑡 𝑒 .
3
Finally, we obtain the solution of the given initial value problem, that is
1 1 5 2 1 1
𝑦 = 𝑦ℎ + 𝑌𝑝 = 𝑐1 𝑒 −𝑡 + 𝑐2 𝑒 𝑡 + 𝑐3 𝑒 2𝑡 + 𝑡 2 + 𝑡 + + sin 𝑡 + cos 𝑡 + + 𝑡𝑒 2𝑡 .
2 2 4 5 5 3

Example 4. Solve the initial value problem


4 3
𝑦 − 5𝑦 + 5𝑦 ′′ + 5𝑦 ′ − 6𝑦 = 2𝑒 𝑡 + 3𝑡 + cos 2𝑡,
𝑦 0 = 1, 𝑦 ′ 0 = 1, 𝑦 ′′ 0 = −1, 𝑦 3
(0) = −1.
The characteristic equation for homogeneous equation can be given by
𝜆4 − 5𝜆3 + 5𝜆2 + 5𝜆 − 6 = 𝜆 + 1 𝜆 − 1 𝜆 − 2 𝜆 − 3 = 0.
Then the roots of the characteristic equations are
𝜆1 = −1, 𝜆2 = 1, 𝜆3 = 2, 𝜆4 = 3.
The solution of the homogeneous equation is given by
𝑦ℎ = 𝑐1 𝑒 −𝑡 + 𝑐2 𝑒 𝑡 + 𝑐3 𝑒 2𝑡 + 𝑐4 𝑒 3𝑡 .
We use guess function for particular solution is 𝑌𝑝 = 𝑌𝑝1 + 𝑌𝑝2 + 𝑌𝑝3 , with
𝑌𝑝1 = 𝐴1 𝑡𝑒 𝑡 ,
𝑌𝑝2 = 𝐵1 𝑡 + 𝐵0 ,
𝑌𝑝3 = 𝐶1 cos 2𝑡 + 𝐶2 sin 2𝑡.
Differentiating all three guess function three times and substituting the differential
equation and we will obtain
1 1 5 1 1
𝐴1 = , 𝐵1 = − , 𝐵2 = − , 𝐶1 = − , 𝐶2 = .
2 2 12 260 52
The particular solution then can be given by
122 Chapter 4-Higher Order ODEs

1 𝑡
𝑌𝑝1 = 𝑡𝑒 ,
2
1 5
𝑌𝑝2 = − 𝑡 − ,
2 12
1 1
𝑌𝑝3 =− cos 2𝑡 + sin 2𝑡.
260 52
Finally, we obtain the general solution, that is
1 1 5
𝑦 = 𝑦ℎ + 𝑌𝑝 = 𝑐1 𝑒 −𝑡 + 𝑐2 𝑒 𝑡 + 𝑐3 𝑒 2𝑡 + 𝑐4 𝑒 3𝑡 + 𝑡𝑒 𝑡 − 𝑡 −
2 2 12
1 1
− cos 2𝑡 + sin 2𝑡.
260 52
Differentiating three times and we get
1 1 1 1 1
𝑦 ′ = 𝑐1 𝑒 𝑡 − 𝑐2 𝑒 −𝑡 + 2𝑐3 𝑒 2𝑡 + 3𝑐4 𝑒 3𝑡 + 𝑒 𝑡 𝑡 + 𝑒 𝑡 − + sin 2𝑡 + cos 2𝑡 ,
2 2 2 130 26
1 1 1
𝑦 ′′ = 𝑐1 𝑒 𝑡 + 𝑐2 𝑒 −𝑡 + 4𝑐3 𝑒 2𝑡 + 9𝑐4 𝑒 3𝑡 + 𝑒 𝑡 𝑡 + 𝑒 𝑡 + cos 2𝑡 − sin 2𝑡 ,
2 65 13
1 3 2 2
𝑦 3 = 𝑐1 𝑒 𝑡 − 𝑐2 𝑒 −𝑡 + 8𝑐3 𝑒 2𝑡 + 27𝑐4 𝑒 3𝑡 + 𝑒 𝑡 𝑡 + 𝑒 𝑡 − sin 2𝑡 − cos 2𝑡 .
2 2 65 13
By using the initial condition we will obtain a system, that is
277
𝑐1 + 𝑐2 + 𝑐3 + 𝑐4 = ,
195
25
𝑐1 − 𝑐2 + 2𝑐3 + 3𝑐4 = ,
26
131
𝑐1 + 𝑐2 + 4𝑐3 + 9𝑐4 = − ,
65
61
𝑐1 − 𝑐2 + 8𝑐3 + 27𝑐4 = − .
26
We can rewrite by
277
195
1 1 1 1 𝑐1 25
1 −1 2 3 𝑐2 26 .
𝑐3 =
1 1 4 9 131
1 −1 8 27 𝑐4 −
65
61

26
Solving the system and we will get
19 59 7 139
𝑐1 = , 𝑐2 = − , 𝑐3 = − , 𝑐4 = .
5 120 3 312
Chapter 4-Higher Order ODEs 123

So we conclude the solution of the given initial value problem can be given by
19 −𝑡 59 𝑡 7 2𝑡 139 3𝑡 1 𝑡 1 5 1 1
𝑦= 𝑒 − 𝑒 − 𝑒 + 𝑒 + 𝑡𝑒 − 𝑡 − − cos 2𝑡 + sin 2𝑡.
5 120 3 312 2 2 12 260 52

Exercises.
1. Find the general solution of the following 𝑛𝑡ℎ order homogeneous differential
equations.
a. 𝑦 (3) + 9𝑦 ′ = 2𝑒 2𝑡 + 1
3
b. 𝑦 + 3𝑦 ′′ − 𝑦 ′ − 3𝑦 = 2𝑒 −𝑡 + 𝑡 2
4 3
c. 𝑦 + 4𝑦 + 2𝑦 ′′ − 4𝑦′ − 3𝑦 = 𝑡 + sin 𝑡
4 3
d. 𝑦 + 2𝑦 − 𝑦 ′′ + 4𝑦′ − 6𝑦 = 3𝑒 𝑡
5 4 3
e. 𝑦 −𝑦 + 4𝑦 − 4𝑦 ′′ + 4𝑦 ′ − 4𝑦 = 𝑡𝑒 𝑡
5 4 3
f. 𝑦 +𝑦 + 2𝑦 + 2𝑦 ′′ + 𝑦 ′ + 𝑦 = 𝑡 2 + 2
3
g. 𝑦 + 6𝑦 ′′ + 12𝑦 ′ + 8𝑦 = 𝑡 sin 𝑡
6
h. 𝑦 + 𝑦 = 𝑡 + 𝑒𝑡
8
i. 𝑦 + 4𝑦 = 2𝑡 + 3
6 4
j. 𝑦 + 3𝑦 + 3𝑦 ′′ + 𝑦 = 𝑒 𝑡 + 2

2. Find the solution of the following given initial value problem.


3
a. 𝑦 + 9𝑦 ′ = 𝑡 + 1, 𝑦 0 = 1, 𝑦 ′ 0 = 1, 𝑦 ′′ 0 = −1
3
b. 𝑦 + 3𝑦 ′′ − 𝑦 ′ − 3𝑦 = 𝑒 𝑡 , 𝑦 0 = 1, 𝑦 ′ 0 = −1, 𝑦 ′′ 0 = 1
4
c. 𝑦 + 4𝑦 = 0, 𝑦 0 = 3𝑒 𝑡 + 2, 𝑦 ′ 0 = 1, 𝑦 ′′ 0 = 1, 𝑦 3
0 =0
3
d. 𝑦 + 6𝑦 ′′ + 12𝑦 ′ + 8𝑦 = 𝑡 + sin 𝑡 , 𝑦 0 = 1, 𝑦 ′ 0 = 0, 𝑦 ′′ 0 = 1
3
e. 𝑦 − 8𝑦 ′′ + 17𝑦 ′ − 10𝑦 = 𝑒 2𝑡 + 1, 𝑦 0 = −2, 𝑦 ′ 0 = 1, 𝑦 ′′ 0 = −1
3
f. 𝑦 − 3𝑦 ′′ + 3𝑦 ′ − 𝑦 = 𝑡 2 + 𝑒 𝑡 , 𝑦 0 = 1, 𝑦 ′ 0 = −1, 𝑦 ′′ 0 = 1
3
g. 𝑦 − 𝑦 ′′ + 𝑦 ′ − 𝑦 = 𝑡𝑒 𝑡 , 𝑦 0 = −1, 𝑦 ′ 0 = 1, 𝑦 ′ 0 = 1
3
h. 𝑦 + 𝑦 ′′ + 2𝑦 ′ + 2𝑦 = 𝑡 2 + 𝑒 2𝑡 , 𝑦 0 = −1, 𝑦 ′ 0 = 1, 𝑦 ′′ 0 = 0
3
i. 𝑦 − 3𝑦 ′′ + 𝑦 ′ − 3𝑦 = sin 𝑡 + 𝑒 3𝑡 , 𝑦 0 = 1, 𝑦 ′ 0 = −1, 𝑦 ′′ 0 = −1
3
j. 𝑦 − 6𝑦 ′′ + 12𝑦 ′ − 8𝑦 = 𝑡 + 2, 𝑦 0 = 1, 𝑦 ′ 0 = −1, 𝑦 ′ 0 = 1.
124 Chapter 4-Higher Order ODEs

4.4.Variation of Parameters
In this section we will study the 𝑛𝑡ℎ order linear homogeneous differential equation
with constant coefficients by using the variation of parameters method. As we have
studied the variation method for second orders differential equation that this method
always involves with integrals that are not easy to calculate. However, this method can
always be used. We consider the 𝑛𝑡ℎ order linear nonhomogeneous differential equation
𝑦 (𝑛) + 𝑃𝑛 −1 𝑦 𝑛−1
+ ⋯ + 𝑃1 𝑦 ′ + 𝑃0 𝑦 = 𝑔 𝑡 . (4.4.1)
Let we have the fundamental solution 𝑦1 , 𝑦2 , ⋯ , 𝑦𝑛 of the homogeneous differential
equation associated to the differential equation (4.4.1). We can write the general solution
of the homogeneous in the form
𝑦ℎ = 𝑐1 𝑦1 + 𝑐2 𝑦2 + ⋯ + 𝑐𝑛 𝑦𝑛 . (4.4.2)
As in the second order the variation of parameter method involves to find a set of new
functions 𝑢1 , 𝑢2 , ⋯ , 𝑢𝑛 such that
𝑌𝑝 = 𝑢1 𝑦1 + 𝑢2 𝑦2 + ⋯ + 𝑢𝑛 𝑦𝑛 , (4.4.3)
is a particular solution of nonhomogeneous differential equation (4.4.1). Since equation
(4.4.3) has 𝑛 functions to determine, we will have to specify 𝑛 conditions. The equation
(4.4.3) will be a solution if satisfy equation (4.4.1), so we differentiate equation (4.4.3)
and we will obtain
𝑌𝑝′ = 𝑢1 𝑦1′ + 𝑢2 𝑦2′ + ⋯ + 𝑢𝑛 𝑦𝑛′ + 𝑢1′ 𝑦1 + 𝑢2′ 𝑦2 + ⋯ + 𝑢𝑛′ 𝑦𝑛 . (4.4.4)
From equation (4.4.4) we will have the first condition, that is
𝑢1′ 𝑦1 + 𝑢2′ 𝑦2 + ⋯ + 𝑢𝑛′ 𝑦𝑛 = 0. (4.4.5)
Using (4.4.5) differentiating (4.4.4) and we obtain
𝑌𝑝′′ = 𝑢1 𝑦1′′ + 𝑢2 𝑦2′′ + ⋯ + 𝑢𝑛 𝑦𝑛′′ + (𝑢1′ 𝑦1′ + 𝑢2′ 𝑦2′ + ⋯ + 𝑢𝑛′ 𝑦𝑛′ ). (4.4.6)
From equation (4.4.6) we will have second condition, that is
𝑢1′ 𝑦1′ + 𝑢2′ 𝑦2′ + ⋯ + 𝑢𝑛′ 𝑦𝑛′ = 0. (4.4.7)
We continue the process for the first 𝑛 − 1 derivatives and we will obtain

𝑌𝑝 𝑘 = 𝑢1 𝑦1 𝑘 + 𝑢2 𝑦2 𝑘 + ⋯ + 𝑢𝑛 𝑦𝑛𝑘 , 𝑘 = 1,2, ⋯ , 𝑛 − 1 (4.4.8)


To obtain equation (4.4.8) we had assume that
𝑢1′ 𝑦1 𝑘 + 𝑢2′ 𝑦2 𝑘 + ⋯ + 𝑢𝑛′ 𝑦𝑛𝑘 = 0, 𝑘 = 0,1, ⋯ , 𝑛 − 2. (4.4.9)
Chapter 4-Higher Order ODEs 125

So, from equation (4.4.7), (4.4.8), and (4.4.9) after substituting into equation (4.4.1) will
be obtained a system
𝑦1 𝑢1′ + 𝑦2 𝑢2′ + ⋯ + 𝑦𝑛 𝑢𝑛′ = 0,
𝑦1′ 𝑢1′ + 𝑦2′ 𝑢2′ + ⋯ + 𝑦𝑛′ 𝑢𝑛′ = 0,
𝑦1′′ 𝑢1′ + 𝑦2′′ 𝑢2′ + ⋯ + 𝑦𝑛′′ 𝑢𝑛′ = 0,

𝑛 −2 ′ 𝑛 −2 ′
𝑦1 𝑢1 + 𝑦2 𝑢2 + ⋯ + 𝑦𝑛𝑛−2 𝑢𝑛′ = 0,
𝑦1 𝑛 −1 𝑢1′ + 𝑦2 𝑛 −1 𝑢2′ + ⋯ + 𝑦𝑛𝑛−1 𝑢𝑛′ = 𝑔 𝑡 .
We can write
𝑦1 𝑦2 ⋯ 𝑦𝑛 𝑢1 ′ 0
𝑦1 ′ 𝑦2 ′ ⋯ 𝑦𝑛 ′ 𝑢2 ′ 0
𝑦1 ′′ 𝑦2 ′′ ⋯ 𝑦𝑛 ′′ 𝑢3 ′ 0
⋮ ⋮ ⋱ ⋮ = . (4.4.10)
⋮ ⋮
𝑛−2 𝑛 −2 𝑛−2
𝑦1 𝑦2 ⋯ 𝑦𝑛 𝑢𝑛 −1 ′ 0
𝑦1 𝑛−1
𝑦2 𝑛 −1 ⋯ 𝑦𝑛𝑛−1 𝑢𝑛 ′ 𝑔

A sufficient condition for the existence of a solution of the system (4.4.10) is that the
determinant of coefficients that is 𝑊(𝑦1 , 𝑦2 , ⋯ , 𝑦𝑛 ) ≠ 0. By using Cramer’s rule we can
obtain the solution of the system (4.4.10) can be given by


𝑔 𝑡 𝑊𝑚 (𝑡)
𝑢𝑚 = , 𝑚 = 1,2, ⋯ , 𝑛
𝑊(𝑡)
where 𝑊 𝑡 = 𝑊 𝑦1 , 𝑦2 , ⋯ , 𝑦𝑛 , and where 𝑊𝑚 (𝑡) is the determinant obtained from 𝑊
by replacing the 𝑚𝑡ℎ column by (0,0, ⋯ ,0,1). So we will obtain
𝑔𝑊1 𝑔𝑊2 𝑔𝑊𝑛
𝑢1 = 𝑑𝑡, 𝑢2 = 𝑑𝑡, ⋯ , 𝑢𝑛 = 𝑑𝑡.
𝑊 𝑊 𝑊
So the particular solution will be given by
𝑔𝑊1 𝑔𝑊2 𝑔𝑊𝑛
𝑌𝑝 = 𝑦1 𝑑𝑡 + 𝑦2 𝑑𝑡 + ⋯ + 𝑦𝑛 𝑑𝑡. (4.4.11)
𝑊 𝑊 𝑊

Let we discuss several examples.

Example 1. Find the general solution of the following differential equation by using the
variation of paramaters.
3
𝑦 − 3𝑦 ′′ − 4𝑦 ′ + 12𝑦 = 2𝑒 𝑡 .
The characteristic equation for homogeneous equation associated with the
nonhomogeneous differential equation is
126 Chapter 4-Higher Order ODEs

𝜆3 − 3𝜆2 − 4𝜆 + 12 = 𝜆 + 2 𝜆 − 2 𝜆 − 3 = 0.
We obtain the homogeneous solution, that is
𝑦ℎ = 𝑐1 𝑒 −2𝑡 + 𝑐2 𝑒 2𝑡 + 𝑐3 𝑒 3𝑡 .
Let the particular solution is 𝑌𝑝 = 𝑢1 𝑦1 + 𝑢2 𝑦2 + 𝑢3 𝑦3 . Using equation (4.4.11) we will
obtain the particular solution 𝑌𝑝 . We have to find 𝑊, that is
𝑒 −2𝑡 𝑒 2𝑡 𝑒 3𝑡
−2𝑡 2𝑡 3𝑡
𝑊 𝑒 ,𝑒 ,𝑒 = −2𝑒 −2𝑡 2𝑒 2𝑡 3𝑒 3𝑡 = 20𝑒 3𝑡 ,
4𝑒 −2𝑡 4𝑒 2𝑡 9𝑒 3𝑡
0 𝑒 2𝑡 𝑒 3𝑡
𝑊1 = 0 2𝑒 2𝑡 3𝑒 3𝑡 = 𝑒 5𝑡 ,
1 4𝑒 2𝑡 9𝑒 3𝑡
𝑒 −2𝑡 0 𝑒 3𝑡
𝑊2 = −2𝑒 −2𝑡 0 3𝑒 3𝑡 = −5𝑒 𝑡 ,
4𝑒 −2𝑡 1 9𝑒 3𝑡
𝑒 −2𝑡 𝑒 2𝑡 0
𝑊3 = −2𝑒 −2𝑡 2𝑒 2𝑡 0 = 4.
4𝑒 −2𝑡 4𝑒 2𝑡 1
We then obtain
2𝑒 𝑡 𝑒 5𝑡 1 1 3𝑡
𝑢1 = 𝑑𝑡 = 𝑒 3𝑡 𝑑𝑡 = 𝑒 ,
20 𝑒 3𝑡 10 30
2𝑒 𝑡 (−5𝑒 𝑡 ) 1 1
𝑢2 = 3𝑡
𝑑𝑡 = − 𝑒 −𝑡 𝑑𝑡 = 𝑒 𝑡 ,
20𝑒 2 2
2𝑒 𝑡 4 2 1
𝑢3 = 3𝑡
𝑑𝑡 = 𝑒 −2𝑡 𝑑𝑡 = − 𝑒 −2𝑡 .
20𝑒 5 5
The particular solution then becomes
1 3𝑡 1 1 1
𝑌𝑝 = 𝑒 −2𝑡 𝑒 + 𝑒 2𝑡 𝑒 𝑡 + 𝑒 3𝑡 − 𝑒 −2𝑡 = 𝑒 𝑡 .
30 2 5 3
The general solution can be given by
1
𝑦 = 𝑐1 𝑒 −2𝑡 + 𝑐2 𝑒 2𝑡 + 𝑐3 𝑒 3𝑡 + 𝑒 𝑡 .
3

Example 2. Find the general solution of the following differential equation by using
variation of parameters
3
𝑦 − 3𝑦 ′′ + 3𝑦 ′ − 𝑦 = 2𝑒 𝑡 + 3𝑒 2𝑡 − 1.
Chapter 4-Higher Order ODEs 127

The characteristic equation related with the nonhomogeneous is given by


3
𝜆−1 = 0 ⟹ 𝜆 = 1 (multiplicity 3).
We obtain the homogeneous solution, that is
𝑦ℎ = 𝑐1 𝑒 𝑡 + 𝑐2 𝑡𝑒 𝑡 + 𝑐3 𝑡 2 𝑒 𝑡 .
Using equation (4.4.11) we will obtain the particular solution 𝑌𝑝 = 𝑢1 𝑦1 + 𝑢2 𝑦2 + 𝑢3 𝑦3 .
We have to find 𝑊, that is
𝑒𝑡 𝑡𝑒 𝑡 𝑡2 𝑒𝑡
−2𝑡 2𝑡 3𝑡
𝑊 𝑒 ,𝑒 ,𝑒 = 𝑒𝑡 𝑒 𝑡 + 𝑡𝑒 𝑡 2𝑡𝑒 𝑡 + 𝑡 2 𝑒 𝑡 = 2𝑒 3𝑡 ,
𝑒𝑡 2𝑒 𝑡 + 𝑡𝑒 𝑡 2𝑒 𝑡 + 4𝑡𝑒 𝑡 + 𝑡 2 𝑒 𝑡
0 𝑡𝑒 𝑡 𝑡2 𝑒𝑡
𝑊1 = 0 𝑒 + 𝑡𝑒 𝑡
𝑡
2𝑡𝑒 + 𝑡 2 𝑒 𝑡
𝑡 = 𝑡 2 𝑒 2𝑡 ,
1 2𝑒 𝑡 + 𝑡𝑒 𝑡 2𝑒 𝑡 + 4𝑡𝑒 𝑡 + 𝑡 2 𝑒 𝑡
𝑒𝑡 0 𝑡2 𝑒𝑡
𝑊2 = 𝑒 𝑡 0 2𝑡𝑒 + 𝑡 2 𝑒 𝑡
𝑡 = −2𝑡𝑒 2𝑡 ,
𝑒𝑡 1 2𝑒 𝑡 + 4𝑡𝑒 𝑡 + 𝑡 2 𝑒 𝑡
𝑒𝑡 𝑡𝑒 𝑡 0
𝑊3 = 𝑒 𝑡 𝑒 𝑡 + 𝑡𝑒 𝑡 0 = 𝑒 2𝑡 .
𝑒𝑡 2𝑒 𝑡 + 𝑡𝑒 𝑡 1
We then obtain
2𝑒 𝑡 + 3𝑒 2𝑡 − 1 (𝑡 2 𝑒 2𝑡 )
𝑢1 = 𝑑𝑡
2 𝑒 3𝑡
1 3 1
= 𝑡 3 + 𝑡 2 𝑒 𝑡 − 3𝑡𝑒 𝑡 + 3𝑒 𝑡 + 𝑡 2 𝑒 −𝑡 + 𝑡𝑒 −𝑡 + 𝑒 −𝑡 ,
3 2 2
(2𝑒 𝑡 + 3𝑒 2𝑡 − 1)(−2𝑡𝑒 2𝑡 )
𝑢2 = 𝑑𝑡 = −𝑡 2 − 3𝑡𝑒 𝑡 + 3𝑒 𝑡 − 𝑡𝑒 −𝑡 − 𝑒 −𝑡 ,
2𝑒 3𝑡
2𝑒 𝑡 + 3𝑒 2𝑡 − 1 𝑒 2𝑡 3 𝑡 1 −𝑡
𝑢3 = 𝑑𝑡 = 𝑡 + 𝑒 + 𝑒 .
2𝑒 3𝑡 2 2
The particular solution then becomes
1 3 𝑡
𝑌𝑝 = 𝑒 𝑡 𝑢1 + 𝑡𝑒 𝑡 𝑢2 + 𝑡 2 𝑒 𝑡 𝑢3 = 𝑡 𝑒 + 3𝑒 2𝑡 + 1.
3
The general solution can be given by
1
𝑦 = 𝑐1 𝑒 𝑡 + 𝑐2 𝑡𝑒 𝑡 + 𝑐3 𝑡 2 𝑒 𝑡 + 𝑡 3 𝑒 𝑡 + 3𝑒 2𝑡 + 1.
3
Exercises.
1. Find the general solution of the following 𝑛𝑡ℎ order homogeneous differential
equations by using variation of parameters.
128 Chapter 4-Higher Order ODEs

a. 𝑦 (3) + 9𝑦 ′ = 2𝑒 2𝑡 + 1
3
b. 𝑦 + 3𝑦 ′′ − 𝑦 ′ − 3𝑦 = 2𝑒 −𝑡 + 𝑡 2
4 3
c. 𝑦 + 4𝑦 + 2𝑦 ′′ − 4𝑦′ − 3𝑦 = 𝑡 + sin 𝑡
4 3
d. 𝑦 + 2𝑦 − 𝑦 ′′ + 4𝑦′ − 6𝑦 = 3𝑒 𝑡
5 4 3
e. 𝑦 −𝑦 + 4𝑦 − 4𝑦 ′′ + 4𝑦 ′ − 4𝑦 = 𝑡𝑒 𝑡
5 4 3
f. 𝑦 +𝑦 + 2𝑦 + 2𝑦 ′′ + 𝑦 ′ + 𝑦 = 𝑡 2 + 2
3
g. 𝑦 + 6𝑦 ′′ + 12𝑦 ′ + 8𝑦 = 𝑡 sin 𝑡
3
h. 𝑦 + 𝑦 = tan 𝑡 + 𝑒 𝑡 , 0 < 𝑡 < 𝜋
3
i. 𝑦 − 𝑦 = 2𝑡 + 3
3 𝜋 𝜋
j. 𝑦 + 𝑦′ = sec 𝑡 + 1, − 2 < 𝑡 < 2

2. Find the solution of the following given initial value problem by using the
variation of parameters.
3
a. 𝑦 + 9𝑦 ′ = 𝑡 + 1, 𝑦 0 = 1, 𝑦 ′ 0 = 1, 𝑦 ′′ 0 = −1
3
b. 𝑦 + 3𝑦 ′′ − 𝑦 ′ − 3𝑦 = 𝑒 𝑡 , 𝑦 0 = 1, 𝑦 ′ 0 = −1, 𝑦 ′′ 0 = 1
4
c. 𝑦 + 4𝑦 = 0, 𝑦 0 = 3𝑒 𝑡 + 2, 𝑦 ′ 0 = 1, 𝑦 ′′ 0 = 1, 𝑦 3
0 =0
3
d. 𝑦 + 6𝑦 ′′ + 12𝑦 ′ + 8𝑦 = 𝑡 + sin 𝑡 , 𝑦 0 = 1, 𝑦 ′ 0 = 0, 𝑦 ′′ 0 = 1
3
e. 𝑦 − 8𝑦 ′′ + 17𝑦 ′ − 10𝑦 = 𝑒 2𝑡 + 1, 𝑦 0 = −2, 𝑦 ′ 0 = 1, 𝑦 ′′ 0 = −1
3
f. 𝑦 − 3𝑦 ′′ + 3𝑦 ′ − 𝑦 = 𝑡 2 + 𝑒 𝑡 , 𝑦 0 = 1, 𝑦 ′ 0 = −1, 𝑦 ′′ 0 = 1
3
g. 𝑦 − 𝑦 ′′ + 𝑦 ′ − 𝑦 = 𝑡𝑒 𝑡 , 𝑦 0 = −1, 𝑦 ′ 0 = 1, 𝑦 ′ 0 = 1
3
h. 𝑦 + 𝑦 ′′ + 2𝑦 ′ + 2𝑦 = 𝑡 2 + 𝑒 2𝑡 , 𝑦 0 = −1, 𝑦 ′ 0 = 1, 𝑦 ′′ 0 = 0
3
i. 𝑦 + 𝑦′ = sec 𝑡 , 𝑦 0 = 1, 𝑦 ′ 0 = −1, 𝑦 ′′ 0 = −1
3
j. 𝑦 − 6𝑦 ′′ + 12𝑦 ′ − 8𝑦 = 𝑡 + 2, 𝑦 0 = 1, 𝑦 ′ 0 = −1, 𝑦 ′ 0 = 1.
REFERENCES
Arnold, V. I. Ordinary differential equations. Springer-Verlag, Berlin Heidelberg. 1992.

Betounes, D. Differential Equations: Theory and Apllications. Springer New York. 2000

Boelkins, M. R, Goldberg, J. L, and Potter, M. C. Differential Equation with Linear


Algebra. Oxford University Press, Inc, New York. 2009.

Boyce, W. E and DiPrima. Elementary Differential Equations and Boundary Value


Problems. John Wiley & Sons, Inc, New York. 1997.

Bronson, R and Costa, G. B. Differential Equations. McGRAW-HlLL New York. 2006

Chicone, C. Ordinary Differential Equations with Applications. Springer Science and


Business Media, Inc, New York. 2006

Costa, D. G. An invitation to variational Methods in Differential Equations. Birkhauser


Boston. 2007

Farlow, S.J. Introduction to Differential Equations and Their Applications. McGraw-Hill,


Inc. New York. 1994.

Hirsch, M. W and Smale, S. Differential equations, dynamical systems, and an


introduction to chaos. Elsevier. San Diego, California. 2004

Kaplan, W,. Ordinary differential equations. Addison-Wesley, Massachusetts, 1958.

Kevorkian, J., and J. D. Cole. Multiple Scale and Singular Perturbation Methods.
Springer-Verlag, New York, 1996.

King, A.C, Billingham, J, and Otto, S.R. Differential Equations Linear, Nonlinear,
Ordinary, Partial. Cambridge University Press. New York. 2003

Kishan, H. Differential Equations. Atantic Publisher and Distributor. New Delhi. 2006.

Krantz, S. G. Differential Equations Demystified. Mc Graw-Hill. New York. 2005

Kreyszig, E. Advanced Engineering Mathematics, 8th edition. John Wiley & Sons, Inc.
New York. 1999.

Nagle, R.E and Saff, E.B. Fundamentals of Differential Equations and Boundary Value
Problems. Addison-Wesley Publishing Company. New York1996.
178 Refferences

Nayfeh, A.H., and D. T. Mook. Nonlinear Oscillations. John Wiley & Sons, New York,
1985.

Robinson, J. C. Introduction to Ordinary Differential Equations. Cambridge University


Press, New York. 2004

Verhulst, F. Nonlinear differential equations and dynamical systems. Springer- Verlag,


Berlin, 1996.

Waluya, S. B. Persamaan Differensial. Graha Ilmu. Jogyakarta. 2006.

Waluya, S. B. Metode Perturbasi untuk Nonlinear Oscillators. Unnes Press. Semarang.


2009.

Wiggins, S. Introduction to Applied Nonlinear Dynamical Systems and Chaos. Springer-


Verlag, New York, 1990.

Williamson, R.E. Introduction to Differential Equations and Dynamical Systems. The


McGraw-Hill Company, Inc. New York. 1996.

Xie, W. C, Differential Equations for Engineers. Cambridge, New York. 2010


APPENDIX
Differential Technique
1. = , is a constant
2. + = +
3. = + ′

4. =

5. =

6. =
7. =
8. = ln
9. log ′ = 1/ log
10. sin ′= cos
11. cos ′ = − sin
12. tan ′= sec + a
13. cot ′ = − csc +
14. sinh ′= cosh
15. cosh ′ = a sinh
16. ln ′ = 1/

17. arcsin ′=

18. arccos ′=−


19. arctan ′=
/

20. arccot ′=− /

Integration Technique
1. 0 1 = −0 1
/
2. 0 1 = + , ≠1
/

3. 0 = ln| | +
180 Appendix-Nonlinear ODEs

4. 0 1 = +

5. 0 sin 1 = − cos +

6. 0 cos 1 = sin +

7. 0 tan 1 = − ln|cos |+

8. 0 cot 1 = ln|sin |+

9. 0 sec 1 = ln|sec + tan |+

10. 0 csc 1 = ln|csc − cot |+

11. 0 = arctan +
/

12. 0 = arcsin +

13. 0 √ = arcsinh +
/

14. 0 = arccosh +

15. 0 sin+ 1 = − sin 2 +


+ 4

16. 0 cos + 1 = + sin 2 +


+ 4

17. 0 tan+ 1 = tan − +


18. 0 cot + 1 = − cot − +
19. 0 ln 1 = ln − +
20. 0 1 = −1 +

21. 0 sin 1 = + sin − + cos +

22. 0 cos 1 = + sin + + cos

23. 0 sin cos 1 = − + cos + +

24. 0 sin 1 = sin − cos +


25. 0 cos 1 = cos + sin +

You might also like