Linear Differential Equations
Linear Differential Equations
Linear Differential Equations
Lecture Notes
Samsun Baharin Haji Mohamad
March 30, 2012
1
Contents
1 Introduction to Dierential Equations 3
1.1 Denitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.2 Solution of Dierential Equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.3 Linearly Independent Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2 First Order and First Degree ODEs 5
2.1 Separation of Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2.2 Homogeneous Equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.2.1 Equations Reducible to Homogeneous Form . . . . . . . . . . . . . . . . . . 9
2.3 Linear First-order Equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
2.3.1 Bernoullis Equation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
2.4 Exact Dierential Equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
2.4.1 Reduction to Exact Form, Integrating Factor . . . . . . . . . . . . . . . . . 16
3 Second Order Linear Dierential Equation 18
3.1 Homogeneous Linear ODEs with Constant Coecients . . . . . . . . . . . . . . . . 18
3.2 Non-homogeneous ODEs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
3.2.1 Method of Undetermined Coecients . . . . . . . . . . . . . . . . . . . . . 21
3.2.2 Method of Variation of Parameters . . . . . . . . . . . . . . . . . . . . . . . 23
4 Other Types of ODE 24
4.1 ODE with y is missing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
4.2 ODE with x is missing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
4.3 Equation of the type
d
2
y
dx
2
= f(y) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
4.4 Euler-Cauchy Equation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
4.4.1 Method 1: Using substitution x = e
z
. . . . . . . . . . . . . . . . . . . . . . 27
4.4.2 Method 2: Using y = x
m
. . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
4.5 One Solution is Known . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
5 Higher Order Linear ODEs 33
5.1 Homogeneous Linear ODEs with Constant Coecients . . . . . . . . . . . . . . . . 33
5.2 Non-Homogeneous Linear ODEs . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
5.2.1 Method of Variation of Parameters . . . . . . . . . . . . . . . . . . . . . . . 35
5.2.2 Annihilator Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
2
1 Introduction to Dierential Equations
1.1 Denitions
A dierential equation is an equation which involve dierential coecients or dierentials. For
example, the equations below are all dierential equations.
1. e
x
dx +e
y
dy = 0
2.
d
2
x
dt
2
+n
2
x = 0
3. y = x
dy
dx
+x
dx
dy
4.
_
1 +
_
dy
dx
_
2
_
3/2
/
d
2
y
dx
2
= c
5.
dx
dy
wy = a cos(pt),
dy
dt
+wx = a sin(pt)
6. x
u
x
+y
u
y
= 2u
7.
2
y
t
2
= c
2
2
y
x
2
An ordinary dierential equations (ODE) is dierential equations where all the dierential
coecients have reference to a single independent variable. Item 1 to 5 in the list are all ODEs.
A partial dierential equation (PDE) is dierential equations which there are two or more
independent variables and partial dierential coecients with respect to any of them. Item 6 and
7 are PDEs.
The ORDER of a dierential equation is the order of the highest derivative appearing in it.
The DEGREE of a dierential equation is the degree of the highest derivative occuring in it,
after the equation has been expressed in a form free from any radicals or fractions as far as the
derivatives are concerned.
From the list above, we can see that
1. Item 1 is of the rst order and rst degree.
2. Item 2 is of the second order and rst degree.
3. Item 3 written as y
dy
dx
= x
_
dy
dx
_
2
+x is clearly of the rst order but of second degree.
4. Item 4 written as
_
1 +
_
dy
dx
_
2
_
3
= c
2
_
d
2
y
dx
2
_
2
is of the second order and second degree.
1.2 Solution of Dierential Equations
A solution of a dierential equation is a relation between the variables which satises the given
dierential equation.
y = Acos(nx +)
is a solution of
d
2
y
dx
2
+ny
2
= 0
The general (or complete) solution of a dierential equation is that in which the number of
arbitrary constants are equal to the order of the dierential equation. Thus y = Acos(nx + ) is
3
a solution for
d
2
y
dx
2
+ny
2
= 0 as the number of arbitrary constants (A, ) are the same as the order
of
d
2
y
dx
2
+ny
2
= 0.
A particular solution is a solution that can be obtained from general solution by giving
particular values to the arbitrary constants. For example
y = Acos(nx +/4)
is the particular solution of the equation
d
2
y
dx
2
+ ny
2
= 0 as it can be derived from the general
solution y = Acos(nx +) by putting = /4.
A dierential equation may sometimes have an additional solution which cannot be obtained
from the general solution by assigning a particular value to the arbitrary constant. Such a solution
is called a singular solution.
1.3 Linearly Independent Solution
Two solutions y
1
(x) and y
2
(x) of the dierential equation
d
2
y
dx
2
+P(x)
dy
dx
+Q(x)y = 0
are said to be linearly independent if c
1
y
1
(x) +c
2
y
2
(x) = 0 such that c
1
= 0 and c
2
= 0.
If c
1
and c
2
are not both zero, then the two solutions y
1
(x) and y
2
(x) are said to be linearly
dependent.
If y
1
(x) and y
2
(x) any two solutions of
d
2
y
dx
2
+P(x)
dy
dx
+Q(x)y = 0, then their linear combination
c
1
y
1
(x) +c
2
y
2
(x) where c
1
and c
2
are constants, is also a solution of
d
2
y
dx
2
+P(x)
dy
dx
+Q(x)y = 0.
4
2 First Order and First Degree ODEs
Some special methods to nd solutions for these ODEs will be discussed here,
1. Separation of Variables
2. Homogeneous equations
3. Linear equations
4. Exact equations.
2.1 Separation of Variables
If in an equation, it is possible to collect all function of x and dx on one side and all the functions
of y and dy on the other side, then the variables are said to be separable. Thus the general form
of such equation is
f(x)dx = g(y)dy
Integrating both sides, we get
_
f(x)dx =
_
g(y)dy +c
as its solution.
Example 1
Solve
dy
dx
=
x(2 log x + 1)
sin y +y cos y
We separate them into
(sin y +y cos y)dy = (x(2 log x + 1))dx
Integrating both side, we get
_
sin ydy +
_
y cos ydy = 2
_
log x xdx + 2
_
xdx
cos y +
_
y sin y
_
sin y 1dy +c
_
= 2
__
log x
x
2
2
_
1
x
x
2
2
dx
_
+
x
2
2
_
cos y +y sin y + cos y +c = 2x
2
log x
x
2
2
+
x
2
2
Hence the solution is
2x
2
log x y sin y = c
Example 2
Solve
dy
dx
= e
3x2y
+x
2
e
2y
We separate them into
e
2y
dy = (e
3x
+x
2
)dx
5
Integrating both side, we get
_
e
2y
dy =
_
(e
3x
+x
2
)dx +c
e
2y
2
=
e
3x
3
+
x
3
3
+c
Hence the solution is
3e
2y
= 2(e
3x
+x
3
) + 6c
Example 3
Solve
dy
dx
= sin(x +y) + cos(x +y)
Setting x +y = t so that dy/dx = dt/dx 1. The given equation becomes
dt
dx
1 = sin t + cos t
dx =
dt
1 + sin t + cos t
Integrating both side, we get
_
dx =
_
dt
1 + sin t + cos t
+c
x =
_
2d
1 + sin 2 + cos 2
+c (setting t = 2)
=
_
2d
2 cos
2
+ 2 sin cos
c
=
_
sec
2
1 + tan
d +c
= log(1 + tan ) +c
Hence the solution is
x = log
_
1 + tan
1
2
(x +y)
_
+c
Example 4
Solve
y
x
dy
dx
+
x
2
+y
2
1
2(x
2
+y
2
) + 1
= 0
Setting x
2
+y
2
= t, we get
2x + 2y
dy
dx
=
dt
dx
or
y
x
dy
dx
=
1
2x
dt
dx
1
6
The given equation becomes
1
2x
dt
dx
1 +
t 1
2t + 1
= 0
1
2x
dt
dx
= 1
t 1
2t + 1
=
t + 2
2t + 1
2xdx =
2t + 1
t + 2
dt
2xdx =
_
2
3
t + 2
_
dt
Integrating both side, we get
_
2xdx =
_ _
2
3
t + 2
_
dt +c
x
2
= 2t 3 log(t + 2) +c
Hence the solution is
x
2
+ 2y
2
3 log(x
2
+y
2
+ 2) +c = 0
2.2 Homogeneous Equations
Homogeneous equations are of the form
dy
dx
=
f(x, y)
g(x, y)
where f(x, y) and g(x, y) are homogeneous functions of the same degree in x and y.
To solve a homogeneous equation,
1. Set y = ux, then
dy
dx
= u +x
du
dx
2. Separate the variables u and x, and integrate.
Example 1
Solve
(x
2
y
2
)dx xydy = 0
Rearrange the equation, we get
dy
dx
=
x
2
y
2
xy
Setting y = ux, then
dy
dx
= u +x
du
dx
, the equation becomes,
u +x
du
dx
=
1 u
2
u
x
du
dx
=
1 2u
2
u
Separating the variables, we get
u
1 2u
2
du =
dx
x
7
Integrating both sides, we get
_
u
1 2u
2
du =
_
dx
x
+c
1
4
_
4u
1 2u
2
du =
_
dx
x
+c
1
4
log(1 2u
2
) = log x +c
4 log x + log(1 2u
2
) = 4c
log x
4
(1 2u
2
) = 4c
x
4
_
1 2
y
2
x
2
_
= e
4c
= c
(Set u = y/x)
Hence the solution is
x
2
(x
2
2y
2
) = c
Example 2
Solve _
xtan
y
x
y sec
2
y
x
_
dx +
_
xsec
2
y
x
_
dy = 0
The equation can be rearrange into homogeneous equation
dy
dx
=
_
y
x
sec
2
y
x
tan
y
x
_
cos
2
y
x
Setting y = ux, then
dy
dx
= u +x
du
dx
, the equation becomes,
u +x
du
dx
= (usec
2
u tan u) cos
2
u
x
du
dx
= u tan ucos
2
u u
Separating the variables, we get
sec
2
u
tan u
du =
dx
x
Integrating both side, we get
_
sec
2
u
tan u
du =
_
dx
x
log tan u = log x + log c
xtan u = c
Hence the solution is
xtan
y
x
= c
Example 3
Solve
(1 +e
x/y
)dx +e
x/y
_
1
x
y
_
dy = 0
8
Rewrite the equation into its homogeneous form, we get
dx
dy
=
e
x/y
_
1
x
y
_
(1 +e
x/y
)
Setting x = uy, then
dx
dy
= u +y
du
dy
, the equation becomes
u +y
du
dy
=
e
u
(1 u)
(1 +e
u
)
y
du
dy
=
e
u
(1 u)
(1 +e
u
)
u =
u +e
u
(1 +e
u
)
Separating the variables, we get
dy
y
=
1 +e
u
u +e
u
du =
d(u +e
u
)
u +e
u
Integrating both side, we get
_
dy
y
=
_
d(u +e
u
)
u +e
u
log y = log(u +e
u
) +c
y(u +e
u
) = e
c
= c
x +b
y +c
=
b
b
Setting
x = X +h, y = Y +k, (h, k are constants)
and
dx = dX, dy = dY
the equation becomes
dY
dX
=
aX +bY + (ah +bk +c)
a
X +b
Y + (a
h +b
k +c
)
we choose h and k so that
dY
dX
become homogeneous equation.
Set ah +bk +c = 0 and a
h +b
k +c
= 0 so that
h
bc
c
=
k
ca
a
=
1
ab
ba
or
h =
bc
c
ab
a
, and k =
ca
a
ab
ba
9
Thus when ab
ba
= 0,
dY
dX
becomes
dY
dX
=
aX +bY
a
X +b
Y
which is homogeneous in X, Y and be solved by setting Y = uX.
Example
Solve
dy
dx
=
y +x 2
y x 4
Setting
x = X +h, y = Y +k, (h, k are constants)
and
dx = dX, dy = dY
the equation becomes
dy
dx
=
y +x + (k +h 2)
y x + (k h 4)
Letting k + h 2 = 0 and k h 4 = 0, then h = 1 and k = 3 then the equation will be
dY
dX
=
Y +X
Y X
which is homogeneous in X and Y .
Setting Y = uX, then
dY
dX
= u +X
du
dX
, the equation becomes,
u +X
du
dX
=
u + 1
u 1
X
du
dX
=
1 + 2u u
2
u 1
u 1
1 + 2u u
2
du =
dX
X
Integrating both sides, we get
1
2
_
2 2u
1 + 2u u
2
du =
_
dX
X
1
2
log(1 + 2u u
2
) = log X +c
log
_
1 +
2Y
X
2
Y
2
X
2
_
+ log X
2
= 2c
log(X
2
+ 2XY Y
2
) = 2c
X
2
+ 2XY Y
2
= e
2c
= c
x
2
+ 2xy y
2
4x + 8y 14 = c
=
b
b
When ab
ba
=
b
b
=
1
m
or
a
= am, b
= bm
then
dy
dx
becomes
dy
dx
=
(ax +by) +c
m(ax +by) +c
dt
dx
= a +
bt +bc
mt +c
=
(am+b)t +ac
+bc
mt +c
so the variables are separable. In the solution, setting t = ax +by, we get the required solution of
dy
dx
Example
Solve
(3y + 2x + 4)dx (4x + 6y + 5)dy = 0
The equation can be rearrange as
dy
dx
=
(2x + 3y) + 4
2(2x + 3y) + 5
Setting 2x + 3y = t, then 2 + 3
dy
dx
=
dt
dx
The equation becomes,
1
3
_
dt
dx
2
_
=
t + 4
2t + 5
dt
dx
=
7t + 22
2t + 5
2t + 5
7t + 22
dt = dx
Integrating both sides,
_
2t + 5
7t + 22
dt =
_
dx
_ _
2
7
9
7
1
7t + 22
_
= x +c
2
7
t
9
49
log(7t + 22) = x +c
Setting t = 2x + 3y, we have
14(2x + 3y) 9 log(14x + 21y + 22) = 49x + 49c
21x 42y + 9 log(14x + 21y + 22) = c
Pdx
, so we get
dy
dx
e
Pdx
+y
_
e
Pdx
P
_
= Qe
Pdx
d
dx
_
ye
Pdx
_
= Qe
Pdx
Integrating both side, we get
ye
Pdx
=
_
Qe
Pdx
+c
as the required solution.
Example 1
Solve
(x + 1)
dy
dx
y = e
3x
(x + 1)
2
Divide the equation with (x + 1), we get
dy
dx
y
x + 1
= e
3x
(x + 1)
Here P =
1
x+1
and
_
Pdx =
_
dx
x + 1
= log(x + 1) = log(x + 1)
1
The integrating factor is
e
Pdx
= e
log(x+1)
1
=
1
x + 1
Thus the solution for the equation is
y
x + 1
=
_
[e
3x
(x + 1)]
1
x + 1
dx +c
=
_
e
3x
dx +c
=
1
3
e
3x
+c
So the solution is
y =
_
1
3
e
3x
+c
_
(x + 1)
12
Example 2
Solve
_
e
2
x
_
dx
dy
= 1
Rewrite the equation into
dy
dx
+
y
x
=
e
2
x
where P =
1
x
and
_
Pdx =
_
1
x
= 2
x
then the integrating factor becomes e
Pdx
= e
2
x
The solution for the equations is
y e
2
x
=
_
e
2
x
e
2
x
dx +c
=
_
1
x
dx +c
So the solution is
y e
2
x
= 2
x +c
Example 3
Solve
3x(1 x
2
)y
2
dy
dx
+ (2x
2
1)y
3
= ax
3
Setting z = y
3
and 3y
2 dy
dx
=
dz
dx
, the equation becomes
x(1 x
2
)
dz
dx
= (2x
2
1)z = ax
3
dz
dx
+
2x
2
1
x x
3
z =
ax
3
x x
3
Here P =
2x
2
1
xx
3
and
_
Pdx =
_
2x
2
1
x x
3
dx
=
_ _
1
x
1
2
1
1 +x
+
1
2
1
1 x
_
dx
= log x
1
2
log(1 +x)
1
2
log(1 x)
= log
_
x
_
1 x
2
_
The integrating factor is
exp
__
2x
2
1
x x
3
dx
_
= e
log[x
1x
2
]
=
_
x
_
1 x
2
_
1
13
So the solution is
z
_
x
1 x
2
= a
_
x
3
x(1 x
2
)
1
x
1 x
2
dx +c
= a
_
x(1 x
2
)
3/2
dx +c
=
a
2
_
(2x)(1 x
2
)
3/2
dx +c
z
_
x
1 x
2
= a(1 x
2
)
1/2
+c
Inserting z = y
3
, we get
y
3
= ax +cx
_
1 x
2
2.3.1 Bernoullis Equation
The equation
dy
dx
+Py = Qy
n
where P, Q are function of x is reducible to linear equation of the rst order. This is a Bernoullis
equation.
To solve it, we divide both sides with y
n
so that
y
n
dy
dx
+Py
1n
= Q
Setting y
1n
= z so that
(1 n)y
n
dy
dx
=
dz
dx
Then, the equation becomes
1
1 n
dz
dx
+Pz = Q
dz
dx
+P(1 n)z = Q(1 n)
which is a linear equation of the rst order and can be solved easily.
Example
Solve
x
dy
dx
+y = x
3
y
6
.
Divide both sides with xy
6
, we get
y
6
dy
dx
+
y
5
x
= x
2
Setting y
5
= z and
5y
6
dy
dx
=
dz
dx
The equation becomes
1
5
dz
dx
+
z
x
= x
2
dz
dx
5
x
z = 5x
2
14
which is the same as
dy
dx
+Py = Q pattern. So we can use the integrating factor.
Integrating factor is
e
Pdx
= e
(5/x)
dx
= e
5 log x
= e
log x
5
= x
5
The solution is
z x
5
=
_
(5x
2
) x
5
dx +c
y
5
x
5
= 5
x
2
2
+c
Divide both side with y
5
x
5
, we get
1 = (2.5 +cx
2
)x
3
y
5
which is the required solution.
2.4 Exact Dierential Equations
A dierential equation of the form
M(x, y)dx +N(x, y)dy = 0
is said to be exact if its left hand side member is the exact dierential of some function u(x, y)
which is
du Mdx +Ndy = 0
The solution is therefore
u(x, y) = c
From calculus, we see that the partial derivatives of u(x, y) is
du =
u
x
dx +
u
y
dy
Comparing with du Mdx +Ndy, then we see that
u
x
= M
u
y
= N
If we dierentiate M with respect to y and N with respect to x, we get
M
y
=
2
u
yx
N
x
=
2
u
xy
or
M
y
=
N
x
We integrate
u
x
= M with respect to x, we get
u =
_
Mdx +k(y) k(y) is a constant
15
To determine k(y), we derive
u
y
from this equation, and use
u
y
= N to get dk/dy, and integrate
dk/dy to get k.
Example
Solve
cos(x +y)dx + (3x
2
+ 2y + cos(x +y))dy = 0
Test for exactness
M = cos(x +y)
N = (3x
2
+ 2y + cos(x +y))
Thus
M
y
= sin(x +y)
N
x
= sin(x +y)
So the equation is exact.
Implicit general solution
u =
_
Mdx +k(y)
=
_
cos(x +y)dx +k(y)
= sin(x +y) +k(y)
To nd k(y), we dierentiate u = sin(x +y) +k(y) with respect to y, we get
u
y
= cos(x +y) +
dk
dy
N = 3y
2
+ 2y + cos(x +y)
So,
dk
dy
is
dk
dy
= 3y
2
+ 2y
By integration k(y) is
k(y) = y
3
+y
2
+c
Inserting k(y) into u = sin(x +y) +k(y), we obtain the answer
u(x, y) = sin(x +y) +y
3
+y
2
= c
2.4.1 Reduction to Exact Form, Integrating Factor
We can transform a non-exact equation,
P(x, y)dx +Q(x, y)dy = 0
by multiplying it with a function F(x, y) producing an exact equation
FPdx +FQdy = 0
16
which can be solve by using the method from the previous section. F(x, y) is called Integrating
Factor.
How to nd Integrating factor
For Mdx + Ndy = 0, the exactness condition is M/y = N/x. For F(x) and FPdx +
FQdy = 0, the exactness condition is
(FP)/y = (FQ)/x
By product rule, we get
FP
y
= F
Q+FQ
x
Dividing by FQ and rearrange, we get
1
F
dF
dx
= R where R =
1
Q
_
P
y
Q
x
_
If we integrate the equation with respect to x and taking the exponent on both side, we get
the integrating factor which is
F(x) = exp
_
R(x)dx
and if our initial is F(y), we get
F(y) = exp
_
R(y)dy where R(y) =
1
P
_
Q
x
P
y
_
Example
Find an integrating factor and solve the initial value problem of
(e
x+y
+ye
y
)dx + (xe
y
1)dy = 0, y(0) = 1
Test for exactness
P
y
= e
x+y
+e
y
+ye
y
Q
x
= e
y
Since
P
y
=
Q
x
, so we have to nd the integrating factor to make it an exact equation.
R(x) fail, since it on both x and y, so we have to use R(y), which is
R(y) =
1
P
_
Q
x
P
y
_
=
1
e
x+y
+ye
y
(e
y
(e
x+y
+e
y
+ye
y
))
= 1
Hence the integrating factor is F(y) = exp
_
1dy = e
1
. Multiplying the integrating factor to
the original equation, we get
(e
x
+y)dx + (x e
y
)dy = 0
17
which is an exact equation and be solve using the previous method.
u =
_
(e
x
+y)
= e
x
+xy +k(y)
u
y
= x +
dk
dy
= N = x e
y
dk
dy
= e
y
k = e
y
+c
Hence, the general solution is
u(x, y) = e
x
+xy +e
y
= c
The particular solution is
u(0, 1) = e
0
+ 0 1 +e
1
= 3.72
e
x
+xy +e
y
= 3.72
3 Second Order Linear Dierential Equation
3.1 Homogeneous Linear ODEs with Constant Coecients
A second-order homogeneous linear ODEs with constant coecient is
y
+ay
+by = 0
The solution is
y = e
x
y
= e
x
y
=
2
e
x
If we put into the equation and rearrange, we will get
(
2
+a +b)e
x
= 0
Hence is a solution of the important characteristic equation
2
+a +b = 0
The roots for this quadratic equation is
1
=
1
2
(a +
_
a
2
4b)
2
=
1
2
(a
_
a
2
4b)
then the function
y
1
= e
1
x
y
2
= e
2
x
are solutions for second-order homogeneous linear ODEs with constant coecient.
From algebra, we know that the quadratic equation might have three dierent kind of roots,
depending on the sign of the discriminant a
2
4b, which are
1. Two real roots if a
2
4b > 0.
2. A real double root if a
2
4b = 0.
18
3. Complex conjugate roots if a
2
4b < 0
Case I: Two Distinct Real Root
1
and
2
In this case, the basic solution is
y
1
= e
1
x
and y
2
= e
2
x
and the general solution is
y = c
1
e
1
x
+c
2
e
2
x
Example
Solve the initial value problem
y
+y
2y = 0, y(0) = 4, y
(0) = 5
The characteristics equation is
2
+ 2 = 0
Its roots are,
1
= 1 and
2
= 2
So the general equation is
y = c
1
e
x
+c
2
e
2x
For nding particular solution, we dierentiate once
y
= c
1
e
x
2c
2
e
2x
and using the initial condition, we get
y = e
x
+ 3e
2x
Case II: Real Double Root = a/2
When a
2
4b = 0 we only get one root, =
1
=
2
= a/2, hence the only solution is
y
1
= e
(a/2)x
To obtain the second independent solution y
2
, we set y
2
= uy
1
. Substitute this and its derivative
y
2
and y
2
, we get
(u
y
1
+ 2u
+uy
1
) + (a(u
y
1
+uy
1
) +buy
1
= 0
Collecting term
u
y
1
+u
(2y
1
+ay
1
) +u(y
1
+ay
1
+by
1
) = 0
The second and third expression is zero, so we are left with
u
y
1
= 0
By two integrations, we get
u = c
1
x +c
2
19
we choose c
1
= 1 and c
2
= 0 then u = x, so y
2
= xy
1
, so the general solution is
y = (c
1
+c
2
x)e
(a/2)x
Example
Solve the initial value problem
y
+y
(0) = 3.5
The characteristic equation is
2
+ + 0.25 = ( + 0.5)
2
= 0
It has double root = 0.5, this give the general solution as
y = (c
1
+c
2
x)e
0.5x
Taking the derivative and nd c
1
and c
2
, so we get the particular solution as
y = (3 2x)e
0.5x
Case III: Complex Roots
1
2
+i and
1
2
i
The discriminant is a
2
4b < 0, two complex roots, or we can obtain a real solution by using
y
1
= e
ax/2
cos x and y
2
= e
ax/2
sin x
where = b
1
4
a
2
. The real general solution for Case III is
y = e
ax/2
(Acos x +Bsin x)
where A, B are arbitrary constants.
Example
Solve the initial value problem
y
+ 0.4y
+ 9.04y = 0, y(0) = 0, y
(0) = 3
The characteristic equation is
2
+ 0.4 + 9.04 = 0
so the roots are
1
= 0.2 + 3i and
1
= 0.2 3i. Hence = 3. The general solution is
y = e
0.2x
(Acos 3x +Bsin 3x)
Dierentiate the general solution and using the initial value, we get the particular solution as
y = e
0.2x
sin 3x
20
3.2 Non-homogeneous ODEs
A general solution for a non-homogeneous ODEs
y
+p(x)y
+ay
+by = r(x)
when r(x) is an exponential function, a power of x, a cosine or sine, or sums or products of such
functions. These functions have derivative similar to r(x) itself. So, we choose a form for y
p
similar
to r(x), but with unknown coecients to be determined by substituting y
p
and its derivatives into
the ODE. Table below shows the choice for y
p
for important form of r(x).
Term in r(x) Choice for y
p
ke
x
Ce
x
kx
n
(n = 0, 1, ) K
n
x
n
+K
n1
x
n1
+ +K
1
x +K
0
k cos x K cos x +M sin x
k sin x K cos x +M sin x
ke
x
cos x e
x
(K cos x +M sin x)
ke
x
sin x e
x
(K cos x +M sin x)
And the choice of rules for the method of undetermined coecients are
1. Basic Rule: If r(x) is one of the functions in the rst column from the table, choose y
p
from the same line and determine the coecients by substituting y
p
and its derivatives into
the equation
2. Modication rule: If a term in our choice for y
p
happens to be a solution of the ho-
mogeneous ODE corresponding to the equation, we multiply the choice of y
p
by x or x
2
etc.
3. Sum Rule: If r(x) is a sum of functions in the rst column of the table; we choose y
p
by
summing up the functions in the corresponding line.
Example 1: Rule 1
Solve the initial value problem
y
+y = 0.001x
2
, y(0) = 0, y
(0) = 1.5
The general solution for homogeneous ODE y
+y = 0 is
y
h
(x) = Acos x +Bsin x
Solution for non-homogeneous ODE, setting y
p
= Kx
2
, then y
p
= 2K. Substitute into the
equation, we get
2K +Kx
2
= 0.001x
2
21
Comparing both sides, we see that
2K = 0, K = 0.001
which the value of K contradict each other, so y
p
= Kx
2
is not the solution for this equation.
Looking from the table, the choice of y
p
for the term r(x) = Kx
n
is y
p
= K
2
x
2
+ K
1
x + K
0
,
then
y
p
+y
p
= 2K
2
+ 2K
2
x
2
+K
1
x +K
0
= 0.001x
2
Comparing both sides, we get
K
2
= 0.001, K
1
= 0, K
0
= 0.002
This gives
y
p
= 0.001x
2
0.002
and the general solution becomes,
y = y
h
+y
p
= Acos x +Bsin x + 0.001x
2
0.002
To nd the value for A and B, we use the initial condition
y(0) = Acos 0 +Bsin 0 + 0.001(0)
2
0.002
= A0.002 = 0
So, A = 0.002. To nd B, we dientiate the general solution once and put the initial condition
y
= y
h
+y
p
= Asin x +Bcos x + 0.002x
y
+ 3y
+ 2.25y = 10e
1.5x
, y(0) = 1, y
(0) = 0
The general solution for the homogeneous ODE,
y
+ 3y
+ 2.25y = 0
where
2
+ 3 + 2.25 = ( + 1.5)
2
= 0 is
y
h
= (c
1
+c
2
x)e
1.5x
The solution of non-homogeneous ODE cannot be taken as y
p
= Ce
1.5x
since this a solution
for homogeneous ODE. So, by using rule number 2, we modify our choice function by x
2
. That is,
we use
y
p
= Cx
2
e
1.5x
y
p
= C(2x 1.5x
2
)e
1.5x
y
p
= C(2 3x 3x + 2.25x
2
)e
1.5x
22
Substitute these equations into the main equation, by ignoring the e
1.5x
, we get
C(2 6x + 2.25x
2
) + 3C(2x 1.5x
2
) + 2.25Cx
2
e
1.5x
= 10
Comparing both sides, we get 2C = 10, so C = 5 and the solution is
y
p
= 5x
2
e
1.5x
Hence the general equation becomes
y = y
h
+y
p
= (c
1
+c
2
x)e
1.5x
5x
2
e
1.5x
Using the initial condition to nd c
1
and c
2
, we get
c
1
= 1, and c
2
= 1.5
This give the answer which is
y = (1 + 1.5x)e
1.5x
5x
2
e
1.5x
Example 3: Rule 3
Solve the initial value problem
y
+ 2y
+ 5y = e
0.5x
+ 40 cos 10x 190 sin 10x, y(0) = 0.16, y
(0) = 40.08
The general solution for homogeneous ODE y
+2y
2
+ 25 = ( + 1 + 2i)( + 1 2i) = 0
is
y
h
= e
x
(Acos 2x +Bsin 2x)
The solution for non-homogeneous ODE, we choose our y
p
as summation of two function from
the table, that is
y
p
= Ce
0.5x
+K cos 10x +M sin 10x
Substitute into the equation and comparing both side, we get
C = 0.16, K = 0, M = 2
Hence the solution is
y = y
h
+y
p
= e
x
(Acos 2x +Bsin 2x) + 0.16e
0.5x
+ 2 sin 10x
From the initial condition, we found that A = 0 and B = 10, hence the complete solution is
y = 10e
x
sin 2x + 0.16e
0.5x
+ 2 sin 10x
3.2.2 Method of Variation of Parameters
A particular solution y
p
for non-homogeneous linear ODE where r(x) is not an exponential function
e
x
, a power of x, a cosine or sine, or sums or products of such functions can be determine by using
the following formula
y
p
(x) = y
1
_
y
2
r(x)
W
dx +y
2
_
y
1
r(x)
W
dx
23
where y
1
and y
2
are solutions for the corresponding homogeneous ODE,
y
+P(x)y
+Q(x)y = 0
and W is the Wronskian of y
1
, y
2
,
W = y
1
y
2
y
2
y
1
Example
Solve the non-homogeneous ODE
y
+y = sec x
From the homogeneous solution we get y
1
= cos x and y
2
= sin x. Using these information, we
can get the Wronskian as
W = cos x cos x sin x (sin x) = 1
By using the formula, y
p
is
y
p
= cos x
_
sin x sec x
1
dx + sin x
_
cos x sec x
1
dx
= cos xln | cos x| +xsin x
The complete solution will be
y = y
h
+y
p
= c
1
cos x +c
2
sin x + cos xln | cos x| +xsin x
y = (c
1
+ ln | cos x|) cos x + (c
2
+x) sin x
4 Other Types of ODE
4.1 ODE with y is missing
The equation which do not contain y directly can be written as
f
_
d
2
y
dx
2
,
dy
dx
, x
_
= 0
on substituting
dy
dx
= p
d
2
y
dx
2
=
dp
dx
we get
f
_
dp
dx
, p, x
_
= 0
24
Example
Find the solution for this ODE
(1 x
2
)D
2
xD = 2
By setting
dy
dx
= p and
d
2
y
dx
2
=
dp
dx
, we get
(1 x
2
)
dp
dx
xp = 2
dp
dx
x
1 x
2
p =
2
1 x
2
Integrating factor is
I.F = e
x
1x
2
= e
1/2log(1x
2
)
= e
log
1x
2
=
_
1 x
2
Hence, the solution is
p
_
1 x
2
= 2
_
1 x
2
1 x
2
dx
=
_
2
1 x
2
dx
= 2 sin
1
x +c
1
or p =
2 sin
1
x
1 x
2
+
c
1
1 x
2
or
dy
dx
=
2 sin
1
x
1 x
2
+
c
1
1 x
2
On integrating with respect to x, we get
y = (sin
1
x)
2
+c
1
sin
1
x +c
2
4.2 ODE with x is missing
The equations that do not contain x directly are of the form
f
_
d
2
y
dx
2
,
dy
dx
, y
_
= 0
On substituting
dy
dx
= p
d
2
y
dx
2
=
dp
dx
=
dp
dy
dy
dx
d
2
y
dx
2
=
dp
dy
p
25
we get
f
_
dp
dx
, p, y
_
= 0
Example
Solve the following equation
y
d
2
y
dx
2
+
_
dy
dx
_
2
=
dy
dx
Put
dy
dx
= p and
d
2
y
dx
2
=
dp
dy
p into the equation, we get
y
dp
dy
p + (p)
2
= p
or y
dp
dy
= 1 p
or
dp
1 p
=
dy
y
or log(1 p) = log y + log c
1
or
1
1 p
= c
1
y
or p = 1
1
c
1
y
or
dy
dx
=
c
1
y 1
c
1
y
dy
dx
= p
or
c
1
y
c
1
y 1
dy = dx
or
_
1 +
1
c
1
y 1
_
dy = dx
y +
1
c
1
log(c
1
y 1) = x +c
2
4.3 Equation of the type
d
2
y
dx
2
= f(y)
Multiplying with 2
dy
dx
, we get
2
dy
dx
d
2
y
dx
2
= 2
dy
dx
f(y)
Integrating with respect to x, we get
_
dy
dx
_
2
= 2
_
f(y)dy +c
1
= (y), (y) = 2
_
f(y)dy +c
1
dy
dx
=
_
(y)
dy
_
(y)
= dx
So the solution is
_
dy
_
(y)
= x +c
2
26
Example
Solve the following equation
d
2
y
dx
2
=
y, y(0) = 1, y
(0) =
2
3
Multiplying with 2
dy
dx
, we get
2
dy
dx
d
2
y
dx
2
= 2
dy
dx
y
Integrating with respect to x,we get
_
dy
dx
_
2
=
4
3
y
3/2
+c
1
=
4
3
y
3/2
, c
1
= 0 using IVP
dy
dx
=
2
3
y
3/4
y
3/4
dy =
2
3
dx
Integrating both side and using IVP values, we get
y
1/4
=
2
3
x +c
2
=
2
3
x + 1, c
2
= 1 using IVP
4.4 Euler-Cauchy Equation
An equation of the form
a
2
x
2
d
2
y
dx
2
+a
1
x
dy
dx
+a
0
y = r(x)
where a
0
, a
1
anda
2
are constants is called Euler-Cauchy Equation. We will discuss two method
which can be use to solve this equation.
4.4.1 Method 1: Using substitution x = e
z
An Euler-Cauchy equation can be reduced to a linear equation with constant coecients by chang-
ing the independent variable from x to z where
x = e
z
, z = log x,
d
dz
= D
For x
dy
dx
dy
dx
=
dy
dz
dz
dx
=
1
x
dy
dz
x
dy
dx
=
dy
dz
x
dy
dx
= Dy
27
And for x
2 d
2
y
dx
2
, we get
d
2
y
dx
2
=
d
dx
_
dy
dx
_
=
d
dx
_
1
x
dy
dz
_
=
1
x
2
dy
dz
+
1
x
d
2
y
dz
2
dz
dx
=
1
x
2
dy
dz
+
1
x
d
2
y
dz
2
1
x
=
1
x
2
_
d
2
y
dz
2
dy
dz
_
=
1
x
2
(D
2
D)y
x
2
d
2
y
dx
2
= (D
2
D)y
Substitution of x
dy
dx
= Dy and x
2 d
2
y
dx
2
= (D
2
D)y into the rst equation will reduces equation
into a dierential equation with constant coecients.
Example
Solve the following equation
x
2
d
2
y
dx
2
2x
dy
dx
4y = x
4
Set
x = e
z
, z = log x,
d
dz
= D, x
dy
dx
= Dy, x
2
d
2
y
dx
2
= (D
2
D)y
The equation becomes
D(D 1)y 2Dy 4y = e
4z
(D
2
3D 4)y = 0
Since m
1
= 1 and m
2
= 4, then the homogeneous solution is
y
h
(z) = c
1
e
z
+c
2
e
4z
And by using method of undetermined coecient where we set y
p
= Cxe
4z
, the non-homogeneous
solution is
(D
2
3D 4)y = 8Ce
4z
+ 16Cze
4z
3(Ce
4z
+ 4Cze
4z
) 4Cze
4z
= 5Ce
4z
e
4z
= 5Ce
4z
Comparing both side, we get C =
1
5
, thus particular solution is
y
p
(z) =
1
5
ze
4z
So the solution is
y(z) = y
h
(z) +y
p
(z)
= c
1
e
z
+c
2
e
4z
+
ze
4z
5
28
But since our original independent variable is x, we substitute back x = e
z
and z = ln x into the
equation to get our nal solution,
y(x) =
c
1
x
+c
2
x
4
+
1
5
x
4
ln x
4.4.2 Method 2: Using y = x
m
We write the Euler-Cauchy equation in the form
x
2
y
+axy
+by = 0
Substituting
y = x
m
y
= mx
m1
y
= m(m1)x
m2
into Euler-Cauchy equation, we get
x
2
m(m1)x
m2
+axmx
m1
+bx
m
= 0 or
m(m1) +am+b = 0
m
2
+ (a 1)m+b = 0
The roots are calculated using this formula
m
1
=
1
2
(1 a) +
_
1
4
(1 a)
2
b
m
2
=
1
2
(1 a)
_
1
4
(1 a)
2
b
Case I: Real roots, m
1
= m
2
If the roots m
1
and m
2
are real and dierent, the solutions are
y
1
= x
m
1
, y
2
= x
m
2
and the general solution will be
y = c
1
x
m
1
+c
2
x
m
2
Example
Solve the following Euler-Cauchy equation
x
2
y
+ 1.5xy
0.5y = 0
the auxiliary equation is
m
2
+ (1.5 1)m0.5 = 0
The roots are m
1
= 0.5 and m
2
= 1, so the general solution is
29
y = c
1
x +
c
2
x
Case II: Real double roots, m
1
= m
2
The rst solution is (from m
1
=
1
2
(1 a))
y
1
= x
(1a)/2
To nd a second linearly independent solution, we use the reduction of order method by setting
y
2
= u y
1
where we get
u =
_
1
y
2
1
exp
_
_
p dx
_
dx
where p =
a
x
, which after some manipulation, we get u as
u = ln x
Therefore, the second linearly independent solution is
y
2
= u y
1
= ln x x
(1a)/2
Then, the general solution will be
y = (c
1
+c
2
ln x)x
(1a)/2
Example
Solve the Euler-Cauchy equation
x
2
y
5xy
+ 9y = 0
Answer
The auxiliary equation is
m
2
6m+ 9 = 0
which give double real roots m
1
= m
2
= 3, so the general solution is
y = (c
1
+c
2
ln x)x
3
Case III: Complex Roots, m
1,2
= i
We show one example
Example
Solve the Euler-Cauchy equation
x
2
y
+ 0.6xy
+ 16.04y = 0
30
the auxilirary equation is
m
2
0.4m+ 16.04 = 0
which give complex roots
m
1
= 0.2 + 4i
m
2
= 0.2 4i
The basis solution
y
1
= x
m
1
= x
0.2+4i
= x
0.2
(e
ln x
)
4i
= x
0.2
e
(4 ln x)i
y
2
= x
m
2
= x
0.24i
= x
0.2
(e
ln x
)
4i
= x
0.2
e
(4 ln x)i
Using Eulers Formula and t = 4 ln x, we get
y
1
= x
m
1
= x
0.2
[cos(4 ln x) +i sin(4 ln x)]
y
2
= x
m
2
= x
0.2
[cos(4 ln x) i sin(4 ln x)]
After some manipulation we get (try to prove yourself)
y
1
= x
0.2
cos(4 ln x)
y
2
= x
0.2
sin(4 ln x)
Hence the general solution is
y = x
0.2
[Acos(4 ln x) +Bsin(4 ln x)
4.5 One Solution is Known
If y = u is a given solution belonging to the homogeneous equation of the dierential equation,
then put y = u v is other solution for dierential equation. Let
d
2
y
dx
2
+P(x)
dy
dx
+Q(x)y = R(x) (1)
Since u is a solution of the dierential equation, we can write
d
2
u
dx
2
+P(x)
du
dx
+Q(x)u = 0
For y = u v
y = u v
dy
dx
= v
du
dx
+u
dv
dx
d
2
y
dx
2
= v
d
2
u
dx
2
+ 2
dv
dx
du
dx
+u
d
2
v
dx
2
31
Substituting y,
dy
dx
and
d
2
y
dx
2
into (1), we get
v
d
2
u
dx
2
+ 2
dv
dx
du
dx
+u
d
2
v
dx
2
+P(x)
_
v
du
dx
+u
dv
dx
_
+Q(x)uv = R(x)
Rearrange, we get
v
_
d
2
u
dx
2
+P(x)
du
dx
+Q(x)u
_
+u
_
d
2
v
dx
2
+P(x)
dv
dx
_
+ 2
du
dx
dv
dx
= R(x)
The rst bracket is equal to 0, so the remaining equation divided by u, we get
d
2
v
dx
2
+P(x)
dv
dx
+
2
u
du
dx
dv
dx
=
R(x)
u
d
2
v
dx
2
+
_
P(x) +
2
u
du
dx
_
dv
dx
=
R(x)
u
Thus, the formula to nd v is
d
2
v
dx
2
+
_
P(x) +
2
u
du
dx
_
dv
dx
=
R(x)
u
(2)
Example
Solve the following equation, given that y = u = x is a homogeneous solution for this equation
d
2
v
dx
2
+
_
P(x) +
2
u
du
dx
_
dv
dx
=
R(x)
u
d
2
v
dx
2
+
_
2x(1 +x)
x
2
+
2
x
(1)
_
dv
dx
=
x
x
d
2
v
dx
2
2
dv
dx
= 1
or
dz
dx
2z = 1, z =
dv
dx
The last equation is linear dierential equation, its solution is
ze
2x
=
_
1 e
2x
dx +c
1
=
e
2x
2
+c
1
z =
1
2
+c
1
e
2x
dv
dx
=
1
2
+c
1
e
2x
dv = (
1
2
+c
1
e
2x
)dx
v =
x
2
+
c
1
2
e
2x
+c
2
Then, the complete solution y = u v is
y = u v = x
_
x
2
+
c
1
2
e
2x
+c
2
_
32
5 Higher Order Linear ODEs
An Higher Order ODE which can be written as below
y
n
+p
n1
(x)y
n1
+. . . +p
1
(x)y
+p
0
(x)y = r(x)
is called Higher Order Linear ODE. The general solution can be represent as
y(x) = c
1
y
1
(x) +. . . +c
n
y
n
(x).
5.1 Homogeneous Linear ODEs with Constant Coecients
We consider nth-order homogeneous linear ODEs with constant coecient which can write in form
y
n
+a
n1
y
n1
+. . . +a
1
y
+a
0
y = 0
Substituting y = e
x
, we obtain the characteristic equation,
n
+a
n1
n1
+. . . +a
1
+a
0
= 0
By factoring the equation or using other methods we can determine the roots for this equation.
Distinct Real Roots
If all the roots we get are real and dierent, (
1
=
2
= . . . =
n
), then the n solutions,
y
1
= e
1
x
, . . . , y
n
= e
n
x
cosntitute the basic solution for
y = c
1
e
1
x
+c
2
e
2
x
+. . . +c
n1
e
n1
x
+c
n
e
n
x
Example
Solve the ODE
y
2y
+ 2y = 0
Answer
The characteristic equation is
3
2
2
+ 2 = 0
The roots are
1
= 1,
2
= 1 and
3
= 2. Therefore, the general solution is
y = c
1
e
x
+c
2
e
x
+c
3
e
2x
Simple Complex Roots
If complex roots occur, they exist in conjugate pairs. Thus if = + i is a complex root
exist then it conjugate
+ 100y
100y = 0
Answer
The characteristic equation is
2
+ 100 100 = 0
The roots are
1
= 1,
2
= 10i and
2
= 10i which has a complex roots. The general solution
will be
y = c
1
e
x
+c
2
e
0x
cos 10x +c
3
e
0x
sin 10x
= c
1
e
x
+c
2
cos 10x +c
3
sin 10x
y = c
1
e
x
+Acos 10x +Bsin 10x
Multiple Real Roots
If among the nth roots we have a real double root occur, for example
1
=
2
, we take y
1
and
xy
1
as the corresponding linearly independent solutions.
In general, if we have as a real root of order m, the m corresponding linearly independent
solution are
e
x
, xe
x
, x
2
e
x
, . . . , x
m1
e
x
.
Example
Solve the ODE
y
3y
+ 3y
= 0
Answer
The characteristic equation is
5
3
4
+ 3
3
2
= 0
The roots are
1
=
2
= 0 and
3
=
4
=
5
= 1. So the general solution will be
y = c
1
+c
2
x + (c
3
+c
4
x +c
5
x
2
)e
x
Multiple Complex Roots
The general solution will be the same as Simple Complex Roots except if = + i is a
complex double root with corresponding linearly independent solutions are
34
e
x
cos(x), e
x
sin(x), xe
x
cos(x), xe
x
sin(x)
and the corresponding general solution are
y = e
x
[(A
1
+A
2
x) cos x + (B
1
+B
2
x) sin x]
5.2 Non-Homogeneous Linear ODEs
We consider nth-order non-homogeneous linear ODEs with constant coecient which can write in
form
y
n
+a
n1
y
n1
+. . . +a
1
y
+a
0
y = r(x)
The general solution is in the form
y(x) = y
h
(x) +y
p
(x)
where, y
h
(x) is the general solution for the corresponding homogeneous ODE. y
p
(x) is the
particular solution and can be found by using one of these methods.
1. Method of Undetermined Coecients (same as for Second Order ODE)
2. Method of Variation of Parameters
3. Annihilator Method (guessing y
p
pattern)
5.2.1 Method of Variation of Parameters
The particular solution for the non-homogeneous higher order ODEs can be determined using the
following formula
y
p
(x) =
n
k=1
y
k
(x)
_
W
k
(x)
W(x)
r(x) dx
= y
1
(x)
_
W
1
(x)
W(x)
r(x) dx +. . . +y
n
(x)
_
W
n
(x)
W(x)
r(x) dx
Example
Solve the non-homogeneous Euler-Cauchy equation
x
3
y
3x
2
y
+ 6xy
6y = x
4
ln x, (x > 0)
Answer
For general homogeneous solution, we use y = x
m
which give
m(m1)(m2) 3m(m1) + 6m6 = 0
The roots are 1, 2, 3 and give as a basis
y
1
= x, y
2
= x
2
, y
3
= x
3
.
Hence the corresponding general solution of the homogeneous ODE is
35
y
h
= c
1
x +c
2
x
2
+c
3
x
3
.
For particular non-homogeneous solution, we start by nding the Determinants
W =
x x
2
x
3
1 2x 3x
2
0 2 6x
= 2x
3
W
1
=
0 x
2
x
3
0 2x 3x
2
1 2 6x
= x
4
W
2
=
x 0 x
3
1 0 3x
2
0 1 6x
= 2x
3
W
3
=
x x
2
0
1 2x 0
0 2 1
= x
2
Putting all the result into the standard equation, we get
y
p
= y
1
(x)
_
W
1
(x)
W(x)
r(x) dx +y
2
(x)
_
W
2
(x)
W(x)
r(x) dx +y
3
(x)
_
W
3
(x)
W(x)
r(x) dx
= x
_
x
4
2x
3
xln xdx +x
2
_
2x
3
2x
3
xln xdx +x
3
_
x
2
2x
3
xln xdx
= x
_
x
2
xln xdx x
2
_
xln xdx +x
3
_
1
2x
xln xdx
=
x
2
_
x
3
3
ln x
x
3
9
_
x
2
_
x
2
2
ln x
x
2
4
_
+
x
3
2
(xln x x)
y
p
=
1
6
x
4
_
ln x
11
6
_
Hence the complete solution is
y = y
h
+y
p
= c
1
x +c
2
x
2
+c
3
x
3
+
1
6
x
4
_
ln x
11
6
_
5.2.2 Annihilator Method
Here we try to make r(x) becomes 0 by multiplying the non-homogeneous equation with xed
Dierential operator.
1. for r(x) = e
rx
, we mulitply the non-homogeneous equation with (Dr) to get (Dr)r(x) = 0
Example
De
rx
= re
rx
(D r)e
rx
= 0
2. for r(x) = x
k
e
rx
we multiply the non-homogeneous equation with (D r)
k+1
to get (D
r)
k+1
r(x) = 0
36
Example
D(e
rx
u) = e
rx
Du +re
rx
u = e
rx
(D +r)u
0 = D(e
rx
u) e
rx
Du re
rx
u
D
2
(e
rx
u) = e
rx
D
2
u + 2re
rx
Du +r
2
e
rx
u = e
rx
(D +r)
2
u
0 = D
2
(e
rx
u) e
rx
D
2
u 2re
rx
Du r
2
e
rx
u
3. for r(x) = cos x or sin x, we multiply the non-homogeneous equation with (D
2
+
2
) to
get (D
2
+
2
)r(x) = 0
Example
D(cos x) = sin x
D
2
(cos x) =
2
cos x
0 = D
2
(cos x) +
2
cos x
4. for r(x) = x
k
e
x
cos x or x
k
e
x
sin x, we multiply the non-homogeneous equation with
_
(D )
2
+
2
k+1
to get
_
(D )
2
+
2
k+1
r(x) = 0
Example
Find a general solution for the following non-homogeneous ODEs using Annihilator method,
y
3y
+ 4y = xe
2x
Answer
For homogeneous solution we use
(D
3
3D
2
+ 4)y(x) = (D + 1)(D 2)
2
y(x) = 0.
To annihilate r(x) = xe
2x
we multiply both side with (D 2)
2
, we get
(D 2)
2
(D
3
3D
2
+ 4)y(x) = (D 2)
2
(xe
2x
)
(D 2)
2
(D + 1)(D 2)
2
y(x) = 0
(D + 1)(D 2)
4
y(x) = 0
The general solution is
y(x) = c
1
e
x
+c
2
e
2x
+c
3
xe
2x
+c
4
x
2
e
2x
+c
5
x
3
e
2x
which comprise of
y
h
= c
1
e
x
+c
2
e
2x
+c
3
xe
2x
y
p
= c
4
x
2
e
2x
+c
5
x
3
e
2x
Using method of undetermined coecients, we get c
4
= 1/18 and c
5
= 1/18, so the general
solution is
y(x) = c
1
e
x
+c
2
e
2x
+c
3
xe
2x
1
18
x
2
e
2x
+
1
18
x
3
e
2x
37